From 4e287594bf6d7e1c6ecd9412631d436e15f883ae Mon Sep 17 00:00:00 2001 From: robert-smith-911 Date: Fri, 5 Mar 2021 21:24:35 -0500 Subject: [PATCH 1/2] Extract XML examples from Maven plugin adoc files See gh-25534 --- .../src/docs/asciidoc/build-info.adoc | 28 +- .../src/docs/asciidoc/getting-started.adoc | 32 +- .../src/docs/asciidoc/integration-tests.adoc | 157 +------ .../docs/asciidoc/packaging-oci-image.adoc | 207 +-------- .../src/docs/asciidoc/packaging.adoc | 417 ++---------------- .../src/docs/asciidoc/running.adoc | 124 +----- .../src/docs/asciidoc/using.adoc | 69 +-- .../src/docs/maven/build-info/pom.xml | 31 ++ .../plugin-repositories-pom.xml | 43 ++ .../src/docs/maven/getting-started/pom.xml | 17 + .../customize-jmx-port-pom.xml | 33 ++ .../src/docs/maven/integration-tests/pom.xml | 30 ++ .../integration-tests/random-port-pom.xml | 62 +++ .../skip-integration-tests-pom.xml | 44 ++ ...mage-example-builder-configuration-pom.xml | 21 + .../packaging-oci-image/buildpacks-pom.xml | 22 + .../custom-image-builder-pom.xml | 20 + .../custom-image-name-pom.xml | 19 + .../maven/packaging-oci-image/docker-pom.xml | 28 ++ .../docker-registry-authentication-pom.xml | 24 + .../packaging-oci-image/docker-remote-pom.xml | 21 + .../docker-token-authentication-pom.xml | 21 + .../maven/packaging-oci-image/paketo-pom.xml | 22 + .../docs/maven/packaging-oci-image/pom.xml | 24 + .../packaging/classified-artifact-pom.xml | 40 ++ .../maven/packaging/custom-layers-pom.xml | 20 + .../maven/packaging/custom-layout-pom.xml | 34 ++ .../docs/maven/packaging/custom-name-pom.xml | 23 + .../packaging/different-classifier-pom.xml | 25 ++ .../maven/packaging/disable-layers-pom.xml | 19 + .../packaging/exclude-artifact-group-pom.xml | 17 + .../maven/packaging/exclude-artifact-pom.xml | 22 + .../packaging/exclude-dependency-pom.xml | 19 + .../maven/packaging/jar-plugin-first-pom.xml | 34 ++ .../maven/packaging/layers-configuration.xml | 29 ++ .../src/docs/maven/packaging/layers.xml | 28 ++ .../local-repackaged-artifact-pom.xml | 25 ++ .../docs/maven/packaging/non-default-pom.xml | 28 ++ .../packaging/repackage-configuration-pom.xml | 22 + .../docs/maven/packaging/repackage-pom.xml | 24 + .../maven/running/active-profiles-pom.xml | 19 + .../running/application-arguments-pom.xml | 21 + .../src/docs/maven/running/debug-pom.xml | 20 + .../src/docs/maven/running/devtools-pom.xml | 26 ++ .../running/environment-variables-pom.xml | 23 + .../docs/maven/running/hot-refresh-pom.xml | 29 ++ .../maven/running/system-properties-pom.xml | 24 + .../maven/using/default-and-override-pom.xml | 20 + .../maven/using/different-versions-pom.xml | 22 + ...arter-parent-override-dependencies-pom.xml | 43 ++ .../maven/using/no-starter-parent-pom.xml | 30 ++ 51 files changed, 1275 insertions(+), 927 deletions(-) create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/build-info/pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/getting-started/plugin-repositories-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/getting-started/pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/customize-jmx-port-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/random-port-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/skip-integration-tests-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/build-image-example-builder-configuration-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/buildpacks-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/custom-image-builder-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/custom-image-name-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-registry-authentication-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-remote-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-token-authentication-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/paketo-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/classified-artifact-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/custom-layers-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/custom-layout-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/custom-name-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/different-classifier-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/disable-layers-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-artifact-group-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-artifact-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-dependency-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/jar-plugin-first-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/layers-configuration.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/layers.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/local-repackaged-artifact-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/non-default-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/repackage-configuration-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/repackage-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/active-profiles-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/application-arguments-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/debug-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/devtools-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/environment-variables-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/hot-refresh-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/system-properties-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/using/default-and-override-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/using/different-versions-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/using/no-starter-parent-override-dependencies-pom.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/using/no-starter-parent-pom.xml diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/build-info.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/build-info.adoc index 252d2d7c44..e5f9612c84 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/build-info.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/build-info.adoc @@ -4,33 +4,9 @@ Spring Boot Actuator displays build-related information if a `META-INF/build-inf The `build-info` 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, as shown in the following example: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - build-info - - - - UTF-8 - UTF-8 - ${maven.compiler.source} - ${maven.compiler.target} - - - - - - - - +include::../maven/build-info/pom.xml[tags=build-info] ---- This configuration will generate a `build-info.properties` at the expected location with four additional keys. diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/getting-started.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/getting-started.adoc index a3ed014f0f..36ea76c2c4 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/getting-started.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/getting-started.adoc @@ -2,38 +2,18 @@ == Getting Started To use the Spring Boot Maven Plugin, include the appropriate XML in the `plugins` section of your `pom.xml`, as shown in the following example: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - 4.0.0 - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - +include::../maven/getting-started/pom.xml[tags=getting-started] ---- + + If you use a milestone or snapshot release, you also need to add the appropriate `pluginRepository` elements, as shown in the following listing: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - spring-snapshots - https://repo.spring.io/snapshot - - - spring-milestones - https://repo.spring.io/milestone - - +include::../maven/getting-started/plugin-repositories-pom.xml[tags=plugin-repositories] ---- diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/integration-tests.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/integration-tests.adoc index e16cdf7c88..b844cd75f8 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/integration-tests.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/integration-tests.adoc @@ -3,30 +3,9 @@ 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 around your integration tests, you can use the `start` and `stop` goals, as shown in the following example: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - org.springframework.boot - spring-boot-maven-plugin - - - pre-integration-test - - start - - - - post-integration-test - - stop - - - - - - +include::../maven/integration-tests/pom.xml[tags=integration-tests] ---- 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. @@ -73,64 +52,9 @@ When the `start` goal of the plugin is used, the Spring Boot application is star The example below showcases how you could achieve the same feature using the https://www.mojohaus.org/build-helper-maven-plugin[Build Helper Maven Plugin]: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - reserve-tomcat-port - - reserve-network-port - - process-resources - - - tomcat.http.port - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - pre-integration-test - - start - - - - --server.port=${tomcat.http.port} - - - - - post-integration-test - - stop - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - - - ${tomcat.http.port} - - - - - - +include::../maven/integration-tests/random-port-pom.xml[tags=random-port] ---- You can now retrieve the `test.server.port` system property in any of your integration test to create a proper `URL` to the server. @@ -143,35 +67,9 @@ The `jmxPort` property allows to customize the port the plugin uses to communica This example shows how you can customize the port in case `9001` is already used: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - 9009 - - - - pre-integration-test - - start - - - - post-integration-test - - stop - - - - - - - +include::../maven/integration-tests/customize-jmx-port-pom.xml[tags=customize-jmx-port] ---- TIP: If you need to configure the JMX port, make sure to do so in the global configuration as shown above so that it is shared by both goals. @@ -184,48 +82,9 @@ The `skip` property allows to skip the execution of the Spring Boot maven plugin This example shows how you can skip integration tests with a command-line property and still make sure that the `repackage` goal runs: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - false - - - - - org.springframework.boot - spring-boot-maven-plugin - - - pre-integration-test - - start - - - ${skip.it} - - - - post-integration-test - - stop - - - ${skip.it} - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - - ${skip.it} - - - - - +include::../maven/integration-tests/skip-integration-tests-pom.xml[tags=skip-integration-tests] ---- 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/docs/asciidoc/packaging-oci-image.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging-oci-image.adoc index 4ba97837ab..de9b32cca6 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging-oci-image.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging-oci-image.adoc @@ -9,23 +9,9 @@ See the {buildpacks-reference}/reference/spec/platform-api/#users[CNB specificat The easiest way to get started is to invoke `mvn spring-boot:build-image` on a project. It is possible to automate the creation of an image whenever the `package` phase is invoked, as shown in the following example: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - org.springframework.boot - spring-boot-maven-plugin - - - - build-image - - - - - - +include::../maven/packaging-oci-image/pom.xml[tags=packaging-oci-image] ---- TIP: While the buildpack runs from an <>, it is not necessary to execute the `repackage` goal first as the executable archive is created automatically if necessary. @@ -213,24 +199,9 @@ include::goals/build-image.adoc[leveloffset=+1] ==== Custom Image Builder If you need to customize the builder used to create the image or the run image used to launch the built image, configure the plugin as shown in the following example: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - mine/java-cnb-builder - mine/java-cnb-run - - - - - - +include::../maven/packaging-oci-image/custom-image-builder-pom.xml[tags=custom-image-builder] ---- This configuration will use a builder image with the name `mine/java-cnb-builder` and the tag `latest`, and the run image named `mine/java-cnb-run` and the tag `latest`. @@ -250,25 +221,9 @@ If the builder exposes configuration options using environment variables, those The following is an example of {paketo-java-reference}/#configuring-the-jvm-version[configuring the JVM version] used by the Paketo Java buildpacks at build time: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - 8.* - - - - - - - +include::../maven/packaging-oci-image/build-image-example-builder-configuration-pom.xml[tags=build-image-example-builder-configuration] ---- In a similar way, Paketo Java buildpacks support {paketo-java-reference}/#runtime-jvm-configuration[configuring JVM runtime behavior]. @@ -277,26 +232,9 @@ Refer to the {paketo-java-reference}[Paketo documentation] for additional config If there is a network proxy between the Docker daemon the builder runs in and network locations that buildpacks download artifacts from, you will need to configure the builder to use the proxy. When using the Paketo builder, this can be accomplished by setting the `HTTPS_PROXY` and/or `HTTP_PROXY` environment variables as show in the following example: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - http://proxy.example.com - https://proxy.example.com - - - - - - - +include::../maven/packaging-oci-image/paketo-pom.xml[tags=paketo] ---- @@ -306,23 +244,9 @@ When using the Paketo builder, this can be accomplished by setting the `HTTPS_PR By default, the image name is inferred from the `artifactId` and the `version` of the project, something like `docker.io/library/${project.artifactId}:${project.version}`. You can take control over the name, as shown in the following example: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - example.com/library/${project.artifactId} - - - - - - +include::../maven/packaging-oci-image/custom-image-name-pom.xml[tags=custom-image-name] ---- NOTE: This configuration does not provide an explicit tag so `latest` is used. @@ -345,26 +269,9 @@ When one or more buildpacks are provided, only the specified buildpacks will be The following example instructs the builder to use a custom buildpack packaged in a `.tgz` file, followed by a buildpack included in the builder. -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - file:///path/to/example-buildpack.tgz - urn:cnb:builder:paketo-buildpacks/java - - - - - - - +include::../maven/packaging-oci-image/buildpacks-pom.xml[tags=buildpacks] ---- Buildpacks can be specified in any of the forms shown below. @@ -401,32 +308,9 @@ An OCI image containing a https://buildpacks.io/docs/buildpack-author-guide/pack ==== Image Publishing The generated image can be published to a Docker registry by enabling a `publish` option and configuring authentication for the registry using `docker.publishRegistry` parameters. -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - docker.example.com/library/${project.artifactId} - true - - - - user - secret - https://docker.example.com/v1/ - user@example.com - - - - - - - +include::../maven/packaging-oci-image/docker-pom.xml[tags=docker] ---- The `publish` option can be specified on the command line as well, as shown in this example: @@ -442,72 +326,21 @@ The `publish` option can be specified on the command line as well, as shown in t ==== Docker Configuration If you need the plugin to communicate with the Docker daemon using a remote connection instead of the default local connection, the connection details can be provided using `docker` parameters as shown in the following example: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - tcp://192.168.99.100:2376 - true - /home/user/.minikube/certs - - - - - - +include::../maven/packaging-oci-image/docker-remote-pom.xml[tags=docker-remote] ---- If the builder or run image are stored in a private Docker registry that supports user authentication, authentication details can be provided using `docker.builderRegistry` parameters as shown in the following example: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - user - secret - https://docker.example.com/v1/ - user@example.com - - - - - - - +include::../maven/packaging-oci-image/docker-registry-authentication-pom.xml[tags=docker-registry-authentication] ---- If the builder or run image is stored in a private Docker registry that supports token authentication, the token value can be provided using `docker.builderRegistry` parameters as shown in the following example: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - 9cbaf023786cd7... - - - - - - - +include::../maven/packaging-oci-image/docker-token-authentication-pom.xml[tags=docker-token-authentication] ---- diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging.adoc index 1787519fe7..a37810df33 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging.adoc @@ -5,23 +5,9 @@ The plugin can create executable archives (jar files and war files) that contain Packaging an executable archive is performed by the `repackage` goal, as shown in the following example: -[source,xml,indent=0,subs="verbatim,attributes"] ----- - - - - org.springframework.boot - spring-boot-maven-plugin - - - - repackage - - - - - - +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] +---- +include::../maven/packaging/repackage-pom.xml[tags=repackage] ---- TIP: If you are using `spring-boot-starter-parent`, such execution is already pre-configured with a `repackage` execution ID so that only the plugin definition should be added. @@ -40,27 +26,9 @@ The plugin rewrites your manifest, and in particular it manages the `Main-Class` If the defaults don't work you have to configure the values in the Spring Boot plugin, not in the jar plugin. The `Main-Class` in the manifest is controlled by the `layout` property of the Spring Boot plugin, as shown in the following example: -[source,xml,indent=0,subs="verbatim,attributes"] ----- - - - - org.springframework.boot - spring-boot-maven-plugin - - ${start.class} - ZIP - - - - - repackage - - - - - - +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] +---- +include::../maven/packaging/non-default-pom.xml[tags=non-default] ---- The `layout` property defaults to a value determined by the archive type (`jar` or `war`). The following layouts are available: @@ -97,86 +65,32 @@ Content that is least likely to change should be added first, followed by layers The repackaged archive includes the `layers.idx` file by default. To disable this feature, you can do so in the following manner: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - false - - - - - - +include::../maven/packaging/disable-layers-pom.xml[tags=disable-layers] ---- - [[repackage-layers-configuration]] ==== Custom Layers Configuration Depending on your application, you may want to tune how layers are created and add new ones. This can be done using a separate configuration file that should be registered as shown below: -[source,xml,indent=0,subs="verbatim,attributes"] ----- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - true - ${project.basedir}/src/layers.xml - - - - - - +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] +---- +include::../maven/packaging/custom-layers-pom.xml[tags=custom-layers] ---- The configuration file describes how an archive can be separated into layers, and the order of those layers. The following example shows how the default ordering described above can be defined explicitly: -[source,xml,indent=0,subs="verbatim,attributes"] ----- - - - - org/springframework/boot/loader/** - - - - - - - - - *:*:*SNAPSHOT - - - - - dependencies - spring-boot-loader - snapshot-dependencies - application - - +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] +---- +include::../maven/packaging/layers.xml[tags=layers] ---- + The `layers` XML format is defined in three sections: * The `` block defines how the application classes and resources should be layered. @@ -224,55 +138,19 @@ The reason for that is that application classes are packaged in `BOOT-INF/classe 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 shown in the following example: -[source,xml,indent=0,subs="verbatim,attributes"] ----- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - repackage - - repackage - - - exec - - - - - - - +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] +---- +include::../maven/packaging/different-classifier-pom.xml[tags=different-classifier] ---- 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: -[source,xml,indent=0,subs="verbatim,attributes"] ----- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - repackage - - exec - - - - - - - +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- +include::../maven/packaging/repackage-configuration-pom.xml[tags=repackage-configuration] +---- + 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. @@ -280,81 +158,18 @@ 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 `task` classified artifact with the repackaged application: -[source,xml,indent=0,subs="verbatim,attributes"] ----- - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - jar - - package - - task - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - repackage - - repackage - - - task - - - - - - - +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- +include::../maven/packaging/classified-artifact-pom.xml[tags=classified-artifact] +---- + As both the `maven-jar-plugin` and the `spring-boot-maven-plugin` 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: -[source,xml,indent=0,subs="verbatim,attributes"] ----- - - - - - org.apache.maven.plugins - maven-jar-plugin - - - default-jar - - task - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - repackage - - task - - - - - - - +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] +---- +include::../maven/packaging/classified-artifact-pom.xml[tags=classified-artifact] ---- @@ -363,27 +178,9 @@ Again, if you are using `spring-boot-starter-parent`, this can be simplified as ==== Custom Name If you need the repackaged jar to have a different local name than the one defined by the `artifactId` attribute of the project, use the standard `finalName`, as shown in the following example: -[source,xml,indent=0,subs="verbatim,attributes"] ----- - - - my-app - - - org.springframework.boot - spring-boot-maven-plugin - - - repackage - - repackage - - - - - - - +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] +---- +include::../maven/packaging/custom-name-pom.xml[tags=custom-name] ---- This configuration will generate the repackaged artifact in `target/my-app.jar`. @@ -395,29 +192,9 @@ This configuration will generate the repackaged artifact in `target/my-app.jar`. By default, the `repackage` goal replaces 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: -[source,xml,indent=0,subs="verbatim,attributes"] ----- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - repackage - - repackage - - - false - - - - - - - +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] +---- +include::../maven/packaging/local-repackaged-artifact-pom.xml[tags=local-repackaged-artifact] ---- This configuration generates two artifacts: the original one and the executable counter part produced by the `repackage` goal. @@ -429,38 +206,9 @@ Only the original one will be installed/deployed. ==== Custom Layout 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: -[source,xml,indent=0,subs="verbatim,attributes"] ----- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - repackage - - repackage - - - - value - - - - - - - com.example - custom-layout - 0.0.1.BUILD-SNAPSHOT - - - - - - +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] +---- +include::../maven/packaging/custom-layout-pom.xml[tags=custom-layout] ---- The layout factory is provided as an implementation of `LayoutFactory` (from `spring-boot-loader-tools`) explicitly specified in the pom. @@ -485,45 +233,16 @@ There are two ways one can exclude a dependency from being packaged/used at runt The following example excludes `com.foo:bar`, and only that artifact: -[source,xml,indent=0,subs="verbatim,attributes"] ----- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - com.foo - bar - - - - - - - +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] +---- +include::../maven/packaging/exclude-artifact-pom.xml[tags=exclude-artifact] ---- This example excludes any artifact belonging to the `com.foo` group: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - com.foo - - - - - +include::../maven/packaging/exclude-artifact-group-pom.xml[tags=exclude-artifact-group] ---- @@ -534,23 +253,9 @@ When a layered jar or war is created, the `spring-boot-jarmode-layertools` jar w With this jar on the classpath, you can launch your application in a special mode which allows the bootstrap code to run something entirely different from your application, for example, something that extracts the layers. If you wish to exclude this dependency, you can do so in the following manner: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - false - - - - - - +include::../maven/packaging/exclude-dependency-pom.xml[tags=exclude-dependency] ---- @@ -561,35 +266,9 @@ The default setup splits dependencies into snapshot and non-snapshot, however, y For example, you may want to isolate company-specific dependencies of your project in a dedicated layer. The following `layers.xml` configuration shown one such setup: -[source,xml,indent=0,subs="verbatim,attributes"] ----- - - - - org/springframework/boot/loader/** - - - - - - *:*:*SNAPSHOT - - - com.acme:* - - - - - dependencies - spring-boot-loader - snapshot-dependencies - company-dependencies - application - - +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] +---- +include::../maven/packaging/layers-configuration.xml[tags=layers-configuration] ---- The configuration above creates an additional `company-dependencies` layer with all libraries with the `com.acme` groupId. diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/running.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/running.adoc index 7b11efc629..ac3a3b0819 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/running.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/running.adoc @@ -21,17 +21,12 @@ Doing so means that the `jvmArguments`, `systemPropertyVariables`, `environmentV Spring Boot `devtools` is 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: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - org.springframework.boot - spring-boot-devtools - true - - +include::../maven/running/devtools-pom.xml[tags=devtools] ---- + When `devtools` 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. @@ -47,19 +42,9 @@ Just include the following property in your project: Prior to `devtools`, 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: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - org.springframework.boot - spring-boot-maven-plugin - - true - - - - +include::../maven/running/hot-refresh-pom.xml[tags=hot-refresh] ---- When `addResources` is enabled, any `src/main/resources` directory will be added to the application classpath when you run the application and any duplicate found in `target/classes` will be removed. @@ -93,23 +78,9 @@ By default, the `run` 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: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 - - - - - - +include::../maven/running/debug-pom.xml[tags=debug] ---- These arguments can be specified on the command line as well, make sure to wrap that properly, that is: @@ -126,27 +97,9 @@ These arguments can be specified on the command line as well, make sure to wrap System properties can be specified using the `systemPropertyVariables` attribute. The following example sets `property1` to `test` and `property2` to 42: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - 42 - - - - org.springframework.boot - spring-boot-maven-plugin - - - test - ${my.value} - - - - - - +include::../maven/running/system-properties-pom.xml[tags=system-properties] ---- If the value is empty or not defined (i.e. `), the system property is set with an empty String as the value. @@ -170,26 +123,9 @@ In the following example, the value for `property1` is `overridden`: Environment variables can be specified using the `environmentVariables` attribute. The following example sets the 'ENV1', 'ENV2', 'ENV3', 'ENV4' env variables: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - 5000 - Some Text - - - - - - - - +include::../maven/running/environment-variables-pom.xml[tags=environment-variables] ---- If the value is empty or not defined (i.e. `), the env variable is set with an empty String as the value. @@ -207,24 +143,9 @@ Environment variables defined this way take precedence over existing values. Application arguments can be specified using the `arguments` attribute. The following example sets two arguments: `property1` and `property2=42`: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - property1 - property2=${my.value} - - - - - - +include::../maven/running/application-arguments-pom.xml[tags=application-arguments] ---- On the command-line, arguments are separated by a space the same way `jvmArguments` are. @@ -244,24 +165,9 @@ The active profiles to use for a particular application can be specified using t The following configuration enables the `foo` and `bar` profiles: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-maven-plugin - - - foo - bar - - - - - - +include::../maven/running/active-profiles-pom.xml[tags=active-profiles] ---- The profiles to enable can be specified on the command line as well, make sure to separate them with a comma, as shown in the following example: diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/using.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/using.adoc index 330a076d8b..0ad9ba34ca 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/using.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/using.adoc @@ -37,12 +37,9 @@ If you import additional starters, you can safely omit the version number. With that setup, you can also override individual dependencies by overriding a property in your own project. For instance, to use a different version of the SLF4J library and the Spring Data release train, you would add the following to your `pom.xml`: -[source,xml,indent=0,subs="verbatim,quotes,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - 1.7.30 - Moore-SR6 - +include::../maven/using/different-versions-pom.xml[tags=different-versions] ---- Browse the {version-properties-appendix}[`Dependency versions Appendix`] in the Spring Boot reference for a complete list of dependency version properties. @@ -56,53 +53,18 @@ You may have your own corporate standard parent that you need to use or you may If you do not want to use the `spring-boot-starter-parent`, you can still keep the benefit of the dependency management (but not the plugin management) by using an `import` scoped dependency, as follows: -[source,xml,indent=0,subs="verbatim,quotes,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.springframework.boot - spring-boot-dependencies - {gradle-project-version} - pom - import - - - +include::../maven/using/no-starter-parent-pom.xml[tags=no-starter-parent] ---- The preceding sample setup does not let you override individual dependencies by using properties, as explained above. To achieve the same result, you need to add entries in the `dependencyManagement` section of your project **before** the `spring-boot-dependencies` entry. For instance, to use a different version of the SLF4J library and the Spring Data release train, you could add the following elements to your `pom.xml`: -[source,xml,indent=0,subs="verbatim,quotes,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - - - org.slf4j - slf4j-api - 1.7.30 - - - - org.springframework.data - spring-data-releasetrain - 2020.0.0-SR1 - pom - import - - - org.springframework.boot - spring-boot-dependencies - {gradle-project-version} - pom - import - - - +include::../maven/using/no-starter-parent-override-dependencies-pom.xml[tags=no-starter-parent-override-dependencies] ---- @@ -120,24 +82,9 @@ For instance, you could tune the profiles to enable when running the application If you want to both have a default while allowing it to be overridden on the command-line, you should use a combination of a user-provided project property and MOJO configuration. -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - - local,dev - - - - - org.springframework.boot - spring-boot-maven-plugin - - ${app.profiles} - - - - - +include::../maven/using/default-and-override-pom.xml[tags=default-and-override] ---- The above makes sure that `local` and `dev` are enabled by default. diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/build-info/pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/build-info/pom.xml new file mode 100644 index 0000000000..976cd10e77 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/build-info/pom.xml @@ -0,0 +1,31 @@ + + + + 4.0.0 + build-info + + + + org.springframework.boot + spring-boot-maven-plugin + + + + build-info + + + + UTF-8 + UTF-8 + ${maven.compiler.source} + ${maven.compiler.target} + + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/getting-started/plugin-repositories-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/getting-started/plugin-repositories-pom.xml new file mode 100644 index 0000000000..ff2203b1ef --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/getting-started/plugin-repositories-pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + getting-started + + + + org.springframework.boot + spring-boot-maven-plugin + + + + build-info + + + + UTF-8 + UTF-8 + ${maven.compiler.source} + ${maven.compiler.target} + + + + + + + + + + + + spring-snapshots + https://repo.spring.io/snapshot + + + spring-milestones + https://repo.spring.io/milestone + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/getting-started/pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/getting-started/pom.xml new file mode 100644 index 0000000000..6c2d900e60 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/getting-started/pom.xml @@ -0,0 +1,17 @@ + + + + 4.0.0 + getting-started + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/customize-jmx-port-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/customize-jmx-port-pom.xml new file mode 100644 index 0000000000..4c57c01bea --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/customize-jmx-port-pom.xml @@ -0,0 +1,33 @@ + + + 4.0.0 + integration-tests + + + + + org.springframework.boot + spring-boot-maven-plugin + + 9009 + + + + pre-integration-test + + start + + + + post-integration-test + + stop + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/pom.xml new file mode 100644 index 0000000000..fdbbe34966 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/pom.xml @@ -0,0 +1,30 @@ + + + 4.0.0 + integration-tests + + + + + org.springframework.boot + spring-boot-maven-plugin + + + pre-integration-test + + start + + + + post-integration-test + + stop + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/random-port-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/random-port-pom.xml new file mode 100644 index 0000000000..202b30600e --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/random-port-pom.xml @@ -0,0 +1,62 @@ + + + 4.0.0 + integration-tests + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + reserve-tomcat-port + + reserve-network-port + + process-resources + + + tomcat.http.port + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + pre-integration-test + + start + + + + --server.port=${tomcat.http.port} + + + + + post-integration-test + + stop + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + ${tomcat.http.port} + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/skip-integration-tests-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/skip-integration-tests-pom.xml new file mode 100644 index 0000000000..ef2d20d023 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/skip-integration-tests-pom.xml @@ -0,0 +1,44 @@ + + + + + false + + + + + org.springframework.boot + spring-boot-maven-plugin + + + pre-integration-test + + start + + + ${skip.it} + + + + post-integration-test + + stop + + + ${skip.it} + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + ${skip.it} + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/build-image-example-builder-configuration-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/build-image-example-builder-configuration-pom.xml new file mode 100644 index 0000000000..5e6dde3e79 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/build-image-example-builder-configuration-pom.xml @@ -0,0 +1,21 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + 8.* + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/buildpacks-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/buildpacks-pom.xml new file mode 100644 index 0000000000..fed32dda88 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/buildpacks-pom.xml @@ -0,0 +1,22 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + file:///path/to/example-buildpack.tgz + urn:cnb:builder:paketo-buildpacks/java + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/custom-image-builder-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/custom-image-builder-pom.xml new file mode 100644 index 0000000000..f93c97fa62 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/custom-image-builder-pom.xml @@ -0,0 +1,20 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + mine/java-cnb-builder + mine/java-cnb-run + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/custom-image-name-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/custom-image-name-pom.xml new file mode 100644 index 0000000000..7a89363fe0 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/custom-image-name-pom.xml @@ -0,0 +1,19 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + example.com/library/${project.artifactId} + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-pom.xml new file mode 100644 index 0000000000..377b0c7172 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-pom.xml @@ -0,0 +1,28 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + docker.example.com/library/${project.artifactId} + true + + + + user + secret + https://docker.example.com/v1/ + user@example.com + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-registry-authentication-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-registry-authentication-pom.xml new file mode 100644 index 0000000000..478aaf0194 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-registry-authentication-pom.xml @@ -0,0 +1,24 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + user + secret + https://docker.example.com/v1/ + user@example.com + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-remote-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-remote-pom.xml new file mode 100644 index 0000000000..942e3cdebd --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-remote-pom.xml @@ -0,0 +1,21 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + tcp://192.168.99.100:2376 + true + /home/user/.minikube/certs + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-token-authentication-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-token-authentication-pom.xml new file mode 100644 index 0000000000..6ac77fab6b --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-token-authentication-pom.xml @@ -0,0 +1,21 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + 9cbaf023786cd7... + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/paketo-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/paketo-pom.xml new file mode 100644 index 0000000000..ce818d71fc --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/paketo-pom.xml @@ -0,0 +1,22 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + http://proxy.example.com + https://proxy.example.com + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/pom.xml new file mode 100644 index 0000000000..7445b14ad6 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/pom.xml @@ -0,0 +1,24 @@ + + + 4.0.0 + packaging-oci-image + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + build-image + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/classified-artifact-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/classified-artifact-pom.xml new file mode 100644 index 0000000000..a6cfd32304 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/classified-artifact-pom.xml @@ -0,0 +1,40 @@ + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + jar + + package + + task + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + repackage + + repackage + + + task + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/custom-layers-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/custom-layers-pom.xml new file mode 100644 index 0000000000..3a1af1c8d0 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/custom-layers-pom.xml @@ -0,0 +1,20 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + true + ${project.basedir}/src/layers.xml + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/custom-layout-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/custom-layout-pom.xml new file mode 100644 index 0000000000..3e751124f0 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/custom-layout-pom.xml @@ -0,0 +1,34 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + repackage + + repackage + + + + value + + + + + + + com.example + custom-layout + 0.0.1.BUILD-SNAPSHOT + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/custom-name-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/custom-name-pom.xml new file mode 100644 index 0000000000..d37ba27d3b --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/custom-name-pom.xml @@ -0,0 +1,23 @@ + + + + + my-app + + + org.springframework.boot + spring-boot-maven-plugin + + + repackage + + repackage + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/different-classifier-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/different-classifier-pom.xml new file mode 100644 index 0000000000..ec685d964d --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/different-classifier-pom.xml @@ -0,0 +1,25 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + repackage + + repackage + + + exec + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/disable-layers-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/disable-layers-pom.xml new file mode 100644 index 0000000000..22d47df36b --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/disable-layers-pom.xml @@ -0,0 +1,19 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + false + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-artifact-group-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-artifact-group-pom.xml new file mode 100644 index 0000000000..1f69dbd062 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-artifact-group-pom.xml @@ -0,0 +1,17 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + com.foo + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-artifact-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-artifact-pom.xml new file mode 100644 index 0000000000..85ede9915c --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-artifact-pom.xml @@ -0,0 +1,22 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + com.foo + bar + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-dependency-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-dependency-pom.xml new file mode 100644 index 0000000000..511cc00860 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-dependency-pom.xml @@ -0,0 +1,19 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + false + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/jar-plugin-first-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/jar-plugin-first-pom.xml new file mode 100644 index 0000000000..1aa849fd0f --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/jar-plugin-first-pom.xml @@ -0,0 +1,34 @@ + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + default-jar + + task + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + repackage + + task + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/layers-configuration.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/layers-configuration.xml new file mode 100644 index 0000000000..d2cc497dc8 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/layers-configuration.xml @@ -0,0 +1,29 @@ + + + + + org/springframework/boot/loader/** + + + + + + *:*:*SNAPSHOT + + + com.acme:* + + + + + dependencies + spring-boot-loader + snapshot-dependencies + company-dependencies + application + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/layers.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/layers.xml new file mode 100644 index 0000000000..93cbee9272 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/layers.xml @@ -0,0 +1,28 @@ + + + + + org/springframework/boot/loader/** + + + + + + + + + *:*:*SNAPSHOT + + + + + dependencies + spring-boot-loader + snapshot-dependencies + application + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/local-repackaged-artifact-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/local-repackaged-artifact-pom.xml new file mode 100644 index 0000000000..137e455e24 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/local-repackaged-artifact-pom.xml @@ -0,0 +1,25 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + repackage + + repackage + + + false + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/non-default-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/non-default-pom.xml new file mode 100644 index 0000000000..ded8bc10bd --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/non-default-pom.xml @@ -0,0 +1,28 @@ + + + 4.0.0 + packaging + + + + + + org.springframework.boot + spring-boot-maven-plugin + + ${start.class} + ZIP + + + + + repackage + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/repackage-configuration-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/repackage-configuration-pom.xml new file mode 100644 index 0000000000..5878dbd5ca --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/repackage-configuration-pom.xml @@ -0,0 +1,22 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + repackage + + exec + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/repackage-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/repackage-pom.xml new file mode 100644 index 0000000000..c5401e6098 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/repackage-pom.xml @@ -0,0 +1,24 @@ + + + + 4.0.0 + packaging + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/active-profiles-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/active-profiles-pom.xml new file mode 100644 index 0000000000..3a3daddb1f --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/active-profiles-pom.xml @@ -0,0 +1,19 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + foo + bar + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/application-arguments-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/application-arguments-pom.xml new file mode 100644 index 0000000000..cf0a1848a2 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/application-arguments-pom.xml @@ -0,0 +1,21 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + property1 + property2=${my.value} + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/debug-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/debug-pom.xml new file mode 100644 index 0000000000..08db158eb8 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/debug-pom.xml @@ -0,0 +1,20 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + -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/docs/maven/running/devtools-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/devtools-pom.xml new file mode 100644 index 0000000000..222b96c2bd --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/devtools-pom.xml @@ -0,0 +1,26 @@ + + + 4.0.0 + running + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + + + org.springframework.boot + spring-boot-devtools + true + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/environment-variables-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/environment-variables-pom.xml new file mode 100644 index 0000000000..ebc1741b10 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/environment-variables-pom.xml @@ -0,0 +1,23 @@ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + 5000 + Some Text + + + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/hot-refresh-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/hot-refresh-pom.xml new file mode 100644 index 0000000000..190bd2c561 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/hot-refresh-pom.xml @@ -0,0 +1,29 @@ + + + 4.0.0 + getting-started + + + + + + org.springframework.boot + spring-boot-maven-plugin + + true + + + + + + + + + org.springframework.boot + spring-boot-devtools + true + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/system-properties-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/system-properties-pom.xml new file mode 100644 index 0000000000..5923b0dd3d --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/system-properties-pom.xml @@ -0,0 +1,24 @@ + + + + + + 42 + + + + org.springframework.boot + spring-boot-maven-plugin + + + test + ${my.value} + + + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/using/default-and-override-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/using/default-and-override-pom.xml new file mode 100644 index 0000000000..a317af82da --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/using/default-and-override-pom.xml @@ -0,0 +1,20 @@ + + + + + local,dev + + + + + org.springframework.boot + spring-boot-maven-plugin + + ${app.profiles} + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/using/different-versions-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/using/different-versions-pom.xml new file mode 100644 index 0000000000..ec86e1c004 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/using/different-versions-pom.xml @@ -0,0 +1,22 @@ + + + 4.0.0 + getting-started + + + + 1.7.30 + Moore-SR6 + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/using/no-starter-parent-override-dependencies-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/using/no-starter-parent-override-dependencies-pom.xml new file mode 100644 index 0000000000..577be603ca --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/using/no-starter-parent-override-dependencies-pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + getting-started + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + + + + + org.slf4j + slf4j-api + 1.7.30 + + + + org.springframework.data + spring-data-releasetrain + 2020.0.0-SR1 + pom + import + + + org.springframework.boot + spring-boot-dependencies + {gradle-project-version} + pom + import + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/using/no-starter-parent-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/using/no-starter-parent-pom.xml new file mode 100644 index 0000000000..b5aaf8815d --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/using/no-starter-parent-pom.xml @@ -0,0 +1,30 @@ + + + 4.0.0 + using + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + + + + + org.springframework.boot + spring-boot-dependencies + {gradle-project-version} + pom + import + + + + + + From 5595fb242382a9ee0f8cfc146b915163366295dc Mon Sep 17 00:00:00 2001 From: Scott Frederick Date: Wed, 31 Mar 2021 14:04:25 -0500 Subject: [PATCH 2/2] Polish "Extract XML examples from Maven plugin adoc files" See gh-25534 --- .../src/docs/asciidoc/integration-tests.adoc | 10 ++-------- .../src/docs/asciidoc/packaging.adoc | 6 +++--- .../src/docs/asciidoc/running.adoc | 4 ++-- .../maven/integration-tests/failsafe-pom.xml | 19 +++++++++++++++++++ .../packaging/exclude-artifact-group-pom.xml | 2 +- .../maven/packaging/exclude-artifact-pom.xml | 4 ++-- .../maven/packaging/jar-plugin-first-pom.xml | 4 ++-- .../docs/maven/packaging/repackage-pom.xml | 5 ++--- .../maven/running/active-profiles-pom.xml | 4 ++-- 9 files changed, 35 insertions(+), 23 deletions(-) create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/failsafe-pom.xml diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/integration-tests.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/integration-tests.adoc index b844cd75f8..6d320ee59d 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/integration-tests.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/integration-tests.adoc @@ -23,15 +23,9 @@ Spring Boot's Parent POM, `spring-boot-starter-parent`, configures Failsafe's `< Without this configuration, which causes Failsafe to use the compiled classes rather than the repackaged jar, Failsafe cannot load your application's classes. If you are not using the parent POM, you should configure Failsafe in the same way, as shown in the following example: -[source,xml,indent=0,subs="verbatim,attributes"] +[source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- - - org.apache.maven.plugins - maven-failsafe-plugin - - ${project.build.outputDirectory} - - +include::../maven/integration-tests/failsafe-pom.xml[tags=failsafe] ---- include::goals/start.adoc[leveloffset=+1] diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging.adoc index a37810df33..3af635415c 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging.adoc @@ -169,7 +169,7 @@ Again, if you are using `spring-boot-starter-parent`, this can be simplified as [source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- -include::../maven/packaging/classified-artifact-pom.xml[tags=classified-artifact] +include::../maven/packaging/jar-plugin-first-pom.xml[tags=jar-plugin-first] ---- @@ -231,14 +231,14 @@ There are two ways one can exclude a dependency from being packaged/used at runt * Exclude a specific artifact identified by `groupId` and `artifactId`, optionally with a `classifier` if needed. * Exclude any artifact belonging to a given `groupId`. -The following example excludes `com.foo:bar`, and only that artifact: +The following example excludes `com.example:module1`, and only that artifact: [source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- include::../maven/packaging/exclude-artifact-pom.xml[tags=exclude-artifact] ---- -This example excludes any artifact belonging to the `com.foo` group: +This example excludes any artifact belonging to the `com.example` group: [source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/running.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/running.adoc index ac3a3b0819..61ad0a7de5 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/running.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/running.adoc @@ -163,7 +163,7 @@ In the following example, two arguments are available: `property1` and `property ==== Specify Active Profiles The active profiles to use for a particular application can be specified using the `profiles` argument. -The following configuration enables the `foo` and `bar` profiles: +The following configuration enables the `local` and `dev` profiles: [source,xml,indent=0,subs="verbatim,attributes",tabsize=4] ---- @@ -174,7 +174,7 @@ The profiles to enable can be specified on the command line as well, make sure t [indent=0] ---- - $ mvn spring-boot:run -Dspring-boot.run.profiles=foo,bar + $ mvn spring-boot:run -Dspring-boot.run.profiles=local,dev ---- diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/failsafe-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/failsafe-pom.xml new file mode 100644 index 0000000000..d6e8993581 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/integration-tests/failsafe-pom.xml @@ -0,0 +1,19 @@ + + + 4.0.0 + integration-tests + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + ${project.build.outputDirectory} + + + + + + + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-artifact-group-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-artifact-group-pom.xml index 1f69dbd062..aef38a7cf5 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-artifact-group-pom.xml +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-artifact-group-pom.xml @@ -7,7 +7,7 @@ org.springframework.boot spring-boot-maven-plugin - com.foo + com.example diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-artifact-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-artifact-pom.xml index 85ede9915c..1a969d14dc 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-artifact-pom.xml +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/exclude-artifact-pom.xml @@ -9,8 +9,8 @@ - com.foo - bar + com.example + module1 diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/jar-plugin-first-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/jar-plugin-first-pom.xml index 1aa849fd0f..c39b02d3cf 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/jar-plugin-first-pom.xml +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/jar-plugin-first-pom.xml @@ -1,5 +1,5 @@ - + @@ -30,5 +30,5 @@ - + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/repackage-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/repackage-pom.xml index c5401e6098..ee7d5584e0 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/repackage-pom.xml +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/packaging/repackage-pom.xml @@ -1,9 +1,9 @@ - 4.0.0 packaging + @@ -19,6 +19,5 @@ + - - diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/active-profiles-pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/active-profiles-pom.xml index 3a3daddb1f..9eb58adb69 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/active-profiles-pom.xml +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/maven/running/active-profiles-pom.xml @@ -8,8 +8,8 @@ spring-boot-maven-plugin - foo - bar + local + dev