diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java index 0423035ff64..899a8f2c090 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java @@ -51,7 +51,7 @@ import org.springframework.boot.loader.tools.Repackager; import org.springframework.boot.loader.tools.Repackager.MainClassTimeoutWarningListener; /** - * Repackages existing JAR and WAR archives so that they can be executed from the command + * Repackage existing JAR and WAR archives so that they can be executed from the command * line using {@literal java -jar}. With layout=NONE can also be used simply * to package a JAR with nested dependencies (and no main class, so not executable). * diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RunMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RunMojo.java index 510ae049a9a..0b398faeee0 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RunMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RunMojo.java @@ -34,7 +34,7 @@ import org.springframework.boot.loader.tools.JavaExecutable; import org.springframework.boot.loader.tools.RunProcess; /** - * Run an executable archive application. + * Run an application in place. * * @author Phillip Webb * @author Dmytro Nosan diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StartMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StartMojo.java index 240d9d41a7c..f1cbfa1bddd 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StartMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StartMojo.java @@ -42,7 +42,7 @@ import org.springframework.boot.loader.tools.RunProcess; /** * Start a spring application. Contrary to the {@code run} goal, this does not block and - * allows other goal to operate on the application. This goal is typically used in + * allows other goals to operate on the application. This goal is typically used in * integration test scenario where the application is started before a test suite and * stopped after. * diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java index 52aae26fd7f..b72f8595844 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java @@ -32,8 +32,8 @@ import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; /** - * Stop a spring application that has been started by the "start" goal. Typically invoked - * once a test suite has completed. + * Stop an application that has been started by the "start" goal. Typically invoked once a + * test suite has completed. * * @author Stephane Nicoll * @since 1.3.0 diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/build-info.apt.vm b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/build-info.apt.vm deleted file mode 100644 index 359a55cabe7..00000000000 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/build-info.apt.vm +++ /dev/null @@ -1,56 +0,0 @@ - ----- - Generate build information - ----- - Stephane Nicoll - ----- - 2016-03-17 - ----- - - Spring Boot Actuator displays build-related information if a <<>> - file is present. The <<>> goal generates such file with the coordinates of the project - and the build time. It also allows you to add an arbitrary number of additional properties: - ---- - - ... - - ... - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - - build-info - - - - UTF-8 - UTF-8 - ${maven.compiler.source} - ${maven.compiler.target} - - - - - ... - - ... - - ... - - ... - ---- - - This configuration will generate a <<>> at the expected location with - four additional keys. Note that <<>> and <<>> - are expected to be regular properties available in the project. They will be interpolated as - you would expect. - - - - diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/custom-layout.apt b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/custom-layout.apt deleted file mode 100644 index 2cffd8f0295..00000000000 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/custom-layout.apt +++ /dev/null @@ -1,59 +0,0 @@ - ----- - Use a custom layout - ----- - Dave Syer - ----- - 2016-10-30 - ----- - - Spring Boot repackages the jar file for this project using a custom layout factory - defined in the additional jar file, provided as a dependency to the build plugin: - ---- - - ... - - ... - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - repackage - - repackage - - - - value - - - - - - - com.example - custom-layout - 0.0.1.BUILD-SNAPSHOT - - - ... - - ... - - ... - - ... - ---- - - The layout factory is provided as an implementation of <<>> (from - spring-boot-loader-tools) explicitly specified in the pom. If there is only one custom - <<>> on the plugin classpath and it is listed in - <<>> then it is unnecessary to explicitly set it in the - plugin configuration. - - Layout factories are always ignored if an explicit <> is set. diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/exclude-dependency.apt.vm b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/exclude-dependency.apt.vm deleted file mode 100644 index a9928369914..00000000000 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/exclude-dependency.apt.vm +++ /dev/null @@ -1,84 +0,0 @@ - ----- - Exclude a dependency - ----- - Stephane Nicoll - ----- - 2014-05-06 - ----- - - By default, both the <<>> and the <<>> goals will include any <<>> - dependencies that are defined in the project. A Spring Boot project should consider - <<>> dependencies as <> dependencies that are required to run - the application. - - Some of these dependencies may not be required at all and should be excluded from the - executable jar. For consistency, they should not be present either when running the - application. - - There are two ways one can exclude a dependency from being packaged/used at runtime - - * Exclude a specific artifact identified by <<>> and <<>> - (optionally with a <<>> if needed) - - * Exclude any artifact belonging to a given <<>> - - [] - - The following excludes <<>> (and only that artifact) - ---- - - ... - - ... - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - - com.foo - bar - - - - ... - - ... - - ... - - ... - ---- - - This example excludes any artifact belonging to the <<>> group - - ---- - - ... - - ... - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - com.foo - - ... - - ... - - ... - - ... - ---- - diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/it-random-port.apt.vm b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/it-random-port.apt.vm deleted file mode 100644 index 8635e87c3bb..00000000000 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/it-random-port.apt.vm +++ /dev/null @@ -1,82 +0,0 @@ - ----- - Random port for integration tests - ----- - Stephane Nicoll - ----- - 2015-04-16 - ----- - - One nice feature of the Spring Boot test integration is that it can allocate a free - port for the web application. When the <<>> goal of the plugin is used, the - Spring Boot application is started separately, making it difficult to pass the actual - port to the integration test itself. - - The example below showcases how you could achieve the same feature using the - {{{https://www.mojohaus.org/build-helper-maven-plugin/}build-helper-plugin}}: - ---- - - ... - - ... - - ... - - org.codehaus.mojo - build-helper-maven-plugin - - - reserve-tomcat-port - - reserve-network-port - - process-resources - - - tomcat.http.port - - - - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - pre-integration-test - - start - - - - --server.port=${tomcat.http.port} - - - - - post-integration-test - - stop - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - - - ${tomcat.http.port} - - - - ... - - ... - ---- - - You can now retrieve the <<>> system property in any of your integration test - to create a proper <<>> to the server. diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/it-skip.apt.vm b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/it-skip.apt.vm deleted file mode 100644 index f846bca20c5..00000000000 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/it-skip.apt.vm +++ /dev/null @@ -1,63 +0,0 @@ - ----- - Skip integration tests - ----- - Stephane Nicoll - ----- - 2016-11-25 - ----- - - The <<>> property allows to skip the execution of the Spring Boot maven plugin - altogether. This example shows how you can skip integration tests with a command-line - property and still make sure that the <> goal runs: - ---- - - - false - ... - - ... - - ... - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - pre-integration-test - - start - - - ${skip.it} - - - - post-integration-test - - stop - - - ${skip.it} - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - - ${skip.it} - - - ... - - ... - ---- - - By default, the integration tests will run but this setup allows you to easily disable - them on the command-line as follows: <<>>. diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/repackage-classifier.apt.vm b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/repackage-classifier.apt.vm deleted file mode 100644 index d64dc2ea643..00000000000 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/repackage-classifier.apt.vm +++ /dev/null @@ -1,187 +0,0 @@ - ----- - Repackage classifier - ----- - Stephane Nicoll - ----- - 2014-05-02 - ----- - - By default, the <<>> goal will replace the original artifact with the - repackaged one. That's a sane behavior for modules that represent an app but if - your module is used as a dependency of another module, you need to provide a - classifier for the repackaged one. - - The reason for that is that application classes are packaged in <<>> - so that the dependent module cannot load a repackaged jar's classes. If that is the - case or if you prefer to keep the original artifact and attach the repackaged one - with a different classifier, configure the plugin as follows: - ---- - - ... - - ... - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - repackage - - repackage - - - exec - - - - ... - - ... - - ... - - ... - ---- - - If you are using `spring-boot-starter-parent`, the `repackage` goal is executed - automatically in an execution with id `repackage`. In that setup, only the configuration - should be specified as shown in the following example: - ---- - - ... - - ... - - ... - - ${project.groupId} - ${project.artifactId} - - - repackage - - exec - - - - ... - - ... - - ... - - ... - ---- - - This configuration will generate two artifacts: the original one and the repackaged - counter part produced by the repackage goal. Both will be installed/deployed - transparently. - - You can also use the same configuration if you want to repackage a secondary artifact - the same way the main artifact is replaced. The following configuration installs/deploys - a single <<>> classified artifact with the repackaged app: - ---- - - ... - - ... - - ... - - org.apache.maven.plugins - maven-jar-plugin - @maven-jar-plugin.version@ - - - - jar - - package - - task - - - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - repackage - - repackage - - - task - - - - ... - - ... - - ... - - ... - ---- - - As both the <<>> and the <<>> runs at the - same phase, it is important that the jar plugin is defined first (so that it runs before - the repackage goal). - - Again, if you are using `spring-boot-starter-parent`, this can be simplified as follows: - ---- - - ... - - ... - - ... - - org.apache.maven.plugins - maven-jar-plugin - - - default-jar - - task - - - - - - ${project.groupId} - ${project.artifactId} - - - repackage - - task - - - - ... - - ... - - ... - - ... - ---- - - - - diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/repackage-disable-attach.apt.vm b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/repackage-disable-attach.apt.vm deleted file mode 100644 index dcd4dfa142c..00000000000 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/repackage-disable-attach.apt.vm +++ /dev/null @@ -1,50 +0,0 @@ - ----- - Local repackaged artifact - ----- - Stephane Nicoll - ----- - 2016-03-01 - ----- - - By default, the <<>> goal will replace the original artifact with the - executable one. If you need to only deploy the original jar and yet be able to - run your app with the regular file name, configure the plugin as follows: - ---- - - ... - - ... - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - repackage - - repackage - - - false - - - - ... - - ... - - ... - - ... - ---- - - This configuration will generate two artifacts: the original one and the executable counter - part produced by the repackage goal. Only the original one will be installed/deployed. - - - - diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/repackage-name.apt.vm b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/repackage-name.apt.vm deleted file mode 100644 index 9a21dd9ff88..00000000000 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/repackage-name.apt.vm +++ /dev/null @@ -1,42 +0,0 @@ - ----- - Repackage classifier - ----- - Stephane Nicoll - ----- - 2019-03-29 - ----- - - If you need the repackaged jar to have a different local name than the one defined by - the <<>> attribute of the project, simply use the standard <<>> - as shown in the following example: - ---- - - ... - - my-app - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - repackage - - repackage - - - - ... - - ... - - ... - - ... - ---- - - This configuration will generate the repackaged artifact in <<>>. diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-debug.apt.vm b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-debug.apt.vm deleted file mode 100644 index d8d5d0261ba..00000000000 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-debug.apt.vm +++ /dev/null @@ -1,47 +0,0 @@ - ----- - Debug the application - ----- - Stephane Nicoll - ----- - 2014-05-14 - ----- - - By default, the <<>> goal runs your application in a forked process. If you need to - debug it, you should add the necessary JVM arguments to enable remote debugging. The - following configuration suspend the process until a debugger has joined on port 5005: - ---- - - ... - - ... - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 - - - ... - - ... - - ... - - ... - ---- - - These arguments can be specified on the command line as well, make sure to wrap that - properly, that is: - ---- -mvn spring-boot:run -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" ---- - - - diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-env-variables.apt.vm b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-env-variables.apt.vm deleted file mode 100644 index 7a3b7e560aa..00000000000 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-env-variables.apt.vm +++ /dev/null @@ -1,51 +0,0 @@ - ----- - Using environment variables - ----- -Dmytro Nosan - ----- - 2018-04-08 - ----- - - Environment variables can be specified using the <<>> attribute. - The following sets the 'ENV1', 'ENV2', 'ENV3', 'ENV4' env variables: - ---- - - ... - - ... - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - 5000 - Some Text - - - - - ... - - ... - - ... - - ... - ---- - - If the value is empty or not defined (i.e. <<<>>>), the env variable is set - with an empty String as the value. Maven trims values specified in the pom so it is - not possible to specify an env variable which needs to start or end with a space. - - Any String typed Maven variable can be passed as system properties. Any attempt to pass - any other Maven variable type (e.g. a <<>> or a <<>> variable) will cause the - variable expression to be passed literally (unevaluated). - - Environment variables defined this way take precedence over existing values. - - diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-profiles.apt.vm b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-profiles.apt.vm deleted file mode 100644 index 203add200eb..00000000000 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-profiles.apt.vm +++ /dev/null @@ -1,47 +0,0 @@ - ----- - Specify active profiles - ----- - Stephane Nicoll - ----- - 2014-07-07 - ----- - - The active profiles to use for a particular application can be specified using the <<>> - argument. The following configuration enables the foo and bar profiles: - ---- - - ... - - ... - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - foo - bar - - - ... - - ... - - ... - - ... - ---- - - The profiles to enable can be specified on the command line as well, make sure to separate them with - a comma, that is: - ---- -mvn spring-boot:run -Dspring-boot.run.profiles=foo,bar ---- - - - diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-system-properties.apt.vm b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-system-properties.apt.vm deleted file mode 100644 index 0483f58f9df..00000000000 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/run-system-properties.apt.vm +++ /dev/null @@ -1,61 +0,0 @@ - ----- - Using System Properties - ----- - Stephane Nicoll - ----- - 2018-04-24 - ----- - - System properties can be specified using the <<>> attribute. - The following sets <<>> to <<>> and <<>> to 42: - ---- - - ... - - - 42 - - ... - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - test - ${my.value} - - - ... - - ... - - ... - - ... - ---- - - If the value is empty or not defined (i.e. <<<>>>), the system property - is set with an empty String as the value. Maven trims values specified in the pom so it - is not possible to specify a System property which needs to start or end with a space via - this mechanism: consider using <<>> instead. - - Any String typed Maven variable can be passed as system properties. Any attempt to pass - any other Maven variable type (e.g. a <<>> or a <<>> variable) will cause the - variable expression to be passed literally (unevaluated). - - The <<>> parameter takes precedence over system properties defined with - the mechanism above. In the following example, the value for <<>> is - <<>>: - - ---- -mvn spring-boot:run -Dspring-boot.run.jvmArguments="-Dproperty1=overridden" ---- - - - diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/index.apt b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/index.apt deleted file mode 100644 index 64cd7a049a6..00000000000 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/index.apt +++ /dev/null @@ -1,74 +0,0 @@ - ----- - Spring Boot - ----- - Stephane Nicoll - ----- - 2014-05-02 - ----- - -Spring Boot Maven Plugin - - The Spring Boot Maven Plugin provides Spring Boot support in Maven, allowing you to package executable - jar or war archives and run an application “in-place”. - -* Goals Overview - - The Spring Boot Plugin has the following goals. - - * {{{./run-mojo.html}spring-boot:run}} runs your Spring Boot application. - - * {{{./repackage-mojo.html}spring-boot:repackage}} repackages your jar/war to be executable. - - * {{{./start-mojo.html}spring-boot:start}} and {{{./stop-mojo.html}spring-boot:stop}} to manage - the lifecycle of your Spring Boot application (i.e. for integration tests). - - * {{{./build-info-mojo.html}spring-boot:build-info}} generates build information that can be used - by the Actuator. - - - -* Usage - - General instructions on how to use the Spring Boot Plugin can be found on the {{{./usage.html}usage page}}. Some - more specific use cases are described in the examples given below. - - In case you still have questions regarding the plugin's usage, please have a look at the existing - {{{https://stackoverflow.com/questions/tagged/spring-boot}stack overflow issue}}. If you still don't get an - answer, feel free to create a new thread with the <<<#spring-boot>>> tag. - - If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report - in our {{{./issue-tracking.html}issue tracker}}. - -* Examples - - To provide you with better understanding of some usages of Spring Boot, you can take a look into - the following examples: - - * {{{./examples/repackage-classifier.html}Custom repackage classifier}} - - * {{{./examples/repackage-name.html}Custom repackage name}} - - * {{{./examples/repackage-disable-attach.html}Local repackaged artifact}} - - * {{{./examples/exclude-dependency.html}Exclude a dependency}} - - * {{{./examples/run-debug.html}Debug the application}} - - * {{{./examples/run-system-properties.html}Using system properties}} - - * {{{./examples/run-env-variables.html}Using environment variables}} - - * {{{./examples/it-random-port.html}Random port for integration tests}} - - * {{{./examples/it-skip.html}Skip integration tests}} - - * {{{./examples/run-profiles.html}Specify active profiles}} - - * {{{./examples/build-info.html}Generate build information}} - - * {{{./examples/custom-layout.html}Custom layout}} - - [] - - - diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/usage.apt.vm b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/usage.apt.vm deleted file mode 100644 index fb70a976975..00000000000 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/usage.apt.vm +++ /dev/null @@ -1,314 +0,0 @@ - - ----- - Usage - ----- - Stephane Nicoll - ----- - 2014-05-06 - ----- - -Usage - - The plugin provides several goals to work with a Spring Boot application: - - * <<>>: create a jar or war file that is auto-executable. It can replace the regular artifact or can be - attached to the build lifecycle with a separate <>. - - * <<>>: run your Spring Boot application with several options to pass parameters to it. - - * <<>> and <<>>: integrate your Spring Boot application to the <<>> phase so that - the application starts before it. - - * <<>>: generate a build information that can be used by the Actuator. - - [] - - Each goal is further described below. - -* Repackaging an application - - In order to repackage your application, you simply need to add a reference to the - plugin in your <<>>: - ---- - - ... - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - - repackage - - - - - ... - - ... - ---- - - The example above repackages a jar or war that is built during the package phase of the Maven lifecycle, - including any <<>> dependencies that are defined in the project. If some of these dependencies - need to be excluded, you can use one of the exclude options, - see {{{./examples/exclude-dependency.html}Exclude a dependency}} for more details. - Please note that the <<>> feature of the <<>> - is currently not supported. - - Devtools is automatically excluded by default (you can control that using the - <<>> property). In order to make that work with <<>> packaging, - the <<>> dependency must be set as <<>> or with the - <<>> scope. - - The original (i.e. non executable) artifact is renamed to <<<.original>>> by default but it is also - possible to keep the original artifact using a custom classifier. - - The plugin rewrites your manifest, and in particular it manages the <> and <> - entries, so if the defaults don't work you have to configure those there (not in the jar plugin). The - <> in the manifest is actually controlled by the <> property of the boot plugin, e.g. - ---- - - ... - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - ${start-class} - ZIP - - - - - repackage - - - - - ... - - ... - ---- - - The <<>> property defaults to a guess based on the archive type (<<>> or <<>>). The - following layouts are available: - - * <<>>: regular executable JAR layout. - - * <<>>: executable WAR layout. <<>> dependencies are placed in <<>> - to avoid any clash when the <<>> is deployed in a servlet container. - - * <<>> (alias to <<>>): similar to the <<>> layout using <<>>. - - * <<>>: Bundle all dependencies and project resources. Does not bundle a bootstrap loader. - - [] - - For more detailed examples of how to configure this goal see: - - * {{{./examples/repackage-classifier.html}Custom repackage classifier}} - - * {{{./examples/exclude-dependency.html}Exclude a dependency}} - - [] - -* Running the application - - The plugin includes a run goal which can be used to launch your application from the command - line: - ---- -mvn spring-boot:run ---- - - By default the application is executed in a forked process and setting properties on the - command-line will not affect the application. If you need to specify some JVM arguments - (i.e. for debugging purposes), you can use the <<>> parameter, see - {{{./examples/run-debug.html}Debug the application}} for more details. There is also - explicit support for {{{./examples/run-system-properties.html}system properties}} and - {{{./examples/run-env-variables.html}environment variables}}. - - As enabling a profile is quite common, there is dedicated <<>> property that - offers a shortcut for - <<<-Dspring-boot.run.jvmArguments="-Dspring.profiles.active=dev">>>, - see {{{./examples/run-profiles.html}Specify active profiles}}. - - Although this is not recommended, it is possible to execute the application directly - from the Maven JVM by disabling the <<>> property. Doing so means that the - <<>>, <<>>, <<>> and - <<>> options are ignored. - - Spring Boot 1.3 has introduced <<>>, a module to improve the development-time - experience when working on Spring Boot applications. To enable it, just add the following - dependency to your project: - ---- - - - org.springframework.boot - spring-boot-devtools - ${project.version} - true - - ---- - - When <<>> is running, it detects change when you recompile your application and - automatically refreshes it. This works for not only resources but code as well. It also - provides a LiveReload server so that it can automatically trigger a browser refresh whenever - things change. - - Devtools can also be configured to only refresh the browser whenever a static resource has - changed (and ignore any change in the code). Just include the following property in your - project: - ---- -spring.devtools.remote.restart.enabled=false ---- - - Prior to <<>>, the plugin supported hot refreshing of resources by default which has - now be disabled in favour of the solution described above. You can restore it at any time by - configuring your project: - ---- - - ... - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - true - - - ... - - ... - ---- - - When <<>> is enabled, any <> folder will be added to - the application classpath when you run the application and any duplicate found in - <> will be removed. This allows hot refreshing of resources which can be very - useful when developing web applications. For example, you can work on HTML, CSS or JavaScript - files and see your changes immediately without recompiling your application. It is also a helpful - way of allowing your front end developers to work without needing to download and install a Java - IDE. - - Note that a side effect of using this feature is that filtering of resources at build time will - not work. - - In order to be consistent with the <<>> goal, the <<>> goal builds the classpath - in such a way that any dependency that is excluded in the plugin's configuration gets excluded - from the classpath as well. See {{{./examples/exclude-dependency.html}Exclude a dependency}} for - more details. - - Sometimes it is useful to include test dependencies when running the application. For example, - if you want to run your application in a test mode that uses stub classes. If you wish to do this, - you can set the <<>> parameter to true. Note that this is only applied when you - run an application: the <<>> goal will not add test dependencies to the resulting JAR/WAR. - -* Working with integration tests - - While you may start your Spring Boot application very easily from your test (or test suite) itself, - it may be desirable to handle that in the build itself. To make sure that the lifecycle of your Spring - Boot application is properly managed your integration tests, you can use the <<>> and - <<>> goals as described below: - ---- - - ... - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - pre-integration-test - - start - - - - post-integration-test - - stop - - - - - ... - - ... - ---- - - Such setup can now use the {{{https://maven.apache.org/surefire/maven-failsafe-plugin/}failsafe-plugin}} to - run your integration tests as you would expect. - - You could also configure a more advanced setup to skip the integration tests when a specific property has - been set: - ---- - - false - - - - - org.apache.maven.plugins - maven-failsafe-plugin - - ${it.skip} - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - pre-integration-test - - start - - - ${it.skip} - - - - post-integration-test - - stop - - - ${it.skip} - - - - - - ---- - - If you run <<>> your integration tests will be skipped altogether. - - - For more detailed examples of how to configure this goal see: - - * {{{./examples/it-random-port.html}Random port for integration tests}} - - [] diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/site.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/site.xml deleted file mode 100644 index 6711b55c15c..00000000000 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/site.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - org.apache.maven.skins - maven-fluido-skin - 1.6 - -