ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: Re[2]: Perforce Optional Tasks
Date Thu, 20 Dec 2001 18:10:54 GMT
--- Marcus <marcusz@criticalpointsoftware.com> 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}"/>
  </path>

Then, wherever you wanted to reference that path, you'd do it using:
  refid="CLASSPATH"

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message