You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Christian Schlichtherle (JIRA)" <ji...@codehaus.org> on 2012/06/13 12:19:21 UTC

[jira] (MSHADE-122) NPE if packaging == "pom"

Christian Schlichtherle created MSHADE-122:
----------------------------------------------

             Summary: NPE if packaging == "pom"
                 Key: MSHADE-122
                 URL: https://jira.codehaus.org/browse/MSHADE-122
             Project: Maven 2.x Shade Plugin
          Issue Type: Bug
    Affects Versions: 1.7
            Reporter: Christian Schlichtherle
            Priority: Minor


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira