ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dhaval Chokshi" <>
Subject Loop support in ant ?
Date Thu, 24 Jul 2003 07:54:20 GMT
can we include any type of loop in the ant build.xml file?

I have to generate one build.xml file that performs the same tasks for various modules. Each
time i have to add one module or delete one module I have to remove targets from the build.xml
file or add targets in the build file. Targets have all the functionalities same but only
the module name changed. If I can add one loop in the build.xml file that will repeat the
same targets for all the modules then it will greatly help me.

Please look at the targets below: both are same but only the name "staff" is replaced with
"provisioning" in the second target. Can I directly generate these types of modules?

<target name="make-staff-jar" if="staff.present">
   <jar jarfile="${appjars.server.dir}/staff-ejb.jar">
     <fileset dir="${build.classes.dir}">
   <include name="**/staff/**/*"/>
  <fileset dir="${build.ejb-meta.dir}/staff"/>

<target name="make-provisioning-jar" if="provisioning.present">
   <jar jarfile="${appjars.server.dir}/provisioning-ejb.jar">
     <fileset dir="${build.classes.dir}">
   <include name="**/provisioning/**/*"/>
  <fileset dir="${build.ejb-meta.dir}/provisioning"/>

Thanks in advance.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message