rmannibucau commented on a change in pull request #12: [MSHADE-307] defaults 
for transformers and filters
URL: https://github.com/apache/maven-shade-plugin/pull/12#discussion_r243187800
 
 

 ##########
 File path: src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java
 ##########
 @@ -822,6 +831,16 @@ private File resolveArtifactSources( Artifact artifact )
                 simpleFilters.add( new SimpleFilter( jars, 
filter.getIncludes(), filter.getExcludes() ) );
             }
         }
+        else if ( this.filters == null )
+        {
+            getLog().debug( "Adding META-INF/*.SF, META-INF/*.DSA and 
META-INF/*.RSA exclusions" );
+
+            Map<Artifact, ArtifactId> artifacts = getArtifactIds();
+            simpleFilters.add( new SimpleFilter(
+                    getMatchingJars( artifacts , new ArtifactId( "*:*" ) ),
+                    Collections.<String>emptySet(),
+                    new HashSet<>( Arrays.asList( "META-INF/*.SF", 
"META-INF/*.DSA", "META-INF/*.RSA" ) ) ) );
+        }
 
         filters.addAll( simpleFilters );
 
 Review comment:
   not sure i'm following, this is not this.filters but the list created in the 
method

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to