From: James Todd [mailto:[EMAIL PROTECTED] > > it seems to me that when i build a "branch of a project", eg: > > <javac srcdir="${dir.src}/util/src/falcon/util" > destdir="${dir.build}/client/classes"/> > > where the project package is rooted at falcon, that any and > all resources (eg falcon/util/foo.properties) *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, foo.properties 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 "xyz.java" in the package falcon.util, javac will look for xyz.class in the root of the destdir, because the java file is located under the root of srcdir, while the actual class file will be located under .../client/classes/falcon/util/xyz.class. (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 destdir. 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). Cheers, Arnout
