Repository navigation
[OPENJPA-3088] Make the build reproducible - #338
Merged
Merged
Conversation
Declare project.build.outputTimestamp in the root pom.xml, set to the time of the 4.2.0 release; maven-release-plugin sets it to the release time from now on. Two builds of the same commit differed in three places: - The jar manifests had Implementation-Build and Implementation-Date with the time of the build, from buildnumber-maven-plugin and in the locale of the machine. Implementation-Date is now the output timestamp, Implementation-Build and the plugin are removed. - The manual had a "Last updated" footer with the time of the checkout on every HTML page, the build time in the PDF and the year of the build in the copyright line. They now come from the output timestamp. - The assemblies stored the file permissions of the working tree, so the source release changed with the umask. They now store 0644 for files and 0755 for directories. With these changes all 343 jars and archives of two release builds with docs are identical (different directory, time zone and umask), and artifact:compare reports no difference. RELEASING.md describes how to check a build and a release.
cristof
approved these changes
Dec 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OPENJPA-3088: makes the build reproducible, so the release artifacts can be rebuilt from the tag and the source release in the Maven staging repository and in ATR is the same file.
Two release builds of the same commit (
-Dbuilddocs -DperformRelease -Papache-release) differed in three places:Implementation-BuildandImplementation-Dateheld the time of the build, frombuildnumber-maven-pluginand in the locale of the machine.Implementation-Dateis nowproject.build.outputTimestamp;Implementation-Buildand the plugin are removed. Nothing in the code reads either entry.openjpa-parent-x.y.z-source-release.zipchanged with the umask. They now store0644for files and0755for directories. The two shell scripts in the source release (dev-tools/atr/check-release.sh,openjpa-integration/tck/run-tck32.sh) therefore are not executable in the zip; the binary archive has no scripts.project.build.outputTimestampis declared in the rootpom.xml, set to the 4.2.0 release time;release:preparesets it from now on.Verification:
artifact:compareagainst an installed first build reports 82 matching files and no difference.The builds ran with
-DskipTestson JDK 25. Under a umask stricter than 022 the jars (not the assemblies) still differ, asmaven-jar-pluginstores the permissions of the build tree;RELEASING.mdsays so in the new "Reproducible builds" section, which also describes how to check a build and a release.