I transferred an existing docbook project from ANT (using dopus framework) to the docbkx-maven-plugin. After some troubles I got the output right, but the performance is very slow. The processing took with ANT 24sec. With the maven plugin it takes more than 6min.
The processing seems to stop at:
[INFO] Processing input file: manual.xml
[DEBUG] Xerces XInclude mode entered
[DEBUG] User Customization provided: ...doc\src\main\custom-cfg\fo.xsl
[DEBUG] User Customization provided: ...doc\src\main\custom-cfg\fo.xsl
[DEBUG] User Customization provided: ...doc\src\main\custom-cfg\fo.xsl
[DEBUG] Configure the transformer.
[INFO] Applying customization parameters after docbkx parameters
After that there is no output for about 2-3min per goal(I have 2 goals, for JavaHelp and PDF). If i deactivate xincludeSupported, it runs very fast, but obviously the output is useless.
Any help to speed up the build process would be appreciated.
Here is the config section in the pom file:
<configuration>
<sourceDirectory>src/main/docbook</sourceDirectory>
<foCustomization>src/main/custom-cfg/fo.xsl</foCustomization>
<includes>manual.xml</includes>
<xincludeSupported>true</xincludeSupported>
<chapterAutolabel>true</chapterAutolabel>
<sectionAutolabel>true</sectionAutolabel>
<sectionAutolabelMaxDepth>5</sectionAutolabelMaxDepth>
<sectionLabelIncludesComponentLabel>true</sectionLabelIncludesComponentLabel>
<preProcess>
<copy todir="${project.build.directory}/docbkx/javahelp/resource">
<fileset dir="src/main/docbook/resource/"/>
</copy>
</preProcess>
</configuration>
After some research I found the reason. In the xml files is the doctype defined:
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[
<!ENTITY % entities SYSTEM "../custom-cfg/local-entities.xml">
%entities;
]
>
The build tried to download the dtd for each file, the network traffic caused the slow build. By adding
<dependency>
<groupId>docbook</groupId>
<artifactId>docbook-xml</artifactId>
<version>4.5</version>
<scope>runtime</scope>
</dependency>
to my docbkx-maven-plugin dependencies I could solve the problem. (This dependency is different for the different docbook versions, for this there is also a repository entry necessary as described in: http://docbkx-tools.sourceforge.net/docbkx-samples/manual.html#d5e28)