|
@@ -567,15 +567,38 @@ build.compiler to "jikes" for it to be used in your build files. |
|
|
#include targets to simplify multi build.xml projects |
|
|
#include targets to simplify multi build.xml projects |
|
|
</b><dd> |
|
|
</b><dd> |
|
|
|
|
|
|
|
|
You can import XML files into a build file using <?import?> |
|
|
|
|
|
an element of XML syntax which the standard parsers use. This lets |
|
|
|
|
|
a multi-project development program share code through reference, |
|
|
|
|
|
|
|
|
You can import XML files into a build file using the XML parser itself. |
|
|
|
|
|
This lets a multi-project development program share code through reference, |
|
|
rather than cut and paste re-use. It also lets one build up a file of |
|
|
rather than cut and paste re-use. It also lets one build up a file of |
|
|
standard tasks which can be reused over time. Because the import |
|
|
standard tasks which can be reused over time. Because the import |
|
|
mechanism is at a level below which ant is aware, treat it as |
|
|
mechanism is at a level below which ant is aware, treat it as |
|
|
equivalent to the #include mechanism of the 'legacy' languages C and |
|
|
equivalent to the #include mechanism of the 'legacy' languages C and |
|
|
C++. |
|
|
C++. |
|
|
|
|
|
|
|
|
|
|
|
<p> |
|
|
|
|
|
|
|
|
|
|
|
There are two inclusion mechanisms, an ugly one for all parsers and a |
|
|
|
|
|
clean one. For now, the ugly |
|
|
|
|
|
method is the most portable:- |
|
|
|
|
|
<pre> |
|
|
|
|
|
<!DOCTYPE project [ |
|
|
|
|
|
<!ENTITY IncludeBuildCore SYSTEM "buildCore.xml"> |
|
|
|
|
|
<!ENTITY IncludeBuildSecondary SYSTEM "buildSecondary.xml"> |
|
|
|
|
|
%IncludeBuildCore; |
|
|
|
|
|
%IncludeBuildSecondary; |
|
|
|
|
|
]> |
|
|
|
|
|
|
|
|
|
|
|
<target name="includedBuild"> |
|
|
|
|
|
&IncludeBuildCore; |
|
|
|
|
|
&IncludeBuildSecondary; |
|
|
|
|
|
</target> |
|
|
|
|
|
</pre> |
|
|
|
|
|
The clean method using XInclude/Xpath will let you include named |
|
|
|
|
|
targets from one build file or another, using |
|
|
|
|
|
<a href="http://www.w3.org/XML/Linking"> |
|
|
|
|
|
the xpointer syntax</a>. You'll need to wait for the W3C proposals |
|
|
|
|
|
to finalise and the java XML parsers to implement it before |
|
|
|
|
|
using xpointer references. |
|
|
<dt><b> |
|
|
<dt><b> |
|
|
Implement complex Ant builds through XSL |
|
|
Implement complex Ant builds through XSL |
|
|
</b><dd> |
|
|
</b><dd> |
|
|