Ant – junit, build failed= Could not create task o

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.

转载自:https://blog.csdn.net/article/article/details/83267114

You may also like...