Affects Version/s: 1.7
Fix Version/s: 2.1
Number of attachments :
I am trying to follow POM Best Practices chapter 3.6.1 at http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html and group some dependencies in an aggregator POM with packaging == "pom".
For non-Maven users, I would also like to create an uber JAR with the dependencies added and so I added the maven-shade-plugin.
Now because the POM packaging is "pom", no JAR artifact is generated and the shade goal fails with a NullPointerException because it expected one.
As a workaround I could simply switch the packaging to "jar", but this is a bit unfortunate for a number of reasons:
(1) Why create a JAR artifact first which contains nothing? It bloats the process and generates another warning about an empty JAR.
(2) I want Maven users to depend on the aggregated POM with type "pom", so they get its transitive dependencies, but I don't want them to depend on it with type "jar", which would add the uber JAR to their class path. The uber JAR is really only a courtesy for non-Maven users.