Ant - junit, build failed= Could not create task or type of type junit
Q: Ant - junit, build failed: Could not create task or type of type: junit
When running JUnit tasks in ant and you get the following error:
BUILD FAILED
path\to\Geoserver\build.xml:259: Could not create task or type of type: junit.
Ant could not find the task or a class this task relies upon.
To fix this problem, you need to copy a JUnit.jar file to your eclipse/plugins/org.apache.ant/lib directory
Next you need to go into Eclipse then click on Window->Preferences->ant->Runtime, then select 'Ant Home Entries (Default). Click on the button 'Add External JARs'. Locate the junit.jar file you copied, select it and hit 'OK'. Hit 'Apply', then 'OK' and try your ant task again. That should fix it.
Comments ( Hide )
Anonymous says:Feb 03, 2006 09:18 ( Permalink ) |
Anonymous says:I faced the same problem in Eclipse.The tip was very useful. |
Anonymous says:I must agree. Excellent tip. Clear and concise. |
Anonymous says:very helpful hint .. before that i was just trying by adding junit jar in plugin lib folder but i wasnt aware of that window -> prefrence linking procedure thanks buddy |
Anonymous says:Also help me so much Jan |
Anonymous says:very helpful solution to resolve the problem. thanks |
Anonymous says:I have the same problem with scp task for ant under eclipse. But the lib ant-jsch.jar already exists in the correct location (eclipse/plugins/org.apache.ant/lib directory).... Simona |
Anonymous says:That nailed it - Thanks! |
|
|
michelle.m.yan@lmco.com says:Hi, My problem is odd, I can run my junit task without any problems on both Eclipse and command line, but not Linux box! I got this error: Please help! Best regards. |
|
|
mahesh.mudigonda@gmail.com says:awesome Tip. worked like magic... thanks for the tip |
This hint has been very heplful to me.
I had a similar problem, but with the scp-task. I had to place a copy of jsch.jar in the directory, then I could run the target containing the scp-task out of eclipse. Before I had to do it via command-line.