Permalink
Browse files

Added an @Execute annotation to RunMojo

Update RunMojo to include an @Execute annotation. Allows the use of
`mvn spring-boot:run` without having to compile/package first. Now a
command like `mvn clean spring-boot:run` works.

The phase for @Execute annotation is along the lines of what is used
for the `jetty:run` plugin.
  • Loading branch information...
1 parent 47d0ba5 commit 29afcb7898f1fdf3c5ef8c122d130c5d5305f4ef @bijukunjummen bijukunjummen committed with philwebb Aug 25, 2013
@@ -30,6 +30,7 @@
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
@@ -43,6 +44,7 @@
* @author Phillip Webb
*/
@Mojo(name = "run", requiresProject = true, defaultPhase = LifecyclePhase.VALIDATE, requiresDependencyResolution = ResolutionScope.TEST)
+@Execute(phase=LifecyclePhase.TEST_COMPILE)
public class RunMojo extends AbstractMojo {
/**

0 comments on commit 29afcb7

Please sign in to comment.