ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: including other build files
Date Fri, 13 Oct 2000 08:50:10 GMT
I've added an entry for this to the FAQ but unfortuately it hasn't
been approved yet (I have no influence on this).



How do I include another fragment of a buildfile?

You can use XML's way of including external files and let the parser
do the job for Ant:

<?xml version="1.0"?>

<!DOCTYPE project [
    <!ENTITY common SYSTEM "file:./common.xml">

<project name="test" default="test" basedir=".">

  <target name="setup">




will literally include the contents of common.xml where you've placed
the &common; entity.

In combination with a DTD this would look like this:

<!DOCTYPE project PUBLIC "-//ANT//DTD project//EN" "file:./ant.dtd" [
   <!ENTITY include SYSTEM "file:./header.xml">

View raw message