ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: Circular build problem.
Date Mon, 08 Oct 2001 08:56:44 GMT
Question - why on earth do you have multiple javacs? Why don't you put it in 
one big javac element if you want to build them together. ;)

On Mon, 8 Oct 2001 18:29, Richard Wilkinson wrote:
> I'm having trouble with a circle dependency in a package.
>
> Package A
> Package B
>
>     L-------Package C
>
> Package A contains base classes for both package B and C.
> Package B contains class B.
> Package C contains class C.
>
> Class B aggregates class C, but class C has a back pointer to class A.
>
> An extract of the build.xml is as follows.
>
>       <target name="B" depends="A, C">
>                         <javac srcdir="${sp.packages}/A"
>                                debug="${javacdebug}">
>                 <classpath refid="buildpath"/>
>             </javac>
>       </target>
>
>       <target name="C" depends="A">
>                         <javac srcdir="${sp.packages}/A/C"
>                                debug="${javacdebug}"
>                 <classpath refid="buildpath"/>
>             </javac>
>       </target>
>
> Package B depends on C so Ant builds C, but C cannot because B hasn't
> built. The only solution I can think of is to merge C into B, but this
> muddies the water as to what the new package does. Package B and C perform
> distinctly different functions, but are tightly coupled. Anyone have any
> suggestions?
>
> Thanks
>
> Richard
>
>
> ---------------------------------------------------------------------------
>-------------- This message is for the named persons use only.  It may
> contain confidential, proprietary or legally privileged information.  No
> confidentiality or privilege is waived or lost by any mistransmission.  If
> you receive this message in error, please immediately delete it and all
> copies of it from your system, destroy any hard copies of it and notify the
> sender.  You must not, directly or indirectly, use, disclose, distribute,
> print, or copy any part of this message if you are not the intended
> recipient. PROTEK Network Management Group and each of its subsidiaries
> reserve the right to monitor all e-mail communications through its
> networks.  Any views expressed in this message are those of the individual
> sender, except where the message states otherwise and the sender is
> authorised to state them to be the views of any such entity.

-- 
Cheers,

Pete

"The fact that a believer is happier than a skeptic is no more to the
 point than the fact that a drunken man is happier than a sober one.
 The happiness of credulity is a cheap and dangerous quality."
        -- George Bernard Shaw

Mime
View raw message