It's all about the answers!

Ask a question

Ant Task Iterate is missing


Rogério Ramos da Silva (33512827) | asked Jul 22 '13, 9:33 p.m.
edited Jul 22 '13, 9:36 p.m.
Hi all,

I'm trying to use the task by this example:

<target name="testIterate">
    <propertyHelper />
    <search server="ramServer" query="test" id="searchResults" />
    <iterate collection="searchResults" param="asset" target="printAssetName" />
</target>
	
<target name="printAssetName">
    <propertyHelper />
    <echo message="Name: ${asset.name}" />
</target>
	

But it appear do not exists regardless such enhancement https://jazz.net/jazz02/resource/itemName/com.ibm.team.workitem.WorkItem/64258.
Is there any other way to iterate over a search result catching Asset objects?





	

Accepted answer


permanent link
Piotr Aniola (3.7k11738) | answered Jul 23 '13, 4:25 a.m.
Which version of Ant do you have? This would only work in Ant 1.7, according to the enhancement.
Also, the workitem shows tag <ram:iterate> rather than just <iterate>.
Rogério Ramos da Silva selected this answer as the correct answer

Comments
Gili Mendel commented Jul 23 '13, 9:14 a.m.
JAZZ DEVELOPER

Also make sure you have the right level of ramclient libraries (go into the ramclient-ant.jar and check the antlib.xml see that the task is in your manifest.


Rogério Ramos da Silva commented Jul 23 '13, 10:12 p.m.

I've worked with RAM 7.5.1.1 and didn't pay attention to attribute "planned for" of the enhancement.
Now trying the same example with 7.5.1.2, all is clear, thx all.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.