Skip to content

Commit 92e6f32

Browse files
Jay Bryantfmbenhassine
authored andcommitted
Add EPUB output
Add EPUB output and make all four output formats have links to one another, to enable discoverability and accessibility (for the folks who need a particular format to help them read the document).
1 parent f4e14dd commit 92e6f32

File tree

5 files changed

+61
-11
lines changed

5 files changed

+61
-11
lines changed

pom.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<module>spring-batch-jsr352-tck</module>
2222
<module>spring-batch-docs</module>
2323
</modules>
24-
24+
2525
<organization>
2626
<name>Spring</name>
2727
<url>https://spring.io</url>
@@ -113,10 +113,11 @@
113113
<quartz.version>2.3.2</quartz.version>
114114
<prometheus_pushgateway.version>0.10.0</prometheus_pushgateway.version>
115115
<groovy.version>2.5.14</groovy.version>
116-
116+
117117
<!-- documentation dependencies -->
118118
<spring-doc-resources.version>0.2.5</spring-doc-resources.version>
119119
<asciidoctorj-pdf.version>1.5.4</asciidoctorj-pdf.version>
120+
<asciidoctorj-epub.version>1.5.1</asciidoctorj-epub.version>
120121

121122
<!-- plugin versions -->
122123
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
@@ -276,7 +277,7 @@
276277
</plugin>
277278
</plugins>
278279
</build>
279-
280+
280281
<profiles>
281282
<profile>
282283
<id>test-coverage</id>
@@ -334,7 +335,7 @@
334335
</build>
335336
</profile>
336337
</profiles>
337-
338+
338339
<repositories>
339340
<repository>
340341
<id>maven-central</id>
@@ -385,7 +386,7 @@
385386
</snapshots>
386387
</pluginRepository>
387388
</pluginRepositories>
388-
389+
389390
<developers>
390391
<developer>
391392
<id>dsyer</id>

spring-batch-docs/pom.xml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<type>zip</type>
1919
</dependency>
2020
</dependencies>
21-
21+
2222
<build>
2323
<resources>
2424
<resource>
@@ -66,6 +66,11 @@
6666
<artifactId>asciidoctorj-pdf</artifactId>
6767
<version>${asciidoctorj-pdf.version}</version>
6868
</dependency>
69+
<dependency>
70+
<groupId>org.asciidoctor</groupId>
71+
<artifactId>asciidoctorj-epub3</artifactId>
72+
<version>${asciidoctorj-epub.version}</version>
73+
</dependency>
6974
</dependencies>
7075
<configuration>
7176
<sourceDirectory>${project.basedir}/src/main/asciidoc</sourceDirectory>
@@ -120,6 +125,27 @@
120125
</attributes>
121126
</configuration>
122127
</execution>
128+
<execution>
129+
<id>generate-epub</id>
130+
<phase>site</phase>
131+
<goals>
132+
<goal>process-asciidoc</goal>
133+
</goals>
134+
<configuration>
135+
<backend>epub3</backend>
136+
<doctype>book</doctype>
137+
<attributes>
138+
<icons>font</icons>
139+
<pagenums />
140+
<sectnums />
141+
<sectanchors />
142+
<toc />
143+
<source-highlighter>coderay</source-highlighter>
144+
<project-version>${project.version}</project-version>
145+
<revnumber>${project.version}</revnumber>
146+
</attributes>
147+
</configuration>
148+
</execution>
123149
</executions>
124150
</plugin>
125151
<plugin>
@@ -155,7 +181,7 @@
155181
</plugin>
156182
</plugins>
157183
</build>
158-
184+
159185
<repositories>
160186
<repository>
161187
<id>spring-releases</id>
@@ -167,4 +193,4 @@
167193
</repository>
168194
</repositories>
169195

170-
</project>
196+
</project>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,10 @@
2828
<destName>spring-batch-reference.pdf</destName>
2929
<outputDirectory>reference/pdf</outputDirectory>
3030
</file>
31+
<file>
32+
<source>target/asciidoc/index-single.epub</source>
33+
<destName>spring-batch-reference.epub</destName>
34+
<outputDirectory>reference/epub</outputDirectory>
35+
</file>
3136
</files>
3237
</assembly>

spring-batch-docs/src/main/asciidoc/index.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ include::header/index-header.adoc[]
22

33
// ======================================================================================
44

5-
Welcome to the Spring Batch reference documentation! This documentation is also available
6-
as single link:index-single.html[html] and link:../pdf/spring-batch-reference.pdf[pdf] documents.
5+
This documentation is also available
6+
as a link:index-single.html[single HTML file] and as link:../pdf/spring-batch-reference.pdf[PDF]
7+
and link:../epub/spring-batch-reference.epub[EPUB] documents.
78

89
The reference documentation is divided into several sections:
910

spring-batch-docs/src/main/asciidoc/spring-batch-intro.adoc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,25 @@
22
:toc: left
33
:toclevels: 4
44

5-
[[spring-batch-intro]]
5+
ifdef::backend-html5[]
6+
This documentation is also available
7+
as link:index.html[multiple HTML files] and as link:../pdf/spring-batch-reference.pdf[PDF]
8+
and link:../epub/spring-batch-reference.epub[EPUB] documents.
9+
endif::[]
10+
11+
ifdef::backend-pdf[]
12+
This documentation is also available
13+
as link:index.html[multiple HTML files], a link:index-single.html[single HTML file],
14+
and an link:../epub/spring-batch-reference.epub[EPUB] document.
15+
endif::[]
16+
17+
ifdef::backend-epub3[]
18+
This documentation is also available
19+
as link:index.html[multiple HTML files], a link:index-single.html[single HTML file],
20+
and a link:../pdf/spring-batch-reference.pdf[PDF] document.
21+
endif::[]
622

23+
[[spring-batch-intro]]
724
== Spring Batch Introduction
825

926
Many applications within the enterprise domain require bulk processing to perform

0 commit comments

Comments
 (0)