use of org.springframework.boot.loader.tools.BuildPropertiesWriter.ProjectDetails in project spring-boot by spring-projects.
the class BuildInfoMojo method execute.
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
try {
new BuildPropertiesWriter(this.outputFile).writeBuildProperties(new ProjectDetails(this.project.getGroupId(), this.project.getArtifactId(), this.project.getVersion(), this.project.getName(), this.additionalProperties));
this.buildContext.refresh(this.outputFile);
} catch (NullAdditionalPropertyValueException ex) {
throw new MojoFailureException("Failed to generate build-info.properties. " + ex.getMessage(), ex);
} catch (Exception ex) {
throw new MojoExecutionException(ex.getMessage(), ex);
}
}
Aggregations