----- Original Message -----
From: "David McTavish" <[EMAIL PROTECTED]>
To: "'Ant Users List'" <[EMAIL PROTECTED]>
Sent: Monday, February 03, 2003 13:35
Subject: RE: Scaling to large projects
>
> What I was referring in my original email is when you have a project that
> relies on code you have developed in another project. (ie: maven depends
on
> ant). You could either:
> a) have a static binary from project A in the lib folder of project B
I have project B refer to the version in the dist dir of project A, usually.
Unless I want to decouple builds so that B1.12 runs against A1.0 even while
A1.1 is being coded.
> b) dynamically compile and build the library in project A as part of the
> build process of project B.
The trick there is in the toplevel build file
-each sub project has its own targe that calls <ant> down to the proejct
-these targets state their dependencies
-so builds from the top do stuff in the right order.
Example:
<target name="axis" depends="init" if="axis.src.found">
<ant dir="${axis.home}" target="compile" inheritAll="false">
</ant>
</target>
<target name="client" depends="init,axis">
<ant dir="client" target="${target}" inheritAll="false">
<property name="dist.dir" value="${dist.dir}"/>
</ant>
</target>
<target name="server" depends="init,axis">
<ant dir="server" target="${target}" inheritAll="false">
<property name="dist.dir" value="${dist.dir}"/>
</ant>
</target>
<target name="-all" depends="client,server">
</target>
Then you have targets that call these with the target property set up
right:-
<target name="dist">
<antcall target="-all">
<param name="target" value="default"/>
</antcall>
</target>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]