jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Maven 2.x Shade Plugin
  • Maven 2.x Shade Plugin
  • MSHADE-122

NPE if packaging == "pom"

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.7
  • Fix Version/s: 2.1
  • Labels:
    None
  • Number of attachments :
    0

Description

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.

Issue Links

duplicates

Bug - A problem which impairs or prevents the functions of the product. MSHADE-127 NPE if shade plugin runs in artifact with packaging pom

  • Blocker - Blocks development and/or testing work, production could not run
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Kristian Rosenvold added a comment - 14/May/13 3:00 PM

Fixed in r1482543

Show
Kristian Rosenvold added a comment - 14/May/13 3:00 PM Fixed in r1482543

People

  • Assignee:
    Kristian Rosenvold
    Reporter:
    Christian Schlichtherle
Vote (0)
Watch (2)

Dates

  • Created:
    13/Jun/12 5:19 AM
    Updated:
    Tuesday 3:00 PM
    Resolved:
    Tuesday 3:00 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.