ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Mc Quillan" <john.mcquil...@openjawtech.com>
Subject Accessing the individual files in the file list
Date Wed, 29 May 2002 19:23:19 GMT
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:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message