ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cyriaque Dupoirieux <cyriaque.dupoiri...@pcotech.fr>
Subject Variables in task ?
Date Thu, 28 Jun 2001 12:21:41 GMT
Hello,

   I need to do several times the same thing for different directories.
I want to factorise that kind of task :

<target name="Recopie des images">
       <copy todir="${codes}/${paquetage1}/${images}" >
           <fileset dir="${sources}/${paquetage1}/${images}"/>
       </copy>
       <copy todir="${codes}/${paquetage2}/${images}" >
            <fileset dir="${sources}/${paquetage2}/${images}"/>
       </copy>
       <copy todir="${codes}/${paquetage3}/${images}" >
            <fileset dir="${sources}/${paquetage3}/${images}"/>
       </copy>
       <copy todir="${codes}/${paquetage4}/${images}" >
            <fileset dir="${sources}/${paquetage4}/${images}"/>
       </copy>
       <copy todir="${codes}/${paquetage5}/${images}" >
            <fileset dir="${sources}/${paquetage5}/${images}"/>
       </copy>
</target>

into a task like the following :
<target name="Recopie des images">
        <copy todir="${codes}/${paquetage}/${images}" >
            <fileset dir="${sources}/${paquetage}/${images}"/>
        </copy>
</target>

where I would change the value of ${paquetage} (package in french ;) )  
each time
I call for the target.

Is it possible ?

Thanks and regards,

-- 
Cyriaque Dupoirieux
PCO Technologies
Burolines - 2 ter rue Marcel Doret
31700 Blagnac
Tél : 05 34 60 44 13 - Fax : 05 34 60 44 10


Mime
View raw message