You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Stefan Schulz <sc...@ivs.tu-berlin.de> on 2003/02/27 09:20:02 UTC

How to realize a forked ant call

Hi,

I wonder, if anyone tried to realize a forked ant call in a build file. 

To my motivation:
For the project, several ant extensions have been written that wrap
thirdparty java tools. These tools expect environment variables which
depend on the project settings. By now, these settings are done by
script files that finally call the project's build file. 
I would like to replace these script files by ant, as in ant variables
and paths can be constructed OS-independend.

Unfortunately, in ant one cannot re-set properties or environment
variables. Hence, I was going to use a "Meta"-build file, which sets the
needed variables 
and then calls the real build file by using the java-task with ant. It
failed, because the new ant task does not find javac anymore. The
JAVA_HOME in the new ant task is incorrect and setting JAVA_HOME with
the java-task seems being ignored.

So, what I would actually need is something like this:
<ant fork="true" ...><env key="some" value="thing"/></ant>

Any suggestions or hints are most welcome.

Thanks in advance
Stefan
--
http://www.ivs.tu-berlin.de