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 Sat, 12 Aug 2000 06:31:31 GMT
Yeah, we do.

But doing this...

<property name="myclasspath"
value="blah;blah;blah;blah;blah;blah;blah;blah;blah;blah;blah;blah;blah;blah
;blah;blah;blah;blah;blah;blah;blah;blah;blah" />

<target name="target1">
    ...
    <classpath path="${myclasspath}" />
</target>

<target name="target2">
    ...
    <classpath path="${myclasspath}" />
</target>

is dirty. (The definition of property "myclasspath" would have been broken
by my mailer) To avoid exactly this situation (long property values) we have

<classpath>
    <pathelement location="blah" />
    <pathelement location="blah" />
    <pathelement location="blah" />
</classpath>

But this requires you to have the above definition repeated inside all
targets.

It would be nice to have something like

<property name="myclasspath">
    <propertyelement value="blah">
    <propertyelement value="blah">
    <propertyelement value="blah">
    <propertyelement value="blah">
</property>

Then use this property inside all the targets.

Akbar


----- Original Message -----
From: Jay Glanville <dickon@nortelnetworks.com>
To: Ant-User (text) <ant-user@jakarta.apache.org>
Sent: Thursday, August 10, 2000 9:38 PM
Subject: RE: What is the best way to set up a class path variable?


> Ah, but don't we already have:
>   <classpath path="${property}" />
> ?
>
> -----Original Message-----
> From: Stefan Bodewig [mailto:bodewig@bost.de]
> Sent: Thursday, August 10, 2000 11:18 AM
> To: ant-user@jakarta.apache.org
> Subject: Re: What is the best way to set up a class path variable?
>
>
> [snip]
>
> And to show you a way that doesn't work with Ant 1.1 but will be
> possible in the next release:
>
> <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>
>
> ...
>
> Stefan


Mime
View raw message