Building Forrest within Eclipse
Prerequisites
- Forrest v. 0.7.0, downloaded from the CVS repository /usr/local/cvsrep/third-party/apache
- Environment variable FORREST_HOME set to the root of the Forrest installation (for 0.7; for 0.6 it was the /src/core directory within Forrest), per Forrest upgrade docs.
- Configure Oxygen to find Forrest's DTDs [this is not, strictly speaking, a prerequisite, but it is a mighty convenience]
Running Forrest Builds from Eclipse
Calling Forrest's Ant tasks from within Eclipse requires some initial set-up, and proper calling syntax. Forrest's description of invocation from Ant is here; however, the simple descriptions below might prove more useful.
Add catalog entity resolver to Ant runtime classpath
In Eclipse, the Ant runtime classpath can be set from navigating to Ant : Runtime in the Preferences dialog.
Under Global Entries in the Classpath pane, add the JAR file forrest/lib/core/xml-commons-resolver-1.1.jar (i.e., the jar file xml-commons-resolver-1.1.jar located in the /lib/core directory of your Forrest installation).
Invoke Forrest targets from Ant
The following is an example of a target that invokes Forrest from within Ant. This invocation will run from within Eclipse.
<target name="forrest-site" description="Generates static HTML documentation"> <ant antfile="${forrest.home}/forrest.build.xml" target="site"/> </target>
Plugin-download errors
In Forrest's documentation on running builds within Ant, there is a warning regarding a but in the plugin downloader. If this error occurs, two options may resolve it:
- specify the plugin version number in forrest.properties, as described in the documentation
- the first time you run Forrest on the tree, run it from the command line, e.g., forrest site (where $FORREST_HOME/bin is on the path)


