Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 72703 invoked from network); 19 Mar 2000 21:10:20 -0000 Received: from e21.nc.us.ibm.com (32.97.136.227) by locus.apache.org with SMTP; 19 Mar 2000 21:10:20 -0000 Received: from southrelay02.raleigh.ibm.com (southrelay02.raleigh.ibm.com [9.37.3.209]) by e21.nc.us.ibm.com (8.9.3/8.9.3) with ESMTP id QAA29536 for ; Sun, 19 Mar 2000 16:02:06 -0600 From: rubys@us.ibm.com Received: from d54mta04.raleigh.ibm.com (d54mta04.raleigh.ibm.com [9.67.228.36]) by southrelay02.raleigh.ibm.com (8.8.8m2/NCO v2.06) with SMTP id QAA55216 for ; Sun, 19 Mar 2000 16:10:18 -0500 Received: by d54mta04.raleigh.ibm.com(Lotus SMTP MTA v4.6.5 (863.2 5-20-1999)) id 852568A7.00744990 ; Sun, 19 Mar 2000 16:10:10 -0500 X-Lotus-FromDomain: IBMUS To: ant-dev@jakarta.apache.org Message-ID: <852568A7.00742514.00@d54mta04.raleigh.ibm.com> Date: Sun, 19 Mar 2000 16:05:26 -0500 Subject: Re: new *optional* scripting taskdef Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N > This looks very interesting :). Just one quick question... Why did you >add extra 'id' attributes instead of using targets? Targets are already >named. Because the echo task is a task and not a target. My intention is to make every XML element be addressable. I have gone back and committed a change where project and target names can be used as ids. Amidst all the discussions as to whether properties should be constants or variables, and what delimiters should be used, I've been quietly doing a survey of how properties have been used. Example: cocoon's build.xml defines a property named debug, and then adds a debug="${debug}" on the javac step. Contrast this to how the build.compiler property is used. I'm beginning to think that a more CSS approach is warranted. > My reason for asking is that it is unclear what your example script >actually does I believe that you have correctly surmised exactly what each of the scripts do. Given the recent less than productive discussion on related topics on this mailing list, I'm intentially trying to be thought provoking at this point instead of advocating a specific position. Here's another working example, which outputs the single word false: - Sam Ruby Will Uther on 03/19/2000 01:54:22 PM Please respond to ant-dev@jakarta.apache.org To: ant-dev@jakarta.apache.org cc: rubys@locus.apache.org Subject: Re: new *optional* scripting taskdef Hi all, --On Saturday, March 18, 2000 10:42 PM -0500 rubys@us.ibm.com wrote: > OK, I've taken the plunge. I've committed a scripting task to Ant. This looks very interesting :). Just one quick question... Why did you add extra 'id' attributes instead of using targets? Targets are already named. My reason for asking is that it is unclear what your example script actually does: > > > > > > > > > > > > Does the echo task get run the first time time through the script? My guess is yes. This means the output would be: hi there from BSF! In order to get a task referenced in a script that should not be executed normally you'd have to do something like: > > > > > > > > > > > > > > > which might output (haven't tested it): hi there from BSF! Which brings up another point: it looks like ids are gloablly scoped. This is fine. Just needs to be documented. More interestingly, does this script work? And what does it output? > > > > > > > > > > > > > When I get back to CMU I'll have to play with this more... later, \x/ill :-}