-
Notifications
You must be signed in to change notification settings - Fork 49
fix: Reproducible Builds not working when using modular jar #205
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
fix: Reproducible Builds not working when using modular jar #205
Conversation
44225eb
to
03cb92e
Compare
src/main/java/org/codehaus/plexus/archiver/jar/JarToolModularJarArchiver.java
Show resolved
Hide resolved
03cb92e
to
9ec768e
Compare
dc382e3
to
2f298e0
Compare
Anyone that have some time to review this? |
Hi, Thanks for picking this up and the great work. I took a quick look at the changes and I have a couple of questions to makes sure I got everything right. The first thing is that it looks like there are multiple changes in this MR:
Is my understanding correct? Also if those changes are in different commits (if that makes sense) would ease the review (at least for me). |
Thank you for your review @plamentotev, your understanding is correct, just a couple of comments:
I will try to reduce the refactoring to the minimum to ease the review.
Actually it's required for the build to be reproducible, it's "interconnected" with the jar tool, essentially the jar tool will have a new
As mentioned, the change to make the build reproducible is done by the new Actual scenario:
New scenario:
When I said it's interconnected is because the output should be reproducible on both cases, assume that you run a build with JDK 17.0.2, Plexus Archiver will "fallback" (ii) to rewrite the JAR file with the correct timestamp of all entries (doesn't have the You may ask why not leave only the fallback mechanism that should work in any case? the reason is that there is already a post create archive step that already run the jar command, the fallback is like a post-post create archive step making the build unnecessarily slower, so if we are using a JDK with the provided option we can use that instead. Making different commits could be possible but this change is logically more consistent in a single commit (due to the interconnected nature). |
2f298e0
to
7a6b0f0
Compare
Signed-off-by: Jorge Solórzano <[email protected]>
7a6b0f0
to
3d0bebf
Compare
wow, what a great job in code and in explanations: thanks a lot |
Fixes #164