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 21592 invoked from network); 30 Jun 2000 01:52:24 -0000 Received: from e22.nc.us.ibm.com (32.97.136.228) by locus.apache.org with SMTP; 30 Jun 2000 01:52:24 -0000 Received: from southrelay02.raleigh.ibm.com (southrelay02.raleigh.ibm.com [9.37.3.209]) by e22.nc.us.ibm.com (8.9.3/8.9.3) with ESMTP id VAA19152 for ; Thu, 29 Jun 2000 21:30:54 -0500 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.8m3/NCO v4.9) with SMTP id VAA96930 for ; Thu, 29 Jun 2000 21:52:22 -0400 Received: by d54mta04.raleigh.ibm.com(Lotus SMTP MTA v4.6.5 (863.2 5-20-1999)) id 8525690E.000A484A ; Thu, 29 Jun 2000 21:52:18 -0400 X-Lotus-FromDomain: IBMUS To: ant-dev@jakarta.apache.org Message-ID: <8525690E.000A45F0.00@d54mta04.raleigh.ibm.com> Date: Thu, 29 Jun 2000 21:52:18 -0400 Subject: Gentle introduction to scripting 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 I put a lot of power into the scripting task, a lot more than I think people realize. I wasn't going to discuss it until the time was right, but now it does appear that there is enough genuine interest (trust me, it was *very* controversial at the time). I present it here to seed discussion - if there are things that there is consensus on needing to be changed, then I'm OK with change as I doubt that anybody is seriously using it. The first thing worth mentioning is that scripts have access to everything a Java task would have access to. Below is an example of a simple loop which actually modifies the build script. Note the use of the name "squares" and "main". And here is the output I get when I run this script on my machine: Buildfile: build.xml Project base dir set to: C:\tmp Executing Target: setup Executing Target: main 1 4 9 16 25 36 49 64 81 100 Completed in 4 seconds - Sam Ruby