Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.0-M9
-
None
-
Windows 10 and FreeBSD
Description
I'm using git-commit-id-maven-plugin to set project.build.outputTimestamp as suggested in the Maven Guide Configuring for Reproducible Builds. I've included the plugin in my pom and including the following property definition:
<project.build.outputTimestamp>${git.commit.time}</project.build.outputTimestamp>
When I generate the site, the plugin fails with the message:
site failed: Invalid project.build.outputTimestamp value '${git.commit.time}
This configuration works properly in the maven-jar-plugin, so I did some investigation. The jar plugin is getting the outputTimestamp as a mojo parameter:
@Parameter( defaultValue = "${project.build.outputTimestamp}" ) private String outputTimestamp;
This works properly, with outputTimestamp set to the last commit time.
In the site-plugin code, the outputTimestamp is being pulled from the project properties:
String outputTimestamp = p.getProperties().getProperty("project.build.outputTimestamp");
In the case the property hasn't been resolved and the returned string is ${git.commit.time}.
Attachments
Issue Links
- depends upon
-
MSITE-973 Have ${project.build.outputTimestamp} injected as @Parameter
- Closed
- is related to
-
MSHARED-1295 Have ${project.build.outputTimestamp} injected as @Parameter
- Closed