[jboss-dev] HowTo parameterize your docbook
Thomas Diesler
thomas.diesler at jboss.com
Mon Apr 20 09:11:13 EDT 2009
Folks,
If you are interested in a solution to
Parameterized docbook sources
https://jira.jboss.org/jira/browse/MPJDOCBOOK-30
here is how JBossOSGi does it:
In you pom add
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>create</goal>
</goals>
<configuration>
<format>{0,date,dd-MMM-yyyy}</format>
<items>
<item>timestamp</item>
</items>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/docbook/resources</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
in src/main/resources/bookinfo.xml put
<bookinfo>
<title>JBossOSGi - User Guide</title>
<releaseinfo>Version: ${version}</releaseinfo>
<pubdate>Date: ${buildNumber}</pubdate>
</bookinfo>
in my master.xml put
<book lang="en" xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="../target/docbook/resources/bookinfo.xml"/>
<toc/>
<xi:include href="modules/introduction.xml"/>
<xi:include href="modules/gettingstarted.xml"/>
<xi:include href="modules/frameworkintegration.xml"/>
<xi:include href="modules/devguide.xml"/>
<xi:include href="modules/providedservices.xml"/>
<xi:include href="modules/references.xml"/>
<xi:include href="modules/gettingsupport.xml"/>
</book>
This includes the filtered bookinfo from target/docbook/resources
May this be useful
-thomas
--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss, a division of Red Hat
2009 Red Hat Summit and JBoss World.
Chicago. September 1-4, 2009.
http://www.redhat.com/summit
http://www.jbossworld.com
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
More information about the jboss-development
mailing list