Is there a way in Ant to get at the individual files in the file list (the
equivalent of $< or $@ in make)?

I'll try to explain with the following snippet. This is generating java
source from xml schema files. A command line parameter allows the package
name for output to be defined. What I'd like to do is set the package name
to the name of the input file. Can I do this with a script? How would I get
the file name in a script?

I tried using <source/> but I need it for the input filename and it cannot
be used multiple times.

<target name="sourcegen" depends="init">
        <apply executable="java" dest="${gensrc}">
                <arg line="org.exolab.castor.builder.SourceGenerator -f -package
test -dest ${src} -i"/>
                <mapper type="glob" from="*.xsd" to="*.java"/>
                <fileset dir="${schema}"/>
        </apply>
</target>

Thanks

John


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to