[
https://issues.apache.org/jira/browse/MSHADE-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17035972#comment-17035972
]
Piotr Zygielo edited comment on MSHADE-306 at 2/13/20 8:47 AM:
---------------------------------------------------------------
On just released 3.2.2 - How can I not have warning for
{code:bash}
[WARNING] [... jars listed..] define 1 overlapping resources:
[WARNING] - META-INF/MANIFEST.MF
[WARNING] maven-shade-plugin has detected that some class files are
[WARNING] present in two or more JARs. When this happens, only one
[WARNING] single version of the class is copied to the uber jar.
[WARNING] Usually this is not harmful and you can skip these warnings,
[WARNING] otherwise try to manually exclude artifacts based on
[WARNING] mvn dependency:tree -Ddetail=true and the above output.
[WARNING] See [http://maven.apache.org/plugins/maven-shade-plugin/]
{code}
-Probably
[ManifestResourceTransformer|http://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#ManifestResourceTransformer]
to help.-
-1. I'd expect that MANIFEST.MFs are present in several jars. Does is mean that
warning will be issued for almost every case of plugin usage?-
-I see in
[DefaultShaderTest.java#L123|https://github.com/apache/maven-shade-plugin/blob/5894a4d7ca4e34ed85a310f57e81fa2812e4f3af/src/test/java/org/apache/maven/plugins/shade/DefaultShaderTest.java#L123]
exactly that is tested. Is that really as intended?-
Hmm... Now I see - "so even this should be logged". So effectively - using
shade plugin - one will almost always end up with warning to be fixed.
2. I'd like the message to at least include 'or resources' in 'has detected
that some class files'.
—
I'm sorry for the noise (just confused by new warning appearing in log with
plugin upgrade).
was (Author: pzygielo):
-On just released 3.2.2 - How can I not have warning for-
{code:bash}
[WARNING] [... jars listed..] define 1 overlapping resources:
[WARNING] - META-INF/MANIFEST.MF
[WARNING] maven-shade-plugin has detected that some class files are
[WARNING] present in two or more JARs. When this happens, only one
[WARNING] single version of the class is copied to the uber jar.
[WARNING] Usually this is not harmful and you can skip these warnings,
[WARNING] otherwise try to manually exclude artifacts based on
[WARNING] mvn dependency:tree -Ddetail=true and the above output.
[WARNING] See [http://maven.apache.org/plugins/maven-shade-plugin/]
{code}
Probably
[ManifestResourceTransformer|http://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#ManifestResourceTransformer]
to help.
-1. I'd expect that MANIFEST.MFs are present in several jars. Does is mean
that warning will be issued for almost every case of plugin usage?-
-I see in
[DefaultShaderTest.java#L123|https://github.com/apache/maven-shade-plugin/blob/5894a4d7ca4e34ed85a310f57e81fa2812e4f3af/src/test/java/org/apache/maven/plugins/shade/DefaultShaderTest.java#L123]
exactly that is tested. Is that really as intended?-
Hmm... Now I see - "so even this should be logged". So effectively - using
shade plugin - one will almost always end up with warning to be fixed.
2. I'd like the message to at least include 'or resources' in 'has detected
that some class files'.
---
I'm sorry for the noise (just confused by new warning appearing in log with
plugin upgrade).
> Log all duplicates, not only classes
> ------------------------------------
>
> Key: MSHADE-306
> URL: https://issues.apache.org/jira/browse/MSHADE-306
> Project: Maven Shade Plugin
> Issue Type: New Feature
> Reporter: Romain Manni-Bucau
> Assignee: Romain Manni-Bucau
> Priority: Major
> Fix For: 3.2.2
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Issue to silently swallow duplicated resources is that you don't see, even in
> debug, that there is a choice done by the plugin. This breaks the final app
> in a lot of cases (all SPI-like cases, OSGi for the MANIFEST.MF etc...). So
> let's log it as for classes.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)