You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jay Glanville <di...@nortelnetworks.com> on 2000/11/16 13:39:58 UTC

Does ant deal with reverse dependencies?

What's a reverse dependency, you ask?  It's my way describing source code
that is depended on.

For example:
  A includes B
  B includes C
Now, B has a dependency on C, and B has a reverse dependency on A.  In other
words, B is depended upon by A.

Does ant have a mechanism where, if B is modified, that A will be
re-compiled?

----------------------------------------------------------------------------
-----
Jay Dickon Glanville
P068 - SiteManager Development, Nortel Networks
613-765-1144 (ESN 395-1144)
MS: 045/55/A05
E-Mail: dickon@nortelnetworks.com


Re: Does ant deal with reverse dependencies?

Posted by Stefan Bodewig <bo...@apache.org>.
Jay Glanville <di...@nortelnetworks.com> wrote:

> Does ant have a mechanism where, if B is modified, that A will be
> re-compiled?

Ant 1.2 hasn't, but the current CVS version holds an undocumented
<depend> task that will help you here.

Basically <depend> understands the relationship between your classes
and if A depends on B and B has been changed, it will delete A.class
so that the next <javac> will recompile A as well.

Stefan

RE: Does ant deal with reverse dependencies?

Posted by Conor MacNeill <co...@m64.com>.
Jay,

I added a task after the 1.2 release called <depend> which will
determine dependencies (and reverse dependencies) and then deletes class
files for classes which should be rebuilt. In your case, detecting that
B.java had been modified, it would remove A.class.

It is useable now, but I do plan some changes to it. There is currently
no documentation and you will need to grab a nightly build to try it
out.

Here is the mail I sent when I committed it which shows how to use it.

http://marc.theaimsgroup.com/?l=ant-dev&m=97271084914574&w=2

Conor


> -----Original Message-----
> From: Jay Glanville [mailto:dickon@nortelnetworks.com]
> Sent: Thursday, 16 November 2000 23:40
> To: Ant-User (text)
> Subject: Does ant deal with reverse dependencies?
>
>
> What's a reverse dependency, you ask?  It's my way describing
> source code
> that is depended on.
>
> For example:
>   A includes B
>   B includes C
> Now, B has a dependency on C, and B has a reverse dependency
> on A.  In other
> words, B is depended upon by A.
>
> Does ant have a mechanism where, if B is modified, that A will be
> re-compiled?
>
> --------------------------------------------------------------
> --------------
> -----
> Jay Dickon Glanville
> P068 - SiteManager Development, Nortel Networks
> 613-765-1144 (ESN 395-1144)
> MS: 045/55/A05
> E-Mail: dickon@nortelnetworks.com
>