You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2023/08/06 12:48:24 UTC
[maven-reporting-impl] branch MSHARED-1295 created (now 571f242)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch MSHARED-1295
in repository https://gitbox.apache.org/repos/asf/maven-reporting-impl.git
at 571f242 [MSHARED-1295] Have ${project.build.outputTimestamp} injected as @Parameter
This branch includes the following new commits:
new 571f242 [MSHARED-1295] Have ${project.build.outputTimestamp} injected as @Parameter
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[maven-reporting-impl] 01/01: [MSHARED-1295] Have ${project.build.outputTimestamp} injected as @Parameter
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch MSHARED-1295
in repository https://gitbox.apache.org/repos/asf/maven-reporting-impl.git
commit 571f242991d848b83bb250864d4e01b63a5369f2
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Aug 6 14:47:31 2023 +0200
[MSHARED-1295] Have ${project.build.outputTimestamp} injected as @Parameter
This closes #23
---
.../java/org/apache/maven/reporting/AbstractMavenReport.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java b/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java
index 304edc8..2273196 100644
--- a/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java
+++ b/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java
@@ -139,6 +139,14 @@ public abstract class AbstractMavenReport extends AbstractMojo implements MavenM
@Parameter(defaultValue = "default")
protected String locale;
+ /**
+ * Timestamp for reproducible output archive entries, either formatted as ISO 8601
+ * <code>yyyy-MM-dd'T'HH:mm:ssXXX</code> or as an int representing seconds since the epoch (like
+ * <a href="https://reproducible-builds.org/docs/source-date-epoch/">SOURCE_DATE_EPOCH</a>).
+ */
+ @Parameter(defaultValue = "${project.build.outputTimestamp}")
+ protected String outputTimestamp;
+
/**
* SiteTool.
*/
@@ -296,7 +304,6 @@ public abstract class AbstractMavenReport extends AbstractMojo implements MavenM
}
// Add publish date
- String outputTimestamp = getProject().getProperties().getProperty("project.build.outputTimestamp");
MavenArchiver.parseBuildOutputTimestamp(outputTimestamp).ifPresent(v -> {
context.setPublishDate(Date.from(v));
});