NullPointerException on empty relocation pattern (default package)
------------------------------------------------------------------

                 Key: MSHADE-94
                 URL: http://jira.codehaus.org/browse/MSHADE-94
             Project: Maven 2.x Shade Plugin
          Issue Type: Bug
    Affects Versions: 1.4
            Reporter: J@ck


I need a few classes from a 3rd party jar that are declared in the default 
package. Since usage of the default package should be avoided, I try to 
relocate the classes to a named package:

{code:title=pom.xml}
...
  <relocation>
    <pattern />
    <shadedPattern>org.example.foo.bar</shadedPattern>
  </relocation>
{code}

The Shade Plugin crashes with a NPE:
{code:title=Stacktrace}
Caused by: org.apache.maven.plugin.MojoExecutionException: Error creating 
shaded jar: null
        at 
org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:503)
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
Caused by: java.lang.NullPointerException
        at 
org.apache.maven.plugins.shade.relocation.SimpleRelocator.<init>(SimpleRelocator.java:52)
        at 
org.apache.maven.plugins.shade.mojo.ShadeMojo.getRelocators(ShadeMojo.java:616)
        at 
org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:440)
{code}


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to