ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Inger <ma...@sedonacorp.com>
Subject Re: Javac dependicies
Date Tue, 14 Aug 2001 14:06:50 GMT
Camron Shimy wrote:

> Here is the code I am trying to run.  Every time I run 'ant', ConfigA 
> and ConfigB is recompiled, even though the class file has the same 
> timestamp as the java file.  Is there something I am doing wrong with 
> these dependencies?  Any tips would be greatly appreciated.  Here is 
> the code:
>
>
>   <target name="ConfigA">
>     <javac srcdir="."
>            destdir="../classes"
>            includes="ConfigA.java"
>            classpath="../classes"
>     />
>   </target>
>
>   <target name="ConfigB" depends="ConfigA">
>     <javac srcdir="."
>            destdir="../classes"
>            includes="ConfigB.java"
>            classpath="../classes"
>     />
>
>   </target>
>
If I remember correctly, ant will not resolve implicit dependencies in the
<javac> task.  So what happens is configB runs, which forces ConfigA to
be checked.  The task inside of determines that it needs to run (because of
this lack of implicit dependency checking), so it does.  Then the javac in
ConfigB runs.

try looking at the "depend" attribute on javac.  The ant crew will probably
be able to tell you how to get the desired behavior.

-- 
Matt Inger (matt.inger@sedonacorp.com)
Sedona Corporation
455 S. Gulph Road, Suite 300
King of Prussia, PA 19406
(484) 679-2213
"Self-respect - the secure feeling that no one,
 as yet, is suspicious." -H.L. Mencken 




Mime
View raw message