ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Lopez <>
Subject Re: compiling packages in an explicit order with javac
Date Fri, 21 Nov 2003 16:53:41 GMT

I think with what you're facing there isn't going to be 1 right answer. 
We face a similar problem with circular references....the solution is to 
remove them and your builds will simplify as a result...we are still not 
100% cycle free but working on it.

Our build is driven by a "master" build file which calls the subordinate 
build files...There may be a more elegant way to do it in version 1.6b & 
1.7 a with the new tasks available in those versions (macrodef & import) 
but I have no experience with those releases.

Snippets of our build:

<!-- from main build -->
<target name="build.all" depends="init,tempjar" >
    <antcall target="" />
    <antcall target="build.ejb" />
    <antcall target="build.multi.projs" />
    <antcall target="create.entity.ears" />
    <antcall target="create.client.ear" />

<target name="" depends="init">
   <ant antfile="${}\buildBO.xml" />

<!-- buildBO.xml -->
<!-- it's hard to get around the <ant> calls due to the cycles but once 
in the target build file I try to use depends
       as much as possible - it'll contol the flow of compiliation with 
in that build file -->
<target name="" 
   <echo>  BO Compile...Pt 1...complete</echo>

Steph Richardson wrote:

>chris - the type of dependancy checking I mean is dependancies between packages, not between
.java & .class files.
>I want to have an explicit compilation order, to prohibit circular references between
my packages.
>>-----Original Message-----
>>From: Christopher Schultz []
>>Sent: Friday, November 21, 2003 10:39 AM
>>To: Ant Users List
>>Subject: Re: compiling packages in an explicit order with javac
>>>Looking for the most elegant / shorthand way to enforce an ordered
>>>package dependancy during javac compilation of my source tree.
>>>Currently I have a target that makes an <antcall> to another
>>>compile-package target, for each package.
>>Why not let ant do its own file-date checking, and javac do its own
>>dependency checking?
>>To unsubscribe, e-mail:
>>For additional commands, e-mail:
>To unsubscribe, e-mail:
>For additional commands, e-mail:

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

View raw message