ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akbar Ibrahim" <akbar.ibra...@wipro.com>
Subject Re: What is the best way to set up a class path variable?
Date Fri, 11 Aug 2000 12:14:54 GMT
In that case you would have classpath defined in one target and then
reference it in another task like in your example below.

<task1>
  <classpath ID="my.classpath">
    <pathelement location="path/one" />
    <pathelement location="path/two" />
    ...
    <pathelement location="path/ten" />
  </classpath>
</task1>

<task2>
  <classpathref refid="my.classpath" />
</task2>

Would the following construct be possible...

<classpath ID="my.classpath">
  <pathelement location="path/one" />
  <pathelement location="path/two" />
  ...
  <pathelement location="path/ten" />
</classpath>

<task1>
  <classpathref refid="my.classpath" />
</task1>

<task2>
  <classpathref refid="my.classpath" />
</task2>

where you have a classpath outside any targets (global value) which can be
referenced inside both the targets.

Akbar




----- Original Message -----
From: Stefan Bodewig <bodewig@bost.de>
To: <ant-user@jakarta.apache.org>
Sent: Friday, August 11, 2000 12:36 PM
Subject: Re: What is the best way to set up a class path variable?


> >>>>> "AI" == Akbar Ibrahim <akbar.ibrahim@wipro.com> writes:
>
>  AI> But this requires you to have the above definition repeated
>  AI> inside all targets.
>
> This is where the ID attribute and <classpathref> get into the game.
>
> Stefan
>


Mime
View raw message