ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Handling Circular Dependency
Date Tue, 25 Apr 2006 04:04:03 GMT
On Mon, 24 Apr 2006, Hwa N. Shen <> 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 forces you to
recompile 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).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message