ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kapil_Pa...@i2.com
Subject Re: Circular build problem.
Date Mon, 08 Oct 2001 08:59:15 GMT
You could try the Quick and Dirty solution of splitting the <javac> task 
in conjunction with excludes/includes options.

Regards
_____________________________________
Kapil Singh Pawar
Consultant - Integration
i2 Technologies India Private Ltd.
1 Primrose Road
Bangalore 560 025, INDIA
Email: kapil_pawar@i2.com
Tel: +91 80 558 1487-90 ext. 2416




"Richard Wilkinson" <richard.wilkinson@protek.com>
10/08/01 01:59 PM
Please respond to ant-user

 
        To:     "'ant-user@jakarta.apache.org'" <ant-user@jakarta.apache.org>
        cc: 
        Subject:        Circular build problem.


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