-
Notifications
You must be signed in to change notification settings - Fork 16
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
Support for Maven reproducible builds #104
Conversation
@@ -100,6 +100,7 @@ public void afterSessionStart(MavenSession session) throws MavenExecutionExcepti | |||
hash = head.abbreviate(ABBREV_LENGTH).name(); | |||
try (RevWalk walk = new RevWalk(repo)) { | |||
RevCommit headC = walk.parseCommit(head); | |||
timestamp = DateTimeFormatter.ISO_INSTANT.format(Instant.ofEpochSecond(headC.getCommitTime())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should produce a string such as 2024-04-12T19:40:42Z
which seems to align with https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=74682318#Reproducible/VerifiableBuilds-OutputArchiveEntriesTimestamp though it is vague about allowed precision.
@basil I am ready to merge this and release 1.8 unless you have any last-minute requests? |
No last-minute requests on my side. Thank you! |
https://github.com/jenkinsci/incrementals-tools/releases/tag/parent-1.8 ought to be available on Central shortly. |
Add support for Maven reproducible builds when Maven Release Plugin is not in use, regardless of whether
project.build.outputTimestamp
is (as would be the case for a plugin that still used MRP for production releases but used Incrementals for PR releases) or is not (as would be the case for a plugin that fully implemented automated release) defined inpom.xml
.Testing done
Verified that when passing
-Dset.changelist
Maven couldn't verify an incrementals build withmvn clean verify artifact:compare
before this PR but could verify it after this PR.Fixes #103