ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Stockall <je...@cryptocard.com>
Subject Re: include type task?
Date Sun, 02 Mar 2003 02:23:00 GMT
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.


Mime
View raw message