ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Harnack <harna...@mail05.harlau.de>
Subject Re: ? function in build.xml
Date Wed, 02 Jul 2008 06:54:42 GMT
Hello jantje,

the macrodef-Task should help:
http://ant.apache.org/manual/CoreTasks/macrodef.html

The for-Task (ant-contrib) could be interesting too:
http://ant-contrib.sourceforge.net/tasks/tasks/for.html

Regards

Frank


Quoting jantje <janvanoppen@skynet.be>:

>
> Hi there,
>
> I have this in build.xml
>     <delete dir="/tmp/module"/>
>     <mkdir dir="/tmp/module/usr/local/fop"/>
>     <copy todir="/tmp/module/usr/local/fop">
>       <fileset dir="/usr/local/fop/"/>
>     </copy>
> These three tasks I have to repeat multiple times (only changing fop in f.i.
> jdk or project or..). Is it possible to make some kind of function so I only
> have to pass the word "fop"? f.i.:
>
> function SSS {
>     <delete dir="/tmp/module"/>
>     <mkdir dir="/tmp/module/usr/local/${1}"/>
>     <copy todir="/tmp/module/usr/local/${1}">
>       <fileset dir="/usr/local/${1}/"/>
>     </copy>
> }
>
> Thanks..
> --
> View this message in context:   
> http://www.nabble.com/--function-in-build.xml-tp18227643p18227643.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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