Polish "Extract XML examples from Maven plugin adoc files"

See gh-25534
pull/25873/head
Scott Frederick 4 years ago
parent 4e287594bf
commit 5595fb2423

@ -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]
----
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<classesDirectory>${project.build.outputDirectory}</classesDirectory>
</configuration>
</plugin>
include::../maven/integration-tests/failsafe-pom.xml[tags=failsafe]
----
include::goals/start.adoc[leveloffset=+1]

@ -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]
----

@ -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
----

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-tests</artifactId>
<build>
<plugins>
<!-- tag::failsafe[] -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<classesDirectory>${project.build.outputDirectory}</classesDirectory>
</configuration>
</plugin>
<!-- end::failsafe[] -->
</plugins>
</build>
</project>

@ -7,7 +7,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludeGroupIds>com.foo</excludeGroupIds>
<excludeGroupIds>com.example</excludeGroupIds>
</configuration>
</plugin>
</plugins>

@ -9,8 +9,8 @@
<configuration>
<excludes>
<exclude>
<groupId>com.foo</groupId>
<artifactId>bar</artifactId>
<groupId>com.example</groupId>
<artifactId>module1</artifactId>
</exclude>
</excludes>
</configuration>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- tag::classified-artifact[] -->
<!-- tag::jar-plugin-first[] -->
<project>
<build>
<plugins>
@ -30,5 +30,5 @@
</plugins>
</build>
</project>
<!-- end::classified-artifact[] -->
<!-- end::jar-plugin-first[] -->

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- tag::repackage[] -->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>packaging</artifactId>
<!-- ... -->
<!-- tag::repackage[] -->
<build>
<plugins>
<plugin>
@ -19,6 +19,5 @@
</plugin>
</plugins>
</build>
<!-- end::repackage[] -->
</project>
<!-- end::repackage[] -->

@ -8,8 +8,8 @@
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<profiles>
<profile>foo</profile>
<profile>bar</profile>
<profile>local</profile>
<profile>dev</profile>
</profiles>
</configuration>
</plugin>

Loading…
Cancel
Save