ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Ledford <>
Subject file expansion for <arg>???
Date Fri, 19 Oct 2001 21:30:24 GMT
I finally bit the bullet and I'm switching from make
to ant for my Java projects.  And I've pretty much
got everything figured out, BUT this one item:

How to I get file name expansion for tasks which use
the <arg> element to define command line arguments?

Specifically I'd like to run a Java application for
on all files with a certain extension.

In shell-eez:  java myClass *.pat

In ant's build.xml:
    <java classname="myClass" classpath="mystuff.jar" >
        <arg value="x.pat" />
        <arg value="y.pat" />
        <arg value="z.pat" />

If I use "*.pat" for the value, line, or file attributes
of the arg element - I don't get file expansion.
And - the arg element doesn't allow sub-ordinate fileset
elements. Nor does it support the "includes" attribute.

Either I'm missing something - or - I can't be the only
person who wants to run java applications in their ant
build files. I suppose I could make my applications valid
ant target elements, but this seems excessive.

Don Ledford

View raw message