Skip to content

enable Reproducible Builds #21067

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

hboutemy
Copy link

@hboutemy hboutemy commented Apr 9, 2025

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 reduction

more 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

@@ -1212,6 +1212,7 @@
<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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR. does it mean the build time stamp is hardcoded? do we need to update it regularly somehow?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@wing328
Copy link
Member

wing328 commented Apr 10, 2025

when you've time, please review the CI test failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants