ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Madison" <...@tfftech.com>
Subject Re: expanding properties in custom task
Date Mon, 01 Sep 2003 06:01:41 GMT
Thanks greatly for the direction! Definitely my bad for the laziness. I had
expected this to be mentioned in the doc (at least clearly?). I'll implement
and (if time permits) modify/submit changes to the documentation
accordingly.

j.

---
Jon Madison
Consultant, Thought For Food Tech, LLC
http://www.tfftech.com/
http://jon.madisons.com/

----- Original Message ----- 
From: <Jan.Materne@rzf.fin-nrw.de>
To: <user@ant.apache.org>
Sent: Monday, September 01, 2003 12:46 AM
Subject: RE: expanding properties in custom task


> String nestedText;
> public void addText(String theText) {
>     nestedText = getProject().replaceProperties(theText);
> }
>
>
> The getProject() is implemented in class Task. Maybe you want to look
> at org.apache.tools.ant.Project. There are some other interesting
> methods ...
>
>
> A good hint is looking into the source of other tasks. E.g. for use
> of EnumeratedAttributes or logging <echo>, for executing other (native)
> programs <exec>, working with filesets <copy>, ...
>
>
>
> Jan
>
>
>
> > -----Original Message-----
> > From: Jon Madison [mailto:jon@tfftech.com]
> > Sent: Friday, August 29, 2003 8:28 PM
> > To: Ant Users List
> > Subject: expanding properties in custom task
> >
> >
> > sorry if i missed this--i guess a pointer would be helpful:
> >
> > from the manual on creating a task:
> > ---
> >  If the task should support character data (text nested
> > between the start end end tags), write a public void
> > addText(String) method. Note that Ant does not expand
> > properties on the text it passes to the task.
> > ---
> >
> > unfortunately i don't see anywhere else it explains how to
> > make this the case. how would i handle any properties to
> > expand them? does Ant have any built-in facilities readily
> > available for this?
> >
> > thanks!
> >
> > j.
> >
> > ---
> > Jon Madison
> > Consultant, Thought For Food Tech, LLC
> > http://www.tfftech.com/
> > http://jon.madisons.com/
> >
>


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


Mime
View raw message