ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@ebinteractive.com.au>
Subject RE: <exec>: where is preamble to bin/antRun set?
Date Mon, 13 Nov 2000 22:22:09 GMT
David,

You may be better off using the ant script rather than munging build.sh. The
problem appears to be

-Dant.home=.

Since Java does not read the values of environment variables, the value of
$ANT_HOME is passed to ant by defining the property ant.home. Your script is
setting this to "." and not "/opt/ant". Try changing your script to

-Dant.home=$ANT_HOME

or use the ant script in $ANT_HOME/bin

Conor


--
Conor MacNeill
conor@cortexebusiness.com.au
Cortex eBusiness
http://www.cortexebusiness.com.au

> -----Original Message-----
> From: David Miller [mailto:dmiller1@flashcom.net]
> Sent: Tuesday, 14 November 2000 5:53
> To: ant-user@jakarta.apache.org
> Cc: bodewig@bost.de
> Subject: Re: <exec>: where is preamble to bin/antRun set?
>
>
> $ANT_HOME is set correctly, to /opt/ant. The build.sh file I am
> using to run
> ant on my project launches ant using the line:
>
> "$JAVA_HOME"/bin/java -Dant.home=. -classpath "$TEMP_CP"
> org.apache.tools.ant.Main $@
>
> to run ant, but this copy of build.sh does not override ANT_HOME.
> TEMP_CP is
> my CLASSPATH, slightly modified for running ant...
>
> Thanks for your help!
>
> -David-
>
> ----- Original Message -----
> From: Stefan Bodewig <bodewig@bost.de>
> To: <ant-user@jakarta.apache.org>
> Sent: Monday, November 13, 2000 2:29 AM
> Subject: Re: <exec>: where is preamble to bin/antRun set?
>
>
> > David Miller <dmiller1@flashcom.net> wrote:
> >
> > > So I am able to get <exec> to work with the original antRun file
> > > supplied with my ant install (I am running in Linux), but there is
> > > something very strange going on. If my <project> base directory is
> > > called /foo then I *must* have the file antRun located at
> > > /foo/bin/antRun otherwise I get the following error message:
> > >
> > > "Execute failed: java.io.IOException: /foo/bin/antRun: not found"
> >
> > This is extremely strange. Ant will search for and execute
> > $ANT_HOME/bin/antRun (and does so on my Linux box BTW).
> >
> > To get the behavior you are experiencing, something must be setting
> > either ANT_HOME or the Ant property ant.home to your project's
> > basedir. I know Ant's own build.sh overrides the ANT_HOME setting and
> > sets it to ".", you're not accidently invoking this one, are you? The
> > script named ant is the one that should be used.
> >
> > Stefan
> >
>
>


Mime
View raw message