This week's book giveaway is in the Testing forum.
We're giving away four copies of Practical Unit Testing with TestNG and Mockito and have Tomek Kaczanowski on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Cactus with Ant Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "Cactus with Ant" Watch "Cactus with Ant" New topic
Author

Cactus with Ant

Tony Yan
Ranch Hand

Joined: Apr 10, 2002
Posts: 170
Hi, Ranchers:
I am starting to run cactus with Ant. By the how-to documentation, I included this in the build file:
<!-- Define the Cactus tasks -->
<taskdef resource="cactus.tasks">
<classpath>
<pathelement location="lib/cactus.jar"/>
<pathelement location="lib/cactus-ant.jar"/>
<pathelement location="lib/commons-httpclient.jar"/>
<pathelement location="lib/commons-logging.jar"/>
<pathelement location="lib/aspectjrt.jar"/>
</classpath>
</taskdef>
But got this exception:
Buildfile: build.xml
BUILD FAILED
Class org.apache.tools.ant.taskdefs.Taskdef doesn't support the "resource" attribute
Total time: 0 seconds
So looks like "resource" is not allowed in the taskdef attribute. This error is generated both in 1.5.4 and 1.6.1 version of Ant. I am running W2K.
Thanks for any suggestions.


Tony Yan<br /> <br />IBM Certified Developer XML and Related Technology<br />Sun Certified Web Component Developer For J2EE Platform<br />Sun Certified Programmer For Java 2 Platform
Tony Yan
Ranch Hand

Joined: Apr 10, 2002
Posts: 170
I got around this by using other format of the taskdef task. But it seems to me that cactus-ant integration has some problems, at least for the documentation, which is kinda unusual for apache projects.
Regards,
Tony Yan
Ranch Hand

Joined: Apr 10, 2002
Posts: 170
I have made cactus work fine w/ ant now. I have found the problem. I didn't set up the path correctly. duh!
 
 
subject: Cactus with Ant
 
Threads others viewed
Problem in Maven2 pom for converting ejb2.1 project into sources.
svn update using ant
ServletTestCase::request is not accessible my test class, which extends jspTestCase.
Could not create task or type of type: for.
start/stop Sun Application server from ant build.xml
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com