From 4510be0f8f1af1f907d329fcf1bc7b4d00772ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Wed, 21 Jun 2017 00:17:56 -0500 Subject: [PATCH 1/2] Add prefix to all properties in maven plugin This commit add prefix `spring-boot` to all Mojo's properties. See gh-9567 --- .../maven/AbstractDependencyFilterMojo.java | 4 ++-- .../boot/maven/AbstractRunMojo.java | 20 +++++++++---------- .../boot/maven/RepackageMojo.java | 2 +- .../springframework/boot/maven/StopMojo.java | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractDependencyFilterMojo.java b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractDependencyFilterMojo.java index d3deec31ad9..ef5123f7ebc 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractDependencyFilterMojo.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractDependencyFilterMojo.java @@ -61,14 +61,14 @@ public abstract class AbstractDependencyFilterMojo extends AbstractMojo { * Comma separated list of groupId names to exclude (exact match). * @since 1.1 */ - @Parameter(property = "excludeGroupIds", defaultValue = "") + @Parameter(property = "spring-boot.excludeGroupIds", defaultValue = "") private String excludeGroupIds; /** * Comma separated list of artifact names to exclude (exact match). * @since 1.1 */ - @Parameter(property = "excludeArtifactIds", defaultValue = "") + @Parameter(property = "spring-boot.excludeArtifactIds", defaultValue = "") private String excludeArtifactIds; protected void setExcludes(List excludes) { diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java index ca64718f6b3..2d5cf1befd9 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java @@ -68,7 +68,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { * this feature and many more. * @since 1.0 */ - @Parameter(property = "run.addResources", defaultValue = "false") + @Parameter(property = "spring-boot.run.addResources", defaultValue = "false") private boolean addResources = false; /** @@ -76,14 +76,14 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { * forking a new JVM. * @since 1.0 */ - @Parameter(property = "run.agent") + @Parameter(property = "spring-boot.run.agent") private File[] agent; /** * Flag to say that the agent requires -noverify. * @since 1.0 */ - @Parameter(property = "run.noverify") + @Parameter(property = "spring-boot.run.noverify") private boolean noverify = false; /** @@ -92,7 +92,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { * started by forking a new JVM. * @since 1.5 */ - @Parameter(property = "run.workingDirectory") + @Parameter(property = "spring-boot.run.workingDirectory") private File workingDirectory; /** @@ -102,7 +102,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { * new JVM. * @since 1.1 */ - @Parameter(property = "run.jvmArguments") + @Parameter(property = "spring-boot.run.jvmArguments") private String jvmArguments; /** @@ -110,7 +110,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { * separate multiple arguments. * @since 1.0 */ - @Parameter(property = "run.arguments") + @Parameter(property = "spring-boot.run.arguments") private String[] arguments; /** @@ -119,7 +119,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { * profiles. * @since 1.3 */ - @Parameter(property = "run.profiles") + @Parameter(property = "spring-boot.run.profiles") private String[] profiles; /** @@ -152,21 +152,21 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { * or if devtools is present. * @since 1.2 */ - @Parameter(property = "fork") + @Parameter(property = "spring-boot.run.fork") private Boolean fork; /** * Flag to include the test classpath when running. * @since 1.3 */ - @Parameter(property = "useTestClasspath", defaultValue = "false") + @Parameter(property = "spring-boot.run.useTestClasspath", defaultValue = "false") private Boolean useTestClasspath; /** * Skip the execution. * @since 1.3.2 */ - @Parameter(property = "skip", defaultValue = "false") + @Parameter(property = "spring-boot.run.skip", defaultValue = "false") private boolean skip; @Override diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java index cba02a6cc76..bb1feb1ddaa 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java @@ -90,7 +90,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo { * Skip the execution. * @since 1.2 */ - @Parameter(property = "skip", defaultValue = "false") + @Parameter(property = "spring-boot.it.skip", defaultValue = "false") private boolean skip; /** diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java index d36bc7bd422..e7c1db88a40 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java @@ -54,7 +54,7 @@ public class StopMojo extends AbstractMojo { * {@link StartMojo start} the process. * @since 1.3 */ - @Parameter(property = "fork") + @Parameter(property = "spring-boot.stop.fork") private Boolean fork; /** @@ -75,7 +75,7 @@ public class StopMojo extends AbstractMojo { * Skip the execution. * @since 1.3.2 */ - @Parameter(property = "skip", defaultValue = "false") + @Parameter(property = "spring-boot.stop.skip", defaultValue = "false") private boolean skip; @Override From e230952dd20c894ed8f9c4e90f43ba8501489210 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 22 Jun 2017 09:12:58 +0200 Subject: [PATCH 2/2] Polish "Add prefix to all properties in maven plugin" Closes gh-9567 --- .../boot/maven/AbstractDependencyFilterMojo.java | 4 ++-- .../java/org/springframework/boot/maven/AbstractRunMojo.java | 4 ++-- .../java/org/springframework/boot/maven/RepackageMojo.java | 2 +- .../src/site/apt/examples/run-debug.apt.vm | 2 +- .../src/site/apt/examples/run-profiles.apt.vm | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractDependencyFilterMojo.java b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractDependencyFilterMojo.java index ef5123f7ebc..8fdfff237c1 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractDependencyFilterMojo.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractDependencyFilterMojo.java @@ -45,7 +45,7 @@ public abstract class AbstractDependencyFilterMojo extends AbstractMojo { * {@code classifier} property. * @since 1.2 */ - @Parameter + @Parameter(property = "spring-boot.includes") private List includes; /** @@ -54,7 +54,7 @@ public abstract class AbstractDependencyFilterMojo extends AbstractMojo { * {@code classifier} property. * @since 1.1 */ - @Parameter + @Parameter(property = "spring-boot.excludes") private List excludes; /** diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java index 2d5cf1befd9..c5d00d30d38 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java @@ -127,7 +127,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { * contains a 'main' method will be used. * @since 1.0 */ - @Parameter + @Parameter(property = "spring-boot.run.main-class") private String mainClass; /** @@ -135,7 +135,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { * classpath. * @since 1.0 */ - @Parameter + @Parameter(property = "spring-boot.run.folders") private String[] folders; /** diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java index bb1feb1ddaa..87ea8d3874e 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java @@ -90,7 +90,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo { * Skip the execution. * @since 1.2 */ - @Parameter(property = "spring-boot.it.skip", defaultValue = "false") + @Parameter(property = "spring-boot.repackage.skip", defaultValue = "false") private boolean skip; /** diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-debug.apt.vm b/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-debug.apt.vm index c6b362b4e6f..679301a8aaf 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-debug.apt.vm +++ b/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-debug.apt.vm @@ -42,7 +42,7 @@ specified on the command line as well, make sure to wrap that properly, that is: --- -mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" +mvn spring-boot:run -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" --- diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-profiles.apt.vm b/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-profiles.apt.vm index 1562e9ac898..203add200eb 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-profiles.apt.vm +++ b/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-profiles.apt.vm @@ -40,7 +40,7 @@ a comma, that is: --- -mvn spring-boot:run -Drun.profiles=foo,bar +mvn spring-boot:run -Dspring-boot.run.profiles=foo,bar ---