Maven dependencies jar not usable


I am basically running into the following documented issue. I am using the maven assembly plugin to generate a jar file that includes my dependencies so that my project can be run from a single file. However, the jar file is not being built properly it seems. The below was an attempt to try and work around the issue. Has anyone run into this before?

So I am trying to build a jar file that includes all of my dependencies packed and my project artifact jar unpacked.

I tried doing something to the effect of


However, the resulting jar file includes only the META-INF directory… When I say to unpack, but unpack only my includes, does that mean the original jar files aren’t included?

When I run the jar I receive the following

Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace
Offending resource: class path resource [applicationContext.xml]

at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(
at org.springframework.beans.factory.parsing.ReaderContext.error(
at org.springframework.beans.factory.parsing.ReaderContext.error(
at org.springframework.beans.fac



Had you take a look at onejar-maven-plugin. It does what you want in a straightforward way.

Leave a Reply

Your email address will not be published. Required fields are marked *