Suddenly can't run TestNG tests from ant ([testng] Caused by: java.lang.ClassNotFoundException: com.beust.jcommander.ParameterException)

后端 未结 7 1482
走了就别回头了
走了就别回头了 2020-12-01 21:29

I am using ant and TestNG 6.1.1, and I had my tests working just fine yesterday. Today when I try to run the tests I get a NoClassDefFoundError involving com/beust/jcommand

7条回答
  •  庸人自扰
    2020-12-01 22:05

    The problem here is that certain versions of the testNG jar do not have the jcommander jar code inside of them. As a result, you have to add the classpath to the Jcommander jar separately.

    Adding the Jcommander jar to your classpath when you run it will fix the problem, hopefully

提交回复
热议问题