Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 38674 invoked from network); 22 Sep 2006 14:51:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Sep 2006 14:51:25 -0000 Received: (qmail 20234 invoked by uid 500); 22 Sep 2006 14:51:13 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 20079 invoked by uid 500); 22 Sep 2006 14:51:13 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 19934 invoked by uid 99); 22 Sep 2006 14:51:12 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Sep 2006 07:51:12 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=david.corley@ericsson.com; spf=pass X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received-SPF: pass (idunn.apache.osuosl.org: domain ericsson.com designates 193.180.251.60 as permitted sender) Received: from [193.180.251.60] ([193.180.251.60:56856] helo=mailgw3.ericsson.se) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id BC/7D-06791-058F3154 for ; Fri, 22 Sep 2006 07:51:01 -0700 Received: from esealmw128.eemea.ericsson.se (unknown [153.88.254.121]) by mailgw3.ericsson.se (Symantec Mail Security) with ESMTP id DA54B4F00DB for ; Fri, 22 Sep 2006 16:50:23 +0200 (CEST) Received: from esealmw120.eemea.ericsson.se ([153.88.200.79]) by esealmw128.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830); Fri, 22 Sep 2006 16:50:23 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: "java.lang.ClassCastException: org.apache.tools.ant.types.Path" error after using task within ant Date: Fri, 22 Sep 2006 16:50:22 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: "java.lang.ClassCastException: org.apache.tools.ant.types.Path" error after using task within ant Thread-Index: AcbeU25dVdwH1X8cShapfgOnn+9cCgAAXG7w From: "David Corley \(AT/LMI\)" To: "Ant Users List" X-OriginalArrivalTime: 22 Sep 2006 14:50:23.0309 (UTC) FILETIME=[6EBD47D0:01C6DE56] X-Brightmail-Tracker: AAAAAA== X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N That's interesting what you said about . I didn't realise it would eat up so much resources. I actually would have thought that actually worked as a type of "goto" that simply jumped to the target. I guess not. I was curious as to how I would implement a macro to call a specific target though? I've done something similar with ant-contrib, but I think that's overkill for what I want to do here. The and are simple to implement. Hopefully there won't be any problems with them. As I said, I'll post back to let y'all know if it works as a replacement for /Dave=20 -----Original Message----- From: Matt Benson [mailto:gudnabrsam@yahoo.com]=20 Sent: 22 September 2006 16:29 To: Ant Users List Subject: RE: "java.lang.ClassCastException: org.apache.tools.ant.types.Path" error after using task within ant --- "David Corley (AT/LMI)" wrote: > Hey Steve, > I'll take your code, and play around with it, but for the moment I'm=20 > going to try and switch the to an coupled with 2=20 > statements. I've got a developer testing it at the moment,=20 > and hopefully he'll get some results from it. I'll post back here if=20 > he succeeds. and ? I can't remember exactly -why- you needed the new project context that comes with /, but if you're not _sure_ you need it you really might want to try replacing s with macro invocations. In my experience you can accomplish 99% of sane tasks with the latter and without taking the memory/performance hit associated with . -Matt >=20 > Oh by the way, is the code you posted below going to be included as=20 > part of the 2nd edition of java development with ant? I saw smart-frog > is in use. I'm anxious to see if it could integrate into our corporate > environment, but will hold off playing with the current distribution=20 > until the book comes out. >=20 > /Dave >=20 > -----Original Message----- > From: Steve Loughran [mailto:stevel@apache.org] > Sent: 22 September 2006 15:56 > To: Ant Users List > Subject: Re: "java.lang.ClassCastException: > org.apache.tools.ant.types.Path" error after using task within=20 > ant >=20 > David Corley (AT/LMI) wrote: >=20 > >=20 > > I should explain my reasoning for carrying things > out the way I do. > > Basically, I've defined a core build.xml for every > developer on our > > site. It allows them to only have to set their > classpaths and > > properties, and everything else will just work for > them. So far it's > > been quite succesful. But we came across a > stumbling block where some > > developers wanted to run tests against code they > had just compiled. > > Normally the developers would have stubs for their > unit tests, but > > some developers need to run against a live server. > And the server code >=20 > > may have just been compiled as part of the build. > > Unfortunately the core build doesn't facilitate > the running of any > > compiled code, aside from the unit tests, which > are run with the ant > > task. >=20 > OK > >=20 > > So I came up with a workaround, where I allow the > developers to do > > what they like right before the unit testing > starts and straight after >=20 > > it finishes. > > It means the core build.xml is still untampered, > and the used get to > > run whatever tasks need to be run before > testing with their > > custom junit-setup.xml targets. I suppose I could > use ....but > > why should I have to? The task should work > just fine... No? >=20 > does create a new project, and doesnt return state to the=20 > system, so its not ideal. >=20 >=20 > I sometimes use import for this, but let people override the junit=20 > target itself, with different test patterns. We also have a custom=20 > task, >=20 > which integrates setup, parallel deployment, a spin=20 > until the system is running and cleanup >=20 > shutdownTime=3D"10"> > > spawn=3D"false"/> > > > server=3D"localhost"/> > > > fork=3D"true" > includeantruntime=3D"true" > haltonfailure=3D"true" > > > refid=3D"tests.run.classpath"/> > > > > name=3D"**/system/**/*Test.class"/> > > > > > > > reports=3D"${test.reports.dir}" > /> > > >=20 > Notice how we dont even need to tell junit not to fail if the tests=20 > fail, because the teardown sequence generates the junit report and=20 > then re throws the junit-initiated failure method, if that is how=20 > junit ended. >=20 > The LGPL source is available for this if you want it. >=20 > -steve >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: > user-unsubscribe@ant.apache.org > For additional commands, e-mail: > user-help@ant.apache.org >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: > user-unsubscribe@ant.apache.org > For additional commands, e-mail: > user-help@ant.apache.org >=20 >=20 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com=20 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org