ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Ferguson" <will...@verveinc.com>
Subject RE: "include" equivalnet in ant?
Date Thu, 09 Nov 2000 04:09:19 GMT
Stefan,

I know this is getting off-topic wrt Ant, but including build excerpts 
within other build files seem like a good idea to me. So would you 
mind explaining how this works:

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

cause I can't seem to get it to find the included (commom.xml) file. 

The 2 xml files are in the same directory.


William



> -----Original Message-----
> From: Stefan Bodewig [mailto:bodewig@bost.de]
> Sent: Tuesday, 7 November 2000 19:45
> To: ant-user@jakarta.apache.org
> Subject: Re: "include" equivalnet in ant?
> 
> 
> >>>>> "DF" == Duane Fields <dfields@caleonetworks.com> writes:
> 
>  DF> I'd like to be able to include a collection of targets from
>  DF> another build.xml into an antfile,
> 
> Copy of the FAQ entry I've created four weeks ago but that hasn't been
> released yet (*grmbl*) follows:
> 
> -------------------
> 
> 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">
>     ...
>   </target>
> 
>   &common;
> 
>   ...
> 
> </project>
> 
> 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">
> ]>
> 

Mime
View raw message