java - Spring Build Problem - Can't Find Beans Schema -
When I run my project in Eclipse, everything works fine, but when I use the assembly:
I am using Maven2 and Spring 3 assembly, resulting jar throws the following exception:
My Beans file looks like this:
< Pre> & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Bem xmlns = "http://www.springframework.org/schema/beans" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schema location = "http: // Www .springframework.org / schema / beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> & Lt ;! - Beans here - & gt; & Lt; / Bean & gt;
This file is stored in src / main / resources
My pom.xml has the following dependencies for spring:
< Code> & lt; Dependency & gt; & Lt; Group & gt; Org.springframework & lt; / Group & gt; & Lt; ArtifactId & gt; Spring Reference & lt; / ArtifactId> & Lt; Version & gt; 3.0.3.RELEASE & lt; / Edition & gt; & Lt; Type & gt; Jar & lt; / Type & gt; & Lt; Scope & gt; Collection & lt; / Scope & gt; & Lt; / Dependencies & gt;
Why any thoughts are happening? how to fix?
Update:
Checking Google shows that Spring and Maven do not get very well with my pom.xml in the following, although no solution is forthcoming :
& lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven-assembly-plug-in & lt; / ArtifactId> & Lt; Version & gt; 2.2 Beta 5 & lt; / Edition & gt; & Lt; Configuration & gt; & Lt; Collections & gt; & Lt; Appearance & gt; & Lt; MainClass & gt; Org.robert.xclades.Main & lt; / MainClass & gt; & Lt; / Reveal & gt; & Lt; / Collection & gt; & Lt; DescriptorRefs & gt; & Lt; DescriptorRef & gt; Jarar-with-Dependency & lt; / DescriptorRef & gt; & Lt; / DescriptorRefs & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt;
I had the same problem. Helped in using the shadow plugin, but I had to add a transformer as the spring handler and schema files were told to contact.
Comments
Post a Comment