ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: expanding fileset to args for java-task
Date Wed, 06 Nov 2002 17:37:04 GMT
You have two choices:

1) Write an Ant-task. This task will accept a <fileset>, and process it.
   It's actually simpler that it may seem at first, and is even trivial
   when you don't need to use any of the Ant datatype/classes (in which
   case you write a simple bean class with setters and an execute() method)

2) Use a <fileset> outside your <java> task, <pathconvert> it to a space
   separated string stuffed in a property (that you seem to accet), and
   simply dereference that property as an <arg>.

(2) might just be what you need, but (1) is fun and provides a nicer
interface to your particular functionality in the build file. It's all a
matter of choice, time available, willingness to learn something new, etc...

Good luck, --DD

-----Original Message-----
From: Jan Heise [mailto:jan@janheise.de] 
Sent: Wednesday, November 06, 2002 11:27 AM
To: ant-user@jakarta.apache.org
Subject: Q: expanding fileset to args for java-task

hi all,

perhaps this is a simple/silly question but I haven't
found an answer so far. I want to do the following:

say i have a java task like:
<java classname="cirrus.hibernate.tools.SchemaExport" fork="true">

this tool supports a list of files as input from the command line,
so obviously I want to do something like this:
	<arg refid="mapping1.hbm.xml"/>
	<arg refid="mapping2.hbm.xml"/>
	<arg refid="mapping3.hbm.xml"/>

I am searching for a way to make this more flexible/shorter like
doing:
<arg>
	<fileset dir="${dir.src}">
		<include name="**/*.hbm.xml" />
	</fileset>
</arg>

but this does not work. is there a way to achieve the above?

tia, jan




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

--
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