ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject Re: Scaling to large projects
Date Tue, 04 Feb 2003 01:00:54 GMT

----- Original Message -----
From: "David McTavish" <>
To: "'Ant Users List'" <>
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
> 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.


  <target name="axis" depends="init" if="axis.src.found">
    <ant dir="${axis.home}" target="compile" inheritAll="false">

   <target name="client" depends="init,axis">
     <ant dir="client" target="${target}" inheritAll="false">
       <property name="dist.dir" value="${dist.dir}"/>

  <target name="server" depends="init,axis">
    <ant dir="server" target="${target}" inheritAll="false">
      <property name="dist.dir" value="${dist.dir}"/>

   <target name="-all" depends="client,server">

Then you have targets that call these with the target property set up

  <target name="dist">
    <antcall target="-all">
      <param name="target" value="default"/>

View raw message