ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Handling Circular Dependency
Date Tue, 25 Apr 2006 04:04:03 GMT
On Mon, 24 Apr 2006, Hwa N. Shen <Hwa.N.Shen@jci.com> wrote:

> How do you handle circular dependency in Ant?

In general you don't compile files one by one in ant, but all at once
- so circular dependencies don't cause a problem:

    <javac srcdir="${src}" destdir="${build}" debug="yes"/>

Where this doesn't work as good as having a target per source file
(the approach you've shown) is when a change in A.java forces you to
recompile B.java as well.  This is where you'd use a single depend
task for all files before the single javac task (or an aternative to
the javac task like javamake that you can find by browsing the
external tools page).

Stefan

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


Mime
View raw message