4 messages in com.canoo.lists.webtestRE: [Webtest] Custom tasks: take care...
FromSent OnAttachments
Marc Guillemot24 Jul 2003 09:10 
Dierk Koenig24 Jul 2003 09:35 
Marc Guillemot25 Jul 2003 00:31 
Dierk Koenig25 Jul 2003 02:20 
Subject:RE: [Webtest] Custom tasks: take care at loaderRef
From:Dierk Koenig (dier@canoo.com)
Date:07/24/2003 09:35:15 AM
List:com.canoo.lists.webtest

interesting... thanx for the post.

Have you tried to add your step to the ${webtests.canoohome}/webtestTaskdefs.properties and add your implementation jar to the webtests.classpath ?

cheers Mittie

-----Original Message----- From: webt@lists.canoo.com [mailto:webt@lists.canoo.com]On Behalf Of Marc Guillemot Sent: Donnerstag, 24. Juli 2003 18:11 To: webt@lists.canoo.com Subject: [Webtest] Custom tasks: take care at loaderRef

Hi,

I've just won an hard battle against ant to make my custom tasks working. Maybe the results could interest someone (or get integrated in the Troubleshooting page).

I got each time the error like:

file:E:/EWorkspace/Junetz/web-app/WEB-INF/src/webtests/build.xml:58: Task must be of type "Step": zkystorexpath at file:E:/EWorkspace/Junetz/web-app/WEB-INF/src/webtests/front/testN avLinksBot tom.xml:25: is of type org.apache.tools.ant.UnknownElement

although my tasks extend Step.

The cause of the problem was the class loader: my tasks had to be loaded with the same class loader as the canoo tasks.

Now my definitions look like this (and this works perfect):

<path id="webtests.classpath"> <fileset dir="${webtests.canoohome}" includes="**/lib/*.jar"/> <pathelement path="${myWebtestTasks}"/> </path>

<taskdef file="${webtests.canoohome}/webtestTaskdefs.properties" loaderRef="toto" classpathref="webtests.classpath"/>

<taskdef resource="de/internetzky/webtests/extension/webtestsTaskdefs.properties" loaderRef="toto" classpathref="webtests.classpath"/>

Marc.