ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: <import> and <include> in trunk
Date Thu, 10 Dec 2009 16:38:23 GMT
On 2009-12-10, Matt Benson <> wrote:

> On Dec 9, 2009, at 10:55 PM, Stefan Bodewig wrote:

>> And we've added a new task <include> which is similar to <import> with
>> the following differences:

>> * a resource can be included more than once if you use different
>>   prefixes.

> What's the usefulness of this last?

includes that include other files.  Something like

<project name="a">
  <include file="c.xml" as="from-a"/>
  <include file="b.xml"/>

<project name="b">
  <include file="c.xml"/>
  <target name="y" depends="c.x"/>

<project name="c">
  <target name="x"/>

a.xml will see targets from-a.x and b.c.x but more importantly b.xml
will see its c.x target as well.  When using the <import> logic c.xml
would have been imported in a.xml and there wouldn't be a target c.x in
b.xml at all.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message