ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dave young <dyo...@bsis.com.au>
Subject obtaining expanded pathnames [pattern matching] [newbie]
Date Thu, 05 Jul 2001 04:19:59 GMT
I am currently attempting to copy a whole bunch of source files that
have been extracted from a tar file.

the tar file extraction goes ok (although, it'd be really neat if it was
possible to specify a subset of the files to be extracted from the tar
file!!).

there is a set of files matching the following path that i wish to copy;
castor*/src/main/org/exolab/**

now, the thing is, that i need to place them into another directory and
don't wish to have the castor*/src/main bit of the filename, just the
remainder.

if i could get a property to match an expanded filename;
something like;
<property name="copy.from.dir" location="castor*/src/main/org/exolab"/>
then i could use that property in a copy command;

<copy todir="mydestdir">
   <fileset dir="${copy.from.dir}"/>
</copy>

which would avoid the "extra" bits at the start of the relative
pathnames when i am copying...

hope i am being clear in what i am trying to achieve.

i must say that i am very impressed with the ant tool so far.

some kind of filename expansion facility would make my life a lot easier
;-)

does somebody know if such a thing already exists?? i've held off on
delving into the ant source code so far, maybe it's time to get my hands
dirty?

best regards

dave young.

Mime
View raw message