Consider time in BuildInfo up-to-date checks and allow it to be set

Closes gh-12111
Closes gh-12266
This commit is contained in:
Andy Wilkinson
2018-02-27 19:58:17 +00:00
parent 6b3b7909f3
commit fdb9a1ea8f
8 changed files with 96 additions and 49 deletions

View File

@@ -17,6 +17,7 @@
package org.springframework.boot.maven;
import java.io.File;
import java.time.Instant;
import java.util.Map;
import org.apache.maven.plugin.AbstractMojo;
@@ -71,7 +72,8 @@ public class BuildInfoMojo extends AbstractMojo {
new BuildPropertiesWriter(this.outputFile)
.writeBuildProperties(new ProjectDetails(this.project.getGroupId(),
this.project.getArtifactId(), this.project.getVersion(),
this.project.getName(), this.additionalProperties));
this.project.getName(), Instant.now(),
this.additionalProperties));
this.buildContext.refresh(this.outputFile);
}
catch (NullAdditionalPropertyValueException ex) {