Skip to content

Commit 3d8e9c9

Browse files
committed
Do not touch the outputTimeStamp at all if SOURCE_DATE_EPOCH is not set
1 parent dd040a1 commit 3d8e9c9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2668,10 +2668,13 @@ private void populateCompileArtifactMap(Map<String, Artifact> compileArtifactMap
26682668
private String getBottomText() {
26692669
final String inceptionYear = project.getInceptionYear();
26702670

2671-
if (outputTimestamp == null
2672-
|| outputTimestamp.length() < 1
2673-
|| ((outputTimestamp.length() == 1) && !Character.isDigit(outputTimestamp.charAt(0)))) {
2674-
outputTimestamp = System.getenv("SOURCE_DATE_EPOCH");
2671+
final String sde = System.getenv("SOURCE_DATE_EPOCH");
2672+
if (sde != null) {
2673+
if (outputTimestamp == null
2674+
|| outputTimestamp.length() < 1
2675+
|| ((outputTimestamp.length() == 1) && !Character.isDigit(outputTimestamp.charAt(0)))) {
2676+
outputTimestamp = sde;
2677+
}
26752678
}
26762679

26772680
// get Reproducible Builds outputTimestamp date value or the current local date.

0 commit comments

Comments
 (0)