You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Stephan Cleaves <sc...@kana.com> on 2000/10/19 00:16:30 UTC

nested subprojects

Hi,

	I have been using Ant for quite some time, but recently have been
trying to put together a hierarchy which requires the use of nested
subprojects and it isn't working. I'm running under Linux Mandrake 7.1 with
the 1.3 beta refresh JDK. Here is the hierarchy:

	top
	top/build.xml
	top/sub1
	top/sub1/build.xml
	top/sub1/build2.xml
	top/sub2
	top/sub2/build.xml
	top/sub3
	top/sub3/build.xml

top/build.xml uses the ant task to build top/sub1/build.xml,
top/sub2/build.xml, and top/sub3/build.xml in addition to things in its own
directory. Each of the sub* directories are in fact separate projects, and
this works fine. The problem occurs when top/sub1/build.xml tries to use the
ant task to build build2.xml. I get an error that the buildfile cannot be
found. Is this even allowed? I've looked briefly at the code for the ant
taskdef, but haven't looked hard enough to see why this might not work. Has
anyone else tried this with success?

thanks,

stephan

##
Stephan R. Cleaves
Architect
Kana Communications
phone: 603.665.1269
fax: 603.665.1869
mailto:stephan.cleaves@kana.com



Re: nested subprojects

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "SC" == Stephan Cleaves <sc...@kana.com> writes:

 SC> The problem occurs when top/sub1/build.xml tries to use the ant
 SC> task to build build2.xml.  I get an error that the buildfile
 SC> cannot be found.

Is this Ant 1.1? There've been some bugs with regard to relative paths
in 1.1 that have been resolved for 1.2. Could you please try the
latest nightly build (no big problems to be expected, the latest
nightly build is very close to be branded release 1.2).

 SC> Is this even allowed?

There is no limit on how many <ant> tasks can be nested into each
other.

Stefan