ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: Re[2]: Perforce Optional Tasks
Date Thu, 20 Dec 2001 18:10:54 GMT
--- Marcus <> wrote:
> So, it would look like this?
>     <path id="${CLASSPATH}">
>     </path>

Nope. The "id" for a path is just an identifier you can use to reference
it at other places in your build-file. The elements of the path are
specified using the nested <pathelement> tags.

In order to reference your environment CLASSPATH variable, you need to
read your environment in, using the <property environment="..."/> task,
where "..." is a prefix you want to assign (I think most people tend to
use "env"). Once that task is run, you can reference your environment
variables as properties by using the prefix you specified, a "." and the
env var name -- eg., ${env.CLASSPATH}.

So if you wanted to set a <path> that was equivalent to your env var
CLASSPATH, you'd need to do something like:

  <path id="CLASSPATH">
    <pathelement path="${env.CLASSPATH}"/>

Then, wherever you wanted to reference that path, you'd do it using:



Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at
or bid at

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message