forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Springer, Ian P." <>
Subject Maven goal for invoking Forrest
Date Wed, 10 Nov 2004 22:55:07 GMT
In case anyone else has to invoke Forrest from Maven, here is a goal you
can add to yuor maven.xml to do so:

  <property environment="env" />

  <goal name="docs"
        description="generates HTML documentation using Forrest">
    <property name="forrest.home" location="${env.FORREST_HOME}" />
    <property name="forrest.install.dir"
location="${forrest.home}/../.." />
    <property name="forrest.ant.home"
location="${forrest.install.dir}/tools/ant" />
    <java classname=""
         <fileset dir="${forrest.ant.home}/lib">
            <include name="*.jar" />  
         <pathelement path="${java.home}/../lib/tools.jar" />
       <sysproperty key="ant.home" value="${forrest.ant.home}" />
       <sysproperty key="forrest.home" value="${forrest.home}" />
       <sysproperty key="basedir" value="${basedir}" />
       <sysproperty key="java.endorsed.dirs"
value="${forrest.install.dir}/lib/endorsed" />
       <arg line="-f ${forrest.home}/" />

It was necessary to fork a separate java process because Maven 1.0
embeds Ant 1.5.2, but Forrest's requires Ant 1.6. The
goal makes use of the copy of Ant 1.6 that is bundled with Forrest, so
it's not even necessary to have Ant 1.6 installed separately.

I hope this helps someone out. Forrest dev team, feel free to add this
to the docs if you think it will be useful.


View raw message