ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <>
Subject Re: Build file inclusion
Date Sat, 04 Jan 2003 14:14:08 GMT

Jessica P. Hekman wrote:
> I'm trying to find out if there's any way for an ant build file to include 
> another build file. I'm envisioning a task like
>  <include buildfile="../projectA/build.xml"/>
> Then the buildfile for projectB (which is the one which would include the 
> above line) would be able to re-define tasks which had been previously 
> defined in the projectA buildfile, hence overriding them.

Latest CVS Ant has an <import> task.

to import test.xml do:

   <import file="test.xml"/>

This will also add the property


that contains the full path of the imported file, so that file can 
resolve its resources relative to its location.

Nicola Ken Barozzi         
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)

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

View raw message