ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject RE: cvs commit:jakarta-ant/src/main/org/apache/tools/ant/
Date Mon, 26 Jun 2000 00:49:59 GMT

> hey conor -
>     i'm curious as to if this resolves or worsens a problem i've
>     had with ant, that being that if i do a "build of a sub-branch"
>     of a package tree any/all resource files (eg xml, properties)
>     get reparented under the root package name.

All this patch does is to give a warning that copying of support files is
deprecated and fix up some strange indenting.

>     but, when i do a "branch build" using a tag as follows:
>         <javac srcdir="foo/bar/bop" ...

OK, the issue here is that javac (the compiler) relies on the package
statement in your java source code to determine where to place the generated
classes in the destination build area. javac (the task) uses the relative
directory position to determine the location of support files. When you
point srcdir into the middle of your source tree, the effect is to reparent
the support files higher up in the destination hierarchy.

I think it is best if your srcdir attribute always points to the root of
your package hierarchy. To achieve your branch build, you should use
appropriate <include> constructs in your javac task

	<javac srcdir="dir above foo">
          <include name="foo/bar/bop/**/*.java"/>

You may need to get an up to date version of ant for this capability - not


View raw message