Use a ZIP-compatible default project build output timestamp - #8509
Merged
timtebeek merged 4 commits intoAug 17, 2026
Merged
Conversation
4 tasks
martinfrancois
force-pushed
the
agent/repro-output-timestamp-zip-minimum
branch
from
August 15, 2026 21:58
caef079 to
f93b60c
Compare
martinfrancois
marked this pull request as ready for review
August 17, 2026 08:08
It asserted exactly the same thing as the @DocumentExample above it.
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.
Suggested review order: 12 of 52 (Score: 7.5)
Review first: openrewrite/rewrite-static-analysis#1007
What's changed?
Changes the default project build output timestamp from
1980-01-01T00:00:00Zto the earliest ZIP-compatible value,1980-01-01T00:00:02Z, and updates the generated recipe metadata and examples.What's your motivation?
Recipe:
org.openrewrite.maven.cleanup.AddProjectBuildOutputTimestamp.I found this by running
org.openrewrite.maven.cleanup.AddProjectBuildOutputTimestampfromorg.openrewrite:rewrite-maven:8.87.0onpom.xmlin Symphony-Trello ata8013f27. I reproduced the same result with the latest released recipe artifact,org.openrewrite:rewrite-maven:8.90.0, usingorg.openrewrite.maven:rewrite-maven-plugin:6.46.1. Runningmaven-pmd-plugin:3.28.0:pmdon the transformed checkout fails with:'1980-01-01T00:00:00Z' is not within the valid range 1980-01-01T00:00:02Z to 2099-12-31T23:59:59Z.Before
Actual after the recipe
Expected after the recipe
ZIP timestamps have a two-second resolution and reject the emitted value. The recipe therefore adds a property that makes a normal Maven reporting goal fail.
Confirmed real-world execution
pom.xmlata8013f27.martinfrancois/symphony-trello@a8013f27.Anything in particular you'd like reviewers to focus on?
Please review the two-second lower bound and the synchronized updates to the generated example and recipe metadata.
Have you considered any alternatives or workarounds?
Projects can override the generated timestamp manually. The recipe should nevertheless emit a default accepted by ZIP-producing Maven plugins.
Any additional context
Pre-existing tests changed:
ReproducibleBuildsTest.java.appliesEncodingAndOutputTimestamp(updated),AddProjectBuildOutputTimestampTest.java.addsDefaultTimestamp(updated),AddProjectBuildOutputTimestampTest.java.addsToExistingPropertiesBlock(updated).martinfrancois/symphony-trello@a8013f27org.openrewrite:rewrite-maven:8.87.0org.openrewrite:rewrite-maven:8.90.0AddProjectBuildOutputTimestampTestThis change was prepared with AI assistance. I reviewed the target execution evidence, implementation, tests, generated metadata, and contribution text.
Checklist
./gradlew buildlocally, and committed any resulting changes torecipes.csv