@@ -1,4 +1,4 @@
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
@@ -114,9 +114,9 @@
<font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Requirement</b></font>
</td>
</tr>
<!-- Attribute Group -->
<!-- Attribute Group -->
<!-- Attribute Group -->
<!-- Attribute Group -->
<!-- Attribute -->
<tr>
<td bgcolor="#eeeeee" valign="top" align="left">
@@ -410,6 +410,68 @@
setting the basedir to projects1, projects2, projects3
</p>
<!-- manually written -->
<p>Now a little more complex - but useful - scenario. Assume that we have
a directory structure like this:</p>
<pre>
root
| common.xml
| build.xml
|
+-- modules
+-- modA
| +-- src
+-- modB
+-- src
<u><b>common.xml:</b></u><br>
<project>
<property name="src.dir" value="src"/>
<property name="build.dir" value="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<target name="compile">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${classes.dir}"/>
</target>
<!-- more targets -->
</project>
<u><b>build.xml:</b></u><br>
<project>
<macrodef name="iterate">
<attribute name="target"/>
<sequential>
<subant target="@{target}">
<fileset dir="modules" includes="*/build.xml"/>
</subant>
</sequential>
</macrodef>
<target name="compile">
<iterate target="compile"/>
</target>
<!-- more targets -->
</project>
<u><b>modules/modA/build.xml:</b></u><br>
<project name="modA">
<import file="../../common.xml"/>
</project>
</pre>
<p>This results in very small buildfiles in the modules, maintainable
buildfile (common.xml) and a clear project structure. Additionally
the root buildfile is capable to run the whole build over all
modules.
</p>
<!-- manually written -->
</blockquote></td></tr>
</table>
@@ -429,7 +491,7 @@
<tr>
<td>
<div align="center"><font color="#525D76" size="-1"><em>
Copyright © 2000-2003 , Apache Software Foundation
Copyright © 2000-2004 , Apache Software Foundation
</em></font></div>
</td>
</tr>
@@ -437,4 +499,4 @@
</table>
</body>
</html>
</html>