enable Reproducible Builds#21067
Conversation
| <properties> | ||
| <maven.compiler.source>11</maven.compiler.source> | ||
| <maven.compiler.target>11</maven.compiler.target> | ||
| <project.build.outputTimestamp>2025-04-09T17:14:21Z</project.build.outputTimestamp> |
There was a problem hiding this comment.
thanks for the PR. does it mean the build time stamp is hardcoded? do we need to update it regularly somehow?
There was a problem hiding this comment.
it is updated by versions:set when changing from SNAPSHOT to release and vice versa, or by maven-release-plugin
or you can also choose not to update but pick a purely conventional value
There was a problem hiding this comment.
I recommend to set it instead to the timestamp of the latest git commit which can be done on every build
<project.build.outputTimestamp>${git.commit.timestamp.datetime}</project.build.outputTimestamp>
using https://github.com/qoomon/maven-git-versioning-extension
There was a problem hiding this comment.
that's a classical reaction from many people, as it seems a legitimate idea
just know that by doing so, you are killing any cache, as every commit will change the hash of every output archive, even if nothing changed
changing timestamp only on version updates limits the times when the cache will be de-facto flushed for any output of a multi-module Maven build
|
when you've time, please review the CI test failure. |
see https://maven.apache.org/guides/mini/guide-reproducible-builds.html
I just fixed what was reported by
mvn artifact:check-buildplan -Prelease, which is the minimum to get noise reductionmore checks are needed, as documented with install then verify + artifact:compare to see if additional noise needs to be removed: just starting with the first step