Remove recommendation about tweaking Surefire's configuration

Configuring Surefire to run tests found in files ending in
Documentation.java has the unwanted side-effect of switching off its
defaults, i.e. you end up with your documentation tests being run and
nothing else. While using a specific name for your documentation tests
can make them easier to identify, it isn't required. The documentation
also doesn't explicitly recommend using a Documentation suffix.

This commit simplifies things by removing the configuration that
changes Surefire's default inclusions.

Closes gh-368
This commit is contained in:
Andy Wilkinson
2017-03-23 12:19:08 +00:00
parent 5a76decc11
commit b1227ce019

View File

@@ -101,22 +101,13 @@ the configuration are described below.
<build>
<plugins>
<plugin> <3>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Documentation.java</include>
</includes>
</configuration>
</plugin>
<plugin> <4>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.2</version>
<executions>
<execution>
<id>generate-docs</id>
<phase>prepare-package</phase> <6>
<phase>prepare-package</phase> <5>
<goals>
<goal>process-asciidoc</goal>
</goals>
@@ -124,7 +115,7 @@ the configuration are described below.
<backend>html</backend>
<doctype>book</doctype>
<attributes>
<snippets>${snippetsDirectory}</snippets> <5>
<snippets>${snippetsDirectory}</snippets> <4>
</attributes>
</configuration>
</execution>
@@ -137,12 +128,10 @@ the configuration are described below.
REST Assured rather than MockMvc, add a dependency on `spring-restdocs-restassured`
instead.
<2> Configure a property to define the output location for generated snippets.
<3> Add the SureFire plugin and configure it to include files whose names end with
`Documentation.java`.
<4> Add the Asciidoctor plugin
<5> Define an attribute named `snippets` that can be used when including the generated
<3> Add the Asciidoctor plugin
<4> Define an attribute named `snippets` that can be used when including the generated
snippets in your documentation.
<6> Using `prepare-package` allows the documentation to be
<5> Using `prepare-package` allows the documentation to be
<<getting-started-build-configuration-maven-packaging, included in the package>>.
[source,indent=0,subs="verbatim,attributes",role="secondary"]