Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
How to make "outputproperty " element work???

How to make "outputproperty " element work???

2007-06-28       - By Rebhan, Gilbert
Reply:     1     2     3     4     5     6     7     8     9     10     >>  



Hi,


-----Original Message-----
From: broken connection [mailto:brokenconnection@(protected)]
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@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.