ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis Galiegue <...@one2team.com>
Subject Re: AW: Feature requests: include ant-contrib, unordered file sets, "cp"-like copy task
Date Wed, 03 Dec 2008 14:05:28 GMT
Le mardi 02 décembre 2008, Francis Galiegue a écrit :
[...]
> 
> > 
> > 3.I did not try this, but it seems not too difficult, perhaps I dont know 
> > enough about cp. 
> > What about
> > 
> >     <copy todir="dstdir"> 
> >       <fileset>
> >         <include name="**/src/java/**"/>
> >       </fileset>
> >     </copy>
> > 
> 
> I'll try that and report.
> 

Nope...

It recopies the whole directory structure. This is not what I want.

Say, I have:

basedir/a/src/java/com/<whatever>
basedir/a/src/java/org/...
basedir/b/src/java/com/<whatever2>
basedir/b/src/java/foo/...

What I want to have, in the destination directory, is what the cp command I 
gave as an example achieves, ie, in the dstdir:

com/<whatever>
com/org/...
com/foo/...
com/<whatever2>

What the following ant scriptlet recreates all the tree below the basedir in 
dstdir, as in:

a/src/java/com/<whatever>
a/src/java/org/...
b/src/java/com/<whatever2>
b/src/java/foo/...

Just like if I entered the following shell command:

(cd basedir && tar cf - */src/java/*)|(cd dstdit && tar xf -)

So, it just looks like ant cannot do what I want here, or maybe it can do it 
in such a convoluted way that I prefer my one-liner <exec>... unless a 
cp-like task is created :p

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 6 83 87 78 75
Tel : +33 (0) 1 78 94 55 52
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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


Mime
View raw message