You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Robert Upshall <ru...@psasoft.com> on 2003/03/02 03:03:36 UTC

include type task?

Does Ant have any "include" type tags?

Say I have project1.xml, project2.xml and build.xml.  Is there a way I 
can include project1.xml and project2.xml into the build.xml so I can 
keep the targets seperate for each project but still only have 1 build 
file with the common targets?

Robert



Re: include type task?

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Martin wrote:
> What does the designation of SYSTEM mean in this context?
An URI reference.
You can read more about this in the XML spec:
  http://www.w3.org/TR/REC-xml#sec-entity-decl
  http://www.w3.org/TR/REC-xml#NT-ExternalID

> Would there be different designation for PROJECT
> (property attributes) etc..?
*Chuckle*

J.Pietschmann



Re: include type task?

Posted by Martin <mg...@hotmail.com>.
looks almost like CDATA construct..
What does the designation of SYSTEM mean in this context?
Would there be different designation for PROJECT
(property attributes) etc..?
Thanks,
Martin
----- Original Message ----- 
From: "Jesse Stockall" <je...@cryptocard.com>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Saturday, March 01, 2003 7:23 PM
Subject: Re: include type task?


> On Saturday, March 1, 2003, at 09:03 PM, Robert Upshall wrote:
> > Does Ant have any "include" type tags?
> >
> > Say I have project1.xml, project2.xml and build.xml.  Is there a way I 
> > can include project1.xml and project2.xml into the build.xml so I can 
> > keep the targets seperate for each project but still only have 1 build 
> > file with the common targets?
> 
> You can use standard xml includes
> 
> Put this before the <project> tag
> 
> <!-- Define a reference to the common targets -->
> <!DOCTYPE project [
>      <!ENTITY build-include SYSTEM "java-common.inc">
> ]>
> 
> Put this inside the <project> tags
> 
> <!-- Include the common targets -->
> &build-include;
> 
> java-common.inc contains common tasks and properties.
> 
> Jesse Stockall - jesse@cryptocard.com
> CRYPTOCard Corp.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 

Re: include type task?

Posted by Jesse Stockall <je...@cryptocard.com>.
On Saturday, March 1, 2003, at 09:03 PM, Robert Upshall wrote:
> Does Ant have any "include" type tags?
>
> Say I have project1.xml, project2.xml and build.xml.  Is there a way I 
> can include project1.xml and project2.xml into the build.xml so I can 
> keep the targets seperate for each project but still only have 1 build 
> file with the common targets?

You can use standard xml includes

Put this before the <project> tag

<!-- Define a reference to the common targets -->
<!DOCTYPE project [
     <!ENTITY build-include SYSTEM "java-common.inc">
]>

Put this inside the <project> tags

<!-- Include the common targets -->
&build-include;

java-common.inc contains common tasks and properties.

Jesse Stockall - jesse@cryptocard.com
CRYPTOCard Corp.