[Webtest] Custom tasks: take care at loaderRef
Dierk Koenig
webtest@lists.canoo.com
Thu, 24 Jul 2003 18:35:37 +0200
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: webtest-admin@lists.canoo.com
> [mailto:webtest-admin@lists.canoo.com]On Behalf Of Marc Guillemot
> Sent: Donnerstag, 24. Juli 2003 18:11
> To: webtest@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.
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>