diff --git a/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc b/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc index d74ebf643af..6b662acd1ab 100644 --- a/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc +++ b/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc @@ -400,7 +400,7 @@ want the other Boot features but not this one) |`excludeDevtools` |Boolean flag to indicate if the devtools jar should be excluded from the repackaged -archives. Defaults to `false`. +archives. Defaults to `true`. |=== diff --git a/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc b/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc index d583a6b180b..4349656c8f0 100644 --- a/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc +++ b/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc @@ -768,9 +768,9 @@ applied to other modules using your project. Gradle does not support `optional` dependencies out-of-the-box so you may want to have a look to the {propdeps-plugin}[`propdeps-plugin`] in the meantime. -TIP: If you want to ensure that devtools is never included in a production build, you can -use the `excludeDevtools` build property to completely remove the JAR. The property is -supported with both the Maven and Gradle plugins. +TIP: repackaged archives do not contain devtools by default. If you want to use certain +remote devtools feature, you'll need to enable the `excludeDevtools` build property to +include it. The property is supported with both the Maven and Gradle plugins. diff --git a/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/SpringBootPluginExtension.java b/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/SpringBootPluginExtension.java index e4244b22b41..987336250cc 100644 --- a/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/SpringBootPluginExtension.java +++ b/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/SpringBootPluginExtension.java @@ -99,7 +99,7 @@ public class SpringBootPluginExtension { /** * Whether Spring Boot Devtools should be excluded from the fat jar. */ - boolean excludeDevtools = false; + boolean excludeDevtools = true; /** * Location of an agent jar to attach to the VM when running the application with diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java index 3502ef687c4..309eb72db37 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java @@ -167,11 +167,11 @@ public class RepackageMojo extends AbstractDependencyFilterMojo { private Properties embeddedLaunchScriptProperties; /** - * Exclude Spring Boot devtools. + * Exclude Spring Boot devtools from the repackaged archive. * @since 1.3 */ - @Parameter(defaultValue = "false") - private boolean excludeDevtools; + @Parameter(defaultValue = "true") + private boolean excludeDevtools = true; /** * Include system scoped dependencies.