-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
Adjust fat jar central directory to account for launch script #22336
Comments
An issue has been created in the Apache Commons Compress project to add a feature that would make the fix in Spring Boot very simple. Blocking this issue for now, until we get a response on the Commons Compress issue. |
A pull request has been created to implement the requested feature in Apache Commons Compress. |
The changes have been merged and are available in snapshots. We're now waiting for the release of 1.21. |
Including a launch script in a Spring Boot far jar using the Maven and Gradle build plugins results in a jar file that is not well formed and is not compatible with some tools (as noted in the Maven plugin documentation).
Apache Commons Compress library utilities like
ZipFile.getEntries()
fail to find the central directory in such a jar file and return an empty set, which causes issues with other Boot tooling.Other tools will not recognize the file as a valid jar or zip (notably Go-based programs like
pack
):The Linux
zip
utility has an option that can be used to fix up the zip directory data to account for the extra launch script data at the beginning of the file:It would be nice if the build plugins could fix up the jar file in a similar way.
The text was updated successfully, but these errors were encountered: