I have a maven project “main" which depends on (screwy) maven projects “a", “b", and “c". When building “main", I'd like main.jar to contain all the files from a.jar, b.jar and c.jar, and install into the maven repository as if main had always contained everything and a, b and c had never existed. I also don't want in main.jar the POMs from a, b and c that exist below META-INF/maven/.
How would I go about this? I've tried: * Using an assembly file modeled after "jars-with-dependencies" with <exclude>META-INF/maven/sub/path</exclude> kinda works, but it creates a second JAR with jars-with-dependencies in the file name -- but I want this to replace the primary JAR of the project. * Setting maven-jar-plugin to a phase of none disables the JAR generation for the main JAR, but maven then fails to resolve the module because the it isn't looking for the JAR file with jars-with-dependencies in the file name. * I can get it to include a second, pretend pom (without dependencies) inside the JAR instead of the real pom (that has the dependencies) by putting the file below main/resources/META-INF/maven, so the installed/deployed JAR looks like it never had any dependencies. * I failed sneaking the dependencies-with-jar jar into the place of the main artifact using ‘mv’ — maven is too smart for that it seems. There must be a better way (I hope). Is there? Thanks, Johannes. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
