gnodet commented on PR #599: URL: https://github.com/apache/maven-jar-plugin/pull/599#issuecomment-5726390514
Good point — I've updated the PR to restrict clamping to the seconds-as-integer case only, leaving ISO 8601 strings returned as-is for the `jar` tool to validate. The rationale: when a user sets `SOURCE_DATE_EPOCH=0` (or any integer), the intent is clearly "use this epoch for reproducibility" — clamping to `DATE_MIN` gives them exactly what they want (a reproducible jar with the lowest possible ZIP timestamp) instead of a cryptic build failure. That code path is already special-cased for the epoch→ISO conversion, so the clamping fits naturally there. For explicit ISO 8601 strings in the POM, leaving validation to the `jar` tool is cleaner — if someone writes `1970-01-01T00:00:00Z` explicitly they deserve a clear error rather than a silent substitution. Note: maven-archiver PR #401 takes the broader approach (clamping both formats), which is appropriate there since `parseBuildOutputTimestamp()` is the dedicated parsing/validation entry point for the archiver path and there is no external tool to delegate to. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
