Eugene Kirpichov created MSHADE-273:
---------------------------------------

             Summary: Shading of paths starting with / ignores excludes
                 Key: MSHADE-273
                 URL: https://issues.apache.org/jira/browse/MSHADE-273
             Project: Maven Shade Plugin
          Issue Type: Bug
    Affects Versions: 3.1.0
            Reporter: Eugene Kirpichov


This commit addressed rewriting of resource paths that start with a slash, e.g. 
/org/my/company/resource.txt : 
https://github.com/apache/maven-plugins/commit/c438ed843883b06cd72a5d3086d01ef534e39ebe

 

However, this rewriting ignores excludes.

It accounts for a leading slash when determining whether a path should be 
relocated: 
[https://github.com/apache/maven-plugins/blob/maven-shade-plugin-3.0.0/src/main/java/org/apache/maven/plugins/shade/relocation/SimpleRelocator.java#L186]

And replaces the first occurrence anywhere within it (so also ignores leading 
slash): 
[https://github.com/apache/maven-plugins/blob/maven-shade-plugin-3.0.0/src/main/java/org/apache/maven/plugins/shade/relocation/SimpleRelocator.java#L202]

However it applies excludes only at the exact beginning of the path: 
[https://github.com/apache/maven-plugins/blob/maven-shade-plugin-3.0.0/src/main/java/org/apache/maven/plugins/shade/relocation/SimpleRelocator.java#L158]

 

So /org/my/company/resource.txt gets relocated even if org.my.company.** is in 
the excludes list.



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

Reply via email to