[ 
https://issues.apache.org/jira/browse/MSHADE-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16586305#comment-16586305
 ] 

Artem Yak commented on MSHADE-292:
----------------------------------

 
{noformat}
<relocations>
<relocation>
<pattern>com</pattern>
<shadedPattern>bug.com</shadedPattern>
<excludes>
<exclude>com.orange*</exclude>
<exclude>com.banana*</exclude>
</excludes>
</relocation>
</relocations>
{noformat}
for win (works as expected) :
{code:java}
com/
com/banana/
com/banana/T.class
com/orange/
com/orange/framework/
com/orange/framework/T.class
com/orange/T.class
bug/com/
bug/com/google/
bug/com/google/gson/
{code}
 for ubuntu (exclusion does nothing) :

 
{code:java}
bug/com/
bug/com/orange/
bug/com/orange/T.class
bug/com/orange/framework/
bug/com/orange/framework/T.class
bug/com/banana/
bug/com/banana/T.class
bug/com/google/
bug/com/google/gson/
bug/com/google/gson/annotations/
{code}
 

  

> Relocation exclude works differently on Win and Unix platforms
> --------------------------------------------------------------
>
>                 Key: MSHADE-292
>                 URL: https://issues.apache.org/jira/browse/MSHADE-292
>             Project: Maven Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 3.1.1
>            Reporter: Artem Yak
>            Priority: Minor
>         Attachments: defect.tar.gz
>
>
> Un-tar attached project.
> execute on Windows :  
> {code:java}
> mvn clean package -X && unzip -l target/BUG-0.1-SNAPSHOT.jar | grep com -m15
> {code}
> output is: 
> {code:java}
> 0 2018-06-25 15:36    com/
> 0 2018-06-25 15:36    com/banana/
> 250 2018-06-25 15:36  com/banana/T.class
> 0 2018-06-25 15:36    com/orange/
> 0 2018-06-25 15:36    com/orange/framework/
> 270 2018-06-25 15:36  com/orange/framework/T.class
> 250 2018-06-25 15:36  com/orange/T.class
> 0 2018-06-25 15:36    META-INF/maven/com.orange.qa/
> 0 2018-06-25 15:36    META-INF/maven/com.orange.qa/BUG/
> 2166 2018-06-25 18:15 META-INF/maven/com.orange.qa/BUG/pom.xml
> 114 2018-06-25 15:36  META-INF/maven/com.orange.qa/BUG/pom.properties
> 0 2018-06-25 15:36    bug/com/
> 0 2018-06-25 15:36    bug/com/google/
> 0 2018-06-25 15:36    bug/com/google/gson/
> 0 2018-06-25 15:36    bug/com/google/gson/annotations/
> {code}
>  execute on Unix (CentOS or MacOS) : 
> {code:java}
> mvn clean package -X && unzip -l target/BUG-0.1-SNAPSHOT.jar | grep com 
> -m15{code}
> output is 
> {code:java}
>         0  06-25-2018 18:35   bug/com/
>         0  06-25-2018 18:35   bug/com/orange/
>         0  06-25-2018 18:35   bug/com/orange/framework/
>       278  06-25-2018 18:35   bug/com/orange/framework/T.class
>         0  06-25-2018 18:35   com/
>         0  06-25-2018 18:35   com/orange/
>       250  06-25-2018 18:35   com/orange/T.class
>         0  06-25-2018 18:35   com/banana/
>       250  06-25-2018 18:35   com/banana/T.class
>         0  06-25-2018 18:35   META-INF/maven/com.orange.qa/
>         0  06-25-2018 18:35   META-INF/maven/com.orange.qa/BUG/
>      2166  06-25-2018 18:15   META-INF/maven/com.orange.qa/BUG/pom.xml
>       109  06-25-2018 18:35   META-INF/maven/com.orange.qa/BUG/pom.properties
>         0  06-25-2018 18:35   bug/com/google/
>         0  06-25-2018 18:35   bug/com/google/gson/
> {code}
> *Actual result:*
>   Relocation->exclude didn't work as expected on unix
> *Expected results* is on Windows:
> com/orange/framework/T must be excluded from bug.com relocations 
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to