ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Help on outputproperty
Date Sun, 19 May 2002 17:32:33 GMT
Here's a thought: This sounds like a job for the new <filterchain>.

Output the command to a file. Then use <ReplaceRegEx> (there's no such beast
right now, just a LineContainsRegEx, and a ReplaceToken) to transform the
output to the desired output. I guess one could also write a custom filter
specifically for that.

BTW, I found online doc on <filterchain> in the Concepts section, which says
<copy> (and other tasks) can use it, but there's no mention about (I could
see) in <copy> or <move> or ...

Similarly, I didn't a reference to <selector> in <fileset>...

Finally, a 'not likely to get accepted' idea: Why not allow inside <fileset>
(or maybe <filelist>) a command that returns the list of files, with maybe a
regex format that specify where's the filename in the output. That would
allow something like:

  <filelist id="files-to-exclude"
    <exec executable="cleartool" >
      <arg line="lsprivate -other -invob /frem_docs" />

and require having <fileset> be able to accept a <filelist> for an exclude


-----Original Message-----
From: Diane Holt []
Sent: Friday, May 17, 2002 7:43 PM
Subject: RE: Help on outputproperty

--- wrote:
> Thank you for reply.
> After I run clearcase tool :
> 	cleartool lsprivate -other -invob /frem_docs
> 	I should get two lines output
> 	 \frem_docs\Documents\x
> 	 \frem_docs\Documents\y
> I'll want to exclude those two files in "copy" task.

Yeah, that's a problem, since <fileset> wants relative paths for files
it's including/excluding -- so even if you sent the output to a file
instead of a property and pointed to it as an 'excludesfile', you still
wouldn't get the files excluded, since they're not relative to the
directory pointed to in your <copy>'s <fileset>.

The simplest suggestion would be to pick up the ant-contrib <foreach> task
so you can send each of the files through <basename> and write the result
out to a file, then use that file for 'excludesfile'.

Are you running Ant1.5 (if not, can you), and would using ant-contrib's
<foreach> be okay to do?  If no to either, then you'd need to go with a
<script> task to do the work of <foreach> and <basename> (on the plus
side, you wouldn't need to write anything out to a file, since you'd just
construct a comma-separated list, set it in a property, and pass that to
'excludes' instead... but it's a pretty paltry plus).



Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message