I'm using the Maven 2 assembly plug-in to build a jar-with-dependencies and make an executable JAR file. My assembly includes Spring, and the CXF library.
CXF includes copies of META-INF files spring.schemas and spring.handlers which end up clobbering the similar files from the spring-2.5.4 jar.
By hand, I can update those two files within the jar-with-dependencies.
What I'm looking for is some way in the Maven POM to direct the assembly plug-in to get the correct version of those two files.
The assembly plug-in documentation talks about file filtering, but doesn't seem to have configuration for or parameters, without going to the trouble of creating a custom assembly descriptor.
Is making a custom assembly descriptor my only hope in this instance?
Best Answer
For some reason the solution that Mojo and the others are suggesting still doesn't work for me. I've created my custom
spring.handlers
andspring.schemas
files and put them undersrc/main/resources/META-INF
. However, when using theunpackOptions
my files are not included as well. When I don't use theunpackOptions
my files aren't the ones in the jar.What I ended up doing is to reference the files directly. This finally put my files into the JAR.