Basic Example

Using the Docbkx Wrapper Plugin you can generate HTML from DocBook and then merge it with a Velocity template so that it resembles the documentation produced by the site plugin. These files can then be used in your site documentation.

You can run the goal directly by executing:

mvn docbkx-wrapper:generate

It is better to bind the goal to the pre-site execution phase, thus:

<plugin>
    <groupId>org.kathrynhuxtable.maven.plugins</groupId>
    <artifactId>docbkx-wrapper-plugin</artifactId>
    <version>0.1</version>
    <executions>
        <execution>
            <goals>
                <goal>generate</goal>
            </goals>
            <phase>pre-site</phase>
        </execution>
    </executions>
    ...
</plugin>

That way you can simply execute:

mvn site

and the files will be generated before your site documentation is produced.

By default, the source files are found in ${basedir}/site/docbook and are filtered into ${project.build.directory}/generated-site/resources, which will be copied into your site documentation folder.