Passing environment variables to ANT [message #64075] |
Sat, 21 June 2003 16:36  |
Eclipse User |
|
|
|
Originally posted by: s.millies.ids-scheer.REMOVE-THIS.de
In my external build script, I call ANT like this:
java org.apache.tools.ant.Main -Dcatalina.home=%CATALINA_HOME%
(The system property catalina.home is accessed inside build.xml for the
compilation of JSPs.)
When configuring an external task to call ANT from Eclipse,
how should I pass this property to ANT?
The only thing I seem to be able to do is set the property directly,
using the current value of %CATALINA_HOME% , which is
of course not what I want.
Instead of accessing the OS's environment variable, I'd also
be happy to use one of the classpath variables from my Java
preference settings, but even that seems impossible.
-- Sebastian
PS: Incidentally, it would also be nice if there were a filter in the
ANT view for all non-descript targets (the hollow arrows).
|
|
|
Re: Passing environment variables to ANT [message #69466 is a reply to message #64075] |
Sat, 28 June 2003 10:39  |
Eclipse User |
|
|
|
Hi!
Why not access the environment variable inside the ant-script instead of
passing the value as a parameter?
First define the prefix for environment variables ("env" in this case):
<property environment="env"/>
Then access the environment variable:
${env.CATALINA_HOME}
*hth*
Philip
Sebastian Millies wrote in news:bd2fk0$lst$1@rogue.oti.com:
> In my external build script, I call ANT like this:
>
> java org.apache.tools.ant.Main -Dcatalina.home=%CATALINA_HOME%
>
> (The system property catalina.home is accessed inside build.xml for the
> compilation of JSPs.)
>
> When configuring an external task to call ANT from Eclipse,
> how should I pass this property to ANT?
>
> The only thing I seem to be able to do is set the property directly,
> using the current value of %CATALINA_HOME% , which is
> of course not what I want.
>
> Instead of accessing the OS's environment variable, I'd also
> be happy to use one of the classpath variables from my Java
> preference settings, but even that seems impossible.
>
> -- Sebastian
>
> PS: Incidentally, it would also be nice if there were a filter in the
> ANT view for all non-descript targets (the hollow arrows).
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02968 seconds