forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter van de Hoef <>
Subject Re: Building site with Ant from Eclipse 3.0 1?
Date Mon, 11 Apr 2005 08:14:39 GMT
I am using the following ant task to run Forrest from Eclipse, which 
works fine for me.
This task assumes Forrest 0.7 which has not been released yet, but a 
snapshot version can be downloaded from:
For Forrest 0.6, the directory layout is a little bit different but its 
quite easy to adapt this script for 0.6.

    Runs Forrest by executing java with the following command line 
    (as determined from the forrest shell script):

    The forrest script launches 'ant' with the following command line:

    $FORREST_HOME/tools/ant/bin/ant -buildfile 
$FORREST_HOME/main/ -Dbasedir=${basedir} -emacs

    Ant's 'java' exec line:
    -classpath "$FORREST_HOME/tools/ant/lib/ant-launcher.jar"
    -lib ":
    "-buildfile" "$FORREST_HOME/main/"

    Forking is necessary since Forrest uses some extra libraries which 
are not present in the standard ant installation.
<target name="forrest">

    <property name="forrest.home" value="/opt/apache-forrest-0.7-dev" />
    <property name="" value="site" />

    <path id="forrest.classpath">
        <pathelement path="${forrest.home}/tools/ant/lib/ant-launcher.jar"/>
    <property name="forrest.class" 

    <path id="forrest.endorsed.dir">
        <fileset dir="${forrest.home}/lib/endorsed">
            <include name="*.jar"/>


        <jvmarg value="-Xmx256m"/>

        <sysproperty key="forrest.home" value="${forrest.home}"/>
        <sysproperty key="ant.home" value="${forrest.home}/tools/ant"/>
        <sysproperty key="ant.library.dir" 
        <sysproperty key="basedir" value="${basedir}"/>

        <arg value="-lib"/>
        <arg pathref="forrest.endorsed.dir"/>

        <arg value="-buildfile"/>
        <arg value="${forrest.home}/main/"/>
        <arg value="${}"/>

        <arg value="-emacs"/>

Peter van de Hoef

Audun V. Nes wrote:

> Hi
> I am trying to get Forrest to work from within Eclipse 3.0.1 but
> are having a few problems and wanted to hear if anyone has succesfully
> set that up. Based on the chapter "Invoking Forrest from Ant" in
> the Forrest docmentation, I have created the following Ant build file:
> <project name="CCCP Website" default="post-build">
>     <property environment="env"/>
>     <property name="forrest.home" value="${env.FORREST_HOME}"/>
>     <import file="${env.FORREST_HOME}/"/>
>     <target name="post-build" depends="site">
>       <echo>Building Forrest website</echo>
>     </target>
> </project>
> The enviroment variable FORREST_HOME is correctly set in my system 
> enviroment,
> and I can build my site by running "forrest" from command line without 
> problems.
> I was not sure where to copy xml-commons-resolver-1.1.jar, but I though
> eclipse/plugins/org.apache.ant_1.6.2/lib was the right location.
> I also added xml-commons-resolver-1.1.jar to the Ant classpath in 
> Eclipse.
> But when I run the build.xml file from within Eclipse I get the 
> following problem:
> Buildfile: C:\app\eclipse\workspace\CCCP\forrest\build.xml
> init-props:
>     [echo] Loading project specific properties from 
> C:\app\eclipse\workspace\CCCP\forrest\
>     [echo] Loading user specific properties from C:\Documents and 
> Settings\far2fish\
>     [echo] Loading default properties from 
> C:\app\forrest\src\core\context\
>    [mkdir] Created dir: C:\app\eclipse\workspace\CCCP\forrest\build\tmp
> echo-settings:
> check-skin:
> fetch-skins-descriptors:
> fetch-skin:
> unpack-skins:
> init-skins:
> init:
> -prepare-classpath:
> check-contentdir:
> examine-proj:
> validation-props:
> validate-xdocs:
> BUILD FAILED: C:\app\forrest\src\core\targets\validate.xml:143: Parser 
> org.apache.crimson.parser.XMLReaderImpl doesn't recognize feature 
> Total time: 1 second
> best regards
> Audun

View raw message