Browse Source

Merge pull request #34393 from didiez

* pr/34393:
  Add build-info skip support

Closes gh-34393
pull/34383/merge
Moritz Halbritter 3 years ago
parent
commit
b77a85bcd2
  1. 10
      spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/BuildInfoMojo.java

10
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/BuildInfoMojo.java

@ -97,8 +97,18 @@ public class BuildInfoMojo extends AbstractMojo { @@ -97,8 +97,18 @@ public class BuildInfoMojo extends AbstractMojo {
@Parameter
private List<String> excludeInfoProperties;
/**
* Skip the execution.
*/
@Parameter(property = "spring-boot.build-info.skip", defaultValue = "false")
private boolean skip;
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
if (this.skip) {
getLog().debug("skipping build-info as per configuration.");
return;
}
try {
ProjectDetails details = getProjectDetails();
new BuildPropertiesWriter(this.outputFile).writeBuildProperties(details);

Loading…
Cancel
Save