ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Newbie question: how to recurse into subdirectories?
Date Mon, 14 Oct 2002 06:30:04 GMT
On Sat, 12 Oct 2002, Angelo Schneider <angelo.schneider@oomentor.de>
wrote:

> a) why does this task recurse into all directories?
>   <target name="compile" depends="init"
>         description="compile the source " >
>     <!-- Compile the java code from ${src} into ${build} -->
>     <javac srcdir="${src}" destdir="${build}"/>
>   </target>
> 
> b) why does the task above know to work on *.class versus *.java
> files?

The answer to both is that it has been designed to do so (because this
is what makes sense in its context).  Many other Ant tasks recurse
directories by supporting nested <fileset>s, others say that they are
"directory based tasks" in their docs, those do so as well.

> c) this does of course not recure into directories:
>    <target name="rcs">
>         <mkdir dir="rcs"/>
>    </target>

Because not recursing directories is what you'd usually want.

> So: where to get a hint about the basic concepts how ant works? 

Most of us probably feel that the docs are useful enough here,
otherwise they would be better 8-)

> E.g. the ** semenatics in pathes is rather wiered.

Is it?  We needed a way to distinguish between "match everything in
that dir" (i.e. *) and "match everything in that dir and below"
(i.e. **).

> A "ant for makefile authors" guide would be highly appreciated :-)

The problem may be that many people contributing to Ant and its
documentation have never been "makefile authors", at least not for
Java projects.  Any input is more than welcome.

> But more important, how do I create rcs subdirectories for my source
> tree with ant?

See my answer to Dominique.

Stefan

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