You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "J@ck (JIRA)" <ji...@codehaus.org> on 2011/02/12 08:42:22 UTC
[jira] Created: (MSHADE-94) NullPointerException on empty
relocation pattern (default package)
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
[jira] Commented: (MSHADE-94) NullPointerException on empty
relocation pattern (default package)
Posted by "Robert Burrell Donkin (JIRA)" <ji...@codehaus.org>.
[ 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
[jira] Updated: (MSHADE-94) NullPointerException on empty
relocation pattern (default package)
Posted by "Robert Burrell Donkin (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MSHADE-94?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Burrell Donkin updated MSHADE-94:
----------------------------------------
Attachment: maven-shade-plugin-SimpleRelocator-NullPointerException.patch
This patch includes integration and unit test for the problem described. This is narrow patch addressing only the reported NullPointerException.
For more sophisticated handling of default packages, IMHO extra functionality is needed.
> 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
> Attachments: maven-shade-plugin-SimpleRelocator-NullPointerException.patch
>
>
> 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
[jira] (MSHADE-94) NullPointerException on empty relocation pattern
(default package)
Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MSHADE-94?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Lamy closed MSHADE-94.
------------------------------
Resolution: Fixed
Fix Version/s: 1.6
Assignee: Olivier Lamy
fixed r1300099.
Thanks!
> 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
> Assignee: Olivier Lamy
> Fix For: 1.6
>
> Attachments: maven-shade-plugin-SimpleRelocator-NullPointerException.patch
>
>
> 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, 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