-
Notifications
You must be signed in to change notification settings - Fork 48
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
AbstractZipArchiver no longer respects recompressAddedZips #53
Comments
Incidentally this bug manifests itself in |
Hi,
Thank you for the detailed explanation. While this issue should be
solved(I'll try to fix it ASAP), if you want the fat jar to contain only
uncompresses entried maybe you could just set the whole jar compression
level to STORE or you want to compress the non-jar entries?
…On Nov 29, 2016 07:06, "Phil Webb" ***@***.***> wrote:
Incidentally this bug manifests itself in maven-assembly-plugin v3.0 and
is unfortunately quite critical with the creation of Spring Boot fat jars
which rely on uncompressed entries.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#53 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMLobcoo9UFxKwQB5mcn3biNNtUw8Q_Lks5rC7LOgaJpZM4K-kPK>
.
|
@plamentotev Unfortunately I don't think the This specific requirement allows us to generate Spring Boot fat jars which are a usually a mix of |
@philwebb It provides such option in a bit obscure way. You could set arbitrary option of the archiver using
It's a bit of a dirty hack as you want any non-zip files to be compresses but I hope it could help you until a proper fix is released. |
@plamentotev Excellent, thanks for the info! |
Looks like that some changes in Apache Commons Compress are required in order to fix this issue. I've created an issue about them - https://issues.apache.org/jira/browse/COMPRESS-375 |
@plamentotev the commons-compress issue has been solved, awesome! Do you have a timeline for a fix here? I am asking because it will have to be incorporated in the next |
@snicoll the fix is almost ready. It just needs a bit of polishing such as more test cases, javadocs, etc. Unfortunately I can't tell you when it could be merged into master as this depends on when the Apache Commons Compress 1.13 will be released. My role in the Plexus Archiver project is not exactly known even to me 😄. Without going into too much details - I also don't know when a version of Plexus Archiver with the fix could be released. But I did ask about this issue on the Maven Developers list so once I receive an answer I'll let you know. p.s. If you want you could take a look at the fix - I'm working on it on this branch. It is working but still work in progress. |
Hi guys, as soon as anyone of you has a decent PR without any regressions, I can merge it. |
@michael-o thanks. I've created a PR. I don't think it's ready to be merged yet as it depends on not yet released version of Apache Commons Compress. |
Commons Compress has been upgraded to 1.14, please revalidate this issue. |
It is still needed because the root cause is in Plexus Archiver. We needed newer version of Commons Compress to properly fix it. #55 fixes this issue. It's now re-based and ready to be merged. |
@philwebb I don't think you've created an issue to make sure the assembly plugin upgrades to plexus archiver 3.5 so I've created MASSEMBLY-854 |
@michael-o @plamentotev the roadmap is complete for 3.5 and this blocks the release of Maven Assembly plugin 3.0.1. Is there a way to get going with this? Thanks! |
I hoped that Commons Compress 1.15 will be released to be incorporated here. Will not happen I guess this months. I guess I will release without it. |
@michael-o for the record I've tested the whole chain locally (including the current state of maven assembly plugin using the current state of plexus archiver) and it fixes the original issue reported here. Thanks! |
When setting
AbstractZipArchiver.recompressAddedZips
tofalse
already compressed entries should be added using theZipEntry.STORED
method. Unfortunately this doesn't appear to be the case.The following can be added to
ZipArchiverTest
to demonstrate the issue.The root cause appears to be due to changes introduced in 1ddd40b which push the header detection logic down to
wrappedRecompressor
.Unfortunately this doesn't work because
ConcurrentJarCreator.addArchiveEntry
stores themode
at the time that then entry was added and ignores any subsequent updates. You can see this by adding a breakpoint in the constructor ofZipArchiveEntryRequest
and another inZipArchiveEntryRequest.getMethod()
.The text was updated successfully, but these errors were encountered: