[ 
https://jira.codehaus.org/browse/MSHADE-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=272179#comment-272179
 ] 

Robert Burrell Donkin commented on MSHADE-94:
---------------------------------------------

I think this problem exists. I'm creating some tests to verify and (if so) a 
patch to fix.

> NullPointerException on empty relocation pattern (default package)
> ------------------------------------------------------------------
>
>                 Key: MSHADE-94
>                 URL: https://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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to