ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject AW: Execute <java> task several times
Date Wed, 08 Jan 2003 10:31:10 GMT
AntContrib @ sourceforge:

<taskdef resource="net/sf/antcontrib/" />
<target name="castor" depends="init">
    <foreach target="process" param="file">
        <fileset dir="${schema}" includes="*.xsd"/>
<target name="process">
    <java classname="org.exolab.castor.builder.SourceGenerator">
        <arg line="-i ${file} -dest ${build} -package test"/>

Not tried, but it should (hopefully) work.

Jan Matèrne

-----Ursprüngliche Nachricht-----
Von: []
Gesendet am: Mittwoch, 8. Januar 2003 11:26
Betreff: Execute <java> task several times


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

Any idea how to do it?

Thanks in advance.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message