ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kuiper, Arnout" <>
Subject RE: Properties and subprojects
Date Fri, 04 Feb 2000 13:10:05 GMT
From: James Todd []
>     it seems to me that when i build a "branch of a project", eg:
>         <javac srcdir="${dir.src}/util/src/falcon/util"
>             destdir="${}/client/classes"/>
>     where the project package is rooted at falcon, that any and
>     all resources (eg  falcon/util/ *do not* end up
>     co-located with the relevant branch classes yet are instead
>     deposited at the destdir. put another way, i wonder if something
>     in ant/javac is broken when it comes to prepending the src
>     package name for non-java source objects.

This is "expected" behaviour, because javac uses the dir-structure of the
src dir for the dest dir. In you case, is located in the root
of the src dir, so it will be placed in the root of the dest dir.

You will also notice that javac always compiles your java files, even if
they didn't change. This is also caused by the same issue. If you have the
java file "" in the package falcon.util, javac will look for
in the root of the destdir, because the java file is located under the root
srcdir, while the actual class file will be located under

(Do I still make sense?)

Anyway, moral of this story: srcdir of the javac task should be the root of
your source tree, otherwise it cannot find the matching classes/resources in
the destdir, or places the resources in the wrong location under the

This raises another issue, how can you compile a package, without compiling
the whole source tree? Just wait for the pattern-based include/exclude to be
included for Ant (See other postings).



View raw message