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

Shading of multi-release jars produces an invalid manifest #76

Open
jeremyk-91 opened this issue Dec 7, 2020 · 0 comments
Open

Shading of multi-release jars produces an invalid manifest #76

jeremyk-91 opened this issue Dec 7, 2020 · 0 comments

Comments

@jeremyk-91
Copy link
Contributor

jeremyk-91 commented Dec 7, 2020

See internal atlasdb proxy client, issue 1333: builds there are failing on being unable to read the manifest.

The integration spec also looks like it produces an invalid manifest: if I add these lines to the bottom of the test

        // What is of interest here is that this does not throw an exception
        shadowJarFile().getManifest().getAttributes("Multi-Release")

an exception on reading the manifest is thrown.

I believe the problem here is that ManifestResourceAppender simply adds key-value pairs to the end of a file. So you end up with a problem where if a manifest already ends with an empty line (which looks like something internal to the shadow plugin), then appending ends up getting

Manifest-Version: 1.0

Multi-Release: true

which is not a valid format; it should really be

Manifest-Version: 1.0
Multi-Release: true

I'd write a PR, but have struggled with dependencies/possible classpath issues for >2 hours...
Turns out 2.5 hours was the magic mark!

@jeremyk-91 jeremyk-91 changed the title Handling of multi-release jars produces an invalid manifest Shading of multi-release jars produces an invalid manifest Dec 7, 2020
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