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 <[EMAIL PROTECTED]>:


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to