ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. Michael Caine" <jmca...@alum.rpi.edu>
Subject root build "all"
Date Fri, 01 Dec 2000 21:40:04 GMT
i'm currently using a build.xml at the root level of my dev tree to handle
all of my projects.  (i do not want to package everything i do under the
same root for various reasons.)  is there a better way to do this (using
ant, not a shell script) than this?:

(by the way, is ant-dev the right place to post a message like this, or
ant-dev-help, or another?)

<project name="all" default="dist" basedir="/development">

  <target name="init">
    <property name="proj1" value="adapted"/>
    <property name="proj2" value="example"/>
    <property name="proj3" value="jmc"/>
    <property name="proj4" value="RDBIServer"/>
    <property name="sources" value="${basedir}/sources"/>
    <deltree dir="${basedir}/temp"/>
  </target>

  <target name="compile" depends="init">
    <ant antfile="${sources}/${proj1}/build.xml" dir="${basedir}"
target="compile"/>
    <ant antfile="${sources}/${proj2}/build.xml" dir="${basedir}"
target="compile"/>
    <ant antfile="${sources}/${proj3}/build.xml" dir="${basedir}"
target="compile"/>
    <ant antfile="${sources}/${proj4}/build.xml" dir="${basedir}"
target="compile"/>
  </target>

  <target name="dist" depends="compile">
    <ant antfile="${sources}/${proj1}/build.xml" dir="${basedir}"
target="dist"/>
    <ant antfile="${sources}/${proj2}/build.xml" dir="${basedir}"
target="dist"/>
    <ant antfile="${sources}/${proj3}/build.xml" dir="${basedir}"
target="dist"/>
    <ant antfile="${sources}/${proj4}/build.xml" dir="${basedir}"
target="dist"/>
  </target>

  <target name="doc" depends="compile">
    <ant antfile="${sources}/${proj1}/build.xml" dir="${basedir}"
target="doc"/>
    <ant antfile="${sources}/${proj2}/build.xml" dir="${basedir}"
target="doc"/>
    <ant antfile="${sources}/${proj3}/build.xml" dir="${basedir}"
target="doc"/>
    <ant antfile="${sources}/${proj4}/build.xml" dir="${basedir}"
target="doc"/>
  </target>

  <target name="clean" depends="init">
    <ant antfile="${sources}/${proj1}/build.xml" dir="${basedir}"
target="clean"/>
    <ant antfile="${sources}/${proj2}/build.xml" dir="${basedir}"
target="clean"/>
    <ant antfile="${sources}/${proj3}/build.xml" dir="${basedir}"
target="clean"/>
    <ant antfile="${sources}/${proj4}/build.xml" dir="${basedir}"
target="clean"/>
  </target>

</project>


Mime
View raw message