We can control the execution of two build files by using a master build file. The master build file shown in Listing 20.19 is located in the root directory of the Model 2 Hello World Example of the main project. This build file treats the model and application build files as subprojects (the model and application projects are the first of many subprojects that we want to fit into a larger project).
<project name="main" default="build" ><ant dir="./Model" target="clean">
<property name="outdir" value="${outdir}" />
</ant>
<ant dir="./Application" target="clean"> <property name="outdir" value="${outdir}" />
</ant>
<target name="prepare" depends="init"
description="prepare the output directory."> <mkdir dir="${build}" />
<mkdir dir="${lib}" />
<ant dir="./model" target="package">
<property name="outdir" value="${outdir}" />
</ant>
<ant dir="./application" target="package"> <property name="outdir" value="${outdir}" />
</ant>
</target>