DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25097>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25097 Depend does not work when different source dirs are compiled to same destination Summary: Depend does not work when different source dirs are compiled to same destination Product: Ant Version: 1.6Beta Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Optional Tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] In the setup described below, the depend task works as expected when A.java is updated and A and B are compiled to different directories: A.class is deleted before the first complilation and B.class before the second. But there seem to be no way to make it work that way when A.class and B.class share the same destdir: There is a warning in the first invokation about not finding the source for B.class, and the second invokation deletes nothing. This makes it very difficult to use depend in loosely coupled build files that behave well when used from a master build file that overrides "build.dir". Perhaps the easiest solution to the problem is to provide an option to delete out of date class files found in destdir even if the source is not found? src_a/A.java: public class A {} src_a/B.java: public class B { A a = new A(); } depend.xml: <project name="depend" default="b"> <!-- Works as expected: A.class is deleted in the first target, B.class in the second. <target name="a"> <depend srcdir="src_a" destdir="bin_a" closure="true" classpath="bin_a"/> <javac srcdir="src_a" destdir="bin_a" classpath="bin_a"/> </target> <target name="b" depends="a"> <depend srcdir="src_b" destdir="bin_b" closure="true" classpath="bin_a:bin_b"/> <javac srcdir="src_b" destdir="bin_b" classpath="bin_a:bin_b"/> </target> --> <!-- Does not work as expected: A warning in the first target, B.class is never deleted. --> <target name="a"> <depend srcdir="src_a" destdir="bin" closure="true" classpath="bin"/> <javac srcdir="src_a" destdir="bin" classpath="bin"/> </target> <target name="b" depends="a"> <depend srcdir="src_b" destdir="bin" closure="true" classpath="bin"/> <javac srcdir="src_b" destdir="bin" classpath="bin"/> </target> </project> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]