cactifywar doesn't support the nested classpath element
nauke. <[email protected]> Tue, 10 Jun 2008 16:05:15 +0930
| Newsgroups | gmane.comp.jakarta.cactus.user |
|---|---|
| Message-ID | <[email protected]> |
Hi!
Hope I got the right mailing list.
Environment:
jboss-4.2.2.GA
junit-3.8.1
cactus-1.7.2
eclipse
java 5
ant
Initially I was trying to run my cactus target, that looks like this:
<target name="cactus">
<taskdef name="runservertests"
classname="org.apache.cactus.integration.ant.RunServerTestsTask">
<classpath refid="project.classpath" />
</taskdef>
<runservertests testURL="
http://localhost:8080/myproject/ServletRedirectorSecure?Cactus_Service=RUN_TEST"
starttarget="jboss.start"
testtarget="test"
stoptarget="jboss.shutdown"/>
</target>
but I kept getting the following error:
... build.xml:464: Problem: failed to create task or type cactifywar
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
After some googling, apparently the cactus library files I need are missing
from my classpath.
I double checked and saw that all the library files I need were already in
my project.classpath, specified in my build.xml
Since since this obviously wasn't working or I was doing something wrong, I
decided to follow the instructions on this page:
http://jakarta.apache.org/cactus/integration/ant/howto_ant_cactus.html
So i defined my property names and the path id="cactus.classpath".
All was good, until I added the following:
<taskdef resource="cactus.tasks" classpathref="cactus.classpath"/>
and modified my cactus target section from:
<classpath refid="project.classpath" />
to:
<classpath refid="cactus.classpath" />
and now I get this error:
build.xml:464: cactifywar doesn't support the nested "classpath" element.
*pulls hair out*
why???
Even if I leave that classpath refid value with project.classpath, it does
the same thing.
Can't find an answer for the life of me!
On that howto link above, it even says:
" An important fact to note about the *<cactifywar>* task is that it extends
the builtin Ant task *<war>*. That's why we can add the nested *<classes>*and
*<lib>* elements in the example above."
Does anyone know?
Cheers,
nic