The purpose of the jDocBook Plugin is to allow these DocBook transformations to occur as a natural part of the users Maven build. The main difficulty with this has always been the fact that DocBook transformations are usually very closely tied to the user's local environment. The design goal with writing this plugin was to utilize Maven's dependency mechanism to bring all the pieces together on demand. Those pieces are:
- the DocBook distribution;
- custom XSLT;
- custom fonts;
- custom images;
- custom css.
These are the ingredients that when mixed with the source file(s) and stirred with an XSLT transformer produce the desired output(s).
The jDocBook Plugin defines a dedicated project packaging ("jdocbook"). In part, this packaging is used to redefine a suitable set of lifecycle phases pertinent to performing DocBook transformations. Below are the defined lifecycle phases, with the goals attached to them:
|process-resources||binds the jdocbook:resources goal which "stages" the resources need for the XSLT transformations such as fonts, images and css.|
|compile||binds the jdocbook:generate goal which performs the actual XSLT transformations.|
|package||binds the jdocbook:bundle goal which takes all the output formats, archives them as WARs and attaches the WARs to the project with the format name as the artifact classifier.|
|install||binds the standard install goal.|
|deploy||binds the standard deploy goal.|
Detailed usage instructions for the jDocBook Plugin can be found here.
To provide you with better understanding of some usages of the jDocBook Plugin, you can take a look at the following examples: