ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject RE: Examples for <depend> Task
Date Tue, 22 Jan 2002 00:00:46 GMT
> >
> > 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.

I think this is what the original poster is after and it is a useful

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"/>

  <depend destdir="${bin.dir}/antcore"
   <classpath refid="classpath.antcore"/>
  <javac destdir="${bin.dir}/antcore"
    <classpath refid="classpath.antcore"/>
  <jar basedir="${bin.dir}/antcore"


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message