Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate entries in clover jar files #119

Open
aikfiend opened this issue Jan 11, 2020 · 0 comments
Open

Duplicate entries in clover jar files #119

aikfiend opened this issue Jan 11, 2020 · 0 comments

Comments

@aikfiend
Copy link

$ jar -tf clover-4.4.1.jar | sort -n | uniq -c | grep -v '\s\+1'
   3 META-INF/LICENSE
   5 META-INF/LICENSE.txt
   3 META-INF/NOTICE
   4 META-INF/NOTICE.txt
   2 META-INF/maven/log4j/log4j/pom.properties
   2 META-INF/maven/log4j/log4j/pom.xml
   2 cloverlib.xml
$ tar -tf clover-idea-4.4.1.jar | sort -n | uniq -c | grep -v '\s\+1'
   2 META-INF/LICENSE.txt

At least index can not be build:

$ jar -i ../clover-idea-4.4.1.jar 
java.util.zip.ZipException: duplicate entry: META-INF/LICENSE.txt
	at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:232)
	at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:109)
	at sun.tools.jar.Main.update(Main.java:635)
	at sun.tools.jar.Main.dumpIndex(Main.java:1132)
	at sun.tools.jar.Main.genIndex(Main.java:1209)
	at sun.tools.jar.Main.run(Main.java:317)
	at sun.tools.jar.Main.main(Main.java:1288)

And in case when I want to put jars to my Nexus repo to avoid resolving of dependency conflicts if any, and sign them with my plugin I will got exception:

INFO  [qtp836514715-48633] com.companyname.nexus.plugin.signing.DefaultSigningRepository - Signing central:/org/openclover/clover/4.4.1/clover-4.4.1.jar (file)
INFO  [Thread-28830] com.companyname.nexus.plugin.signing.DefaultSigningRepository - jarsigner: unable to sign jar: java.util.zip.ZipException: duplicate entry: META-INF/LICENSE.txt

@mparfianowicz wrote:

OpenClover uses several third party libraries (like Apache Commons or Fastutil). Therefore classes from these libraries along with LICENSE files are packed into clover.jar.
Entries are duplicate but zip format allows it. However, it would be good to rename these files to avoid duplicates. Feel free to report this in our issue tracker on GitHub.

As I see the text of licenses stored in separate files:

$ tar -tf clover-4.4.1.jar | grep 'licenses/..*'
licenses/ANNOTATIONS-13.0-LICENSE.TXT
licenses/ANT-1.5.2-LICENSE.TXT
licenses/ANTLR-2.7.7-LICENSE.TXT
licenses/ANTLR-JAVA-GRAMMAR-3.0-LICENSE.TXT
licenses/CAJO-1.117-LICENSE.TXT
licenses/COMMONS-CODEC-1.9-LICENSE.TXT
licenses/COMMONS-COLLECTIONS-3.2.1-LICENSE.TXT
licenses/COMMONS-LANG3-3.3.2-LICENSE.TXT
licenses/FASTUTIL-4.4.3-LICENSE.TXT
licenses/GROOVY-1.7.0-LICENSE.TXT
licenses/GSON-1.3-LICENSE.TXT
licenses/GUAVA-18.0-LICENSE.TXT
licenses/ITEXT-2.0.1-LICENSE.TXT
licenses/JCOMMON-1.0.23-LICENSE.TXT
licenses/JDOM-1.0-LICENSE.TXT
licenses/JFREECHART-1.0.19-LICENSE.TXT
licenses/JIT-1.1.2-LICENSE.TXT
licenses/JQUERY-1.8.3-LICENSE.TXT
licenses/JSON-LICENSE.TXT
licenses/LOG4J-1.2.17-LICENSE.TXT
licenses/VELOCITY-1.7-LICENSE.TXT

So please provide clover jar files without duplicate entries in them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant