ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
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.

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

"Richard Wilkinson" <>
10/08/01 01:59 PM
Please respond to ant-user

        To:     "''" <>
        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"
                <classpath refid="buildpath"/>

      <target name="C" depends="A">
                        <javac srcdir="${sp.packages}/A/C"
                <classpath refid="buildpath"/>

Package B depends on C so Ant builds C, but C cannot because B hasn't 
The only solution I can think of is to merge C into B, but this muddies 
water as to what the new package does. Package B and C perform distinctly
different functions, but are tightly coupled. Anyone have any suggestions?



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.

View raw message