Polish "Add toolchains support for Spring Boot Maven Plugin"

See gh-18732
This commit is contained in:
Stephane Nicoll
2019-12-26 11:42:16 +01:00
parent eede16ff0a
commit e7f45d8a34
5 changed files with 27 additions and 21 deletions

View File

@@ -69,6 +69,20 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
@Parameter(defaultValue = "${project}", readonly = true, required = true)
private MavenProject project;
/**
* The current Maven session. This is used for toolchain manager API calls.
* @since 2.3.0
*/
@Parameter(defaultValue = "${session}", readonly = true)
private MavenSession session;
/**
* The toolchain manager to use to locate a custom JDK.
* @since 2.3.0
*/
@Component
private ToolchainManager toolchainManager;
/**
* 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
@@ -209,20 +223,6 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
@Parameter(property = "spring-boot.run.skip", defaultValue = "false")
private boolean skip;
/**
* The Maven Session Object.
* @since 2.2.1
*/
@Parameter(defaultValue = "${session}", readonly = true)
private MavenSession session;
/**
* The toolchain manager to use.
* @since 2.2.1
*/
@Component
private ToolchainManager toolchainManager;
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
if (this.skip) {