Return-Path: Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 94528 invoked from network); 31 Jul 2000 19:31:43 -0000 Received: from unknown (HELO mail.3dstockcharts.com) (207.71.197.249) by locus.apache.org with SMTP; 31 Jul 2000 19:31:43 -0000 Received: from dino (unknown [207.71.197.130]) by mail.3dstockcharts.com (Postfix) with SMTP id 70CB3F71E for ; Mon, 31 Jul 2000 11:39:42 -0700 (PDT) Message-Id: <3.0.6.32.20000731123154.0098ca30@mail.3dstockcharts.com> X-Sender: dino@mail.3dstockcharts.com X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Mon, 31 Jul 2000 12:31:54 -0700 To: ant-user@jakarta.apache.org From: Dino Valente Subject: Re: Problems with subbuild In-Reply-To: <3.0.6.32.20000727075639.00988100@mail.3dstockcharts.com> References: <3.0.5.32.20000727163202.008d1460@latcs2.cs.latrobe.edu.au> <3.0.6.32.20000726192631.0097bdb0@mail.3dstockcharts.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N At 07:47 AM 7/28/00 +0200, you wrote: > >> If I change file:../../build.template to file:./build.template then it >> works. But of course, I am not able to run the build in the test directory >> anymore. >> >> How do I get around this (more importantly is this a bug to fix?). >> >> dino >> > >I mentioned the same problem just 2 days ago. It depends on the task. >As a workaround: > > place > > in build.xml (project directory) > > and > > in build.xml in test directory > > > then you can access any file in the projectTop dir from within build.xml >in test directory > > with ${projectTop}/filename. > >This works since projectTop will not be overwritten when the test build.xml >is called from the project build.xml This approach is fine for rules within the ant rules. However, I'm using an entity declaration and it doesn't take the variable value. However, this approach is pretty good for other situations I have come across. > >hope this helps > >Marc > >P.S. Perhaps the values of projectTop have to be changed, I didn't quite >understand where your build.template file is placed. The build.template is placed relative to all my project directories. I include this template into each project's build file and set only one property (name). My goal is to achieve three things with ant: 1) Place virtually all the build rules in a template file 2) Reuse this file for all projects and be able to set a couple of variables to determine targets 3) Construct a main build file which compiles all subprojects. This is a snap with makefiles but I am finding it really difficult to achieve the above with ant. Ant is great for simple one build files (this what got me hooked; especially the javac task). I really wish these problems get resolve soon (I have to make a decision within the week on whether to use this tool for the whole company). dino