Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@jakarta.apache.org Received: (qmail 80017 invoked by uid 500); 16 Oct 2001 17:28:32 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: ant-user@jakarta.apache.org Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 80002 invoked from network); 16 Oct 2001 17:28:32 -0000 Message-ID: <20011016172836.51380.qmail@web13403.mail.yahoo.com> Date: Tue, 16 Oct 2001 10:28:36 -0700 (PDT) From: Diane Holt Subject: RE: Including a common build file with common targets. To: ant-user@jakarta.apache.org In-Reply-To: <68CD54726A22D411A24D00A0C9ECD6E202D873B5@hulk.meb.co.za> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Actually, now that I see what you're wanting to do, since Ant doesn't have an task (yet -- it's on Ant2's list), I'd suggest you flip around the way you're looking at doing things. Instead of having build files for each project, just have a properties file for each project, and read in the properties file appropriate to that project (which could be based on an env var, or specified with a command-line -Dprojname=value). Diane --- Albertus Vermeulen wrote: > Diane, > > Please excuse my ignorance if I don't quite understand all the power > that > Ant provides me. I'm not sure that I follow your comments exactly but I > can > explain to your why I thought that wouldn't quite work for me. > > The end effect I'm trying to achieve is as follows. In any project that > a > developer is coding one build.xml file should exist. I haven't mapped it > yet > to exactly what it should look like in ant but probably something like: > > > > > > > .... include common file which defines all targets and rules for > compiling > > idl,java,pcml (something specific in our environment), etc something > to > the effect of .... > > > > As I understand, by using as was suggested to me by Jerry Li, I > would > need to for each target (17 in total) have to do a replecation of the > s defined in common.xml in the above build.xml. I would thus > save on > not having to expose the body of the target in the above file or the > properties I need to achieve the completion of the target, but I would > still > add a lot of extra targets in the build.xml file. I also seemed to > experience some difficulty in accessing properties declared in the > build.xml > file within the common.xml file. This could though just be a clear case > of > me not having RTFM'd enough yet. :) > > Am I wrong in my understanding of how can/should be used ? Is > there > some way in which I could achieve what I described above ? > > Thanks in advance > Albertus > > -----Original Message----- > From: Diane Holt [mailto:holtdl@yahoo.com] > Sent: 16 October 2001 04:19 > To: ant-user@jakarta.apache.org > Subject: RE: Including a common build file with common targets. > > > --- Albertus Vermeulen wrote: > > Thanks for your input, your solution would mean less lines in the > > build.xml files, but doesn't really provide me with the solution I'm > > looking for. I'm really looking for an equavalent of include in > > makefiles. In our development environment we have seperate components > > that developers are working on. They all need to make the same > targets, > > but for their own projects. We currently maintain these "make" targets > > in one file and this ensures that there is very little clutter in the > > Makefiles of each developer. This can't be changed when we move to > Ant. > > Can you explain a bit more why using the task won't work for you? > I > have a "common" target (eg.) for building parsers in my "main" build.xml > file that lives at the top of the user's workspace (which can be > anywhere). Building a parser in a sub-buildfile 's the common > parser > target, passing the properties it needs to use. That sounds like what > you're looking to do, but maybe I'm missing something. > > Diane > > ===== > (holtdl@yahoo.com) > > > > __________________________________________________ > Do You Yahoo!? > Make a great connection at Yahoo! Personals. > http://personals.yahoo.com > ===== (holtdl@yahoo.com) __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com