ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Toni Penttinen" <toni.pentti...@tassen.fi>
Subject extending existing java task
Date Wed, 26 Dec 2001 12:54:56 GMT
Hi,

It would be nice to have recursive directory scan in java tasks e.g. similar than javac has.

Couple of examples how it would look like as task point of view:

<target name="example" depends="something" description="example task">
	<java fork="yes" srcdir="${src.dir}"  includes="**/*.java" failonerror="true" classname="example.Main"
output="${example.dir}/example_log.xml">
			<arg line="-x -all"/>
		<classpath refid="class.path"/>	
	</java>
</target>

another example:

<target name="example" depends="something" description="example task">
	<java fork="yes" failonerror="true" classname="example.Main" output="${example.dir}/example.xml">
			<arg value="-x"/>
			<arg value="-all"/>
		<fileset dir="${src.dir}">
			<patternset>
				<include name="**/*.java"/>
			</patternset>
		</fileset>
		<classpath refid="class.path"/>
	</java>
</target>


Java task could also extend MatchingTask like javac does.

Regards,

Toni Penttinen 
Mime
View raw message