Skip to content

Commit 6ab21d0

Browse files
committed
reproducible from environment
1 parent 2299072 commit 6ab21d0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2671,6 +2671,15 @@ private void populateCompileArtifactMap(Map<String, Artifact> compileArtifactMap
26712671
private String getBottomText() {
26722672
final String inceptionYear = project.getInceptionYear();
26732673

2674+
final String sourceDateEpoch = System.getenv("SOURCE_DATE_EPOCH");
2675+
if (sourceDateEpoch != null) {
2676+
if (outputTimestamp == null
2677+
|| outputTimestamp.length() < 1
2678+
|| ((outputTimestamp.length() == 1) && !Character.isDigit(outputTimestamp.charAt(0)))) {
2679+
outputTimestamp = sourceDateEpoch;
2680+
}
2681+
}
2682+
26742683
// get Reproducible Builds outputTimestamp date value or the current local date.
26752684
final LocalDate localDate = MavenArchiver.parseBuildOutputTimestamp(outputTimestamp)
26762685
.map(instant -> instant.atZone(ZoneOffset.UTC).toLocalDate())

0 commit comments

Comments
 (0)