From b1227ce019d95717b42fb3533f5e62ed77f6edd9 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 23 Mar 2017 12:19:08 +0000 Subject: [PATCH 1/2] 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 --- docs/src/docs/asciidoc/getting-started.adoc | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/docs/src/docs/asciidoc/getting-started.adoc b/docs/src/docs/asciidoc/getting-started.adoc index 8c527299..4ee0338e 100644 --- a/docs/src/docs/asciidoc/getting-started.adoc +++ b/docs/src/docs/asciidoc/getting-started.adoc @@ -101,22 +101,13 @@ the configuration are described below. <3> - org.apache.maven.plugins - maven-surefire-plugin - - - **/*Documentation.java - - - - <4> org.asciidoctor asciidoctor-maven-plugin 1.5.2 generate-docs - prepare-package <6> + prepare-package <5> process-asciidoc @@ -124,7 +115,7 @@ the configuration are described below. html book - ${snippetsDirectory} <5> + ${snippetsDirectory} <4> @@ -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 <>. [source,indent=0,subs="verbatim,attributes",role="secondary"] From b6120cd539b4a68cce4328d4b7cdfb78ed3f56e4 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 23 Mar 2017 12:33:09 +0000 Subject: [PATCH 2/2] Fix broken cross-reference --- docs/src/docs/asciidoc/getting-started.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/src/docs/asciidoc/getting-started.adoc b/docs/src/docs/asciidoc/getting-started.adoc index 4ee0338e..3bb91f5c 100644 --- a/docs/src/docs/asciidoc/getting-started.adoc +++ b/docs/src/docs/asciidoc/getting-started.adoc @@ -132,7 +132,8 @@ the configuration are described below. <4> Define an attribute named `snippets` that can be used when including the generated snippets in your documentation. <5> Using `prepare-package` allows the documentation to be - <>. + <>. [source,indent=0,subs="verbatim,attributes",role="secondary"] .Gradle @@ -173,7 +174,7 @@ the configuration are described below. documentation is created. -[[getting-started-build-configuration-gradle-packaging-the-documentation]] +[[getting-started-build-configuration-packaging-the-documentation]] ==== Packaging the documentation You may want to package the generated documentation in your project's jar file, for