diff --git a/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/RunCommand.java b/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/RunCommand.java index e96125b952..0a359b709c 100644 --- a/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/RunCommand.java +++ b/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/RunCommand.java @@ -38,7 +38,7 @@ import static java.util.Arrays.asList; */ public class RunCommand extends OptionParsingCommand { - private OptionSpec noWatchOption; // FIXME + private OptionSpec watchOption; private OptionSpec editOption; @@ -70,8 +70,8 @@ public class RunCommand extends OptionParsingCommand { @Override protected OptionParser createOptionParser() { OptionParser parser = new OptionParser(); - this.noWatchOption = parser.accepts("no-watch", - "Do not watch the specified file for changes"); + this.watchOption = parser + .accepts("watch", "Watch the specified file for changes"); this.editOption = parser.acceptsAll(asList("edit", "e"), "Open the file with the default system editor"); this.noGuessImportsOption = parser.accepts("no-guess-imports", @@ -127,7 +127,7 @@ public class RunCommand extends OptionParsingCommand { @Override public boolean isWatchForFileChanges() { - return !this.options.has(RunCommand.this.noWatchOption); + return this.options.has(RunCommand.this.watchOption); } @Override diff --git a/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/compiler/autoconfigure/SpringMvcCompilerAutoConfiguration.java b/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/compiler/autoconfigure/SpringMvcCompilerAutoConfiguration.java index 5e2cc53d81..bd47ba51ce 100644 --- a/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/compiler/autoconfigure/SpringMvcCompilerAutoConfiguration.java +++ b/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/compiler/autoconfigure/SpringMvcCompilerAutoConfiguration.java @@ -32,7 +32,8 @@ public class SpringMvcCompilerAutoConfiguration extends CompilerAutoConfiguratio @Override public void applyDependencies(DependencyCustomizer dependencies) { - dependencies.ifAnyMissingClasses("org.springframework.web.servlet.mvc.Controller") + dependencies + .ifAnyMissingClasses("org.springframework.web.servlet.mvc.Controller") .add("org.springframework", "spring-webmvc", "4.0.0.BOOTSTRAP-SNAPSHOT"); dependencies.ifAnyMissingClasses("org.apache.catalina.startup.Tomcat", @@ -42,8 +43,8 @@ public class SpringMvcCompilerAutoConfiguration extends CompilerAutoConfiguratio // FIXME restore Tomcat when we can get reload to work // dependencies.ifMissingClasses("org.apache.catalina.startup.Tomcat", // "org.eclipse.jetty.server.Server") - // .add("org.apache.tomcat.embed", "tomcat-embed-core", "7.0.37") - // .add("org.apache.tomcat.embed", "tomcat-embed-logging-juli", "7.0.37"); + // .add("org.apache.tomcat.embed", "tomcat-embed-core", "7.0.39") + // .add("org.apache.tomcat.embed", "tomcat-embed-logging-juli", "7.0.39"); } @Override diff --git a/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/runner/BootstrapRunner.java b/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/runner/BootstrapRunner.java index 84b3e5a562..cd987bd200 100644 --- a/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/runner/BootstrapRunner.java +++ b/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/runner/BootstrapRunner.java @@ -119,6 +119,7 @@ public class BootstrapRunner { if (classes.length != 0) { setContextClassLoader(classes[0].getClassLoader()); } + setDaemon(true); } @Override @@ -164,6 +165,7 @@ public class BootstrapRunner { public FileWatchThread() { this.previous = BootstrapRunner.this.file.lastModified(); + setDaemon(false); } @Override