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: How to make "outputproperty" element work???
Date Thu, 28 Jun 2007 06:37:03 GMT
 

Hi,


-----Original Message-----
From: broken connection [mailto:brokenconnection@gmail.com] 
Sent: Thursday, June 28, 2007 8:07 AM
To: Ant Users List
Subject: Re: How to make "outputproperty" element work???

/*
Ninju, showed how to pass one parameter and get the value but what if I
want
to call the same Java file say 20 times passing different parameter
value
each time and getting different encrypted result back each time.

So,is there any way to call the <java> or <exec> task  multiple times
passing different value each time...???
*/

You need antcontrib <for> task, then you go =

<for list="whatever" param="argvalue">
  <sequential>
   <java classname="GeneratePassword" outputproperty="new_password">
   <arg value="@{argvalue}"/>
   <classpath>
              <pathelement path="."/>
   </classpath>
  </java>
  </sequential>
</for>

http://ant-contrib.sourceforge.net/

notice =
within <sequential> it's @{...} not ${...}

maybe it's also possible with <apply> <fileset .../> </apply>
see Ant manual

If you just need to call the java.exe n times you can use
the <repeat> task from Antelope.
http://antelope.tigris.org/


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