ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject RE: target files depending on directories
Date Wed, 16 Oct 2002 16:31:21 GMT
Ant may not be particularly good at this type of
thing, but I still think <foreach> has a chance.  I
see two possibilities:

1) Use <foreach> with a fileset and check if the
target is a directory in your <antcall>ed task (okay).

2) Use <pathconvert> on a dirset to create a list that
can be passed to <foreach> (better).

-Matt

--- Dominique Devienne <DDevienne@lgc.com> wrote:
> Ant's not that good at this kind of things. You're
> best bet is to write a
> custom task, or use <script>. I'm curious why you
> need to that though ;-)
> 
> --DD
> 
> -----Original Message-----
> From: Tomas Hulek [mailto:thulek@cz.ibm.com] 
> Sent: Wednesday, October 16, 2002 11:07 AM
> To: ant-user@jakarta.apache.org
> Subject: target files depending on directories
> 
> Hi,
> 
> I have a problems working out how to create a target
> file in every
> directory which meets certiain condition. Does
> anyone has an idea?
> 
> Details:
> 
> After compiling all Java classes, I need to create a
> foo.properties file
> for every Java package '*.*.*' in the project (third
> level package).
> 
> The algorithms would normaly be:
> 
> 1) find all directories which are three levels deeps
> '*/ */*'
> 
> 2) create a file named foo.properties in each of
> those directories (and
> possible put something meaningful into it..)
> 
> I tried to play with with <foreach>
> (http://ant-contrib.sourceforge.net/ant-contrib/),
> however, the <fileset>
> element does not allow me to select directories
> only...
> 
> 
> Tomas
> 
> 
> --
> 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>
> 


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

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