This commit is contained in:
Phillip Webb
2016-08-29 15:29:54 +01:00
parent 97f15d606d
commit 69e96c6211
4 changed files with 20 additions and 13 deletions

View File

@@ -64,9 +64,9 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
/**
* Add maven resources to the classpath directly, this allows live in-place editing of
* resources. Duplicate resources are removed from {@code target/classes} to prevent
* them to appear twice if {@code ClassLoader.getResources()} is called. Please consider
* adding {@code spring-boot-devtools} to your project instead as it provides this feature
* and many more.
* them to appear twice if {@code ClassLoader.getResources()} is called. Please
* consider adding {@code spring-boot-devtools} to your project instead as it provides
* this feature and many more.
* @since 1.0
*/
@Parameter(property = "run.addResources", defaultValue = "false")
@@ -90,8 +90,8 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
/**
* JVM arguments that should be associated with the forked process used to run the
* application. On command line, make sure to wrap multiple values between quotes.
* NOTE: the use of JVM arguments means that processes will be started by forking
* a new JVM.
* NOTE: the use of JVM arguments means that processes will be started by forking a
* new JVM.
* @since 1.1
*/
@Parameter(property = "run.jvmArguments")
@@ -214,10 +214,10 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
private void run(String startClassName)
throws MojoExecutionException, MojoFailureException {
findAgent();
boolean forkEnabled = isFork();
boolean fork = isFork();
this.project.getProperties().setProperty("_spring.boot.fork.enabled",
Boolean.toString(forkEnabled));
if (forkEnabled) {
Boolean.toString(fork));
if (fork) {
doRunWithForkedJvm(startClassName);
}
else {

View File

@@ -103,7 +103,8 @@ public class StopMojo extends AbstractMojo {
if (this.fork != null) {
return this.fork;
}
String property = this.project.getProperties().getProperty("_spring.boot.fork.enabled");
String property = this.project.getProperties()
.getProperty("_spring.boot.fork.enabled");
return Boolean.valueOf(property);
}