You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by ke...@keysolutions.com on 2002/04/10 19:08:59 UTC

auto dependency generation?

Is there a simple way to generate a dependency file for
inclusion into build.xml?

I have several .java files in a com.blah.blah package (in a
directory).  One of the files is an Interface that one of the
other files uses.  Ant chose to compile the non-Interface
file first, so it can't get the .class file for the Interface
file because it hasn't compiled it yet :-P


 ken



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: auto dependency generation?

Posted by "Denis N. Antonioli" <an...@ifi.unizh.ch>.
On Mercredi, avril 10, 2002, at 09:10 , Diane Holt wrote:

> --- kenyee@keysolutions.com wrote:
>> Is there a simple way to generate a dependency file for
>> inclusion into build.xml?
>
> There's the <depend> task, but it works once the class files are all
> compiled (since it uses them to determine the dependencies).

...which won't find things such as final fields, or other inlined 
members of a class.

To be on the safe side, you need to parse the java sources. Two hints 
for free tools:
1) jikes has an option to generate dependencies
2) <http://code.werken.com/werken.javad/ >

Greetings
	Denis N. Antonioli
--
All human activity was useless, but some kinds were more pleasant than 
others.
   -- D. Lodge, Ginger, you're barmy


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: auto dependency generation?

Posted by Diane Holt <ho...@yahoo.com>.
--- kenyee@keysolutions.com wrote:
> Is there a simple way to generate a dependency file for
> inclusion into build.xml?

There's the <depend> task, but it works once the class files are all
compiled (since it uses them to determine the dependencies).

> I have several .java files in a com.blah.blah package (in a
> directory).  One of the files is an Interface that one of the
> other files uses.  Ant chose to compile the non-Interface
> file first, so it can't get the .class file for the Interface
> file because it hasn't compiled it yet :-P

But won't the Java compiler go compile whatever it needs whenever it needs
it? Does the Interface source file live in some subdir down from the dir
specified in 'srcdir'?

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>