From dev-return-82230-apmail-ant-dev-archive=ant.apache.org@ant.apache.org Tue Feb 12 10:00:36 2008 Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 54810 invoked from network); 12 Feb 2008 10:00:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Feb 2008 10:00:36 -0000 Received: (qmail 46938 invoked by uid 500); 12 Feb 2008 10:00:29 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 46903 invoked by uid 500); 12 Feb 2008 10:00:29 -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 46892 invoked by uid 99); 12 Feb 2008 10:00:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2008 02:00:29 -0800 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [192.6.10.60] (HELO tobor.hpl.hp.com) (192.6.10.60) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2008 09:59:55 +0000 Received: from localhost (localhost [127.0.0.1]) by tobor.hpl.hp.com (Postfix) with ESMTP id 5AD3DB7B20; Tue, 12 Feb 2008 10:00:02 +0000 (GMT) X-Virus-Scanned: amavisd-new at hplb.hpl.hp.com Received: from tobor.hpl.hp.com ([127.0.0.1]) by localhost (tobor.hpl.hp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id und9MPR0Xisd; Tue, 12 Feb 2008 09:59:56 +0000 (GMT) Received: from ha-node-br2.hpl.hp.com (ha-node-br2.hpl.hp.com [16.25.144.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tobor.hpl.hp.com (Postfix) with ESMTPS id 9FB7BB7B1E; Tue, 12 Feb 2008 09:59:55 +0000 (GMT) MailScanner-NULL-Check: 1203415178.92339@+e+WWtw3pSWtsN7auEBTzg Received: from [16.25.171.118] (morzine.hpl.hp.com [16.25.171.118]) by ha-node-br2.hpl.hp.com (8.14.1/8.13.4) with ESMTP id m1C9xc2T026475 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 Feb 2008 09:59:38 GMT Message-ID: <47B16E0E.4050903@apache.org> Date: Tue, 12 Feb 2008 09:59:42 +0000 From: Steve Loughran User-Agent: Thunderbird 2.0.0.9 (X11/20071031) MIME-Version: 1.0 To: Ant Developers List CC: paranoiabla@gmail.com Subject: Re: Cactus 1.8 / Ant 1.8 Integration References: <15396771.post@talk.nabble.com> <15396772.post@talk.nabble.com> In-Reply-To: <15396772.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HPL-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: m1C9xc2T026475 X-HPL-MailScanner: Found to be clean X-HPL-MailScanner-From: stevel@apache.org X-Virus-Checked: Checked by ClamAV on apache.org Petar Tahchiev wrote: > Sorry for the formating :-(. > > > Hi guys, > > it's Petar Tahchiev from the Jakarta Cactus Team (again :-)). > I am trying to integrate the CactusTask with Ant 1.8-alpha. > The CactusTask does: > 0) Extends the JUnitTask from Ant. > 1) Gets all the tests from JUnitTask > 2) Iterates over them and sets different properties to each one of them. > 3) Calls the JUnitTask to executes the test-cases. > > So, the basis is that we are no longer able to use > > execute(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest); > > because the delegate field (Object of type JUnitTaskMirror) leaves > uninitialized and thus the CactusTask throws NLPE. > This way to execute the tests we are bound to use the execute() method of > the > JUnitTask (because in that method the delegate object gets initialized). > When calling > the execute() method we have to have our tests configured. But when I get > the tests and configure them with: > =============================================================== > Enumeration tests = getIndividualTests(); > > while (tests.hasMoreElements()) > { > JUnitTest test = (JUnitTest) tests.nextElement(); > > if (test.shouldRun(getProject()) > && !theWrapper.isExcluded(test.getName())) > { > test.setFork(true); > if (theWrapper.getToDir() != null) > { > test.setTodir(theWrapper.getToDir()); > } > =============================================================== > > I am no longer able to set them in the JUnitTask. The field tests is > private: > > private Vector tests = new Vector(); > > and there is no setter for an individual test, or a vector of tests. > > Please, can you look serious to this and supply a setter method for this. > This way I can configure > the tests and set them in the JUnitTask, and after that just call execute(). > So all you want is a setTests(Vector) method? or an addTest(JUnitTest) method that adds a new test? -- Steve Loughran http://www.1060.org/blogxter/publish/5 Author: Ant in Action http://antbook.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org