How to solve “Cause: the class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask was not found.” while running “ant test”?

前端 未结 5 1579
慢半拍i
慢半拍i 2021-01-01 13:31

I have a target named test and I want to do some tests.

I put here the important parts in build.xml. It includes:



        
5条回答
  •  执念已碎
    2021-01-01 14:24

    
    
    
        
    
    

    this has nothing to do with Ant classpath itself. It is properties you can use in your tasks. You have to put jars to the suggested dirs or add command line argument.

    Try running it like this:

    ant -lib /path/to/the/ant-junit.jar/ test
    

提交回复
热议问题