64.6 Repackage configuration

The plugin adds a bootRepackage task which you can also configure directly, e.g.:

bootRepackage {
    mainClass = 'demo.Application'
}

The following configuration options are available:

Name Description
enabled Boolean flag to switch the repackager off (sometimes useful if you want the other Boot features but not this one)
mainClass The main class that should be run. If not specified, and you have applied the application plugin, the mainClassName project property will be used. If the application plugin has not been applied or no mainClassName has been specified, the archive will be searched for a suitable class. "Suitable" means a unique class with a well-formed main() method (if more than one is found the build will fail). If you have applied the application plugin, the main class can also be specified via its "run" task (main property) and/or its "startScripts" task (mainClassName property) as an alternative to using the "springBoot" configuration.
classifier A file name segment (before the extension) to add to the archive, so that the original is preserved in its original location. Defaults to null in which case the archive is repackaged in place. The default is convenient for many purposes, but if you want to use the original jar as a dependency in another project you must use a classifier to define the executable archive.
withJarTask The name or value of the Jar task (defaults to all tasks of type Jar) which is used to locate the archive to repackage.
customConfiguration The name of the custom configuration which is used to populate the nested lib directory (without specifying this you get all compile and runtime dependencies).
executable Boolean flag to indicate if jar files are fully executable on Unix like operating systems. Defaults to false.
embeddedLaunchScript The embedded launch script to prepend to the front of the jar if it is fully executable. If not specified the 'Spring Boot' default script will be used.
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.

results matching ""

    No results matching ""