-
Notifications
You must be signed in to change notification settings - Fork 3
/
pom.xml
244 lines (241 loc) · 7.89 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cn.spring21</groupId>
<artifactId>docworks</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>docworks</name>
<url>http://fujohnwang.blogspot.com</url>
<build>
<plugins>
<plugin>
<groupId>com.agilejava.docbkx</groupId>
<artifactId>docbkx-maven-plugin</artifactId>
<version>2.0.11</version>
<dependencies>
<dependency>
<groupId>org.docbook</groupId>
<artifactId>docbook-xml</artifactId>
<version>4.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.xslthl</groupId>
<artifactId>xslthl</artifactId>
<version>2.0.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.offo</groupId>
<artifactId>fop-hyph</artifactId>
<version>1.2</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<executions>
<execution>
<id>generate-html</id>
<phase>package</phase>
<goals>
<goal>generate-html</goal>
</goals>
<configuration>
<includes>**/*.dbx,**/*.xml</includes>
<targetDirectory>${basedir}/target/docs/html</targetDirectory>
<chunkedOutput>false</chunkedOutput>
<useExtensions>1</useExtensions>
<highlightSource>1</highlightSource>
<highlightXslthlConfig>${basedir}/src/main/resources/highlighters/xslthl-config.xml</highlightXslthlConfig>
<xhtmlCustomization>${basedir}/src/main/resources/xsl/html.xsl</xhtmlCustomization>
<htmlCustomization>${basedir}/src/main/resources/xsl/html.xsl</htmlCustomization>
<htmlStylesheet>${basedir}/src/main/resources/css/html.css</htmlStylesheet>
<postProcess>
<copy todir="${basedir}/target/docs/html">
<fileset dir="${basedir}/src/main/docbook/" includes="**/images/**/*" />
</copy>
</postProcess>
</configuration>
</execution>
<execution>
<id>generate-pdf</id>
<phase>site</phase>
<goals>
<goal>generate-pdf</goal>
</goals>
<configuration>
<includes>**/*.xml</includes>
<targetDirectory>${basedir}/target/docs/pdf/</targetDirectory>
<ansi>true</ansi>
<paperType>A4</paperType>
<alignment>left</alignment>
<axfExtensions>0</axfExtensions>
<atiXsl11Bookmarks>1</atiXsl11Bookmarks>
<titleFontFamily>SimHei</titleFontFamily> <!-- \/ fonts -->
<titleFontset>SimHei</titleFontset>
<bodyFontFamily>SimKai</bodyFontFamily>
<bodyFontset>SimKai</bodyFontset>
<sansFontFamily>SimKai</sansFontFamily> <!-- /\ fonts -->
<bodyFontMaster>10</bodyFontMaster>
<bodyMarginBottom>0.5in</bodyMarginBottom>
<bodyMarginTop>0.5in</bodyMarginTop>
<fop1Extensions>1</fop1Extensions> <!-- ***use FOP0.90 -->
<keepRelativeImageUris>1</keepRelativeImageUris> <!-- *** images embed -->
<l10nGentextDefaultLanguage>en</l10nGentextDefaultLanguage>
<l10nGentextLanguage>zh</l10nGentextLanguage>
<passivetexExtensions>0</passivetexExtensions>
<fonts>
<font>
<name>SimSun</name>
<style>normal</style>
<weight>normal</weight>
<embedFile>${basedir}/src/main/resources/fonts/SimSun.ttf</embedFile>
<metricsFile>${basedir}/src/main/resources/fonts/SimSun.xml</metricsFile>
</font>
<font>
<name>SimFang</name>
<style>normal</style>
<weight>normal</weight>
<embedFile>${basedir}/src/main/resources/fonts/simfang.ttf</embedFile>
<metricsFile>${basedir}/src/main/resources/fonts/simfang.xml</metricsFile>
</font>
<font>
<name>SimHei</name>
<style>normal</style>
<weight>normal</weight>
<embedFile>${basedir}/src/main/resources/fonts/simhei.ttf</embedFile>
<metricsFile>${basedir}/src/main/resources/fonts/simhei.xml</metricsFile>
</font>
<font>
<name>SimKai</name>
<style>normal</style>
<weight>normal</weight>
<embedFile>${basedir}/src/main/resources/fonts/simkai.ttf</embedFile>
<metricsFile>${basedir}/src/main/resources/fonts/simkai.xml</metricsFile>
</font>
</fonts>
<preProcess>
<copy todir="${basedir}/target/docs/pdf">
<fileset dir="${basedir}/src/main/docbook/" includes="**/images/**/*" />
</copy>
</preProcess>
</configuration>
</execution>
</executions>
<configuration>
<sourceDirectory>${basedir}/src/main/docbook</sourceDirectory>
<xincludeSupported>true</xincludeSupported>
<generateToc>appendix toc,title
article/appendix nop
article
toc,title
book toc,title,figure,table,example,equation
chapter toc
toc,title
part toc,title
preface
toc,title
qandadiv toc
qandaset toc
reference toc,title
sect1 toc
sect2 toc
sect3 toc
sect4 toc
sect5 toc
section toc
set toc,title
</generateToc>
<tocMaxDepth>8</tocMaxDepth>
<tocSectionDepth>8</tocSectionDepth>
<generateSectionTocLevel>8</generateSectionTocLevel>
<chapterAutolabel>true</chapterAutolabel>
<sectionAutolabel>true</sectionAutolabel>
<sectionAutolabelMaxDepth>8</sectionAutolabelMaxDepth>
<sectionLabelIncludesComponentLabel>true</sectionLabelIncludesComponentLabel>
<tableFootnoteNumberFormat>1</tableFootnoteNumberFormat>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.1.2</version>
<!-- add this plug-in and change it version from 2.2 to 2.1.2 to prevent
ArrayIndexOutOfBoundException -->
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/distribution.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>distribute</id>
<phase>package</phase>
<goals>
<goal>assembly</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>create</id>
<build>
<defaultGoal>antrun:run</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks>
<property name="location" value="${basedir}/src/main/docbook/tmpdir" />
<mkdir dir="${location}" />
<copy file="src/main/resources/templates/article-template.xml"
todir="${location}">
</copy>
<copy todir="${location}/images">
<fileset dir="src/main/resources/images" />
</copy>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>createX</id>
<build>
<defaultGoal>antrun:run</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks>
<mkdir dir="${basedir}/src/main/docbook/${module}" />
<copy file="src/main/resources/templates/article-template.xml"
todir="${basedir}/src/main/docbook/${module}">
</copy>
<copy todir="${basedir}/src/main/docbook/${module}/images">
<fileset dir="src/main/resources/images" />
</copy>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>