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

Karl Heinz Marbaise commented on MSHADE-292:
--------------------------------------------

First I don't see a difference between the outputs in Windows/Linux. Apart from 
that if you change your exclude rules like this:
{code:xml}
<relocations>
  <relocation>
    <pattern>com</pattern>
    <shadedPattern>bug.com</shadedPattern>
    <excludes>
      <exclude>com.orange*</exclude>
      <exclude>com.banana*</exclude>
    </excludes>
  </relocation>
</relocations>
{code}
See the difference in {{<exclude>com.orange.*</exclude>}} and 
{{<exclude>com.orange*</exclude>}}. The first one excludes all sub packages of 
{{com.orange}} where as {{com.orange*}} excludes the sub packages including all 
classes in the package {{com.orange}} itself.

I think for this the documentation can be improved to make it more clear where 
the difference is....

> 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: Major
>         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