You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2023/05/29 21:02:00 UTC

[jira] [Created] (MSHADE-445) Be smarter about non .class files

Elliotte Rusty Harold created MSHADE-445:
--------------------------------------------

             Summary: Be smarter about non .class files 
                 Key: MSHADE-445
                 URL: https://issues.apache.org/jira/browse/MSHADE-445
             Project: Maven Shade Plugin
          Issue Type: Improvement
            Reporter: Elliotte Rusty Harold


Building maven surefire plugin shows these warnings:

{{[WARNING] commons-compress-1.21.jar, commons-io-2.11.0.jar, commons-lang3-3.12.0.jar define 2 overlapping resources: 
[WARNING]   - META-INF/LICENSE.txt
[WARNING]   - META-INF/NOTICE.txt
[WARNING] maven-shared-utils-3.3.4.jar, surefire-shared-utils-3.1.2-SNAPSHOT.jar define 3 overlapping resources: 
[WARNING]   - META-INF/DEPENDENCIES
[WARNING]   - META-INF/LICENSE
[WARNING]   - META-INF/NOTICE
[WARNING] commons-compress-1.21.jar, commons-io-2.11.0.jar, commons-lang3-3.12.0.jar, maven-shared-utils-3.3.4.jar, surefire-shared-utils-3.1.2-SNAPSHOT.jar define 1 overlapping resource: 
[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 https://maven.apache.org/plugins/maven-shade-plugin/}}

This got me to thinking:

1. For LICENSES and NOTICES the files are likely byte-per-byte identical. Don't warn in that case.
2. DEPENDENCIES and MANIFEST.MF should perhaps be rewritten and/or merged as common special cases, rather than simply copied as is.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)