ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Birtley" <>
Subject RE: Passing a property from sub project to main project
Date Sun, 27 Jul 2003 20:13:05 GMT
We encountered a similar problem (multie sub-projects all having to hang
off a master build) and solved the problem by having all of the
sub-projects in subscripts, but only at the <target>...</target> level,
and then using XML-level includes.

Not only did this take care of `passing' properties between subtasks and
the main task, but it also took care of dependencies in the sub-projects
- making sure each target was only invoked once.

Another added bonus of doing this is that it allows you to build up
`libraries' of reusable tasks that you can just cut and paste the entity
references into build scripts.

As an example:


		<project name="foo" basedir="." Default="all">

		 ! XML entity references for the subscripts
		 ! -->			
		<!DOCTYPE project [
			<!ENTITY SubProject1 SYSTEM
			<!ENTITY SubProject2 SYSTEM

			 ! Include the sub-projects
			 ! -->			

			<target name="all" depends="sub1, sub2">

		<target name="sub1">

		<target name="sub2">

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

View raw message