You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ram Krish <kr...@yahoo.co.in> on 2002/12/11 06:10:14 UTC

Depend Task..

Hi,
   I have very liitle knowledge in Ant.Whats the
advantage of Depend task over javac and how to combine
them effectivwly for building projects?..(i am using
JDK1.3.1)

Thanks in Advance,
Ram

________________________________________________________________________
Missed your favourite TV serial last night? Try the new, Yahoo! TV.
       visit http://in.tv.yahoo.com

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


Re: Depend Task..

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Ram Krish wrote:
> Hi,
>   if <depend> is not perfect, how to solve this
> dependency probelm when compiling?.I want to write a
> script for our financial product which is already
> running live.Previously we were using NT batch file to
> build.Please help me in this regard.
> 

If you want to be absolutely sure, delete all class files and rebuild. 
Generally you would use <depend> in a development situation where you 
are building over and over in a build-test cycle. All production builds 
should be from scratch in any case.

Conor



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


Re: Depend Task..

Posted by Ram Krish <kr...@yahoo.co.in>.
Hi,
  if <depend> is not perfect, how to solve this
dependency probelm when compiling?.I want to write a
script for our financial product which is already
running live.Previously we were using NT batch file to
build.Please help me in this regard.

Ramkumar

 --- Conor MacNeill <co...@cortexebusiness.com.au>
wrote: > Ram Krish wrote:
> > Hi,
> >    I have very liitle knowledge in Ant.Whats the
> > advantage of Depend task over javac 
> 
> If class A depends on class B and B.java is changed,
> the <javac> task 
> will not recompile A.java even though class B may
> have changed its 
> interface. If it hasB has changes, the result may be
> a runtime error 
> (IncompatibleClassChangeError). The depend task
> analyses class 
> dependencies and if A depends on B and B.java has
> changed, it will 
> delete A.class, forcing A.java to be recompiled. The
> interface change 
> would then cause some sort of compilation error.
> 
> <depend> is not perfect as it relies on class file
> dependencies. Most, 
> but not all, source level dependencies result in
> class filedependencies. 
> In particular, static final constants do not.
> 
> and how to combine
> > them effectivwly for building projects?..(i am
> using
> > JDK1.3.1)
> > 
> 
> Just put a <depend> task before <javac> in your
> build target and use the 
> same parameters.
> 
> Conor
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>  

________________________________________________________________________
Missed your favourite TV serial last night? Try the new, Yahoo! TV.
       visit http://in.tv.yahoo.com

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


Re: Depend Task..

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Ram Krish wrote:
> Hi,
>    I have very liitle knowledge in Ant.Whats the
> advantage of Depend task over javac 

If class A depends on class B and B.java is changed, the <javac> task 
will not recompile A.java even though class B may have changed its 
interface. If it hasB has changes, the result may be a runtime error 
(IncompatibleClassChangeError). The depend task analyses class 
dependencies and if A depends on B and B.java has changed, it will 
delete A.class, forcing A.java to be recompiled. The interface change 
would then cause some sort of compilation error.

<depend> is not perfect as it relies on class file dependencies. Most, 
but not all, source level dependencies result in class filedependencies. 
In particular, static final constants do not.

and how to combine
> them effectivwly for building projects?..(i am using
> JDK1.3.1)
> 

Just put a <depend> task before <javac> in your build target and use the 
same parameters.

Conor



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