You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Matt Benson (JIRA)" <ji...@codehaus.org> on 2014/04/02 21:27:59 UTC
[jira] (MSHADE-78) Possibility to rename classes, e.g. to define a
name prefix, to avoid classes with same names
[ https://jira.codehaus.org/browse/MSHADE-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=344055#comment-344055 ]
Matt Benson commented on MSHADE-78:
-----------------------------------
Note that you _can_ rename classes, if a bit clumsily, by specifying e.g.:
{code}
<relocation>
<pattern>com.example.foo.</pattern>
<shadedPattern>com.uber._foo.__</shadedPattern>
</relocation>
{code}
I do agree that there should be some mechanism for smarter relocations. It's very likely that someone well-versed in the art of Maven plugin configuration customization could figure out a way to direct the {{ShadeMojo}} to, e.g., use a custom {{Relocator}} implementation specified by the user.
> Possibility to rename classes, e.g. to define a name prefix, to avoid classes with same names
> ---------------------------------------------------------------------------------------------
>
> Key: MSHADE-78
> URL: https://jira.codehaus.org/browse/MSHADE-78
> Project: Maven Shade Plugin
> Issue Type: New Feature
> Reporter: Tim Ducheyne
> Priority: Minor
>
> It would be nice if there was an option to, next to relocating the classes, also rename them, for example by giving them a certain prefix.
> Suppose you bundle a third-party lib in your own lib. Suppose a project uses your lib and also uses the third-party lib. If you then start looking up classes in your IDE, 2 classes with the same name (but different package) will pop-up.
> Renaming them would avoid this.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)