Reamer commented on pull request #105:
URL: 
https://github.com/apache/maven-shade-plugin/pull/105#issuecomment-882517785


   Hi @kriegaex 
   thanks for improving the shading of the source code.
   I have tested your version and found an error.
   
   I have corrected this error with the following change.
   
https://github.com/apache/maven-shade-plugin/pull/100/files#diff-293098625e786122aa8c8eff5e7910b351fe9e777c90e5bdb6dcf2942efa66a6L123-L125
   ```patch
                   // Excludes should be subpackages of the global pattern
   -                else if ( exclude.startsWith( pathPattern ) )
   +                if ( exclude.startsWith( pathPattern ) )
                   {
   ```
   
   To test, you need to apply the following lines.
   ```patch
    
            SimpleRelocator relocatorPackage = new SimpleRelocator( "io", 
"shaded.io", null, null);
            SimpleRelocator asmPackage = new SimpleRelocator( 
"org.objectweb.asm", "aj.org.objectweb.asm", null, null);
   +        SimpleRelocator relocatorExlucdeSubPackage = new SimpleRelocator( 
"foo", "shaded.foo", null ,  Arrays.asList( "foo.bar"));
            assertEquals(
              relocatedFile,
   -          asmPackage.applyToSourceContent(
   -            relocatorPackage.applyToSourceContent(
   -              relocator.applyToSourceContent( sourceFile )
   +          relocatorExlucdeSubPackage.applyToSourceContent(
   +            asmPackage.applyToSourceContent(
   +              relocatorPackage.applyToSourceContent(
   +                relocator.applyToSourceContent( sourceFile )
   +              )
                )
              )
            );
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to