Re: Problem running cactus from ant
Kazuhito SUGURI <[email protected]>
| Newsgroups | gmane.comp.jakarta.cactus.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Ian, In article <[email protected]>, Thu, 27 Apr 2006 14:34:16 +0100, "Dickinson, Ian J. (HP Labs, Bristol, UK)" <[email protected]> wrote: ian> I'm just getting going with using Cactus to test a J2EE project. I've ian> built my cactified .war and deployed the .ear. I can run a simple test ian> successfully using the ServletRunner on the server, but if I try to ian> invoke the same test from the cactus task in ant, I get a ian> ClassNotFoundException: [snip] ian> [cactus] Caused an ERROR ian> [cactus] com.hp.vrmm.station.StationInfoFacadeBeanTest ian> [cactus] java.lang.ClassNotFoundException: ian> com.hp.vrmm.station.StationInfoFacadeBeanTest [snip] ian> The named class is present under WEB-INF/classes in the cactified .war, ian> and, indeed, is invoked from the servlet test runner. My cactus task ian> looks like this: You have to set a client-side classpath properly. ian> <target name="run-cactus"> ian> <cactus earfile="${build.dir}/test-${ear.name}" fork="yes" ian> printsummary="yes" haltonerror="true" ian> haltonfailure="false"> ian> <containerset> ian> <generic name="JBossGeneric" port="8088"> ian> <startup target="generic.jboss.deploy"/> ian> <shutdown target="generic.jboss.undeploy"/> ian> </generic> ian> </containerset> ian> <formatter type="plain" usefile="false"/> ian> <test name="com.hp.vrmm.station.StationInfoFacadeBeanTest" /> ian> </cactus> ian> </target> As cactus ant-task is an extension of junit ant-task, you can set the client-side classpath by using classpath nested-element for the cactus task. You may have already solved the problem, though. Hope this helps, ---- Kazuhito SUGURI