ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: filelist task
Date Wed, 19 Sep 2007 06:32:17 GMT
 

Hi,

-----Original Message-----
From: sun99 [mailto:ravinder141@gmail.com] 
Sent: Wednesday, September 19, 2007 6:43 AM
To: user@ant.apache.org
Subject: filelist task

/*
I have list of modules (may vary) to be checked out from cvs  and
compile each module . how can i loop these activities in ant build.
*/

with antcontrib <for> task, i.e.

as macrodef =

<macrodef name="checkout_n_compile">
<attribute name="modules" default="foo,foobar,foobaz"/>
<attribute name="cvsroot" default="...."/>
<attribute name="..." default="...."/>
...

<sequential>

<for list="@{modules}" param="modul">

<cvs cvsroot="@{cvsroot}"
  package="@{modul}"
  dest="C:/cvstemp/@{modul}"
  command="-Q co"
  failonerror="true" />

<javac fork="true"
   memorymaximumsize="1024M"
  failonerror="true"
  includes="**\*.java"
srcdir="C:/cvstemp/@{modul}"
   ...
/>
  </sequential>
</macrodef>

or without a macrodef =

<property name="modules" value="foo,foobar,foobaz"/>
<property name="cvsroot" value="....."/>

...

<for list="${modules}" param="modul">
<sequential>
<cvs cvsroot=${cvsroot}"
  package="@{modul}"
  dest="C:/cvstemp/@{modul}"
  command="-Q co"
  failonerror="true" />

<javac fork="true"
   memorymaximumsize="1024M"
  failonerror="true"
  includes="**\*.java"
srcdir="C:/cvstemp/@{modul}"
destdir="C:/dist/@{modul}"
...
/>

</sequential>


Regards, Gilbert

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message