You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Nick Davis <ni...@yahoo.com> on 2006/03/31 20:30:19 UTC
best approach for a custom task?
I dont monitor this newsgroup, so I am not sure if
the question is appropriate for it. I apologize if it
is inappropriate.
Im creating a few ANT tasks that I would like to use
to modify the contents of text files.
I thought I would create one task that would contain
the other tasks. That task would accept a fileset,
run the other task for each file.
For example:
<my_macro>
<fileset dir="${project-dir}">
<include name="/**/*.txt"/>
</fileset>
<setPosition position=5 />
<insertText text=HEADER: />
<insertText text=${currentDate} />
</my_macro>
But I believe I would have to declare each subtask, so
I wouldnt be able to easily add the core tasks.
Is there a better approach?
Any help you could provide me would be greatly
appreciated.
Kind Regards,
Nick
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: best approach for a custom task?
Posted by Matt Benson <gu...@yahoo.com>.
Hmm... <for> from ant-contrib?
-Matt
--- Nick Davis <ni...@yahoo.com> wrote:
>
> I dont monitor this newsgroup, so I am not sure if
> the question is appropriate for it. I apologize if
> it
> is inappropriate.
>
> Im creating a few ANT tasks that I would like to
> use
> to modify the contents of text files.
>
> I thought I would create one task that would contain
> the other tasks. That task would accept a fileset,
> run the other task for each file.
>
> For example:
> <my_macro>
> <fileset dir="${project-dir}">
> <include name="/**/*.txt"/>
> </fileset>
> <setPosition position=5 />
> <insertText text=HEADER: />
> <insertText text=${currentDate} />
> </my_macro>
>
> But I believe I would have to declare each subtask,
> so
> I wouldnt be able to easily add the core tasks.
>
> Is there a better approach?
>
> Any help you could provide me would be greatly
> appreciated.
>
> Kind Regards,
> Nick
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> dev-help@ant.apache.org
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org