> > > > Is the <depend> task able to "look" into JARs (provided they > are included > > in the CLASSPATH) in case import statements in the source code refer to > > classes contained within these JAR files? If not, is there a > possible way > > (without having to write a custom task in Java) of making Ant do this? > > > > Any help will be greatly appreciated! > > > I do not think <depend> will do that, but it is not clear to me > what do you > want it to acomplish. What it does now is delete classes that depend on > classes that are out-of-date and thus will be recompiled. How would that > work in a jar? where would the source code for the classes in the jar be? >
Depend will do this. Checkout the last paragraph of the description. http://jakarta.apache.org/ant/manual/OptionalTasks/depend.html I think this is what the original poster is after and it is a useful feature. Here is an example I am using. If the common.jar is updated, most classes in the antcore jar get rebuilt <path id="classpath.antcore"> <path refid="classpath.common"/> <pathelement location="${distlib.dir}/common/common.jar"/> <path refid="classpath.parser"/> </path> <depend destdir="${bin.dir}/antcore" srcdir="${java.dir}/antcore"> <classpath refid="classpath.antcore"/> </depend> <javac destdir="${bin.dir}/antcore" srcdir="${java.dir}/antcore" debug="${debug}"> <classpath refid="classpath.antcore"/> </javac> <jar basedir="${bin.dir}/antcore" jarfile="${distlib.dir}/antcore/antcore.jar"/> Conor -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>