Using the spring-boot-maven-plugin both the run and repackage goal cause my compile and test stage to be re ran e.g.
mvn clean package spring-boot:run
and you see two compile and test runs...
in the maven debug out put I can see
...
[DEBUG] Goal: org.springframework.boot:spring-boot-maven-plugin:1.0.2.RELEASE:repackage (default)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<finalName default-value="${project.build.finalName}"/>
<outputDirectory default-value="${project.build.directory}"/>
<project default-value="${project}"/>
</configuration>
[DEBUG] --- init fork of myapp:1.0-SNAPSHOT for org.springframework.boot:spring-boot-maven-plugin:1.0.2.RELEASE:run (default-cli) ---
[DEBUG] Dependencies (collect): []
[DEBUG] Dependencies (resolve): [compile, test]
[DEBUG] -----------------------------------------------------------------------
And looking at the plugin source code classes, RunMojo amd RepackageMojo I see
@Mojo(name = "run", requiresProject = true, defaultPhase = LifecyclePhase.VALIDATE, requiresDependencyResolution = ResolutionScope.TEST)
@Execute(phase = LifecyclePhase.TEST_COMPILE)
public class RunMojo extends AbstractMojo {
Thinking that the @Execute has something to do with it ?
Thanks