Skip to content

Commit 547c4f3

Browse files
committed
Simplify documentation of Asciidoctor Maven plugin's phase
Previously the phase was documented as `package` by default with instructions to change it to `prepare-package` if you want to include the documentation in the project's package. This led to some confusion and sometimes the step to change it to `prepare-package` was missed. This commit updates the documentation to recommend that `prepare-package` is always used. It works equally well for both cases (packaging the documentation or not) and avoids the possible confusion described above. Closes gh-218
1 parent 36bacb4 commit 547c4f3

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

docs/src/docs/asciidoc/getting-started.adoc

+5-8
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ described below.
134134
<executions>
135135
<execution>
136136
<id>generate-docs</id>
137-
<phase>package</phase> <6>
137+
<phase>prepare-package</phase> <6>
138138
<goals>
139139
<goal>process-asciidoc</goal>
140140
</goals>
@@ -159,9 +159,8 @@ described below.
159159
<4> Add the Asciidoctor plugin
160160
<5> Define an attribute named `snippets` that can be used when including the generated
161161
snippets in your documentation.
162-
<6> [[getting-started-build-configuration-maven-plugin-phase]] If you want to
163-
<<getting-started-build-configuration-maven-packaging, package the documentation>> in your
164-
project's jar you should use the `prepare-package` phase.
162+
<6> Using `prepare-package` allows the documentation to be
163+
<<getting-started-build-configuration-maven-packaging, included in the package>>.
165164

166165
[[getting-started-build-configuration-maven-packaging]]
167166
==== Packaging the documentation
@@ -170,10 +169,8 @@ You may want to package the generated documentation in your project's jar file,
170169
example to have it {spring-boot-docs}/#boot-features-spring-mvc-static-content[served as
171170
static content] by Spring Boot.
172171

173-
First, configure the Asciidoctor plugin so that it runs in the `prepare-package` phase, as
174-
<<getting-started-build-configuration-maven-plugin-phase, described above>>. Now configure
175-
Maven's resources plugin to copy the generated documentation into a location where it'll
176-
be included in the project's jar:
172+
Configure Maven's resources plugin to copy the generated documentation into a location
173+
where it'll be included in the project's jar:
177174

178175
[source,xml,indent=0]
179176
----

0 commit comments

Comments
 (0)