ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Ant and java frameworks
Date Wed, 27 Jun 2001 12:47:18 GMT
Kyle Adams <> wrote:

> Here's an example:
>     <target name="compile" depends="init">
>         <ant dir="bm" target="compile" />
>         <ant dir="uv" target="compile" />
>         <ant dir="rh" target="compile" />
>    </target>

OK, I'm part of the "single compile for all modules" fraction, and
prefer a single build file, but my builds are not as complex as those
other people have to live with.

What you are trying to do is a case for <anton>, once it is there - or
a foreach task like the one you can find in the archives of ant-dev.
As long as these are not available, here is a workaround:

<target name="is-it-there">
  <available file="bm/build.xml" property="bm-is-there" />
  <available file="uv/build.xml" property="uv-is-there" />
  <available file="rh/build.xml" property="rh-is-there" />

<target name="compile-bm" depends="is-it-there" if="bm-is-there">
  <ant dir="bm" target="compile" />

<target name="compile-uv" depends="is-it-there" if="uv-is-there">
  <ant dir="uv" target="compile" />

<target name="compile-rh" depends="is-it-there" if="rh-is-there">
  <ant dir="rh" target="compile" />

<target name="compile" depends="compile-bm,compile-uv,compile-rh" />


View raw message