Spring 3 NamespaceHandler issues with Maven Shade plugin -


spring 3.1.1.release apache maven 3.0.3 , maven shade plugin 1.6.

using mvn shade plugin package artifact in uber-jar, including dependencies:

<plugin>     <groupid>org.apache.maven.plugins</groupid>     <artifactid>maven-shade-plugin</artifactid>     <version>1.6</version>     <executions>         <execution>         <phase>package</phase>         <goals>             <goal>shade</goal>         </goals>         <configuration>             <transformers>                 <transformer implementation="org.apache.maven.plugins.shade.resource.manifestresourcetransformer">                     <mainclass>com.myapplication</mainclass>                 </transformer>             </transformers>         </configuration>     </execution> </executions> 

seems package fine on execution complains of spring namespacehandler issues:

caused by: org.springframework.beans.factory.parsing.beandefinitionparsingexception: configuration problem: unable locate spring namespacehandler xml schema namespace [http://www.springframework.org/schema/util] offending resource: class path resource [spring/test-context.xml] 

this applies both util , p-namespaces, expect it's not limited these:

xmlns:util="http://www.springframework.org/schema/util" xmlns:p="http://www.springframework.org/schema/p" 

if rewrite property or list (util) longhand issues disappear.

try adding appendingtransformer config. example mentions being useful spring handlers.


Comments