cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans ...@domek.be>
Subject Re: build error, cocoon 2.1.7, ant 1.6.2, linux
Date Tue, 05 Apr 2005 15:13:45 GMT


Upayavira wrote:
>> Wouldn't it be better if build.sh just backed up ANT_HOME, unsets it, 
>> does it's thing and restores it ? Or am I missing something?
> 
> 
> I always thought it did. Don't know why this should prevent it from 
> working. Fancy taking a look?
> 

 From build.sh :
# ----- Ignore system CLASSPATH variable
OLD_CLASSPATH="$CLASSPATH"
unset CLASSPATH
CLASSPATH="`echo lib/endorsed/*.jar | tr ' ' $S`"
export CLASSPATH

# ----- Use Ant shipped with Cocoon. Ignore installed in the system Ant
OLD_ANT_HOME="$ANT_HOME"
ANT_HOME=tools
OLD_ANT_OPTS="$ANT_OPTS"
ANT_OPTS="-Xms32M -Xmx512M -Djava.endorsed.dirs=lib/endorsed"
export ANT_HOME ANT_OPTS

"$ANT_HOME/bin/ant" -logger org.apache.tools.ant.NoBannerLogger -emacs  $@
ERR=$?

# ----- Restore ANT_HOME and ANT_OPTS
ANT_HOME="$OLD_ANT_HOME"
ANT_OPTS="$OLD_ANT_OPTS"
export ANT_HOME ANT_OPTS
unset OLD_ANT_HOME
unset OLD_ANT_OPTS

It does seem to do what i thought it should do.

The Ant website [1] seems to indicate that these problems occur when 
another ant is somewhere in the classpath. Maybe the call to unset 
CLASSPATH fails somehow, can someone try checking $? after the unset call?

I don't have a RH system to test this on so i'm just guessing here.

Regards
Jorg

[1] http://ant.apache.org/faq.html#NoClassDefFoundError


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message