forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [JIRA] Created: (FOR-471) Missing "--noconfig" causes NoClassDefFoundError due to ant sourcing external config files
Date Fri, 18 Mar 2005 18:36:18 GMT

  A new issue has been created in JIRA.

View the issue:

Here is an overview of the issue:
        Key: FOR-471
    Summary: Missing "--noconfig" causes NoClassDefFoundError due to ant sourcing external
config files
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Forrest
             Launch 'forrest'
             Launch 'forrest run'
             Core operations

   Reporter: Richard Calmbach

    Created: Fri, 18 Mar 2005 12:35 PM
    Updated: Fri, 18 Mar 2005 12:35 PM
Environment: Any system that already has an Ant installation with config files in the standard
locations (/etc/ant.conf, $HOME/.ant/ant.conf, $HOME/.antrc).

Forrest comes with a self-contained Ant distribution. In order for it to work properly, it
is important to avoid picking up Ant config files that belong to other potentially existing
Ant installations on the system. On Red Hat Linux, e.g., the RPM package for ant 1.5.2 installs
/etc/ant.conf. When running Forrest 0.6 out of the box (e.g., "forrest -projecthelp"), the
tools/ant/bin/ant script included with Forrest sources /etc/ant.conf and picks up an incorrect
value for ANT_HOME (/usr/share/ant in this case). This results in a

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher

exception when trying to run forrest because there is no /usr/share/ant/lib/ant-launcher.jar.
Even if there was, we wouldn't want to pick up those jars anyway, we want the ones that came
with Forrest.

The fix is to change line 95 (as of v0.6) in src/core/bin/forrest from

"$ANT_HOME/bin/ant" -buildfile "$ANTFILE" -Dbasedir="$PROJECT_HOME" -Dforrest.home="$FORREST_DOT_HOME"
-emacs $@


"$ANT_HOME/bin/ant" --noconfig -buildfile "$ANTFILE" -Dbasedir="$PROJECT_HOME" -Dforrest.home="$FORREST_DOT_HOME"
-emacs $@

This tells ant to ignore default config files, which is what we want in this case since the
ant used by forrest is completely self-contained.

As of 3-18-05, this bug is still present in the HEAD revision of the forrest startup script
(since v0.7-dev known as bin/forrest).

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

View raw message