Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Passing environment variables to ANT
Passing environment variables to ANT [message #64075] Sat, 21 June 2003 20:36 Go to next message
Eclipse UserFriend
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 14:39 Go to previous message
Philip Lonsing is currently offline Philip LonsingFriend
Messages: 4
Registered: July 2009
Junior Member
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).
>
>
>
Previous Topic:Runtime Workbench Problem
Next Topic:How does one implement relationships with Lomboz
Goto Forum:
  


Current Time: Sun Jul 07 07:54:23 GMT 2024

Powered by FUDForum. Page generated in 0.03152 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top