diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/RunIntegrationTests.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/RunIntegrationTests.java index 33719a7bc3..823ce6bcbb 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/RunIntegrationTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/RunIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,12 +45,14 @@ class RunIntegrationTests { } @TestTemplate + @Deprecated void whenForkingIsDisabledAndDevToolsIsPresentDevToolsIsDisabled(MavenBuild mavenBuild) { mavenBuild.project("run-devtools").goals("spring-boot:run").execute((project) -> assertThat(buildLog(project)) .contains("I haz been run").contains("Fork mode disabled, devtools will be disabled")); } @TestTemplate + @Deprecated void whenForkingIsDisabledJvmArgumentsAndWorkingDirectoryAreIgnored(MavenBuild mavenBuild) { mavenBuild.project("run-disable-fork").goals("spring-boot:run") .execute((project) -> assertThat(buildLog(project)).contains("I haz been run").contains( @@ -103,6 +105,7 @@ class RunIntegrationTests { } @TestTemplate + @Deprecated void whenProfilesAreConfiguredAndForkingIsDisabledTheyArePassedToTheApplication(MavenBuild mavenBuild) { mavenBuild.project("run-profiles-fork-disabled").goals("spring-boot:run").execute( (project) -> assertThat(buildLog(project)).contains("I haz been run with profile(s) 'foo,bar'")); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/StartStopIntegrationTests.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/StartStopIntegrationTests.java index 34736018c3..3ef33cdbe0 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/StartStopIntegrationTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/StartStopIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,6 +33,7 @@ import static org.assertj.core.api.Assertions.contentOf; class StartStopIntegrationTests { @TestTemplate + @Deprecated void startStopWithForkDisabledWaitsForApplicationToBeReadyAndThenRequestsShutdown(MavenBuild mavenBuild) { mavenBuild.project("start-stop-fork-disabled").goals("verify").execute( (project) -> assertThat(buildLog(project)).contains("isReady: true").contains("Shutdown requested")); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java index cbcba09bc9..dc86e049a0 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -265,6 +265,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { * Log a warning indicating that fork mode has been explicitly disabled while some * conditions are present that require to enable it. */ + @Deprecated protected void logDisabledFork() { if (getLog().isWarnEnabled()) { if (hasAgent()) { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RunMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RunMojo.java index 3064c930f6..33bcba0353 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RunMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RunMojo.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -63,6 +63,7 @@ public class RunMojo extends AbstractRunMojo { private boolean optimizedLaunch; @Override + @Deprecated protected void logDisabledFork() { super.logDisabledFork(); if (hasDevtools()) { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java index 86bef74bf4..840691a0fd 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,8 +54,10 @@ public class StopMojo extends AbstractMojo { * ({@code true}). If it is set, it must match the value used to {@link StartMojo * start} the process. * @since 1.3.0 + * @deprecated since 2.7.0 for removal in 3.0.0 with no replacement */ @Parameter(property = "spring-boot.stop.fork") + @Deprecated private Boolean fork; /** @@ -80,6 +82,7 @@ public class StopMojo extends AbstractMojo { private boolean skip; @Override + @SuppressWarnings("deprecation") public void execute() throws MojoExecutionException, MojoFailureException { if (this.skip) { getLog().debug("skipping stop as per configuration."); @@ -100,6 +103,7 @@ public class StopMojo extends AbstractMojo { } } + @Deprecated private boolean isForked() { if (this.fork != null) { return this.fork;