ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <adam....@cyberspaceroad.com>
Subject Re: want a sub task with <ant dir="../.." to fill in properties in calling project
Date Sat, 23 Aug 2003 19:34:11 GMT
Ah, great. I didn't see <import> in the documentation. It works great. 
Thanks.



On 08/23/2003 07:30 PM Antoine Levy-Lambert wrote:
> Adam,
> the ant task does not have currently the ability to return properties or
> refids.
> The import task might be what you are looking for.
> import is really like an include of another build.xml file; you can call
> targets of the imported build.xml file just like normal targets.
> 
> so you can have your common.xml somewhere, and then have
> projectxyz/build.xml looking like that
> 
> <project name="xyz">
> <!-- common.xml contains the init target -->
> <!-- resolution of import files is done relative to the dir of the importing
> file -->
> <import file="../common.xml"/>
> <target name="compile" depends="init">
>     <!-- init in ../common.xml will be invoked before compile is
> executed -->
>     <!-- your tasks here -->
> </target>
> </project>
> 
> ----- Original Message -----
> From: "Adam Hardy" <adam.ant@cyberspaceroad.com>
> To: <user@ant.apache.org>
> Sent: Saturday, August 23, 2003 7:20 PM
> Subject: want a sub task with <ant dir="../.." to fill in properties in
> calling project
> 
> 
> 
>>I have around ten projects and I have a couple of tasks that are common
>>to all of them.
>>
>>One of these is the init task which does alot of property setting, for
>>instance for the deploy directories or the classpath refid.
>>
>>I would like to have my init task in a single build.xml and call that
>>from each project's build.xml.
>>
>>I'm trying this with the ant task, but the properties and refids that
>>the subproject sets are lost when the subproject is finished, and the
>>main project can't access them.
>>
>>Is there a way of letting the main project see the settings that are
>>defined in the subproject?
>>
>>thanks
>>Adam
>>
>>
>>
>>
>>--
>>ant 1.6alpha + java 1.4.2 on Linux 2.4.20 RH9
>>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 

-- 
ant 1.6alpha + java 1.4.2 on Linux 2.4.20 RH9


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message