ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Wilkinson" <richard.wilkin...@protek.com>
Subject Circular build problem.
Date Mon, 08 Oct 2001 08:29:15 GMT
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.





Mime
View raw message