ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ventimiglia, David" <David.Ventimig...@morganstanley.com>
Subject RE: How can I resolve Java dependencies w/o javac
Date Fri, 13 Apr 2001 22:15:42 GMT
This sort of question seems to crop up periodically, on this list and a few
others.  Helpfully, there is a very nice Ant task called <depend> which
effectively computes "reverse" dependencies among Java files, in a way that
fits in perfectly with the way Ant compiles.  In the past, some have claimed
that it has some limitations, but the only one I've been able to verify is
that it has trouble if a .java file contains more than one class definition
(even this may've been fixed...haven't looked in awhile).  If you don't want
to have to figure out how to integrate some other tool, like werken.javad, I
highly recommend using this task.  It's excellent.

Cheers,
David  

-----Original Message-----
From: David Corbin [mailto:dcorbin@imperitek.com]
Sent: Friday, April 13, 2001 10:52 AM
To: ant-user@jakarta.apache.org
Subject: Re: How can I resolve Java dependencies w/o javac


I don't know whatant does, but take a look at werken.javad at
http://code.werken.com


> "Brooke Wallace (EWU)" wrote:
> 
> Hi,
>    A friend of mine pointed out your project because you are working
> on an
> make like environment to build java code. We are also building java
> code and
> have a very complex, very automated build environment that uses a
> varient of
> GNU make.
> 
> The problem that we have encountered, that I would like to ask you
> about is
> that when you build the java code, how do you determine the code
> dependencies,
> or order of compilation?
> 
> I know that if I do javac *.java the java compiler will resolve all
> dependencies
> or if I keep my java source in the same path as the java package name.
> The
> problem with letting the java compiler determine dependencies and what
> should be
> compiled is that javac only knows about timestamps. If you are using a
> 
> safisticated revision control system, as most professional development
> must,
> then timestamps are not enough to determine whether or not to rebuild
> a
> particular file. We are using Rational's Clearcase for revision
> control. It
> comes with clearmake which has a GNUMake mode and is aware of
> clearcase:
> Configuration Records (CRs) and Dervied Objects (DOs) so that it goes
> far
> beyond using timestamps to determine what files need to be rebuilt.
> 
> Have you considered these issues for you project? Are you just using
> timestamps?
> 
> Anyway what we need is someway to generate java makefile dependencies
> similar
> to how a lot of C compilers do with a -M option. Obviously javac does
> not have
> a -M option, but developing such a script would involve parsing the
> java code,
> and that is a substatial part of javac that has already been
> implemented. So
> I just want to know are you guys planning to let javac determine what
> to
> compiled for you, or have you faced this issue of dependencies and
> thought of
> some solution.
> 
>         -Brooke
>         Ericsson Wireless Communications Inc.

-- 
David Corbin 		
dcorbin@imperitek.com

Mime
View raw message