ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Goldstein <sdgol...@mailandnews.com>
Subject Re: Copying a file recursively
Date Tue, 31 Jul 2001 06:06:34 GMT
That's a good point.

If I use the pattern you suggested, it would match all subdirectories and files in
those subdirectories.  This adds more directories than I want.  How would I get all
of the subdirectories that contain files of the form '*.java'?

Thanks for the help.

Scott

"Larry V. Streepy, Jr." wrote:

> My guess would be that your pattern does not match any directories, just
> files.  Try using a pattern of "**".
>
> Scott Goldstein wrote:
> >
> > I'm attempting to copy a file recursively throughout a directory tree.  Here
> > is the target that I'm trying:
> >
> > <target name="make" depends="init">
> >     <apply executable="cp" dest="." dir="." type="dir" failonerror="yes">
> >          <targetfile/>
> >          <srcfile/>
> >          <fileset dir=".">
> >               <patternset refid="all.sources"/>
> >          </fileset>
> >          <mapper type="merge" to="file_to_copy"/>
> >     </apply>
> > </target>
> >
> > where the all.source pattern is
> >
> >     <patternset id="all.sources">
> >             <include name="**/*.java"/>
> >     </patternset>
> >
> > When I run ant with verbose and debug options, I get the following output for
> > this target:
> >
> > make:
> >     [apply] Myos = Windows NT
> >     [apply] cp
> >
> > Can anyone give me some hints on how to fix this?  Thanks.
> >
> > Scott
> >
> > ------------------------------------------------------------
> > "Just a mirror for the sun...
> >  My smiling eyes are just a mirror for the sun."
> > ------------------------------------------------------------
>
> --
> Larry V. Streepy, Jr.
> Chief Technical Officer and VP of Engineering
>
> Health Language, Inc.  -- "We speak the language of healthcare"
>
> 970/626-5028 (office)           mailto:streepy@healthlanguage.com
> 970/626-4425 (fax)              http://www.healthlanguage.com


Mime
View raw message