You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Peter Jeszenszky <je...@venus.math.klte.hu> on 2003/01/08 11:25:48 UTC

Execute task several times

Hello,

I would like to execute a Java class with the <java> task but with
several times passing different arguments to it. The arguments are
constructed using the members of a fileset.

<target name="castor" depends="init"
	description="generate the source code from the XML schemas">

	<fileset dir="${schema}" includes="*.xsd"/>

	<!-- This task should be executed on the elements of the fileset:
		each time ${schema}/schema.xsd below should be replaced
		with the corresponding filename.
	-->
	<java classname="org.exolab.castor.builder.SourceGenerator">
		<arg line="-i ${schema}/schema.xsd -dest ${build} -package test"/>
	</java>
</target>

Any idea how to do it?

Thanks in advance.

Peter

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Execute task several times

Posted by Matt Benson <gu...@yahoo.com>.
There's also the <apply> task, which I believe was
intended to solve exactly this type of problem.

-Matt

--- Peter Jeszenszky <je...@venus.math.klte.hu> wrote:
> Hello,
> 
> I would like to execute a Java class with the <java>
> task but with
> several times passing different arguments to it. The
> arguments are
> constructed using the members of a fileset.
> 
> <target name="castor" depends="init"
> 	description="generate the source code from the XML
> schemas">
> 
> 	<fileset dir="${schema}" includes="*.xsd"/>
> 
> 	<!-- This task should be executed on the elements
> of the fileset:
> 		each time ${schema}/schema.xsd below should be
> replaced
> 		with the corresponding filename.
> 	-->
> 	<java
>
classname="org.exolab.castor.builder.SourceGenerator">
> 		<arg line="-i ${schema}/schema.xsd -dest ${build}
> -package test"/>
> 	</java>
> </target>
> 
> Any idea how to do it?
> 
> Thanks in advance.
> 
> Peter
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>