Skip to content

Commit e2b37f4

Browse files
committed
Tweak documentation generation process
* Update and filter distribution resources * Use maven's `site` phase instead of `verify` to generate docs/distribution
1 parent cde1d41 commit e2b37f4

File tree

7 files changed

+84
-32
lines changed

7 files changed

+84
-32
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ If you want to perform a full build with all integration tests, then run:
2929

3030
$ ./mvnw verify
3131

32+
To generate the reference documentation, run:
33+
34+
$ ./mvnw site
35+
36+
The reference documentation can be found in `spring-batch-docs/target`.
37+
3238
## Spring Tool Suite (STS)
3339
In STS (or any Eclipse distro or other IDE with Maven support), import the module directories as existing projects. They should compile and the tests should run with no additional steps.
3440

pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@
130130
<asciidoctor-maven-plugin.version>2.1.0</asciidoctor-maven-plugin.version>
131131
<maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version>
132132
<maven-dependency-plugin.version>3.1.2</maven-dependency-plugin.version>
133+
<maven-site-plugin.version>3.9.1</maven-site-plugin.version>
134+
<maven-project-info-reports-plugin.version>3.1.1</maven-project-info-reports-plugin.version>
135+
<maven-resources-plugin.version>3.2.0</maven-resources-plugin.version>
133136
</properties>
134137

135138
<build>
@@ -245,6 +248,11 @@
245248
</execution>
246249
</executions>
247250
</plugin>
251+
<plugin>
252+
<groupId>org.apache.maven.plugins</groupId>
253+
<artifactId>maven-site-plugin</artifactId>
254+
<version>${maven-site-plugin.version}</version>
255+
</plugin>
248256
<plugin>
249257
<groupId>org.apache.maven.plugins</groupId>
250258
<artifactId>maven-deploy-plugin</artifactId>
@@ -414,4 +422,18 @@
414422
</roles>
415423
</developer>
416424
</developers>
425+
426+
<reporting>
427+
<plugins>
428+
<plugin>
429+
<groupId>org.apache.maven.plugins</groupId>
430+
<artifactId>maven-project-info-reports-plugin</artifactId>
431+
<version>${maven-project-info-reports-plugin.version}</version>
432+
<configuration>
433+
<skip>true</skip>
434+
</configuration>
435+
</plugin>
436+
</plugins>
437+
</reporting>
438+
417439
</project>

spring-batch-docs/pom.xml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,29 @@
2020
</dependencies>
2121

2222
<build>
23+
<resources>
24+
<resource>
25+
<directory>src/dist</directory>
26+
<includes>
27+
<include>*.txt</include>
28+
</includes>
29+
<filtering>true</filtering>
30+
</resource>
31+
</resources>
2332
<plugins>
33+
<plugin>
34+
<groupId>org.apache.maven.plugins</groupId>
35+
<artifactId>maven-resources-plugin</artifactId>
36+
<version>${maven-resources-plugin.version}</version>
37+
</plugin>
2438
<plugin>
2539
<groupId>org.apache.maven.plugins</groupId>
2640
<artifactId>maven-dependency-plugin</artifactId>
2741
<version>${maven-dependency-plugin.version}</version>
2842
<executions>
2943
<execution>
3044
<id>unpack-resources</id>
31-
<phase>generate-resources</phase>
45+
<phase>pre-site</phase>
3246
<goals>
3347
<goal>unpack-dependencies</goal>
3448
</goals>
@@ -60,7 +74,7 @@
6074
<executions>
6175
<execution>
6276
<id>generate-html</id>
63-
<phase>verify</phase>
77+
<phase>site</phase>
6478
<goals>
6579
<goal>process-asciidoc</goal>
6680
</goals>
@@ -87,7 +101,7 @@
87101
</execution>
88102
<execution>
89103
<id>generate-pdf</id>
90-
<phase>verify</phase>
104+
<phase>site</phase>
91105
<goals>
92106
<goal>process-asciidoc</goal>
93107
</goals>
@@ -123,8 +137,8 @@
123137
</configuration>
124138
<executions>
125139
<execution>
126-
<id>generate-docs</id>
127-
<phase>verify</phase>
140+
<id>create-distribution</id>
141+
<phase>site</phase>
128142
<goals>
129143
<goal>single</goal>
130144
</goals>

spring-batch-docs/src/assembly/dist.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@
8484
<outputDirectory>docs/reference/pdf</outputDirectory>
8585
</file>
8686
<file>
87-
<source>src/dist/license.txt</source>
87+
<source>target/classes/license.txt</source>
8888
</file>
8989
<file>
90-
<source>src/dist/notice.txt</source>
90+
<source>target/classes/notice.txt</source>
9191
</file>
9292
<file>
93-
<source>src/dist/readme.txt</source>
93+
<source>target/classes/readme.txt</source>
9494
</file>
9595
</files>
9696
</assembly>

spring-batch-docs/src/dist/license.txt

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ code for these subcomponents is subject to the terms and
212212
conditions of the following licenses.
213213

214214

215-
>>> ASM 4.0 (org.ow2.asm:asm:4.0, org.ow2.asm:asm-commons:4.0):
215+
>>> ASM 7.1 (org.ow2.asm:asm:7.1, org.ow2.asm:asm-commons:7.1):
216216

217217
Copyright (c) 2000-2011 INRIA, France Telecom
218218
All rights reserved.
@@ -247,33 +247,43 @@ THE POSSIBILITY OF SUCH DAMAGE.
247247
Copyright (c) 1999-2009, OW2 Consortium <https://www.ow2.org/>
248248

249249

250-
>>> CGLIB 3.0 (cglib:cglib:3.0):
250+
>>> CGLIB 3.3 (cglib:cglib:3.3):
251251

252252
Per the LICENSE file in the CGLIB JAR distribution downloaded from
253-
https://sourceforge.net/projects/cglib/files/cglib3/3.0/cglib-3.0.jar/download,
254-
CGLIB 3.0 is licensed under the Apache License, version 2.0, the text of which
253+
https://github.com/cglib/cglib/releases/download/RELEASE_3_3_0/cglib-3.3.0.jar,
254+
CGLIB 3.3 is licensed under the Apache License, version 2.0, the text of which
255255
is included above.
256256

257257

258-
=======================================================================
258+
>>> Objenesis 3.1 (org.objenesis:objenesis:3.1):
259259

260-
To the extent any open source subcomponents are licensed under the EPL and/or
261-
other similar licenses that require the source code and/or modifications to
262-
source code to be made available (as would be noted above), you may obtain a
263-
copy of the source code corresponding to the binaries for such open source
264-
components and modifications thereto, if any, (the "Source Files"), by
265-
downloading the Source Files from https://www.springsource.org/download, or by
266-
sending a request, with your name and address to:
260+
Per the LICENSE file in the Objenesis ZIP distribution downloaded from
261+
http://objenesis.org/download.html, Objenesis 3.1 is licensed under the
262+
Apache License, version 2.0, the text of which is included above.
267263

268-
Pivotal, Inc., 875 Howard St,
269-
San Francisco, CA 94103
270-
United States of America
264+
Per the NOTICE file in the Objenesis ZIP distribution downloaded from
265+
http://objenesis.org/download.html and corresponding to section 4d of the
266+
Apache License, Version 2.0, in this case for Objenesis:
271267

272-
or email [email protected]. All such requests should clearly specify:
268+
Objenesis
269+
Copyright 2006-2019 Joe Walnes, Henri Tremblay, Leonardo Mesquita
273270

274-
OPEN SOURCE FILES REQUEST
275-
Attention General Counsel
276271

277-
Pivotal shall mail a copy of the Source Files to you on a CD or equivalent
278-
physical medium. This offer to obtain a copy of the Source Files is valid for
279-
three years from the date you acquired this Software product.
272+
===============================================================================
273+
274+
To the extent any open source components are licensed under the EPL and/or
275+
other similar licenses that require the source code and/or modifications to
276+
source code to be made available (as would be noted above), you may obtain a
277+
copy of the source code corresponding to the binaries for such open source
278+
components and modifications thereto, if any, (the "Source Files"), by
279+
downloading the Source Files from https://spring.io/projects, Pivotal's website
280+
at https://network.pivotal.io/open-source, or by sending a request, with your
281+
name and address to: Pivotal Software, Inc., 875 Howard Street, 5th floor, San
282+
Francisco, CA 94103, Attention: General Counsel. All such requests should
283+
clearly specify: OPEN SOURCE FILES REQUEST, Attention General Counsel. Pivotal
284+
can mail a copy of the Source Files to you on a CD or equivalent physical
285+
medium.
286+
287+
This offer to obtain a copy of the Source Files is valid for three years from
288+
the date you acquired this Software product. Alternatively, the Source Files
289+
may accompany the Software.

spring-batch-docs/src/dist/notice.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Spring Batch ${version}
2-
Copyright (c) 2002-${copyright} Pivotal, Inc.
1+
Spring Batch ${project.version}
2+
Copyright (c) Pivotal, Inc.
33

44
This product is licensed to you under the Apache License, Version 2.0
55
(the "License"). You may not use this product except in compliance with

spring-batch-docs/src/dist/readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Spring Batch version ${version}
1+
Spring Batch version ${project.version}
22
=====================================================================================
33

44
To find out what has changed since earlier releases, see the 'Releases' section at

0 commit comments

Comments
 (0)