ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: problem with file dependencies
Date Wed, 24 Apr 2002 14:36:42 GMT
I don't think so, at least not with SUN's Javac. It would recompile any
out-of-date class the Constants class depends on, but not the converse, the
classes that depend on the Constants class. Of course Erik, correct me if
I'm wrong ;-)

What could be done is force a rebuild when the constant class (or source) is
newer than any of the other classes (or the corresponding JARs) (or
sources), by wiping out ${build}. Add an <uptodate> condition should do.

Another alternative would be to use jikes which is supposed to have better
dependency analysis than SUN's javac, and deals with your particular cases
by caching dependency information about the Java sources.

Hope this helps, --DD

PS: I agree with Erik that you might want to compile everything with one
Javac... The fact that your code is well compartmented in MVC fashion
shouldn't preclude you for building it all at once, even if it's packaged in
different JARs.

-----Original Message-----
From: Erik Hatcher [mailto:jakarta-ant@ehatchersolutions.com] 
Sent: Wednesday, April 24, 2002 6:17 AM
To: Ant Users List
Subject: Re: problem with file dependencies 

Why not compile your entire tree with one <javac>??

That would solve the problem you're asking about, at least.

----- Original Message -----
From: "Joel Rees" <joel@alpsgiken.gr.jp>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Wednesday, April 24, 2002 5:35 AM
Subject: problem with file dependencies


> Can someone suggest a way to change the following so that a change to a
> class of constants in the package "common" will cause classes in the
> packages "controller" and "view" to be re-compiled? Or perhaps suggest
some
> reasons why it would not be happening today?
>
>   <target name="init">
>     <tstamp/>
>   </target>
>
>   <target name="common" depends="init">
>     <javac destdir="${build}" debug="on">
>         <src path="${src}"/>
>         <include name="${common}/*.java"/>
>     </javac>
>   </target>
>
>   <target name="controller" depends="common">
>     <javac destdir="${build}" debug="on">
>         <src path="${src}"/>
>         <include name="${controller}/*.java"/>
>     </javac>
>   </target>
>
>   <target name="view" depends="common,controller">
>     <javac destdir="${build}" debug="on">
>         <src path="${src}"/>
>         <include name="${view}/*.java"/>
>     </javac>
>   </target>
>
>
>
> Joel Rees
> Alps Giken Kansai Systems Develoment
> Suita, Osaka
>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message