Clarify MainClass option of the bootRepackage task

Closes gh-2477
This commit is contained in:
Stephane Nicoll
2015-10-14 15:00:33 +02:00
parent 06c78a41cd
commit 69581f90da
2 changed files with 9 additions and 1 deletions

View File

@@ -230,6 +230,10 @@ Manifest entry keys are formed by capitalizing initial letters of words and chan
separator to "`-`" from "`.`" (e.g. `Loader-Path`). The exception is `loader.main` which
is looked up as `Start-Class` in the manifest for compatibility with `JarLauncher`).
TIP: Build plugins automatically move the `Main-Class` attribute to `Start-Class` when
the fat jar is built. If you are using that, specify the name of the class to launch using
the `Main-Class` attribute and leave out `Start-Class`.
Environment variables can be capitalized with underscore separators instead of periods.
* `loader.home` is the directory location of an additional properties file (overriding

View File

@@ -246,7 +246,8 @@ its {dependency-management-plugin-documentation}[documentation].
[[build-tool-plugins-gradle-packaging]]
=== Packaging executable jar and war files
Once the `spring-boot` plugin has been applied to your project it will automatically
attempt to rewrite archives to make them executable using the `bootRepackage` task. You
attempt to rewrite archives to make them executable using the
<<build-tool-plugins-gradle-repackage-configuration,`bootRepackage` task>>. You
should configure your project to build a jar or war (as appropriate) in the usual way.
The main class that you want to launch can either be specified using a configuration
@@ -254,6 +255,9 @@ option, or by adding a `Main-Class` attribute to the manifest. If you don't spec
main class the plugin will search for a class with a
`public static void main(String[] args)` method.
TIP: Check <<build-tool-plugins-gradle-repackage-configuration>> for a full list of
configuration options.
To build and run a project artifact, you can type the following:
[indent=0]