Docbkx is the right tool for the job. When correctly setup, it works like a charm.
You can download this maven project and build it by yourself here: http://www.springfuse.com/blog/docbook/docbook-1.0.0-src.zip
To produce image in PDF I found the solution reading Open JPA : FOP needs the JAI jars, unfortunately they are not in the central maven repository.
You need to install manually the Java Advanced Imaging framework .
Download the release at http://download.java.net/media/jai/builds/release/1_1_3/jai-1_1_3-lib.zip
Unzip
Install both jar locally in your repository by executing
mvn install:install-file -Dfile=jai-1_1_3\lib\jai_core.jar -DgroupId=javax.media -DartifactId=jai-core -Dversion=1.1.3 -Dpackaging=jar
and
mvn install:install-file -Dfile=jai-1_1_3\lib\jai_codec.jar -DgroupId=javax.media -DartifactId=jai-codec -Dversion=1.1.3 -Dpackaging=jar
I created the
install
maven profile: it will download the file for you and unzip it in
target/
.
Just execute
mvn -Pinstall initialize
Then in
target
execute
install.(bat|sh)
After that you have the jars in your local repository,you can re-execute the maven command:
mvn
to produce the documentation
You can download this article as a PDF at http://www.springfuse.com/blog/docbook/maven-docbook-syntax-highlighting.pdf