ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Weintraub" <qazw...@gmail.com>
Subject Re: appending to classpath
Date Sun, 26 Oct 2008 04:58:00 GMT
Once you set a reference or property, you can't really change it. My
suggestion is to use macros and pass your classpath as a parameter to
the macro. Take a look at the Macrodef task
<http://ant.apache.org/manual/CoreTasks/macrodef.html>, and take a
look how <element> is set. This is how you can pass your classpath to
a macro.

--
David Weintraub
qazwart@gmail.com



On Sun, Oct 26, 2008 at 12:48 AM, Brendan Miller <catphive@catphive.net> wrote:
> I have a <path id="myid"> ... </path>
>
> that I use as a class path via refid="myid" for a couple of tasks.
>
> For one task I need to add a couple of path elements to the path
> before passing it to my task.
>
> So I have something like
>
> <javac> ...
>
> <classpath>
> <pathelement path="blahblah" />
>
> <!-- this is more or less what I *want* to do, but ant rejects this -->
>
> <classpath refid="myid">
>
> </classpath>
>
> So, basically, I'm trying to add to the task before passing it in. How
> do I do this in ant?
>
> Brendan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Mime
View raw message