ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: <java ...> task question
Date Fri, 09 Apr 2004 18:30:51 GMT
> From: Rudolf Nottrott [mailto:rnott@alexandria.UCSB.edu]
> 
> I have a Java class that takes a single xml file as input (and validates
> it).
> I have a directory, called "valDir", which contains a few hundred xml
> files
> and I want to apply the java class to each of those files.
> 
> Is to possible to make the <java ... > task do this, take files one by one
> from "valDir"?
> 
> Perhaps some kind of loop?
> I know other tasks, like <xslt ... > take a base directory on which to
> operate, but <java ...> doesn't

For a long time Ant lacked the equivalent of <apply> for running Java
program, although you can always <exec executable="java" ... /> configured
properly. (The rational being that you should write an Ant task for it then,
I guess).

At least now there is <for> from Ant-Contrib which should allow you to do
what you want.

PS: BTW, Ant has a built-in <xmlvalidate>.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message