From 0c0245014c63e0dfe0218f41051b6313707593e8 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 23 Mar 2018 17:11:42 -0400 Subject: [PATCH] Recommend using compileOnly rather than the propdeps plugin Closes gh-12573 --- .../main/asciidoc/appendix-configuration-metadata.adoc | 5 ++--- spring-boot-docs/src/main/asciidoc/index.adoc | 1 - spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc | 8 +++----- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/spring-boot-docs/src/main/asciidoc/appendix-configuration-metadata.adoc b/spring-boot-docs/src/main/asciidoc/appendix-configuration-metadata.adoc index d31a05196c7..1cbab6c3ee8 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-configuration-metadata.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-configuration-metadata.adoc @@ -731,13 +731,12 @@ an optional dependency, for example with Maven you would add: ---- -With Gradle, you can use the https://github.com/spring-gradle-plugins/propdeps-plugin[propdeps-plugin] -and specify: +With Gradle you would add: [source,groovy,indent=0,subs="verbatim,quotes,attributes"] ---- dependencies { - optional "org.springframework.boot:spring-boot-configuration-processor" + compileOnly "org.springframework.boot:spring-boot-configuration-processor" } compileJava.dependsOn(processResources) diff --git a/spring-boot-docs/src/main/asciidoc/index.adoc b/spring-boot-docs/src/main/asciidoc/index.adoc index 3a5876dfba3..5513ad91090 100644 --- a/spring-boot-docs/src/main/asciidoc/index.adoc +++ b/spring-boot-docs/src/main/asciidoc/index.adoc @@ -47,7 +47,6 @@ Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson; :spring-data-mongo-javadoc: http://docs.spring.io/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb :spring-data-rest-javadoc: http://docs.spring.io/spring-data/rest/docs/current/api/org/springframework/data/rest :gradle-userguide: http://www.gradle.org/docs/current/userguide -:propdeps-plugin: https://github.com/spring-projects/gradle-plugins/tree/master/propdeps-plugin :ant-manual: http://ant.apache.org/manual :code-examples: ../java/org/springframework/boot :test-examples: ../../test/java/org/springframework/boot 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 6fa6a132d82..898287b43b6 100644 --- a/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc +++ b/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc @@ -772,17 +772,15 @@ devtools support, simply add the module dependency to your build: [source,groovy,indent=0,subs="attributes"] ---- dependencies { - compile("org.springframework.boot:spring-boot-devtools") + compileOnly("org.springframework.boot:spring-boot-devtools") } ---- NOTE: Developer tools are automatically disabled when running a fully packaged application. If your application is launched using `java -jar` or if it's started using a special classloader, then it is considered a "`production application`". Flagging the -dependency as optional is a best practice that prevents devtools from being transitively -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. +dependency as optional in Maven or using `compileOnly` in Gradle is a best practice that +prevents devtools from being transitively applied to other modules using your project. TIP: repackaged archives do not contain devtools by default. If you want to use <>, you'll need to disable the