Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 82869 invoked from network); 23 Sep 2006 16:19:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Sep 2006 16:19:34 -0000 Received: (qmail 37793 invoked by uid 500); 23 Sep 2006 16:19:28 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 37753 invoked by uid 500); 23 Sep 2006 16:19:27 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 36961 invoked by uid 99); 23 Sep 2006 16:19:26 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 23 Sep 2006 09:19:25 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=paulk@asert.com.au; spf=permerror X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received-SPF: error (idunn.apache.osuosl.org: domain asert.com.au from 144.140.83.156 cause and error) Received: from [144.140.83.156] ([144.140.83.156:61197] helo=omta04ps.mx.bigpond.com) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 09/4F-27820-98E55154 for ; Sat, 23 Sep 2006 09:19:23 -0700 Received: from [127.0.0.1] (really [203.51.200.89]) by omta04ps.mx.bigpond.com with ESMTP id <20060923161917.JZDU22756.omta04ps.mx.bigpond.com@[127.0.0.1]> for ; Sat, 23 Sep 2006 16:19:17 +0000 Message-ID: <45155E84.6020809@asert.com.au> Date: Sun, 24 Sep 2006 02:19:16 +1000 From: Paul King User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Ant Developers List Subject: Re: [ANN] Apache AntUnit 1.0 Beta 1 Released References: <87y7sc7e4x.fsf@www.samaflost.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > The Ant Team is proud to announce the first Beta release of > Apache AntUnit 1.0. Sorry I have a question that is half Groovy and half AntUnit related. It is also half user/half dev related. I am wanting to know the best way to use the API (and potentially some normally internal pieces). I was trying to create an AntUnit example with Groovy - mainly just to check out some namespace support which has just been added to Groovy's AntBuilder and currently have the following example working: import org.apache.tools.ant.taskdefs.Antlib def ant = new AntBuilder() def url = this.class.getResource('org/apache/ant/antunit/antlib.xml') Antlib.createAntlib(ant.project, url, 'antlib:org.apache.ant.antunit').execute() ant.assertFileDoesntExist(file:'copytest1.tmp') ant.copy(file:'antunit.groovy', tofile:'copytest1.tmp') ant.assertFileExists(file:'copytest1.tmp') ant.delete(file:'copytest1.tmp') Groovy includes an AntBuilder class which allows Ant build files to be expressed as Groovy notation. It also has its own lifecycle which I guess is bootstrapped slightly differently to the normal launcher. I am not asking this group about the Groovy side of things but I am interested in an opinion on what is the best way to do this from an Ant perspective. Does the "Antlib.createAntlib" part look like a violation of what I should be doing from an Ant perspective? AntBuilder doesn't normally involve explicitly creating anything equivalent to the project or target - these are done under the covers. Also, I was expecting to have to muck around with namespaces but they just dissappeared from the example at the moment. (Not sure this is a good thing or not.) Cheers, Paul. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org