Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Using CactusTask in Ant1.6

Posted on 2004-10-21
5
Medium Priority
?
338 Views
Last Modified: 2012-08-14
Hi, Im having real trouble using the CactusTask in Ant1.6, as a minimal test, I have the following ant script;

<project name="Cactus Test" default="init" basedir=".">
      <taskdef name="cactus" classname="org.apache.cactus.integration.ant.CactusTask">
            <classpath>
                        <pathelement location="cactus-ant-1.6.1.jar"/>
            </classpath>
      </taskdef>
</project>


now I have put cactus-ant-1.6.1.jar in the working dir and verified that org.apache.cactus.integration.ant.CactusTask is in it.
But when i run it i still get the following:

BUILD FAILED
file:C:/projects/Enterprise/CactusTests/build.xml:3: taskdef class org.apache.cactus.integration.ant.CactusTask cannot be found

Does anyone have any idea why this doesnt work?
Regards,
0
Comment
Question by:blackfrancis75
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 92

Accepted Solution

by:
objects earned 750 total points
ID: 12377931
try putting them in the lib directory of ant.
0
 
LVL 5

Author Comment

by:blackfrancis75
ID: 12378177
I tried that and it doesnt help...
0
 
LVL 5

Author Comment

by:blackfrancis75
ID: 12378266
further to this problem, i just ran it with ant - verbose on and I got this:

--- Nested Exception ---
java.lang.NoClassDefFoundError: junit/framework/TestListener
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
        at java.lang.Class.getDeclaredConstructors(Class.java:1169)


I tries putting the junit jar in the ANT lib directory but this didnt help...
0
 
LVL 5

Author Comment

by:blackfrancis75
ID: 12378287
I found this in the JUnit doco:

Note: You must have junit.jar and the class files for the <junit> task in the same classpath. You can do one of:

1.Put both junit.jar and the optional tasks jar file in ANT_HOME/lib.
2.Do not put either in ANT_HOME/lib, and instead include their locations in your CLASSPATH environment variable.
3.Do neither of the above, and instead, specify their locations using a <classpath> element in the build file. See the FAQ for details.

I tried all three of these to no avail...
0
 
LVL 5

Author Comment

by:blackfrancis75
ID: 12378517
OK well i have resolved this - Im not sure what was wrong but I installed a completely new version of ANT and moved the JUnit jar file into ANT\lib and it seems to work ok now.
0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question