Skip to content

Instantly share code, notes, and snippets.

@farukonder
Created June 13, 2012 12:30
Show Gist options
  • Save farukonder/2923765 to your computer and use it in GitHub Desktop.
Save farukonder/2923765 to your computer and use it in GitHub Desktop.
<xmltask source="${file}" dest="${file}">
<copy path="count(/*[local-name()='definitions']/*[local-name()='portType']/*[local-name()='operation'])" property="countNumber"/>
</xmltask>
<script language="beanshell">
<classpath>
<fileset dir="${library.dir}">
<include name="*.jar" />
</fileset>
</classpath>
<![CDATA[
print("countNumber : " + countNumber);
int count = new Integer(countNumber).intValue();
String forLoopString = "";
for (int i=0; i < count; i++)
{
forLoopString+=(i+1)+",";
}
print("forLoopString : " + forLoopString);
project.setProperty("forLoopString",forLoopString);
project.setUserProperty("forLoopString",forLoopString);
]]>
</script>
<for param="instance" list="${forLoopString}" >
<sequential>
<echo> instance : @{instance} </echo>
</sequential>
</for>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment