rfscholte closed pull request #8: [MSHADE-303] Suppress module-info.class
warning if the file if filtered
URL: https://github.com/apache/maven-shade-plugin/pull/8
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/src/main/java/org/apache/maven/plugins/shade/DefaultShader.java
b/src/main/java/org/apache/maven/plugins/shade/DefaultShader.java
index ee633f8..825ed68 100644
--- a/src/main/java/org/apache/maven/plugins/shade/DefaultShader.java
+++ b/src/main/java/org/apache/maven/plugins/shade/DefaultShader.java
@@ -169,6 +169,12 @@ private void shadeJars( ShadeRequest shadeRequest,
Set<String> resources, List<R
JarEntry entry = j.nextElement();
String name = entry.getName();
+
+ if ( entry.isDirectory() || isFiltered( jarFilters, name )
)
+ {
+ continue;
+ }
+
if ( "META-INF/INDEX.LIST".equals( name ) )
{
@@ -185,18 +191,15 @@ private void shadeJars( ShadeRequest shadeRequest,
Set<String> resources, List<R
continue;
}
- if ( !entry.isDirectory() && !isFiltered( jarFilters, name
) )
+ try
{
- try
- {
- shadeSingleJar( shadeRequest, resources,
transformers, remapper, jos, duplicates, jar,
- jarFile, entry, name );
- }
- catch ( Exception e )
- {
- throw new IOException( String.format( "Problem
shading JAR %s entry %s: %s", jar, name, e ),
- e );
- }
+ shadeSingleJar( shadeRequest, resources, transformers,
remapper, jos, duplicates, jar,
+ jarFile, entry, name );
+ }
+ catch ( Exception e )
+ {
+ throw new IOException( String.format( "Problem shading
JAR %s entry %s: %s", jar, name, e ),
+ e );
}
}
----------------------------------------------------------------
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