As Lana mentioned to me the other day, if you make small changes to core docs, it can be painful to wait for the entire documentation set to generate just to see how your changes look in HTML or PDF for example. The fix for DOCS-29 lets you generate output for a single format. You can use the documentSrcName
parameter to restrict what gets built to a single file, such as an individual chapter.
The following command generates PDF only for a single chapter of the forgerock-doc-maven-plugin-test
project.
$ mvn -DdocumentSrcName=chap-one.xml -Dinclude=pdf clean pre-site
Find the pre-site output under target/docbkx/
.
$ ls target/docbkx/pdf/*.pdf target/docbkx/pdf/ForgeRock-Bogus-Guide.pdf
Caveats:
- If you defined <excludes>, then you cannot use <include> in the same configuration.
- If you have multiple chapters with the same name, this might not work as expected. My guess is the last one wins.
- The
documentSrcName
must correspond to a file. You cannot currently generate output for a part of a file, nor for several arbitrary files.