Add option to exclude devtools from fat jar

Add an `excludeDevtools` property to both the Maven and Gradle plugin
that removes `org.springframework.boot:spring-boot-devtools` (if
necessary) when repackaging the application.

Closes gh-3171
This commit is contained in:
Stephane Nicoll
2015-10-13 16:59:35 +02:00
committed by Phillip Webb
parent e2fc30ef24
commit e79ef9b73b
9 changed files with 118 additions and 13 deletions

View File

@@ -395,6 +395,10 @@ want the other Boot features but not this one)
|`embeddedLaunchScriptProperties`
|Additional properties that to be expanded in the launch script. The default script
supports a `mode` property which can contain the values `auto`, `service` or `run`.
|`excludeDevtools`
|Boolean flag to indicate if the devtools jar should be excluded from the repackaged
archives. Defaults to `false`.
|===

View File

@@ -844,6 +844,10 @@ 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 set the `excludeDevtools` build property to completely remove the JAR. The property is
supported with both the Maven and Gradle plugins.
[[using-boot-devtools-property-defaults]]