JBoss.org Community Documentation

2.4. Build the documents

To perform a build using Maven you simply need to enter the following commands from the directory containing the pom.xml file:

  • mvn compile - processes the DocBook source using the XSL stylesheets

  • mvn package - creates WAR archives containing the various output formats

  • mvn clean - removes the target directory containing the build output

It is also possible to chain commands together if required. e.g. mvn clean compile

Once the compile or package goals have been reached then a target/ directory will be created containing the build output.

The JBoss Messaging target directory

Figure 2.2. The JBoss Messaging target directory


The attach directory contains WAR archives that package together all of the files for the various output formats. The intention is that these can be easily deployed into a web server such as Tomcat or JBoss AS.

The docbook directory contains a number of subdirectories; one per output format. This is where you will find the XHTML, PDF and Eclipse Help files.

The staging directory contains resources such as CSS files, images and fonts that are needed for the final output. They need to be placed into this directory during the build as the DocBook XSL stylesheets can only reference a single location for images. Similarly the FOP libraries can only reference a single location for fonts.