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

Transformation fails for artifact 'com.google.javascript:closure-compiler:v20211201' #23

Closed
michael-spahn opened this issue Dec 9, 2021 · 3 comments

Comments

@michael-spahn
Copy link

Failed to transform closure-compiler-v20211201.jar (com.google.javascript:closure-compiler:v20211201) to match attributes {artifactType=jar, javaModule=true, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. Execution failed for ExtraModuleInfoTransform: [...]/closure-compiler-v20211201.jar. java.util.zip.ZipException: duplicate entry: META-INF/MANIFEST.MF duplicate entry: META-INF/MANIFEST.MF

I assume the published jar file is corrupt, but it's still working otherwise. So it would be nice if this plugin could be a bit more lenient with such issues.

@jjohannes
Copy link
Member

Thanks for reporting.

The Jar is corrupt, because the MANIFEST is not in the right place. As far as I know, it needs to be the first entry in the archive.

Because of that, the Manifest is not found and the plugin will create a new one. I pushed this fix to remove the "broken" Manifest completely from the transformed Jar:
ed393c4#diff-876d21a05386747b140e7fe2fe699385add20f6ac3589e3f281a436c1f53d25d

Instead, the transformed Jar will contain a new Manifest in the correct position with the automatic module name entry.

Is that what you would had in mind?

@jjohannes
Copy link
Member

Fix is published in version 0.10

@michael-spahn
Copy link
Author

@jjohannes Perfect, thanks!

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

2 participants