Maven Error
现象:在maven打包构建的时候出现这个,导致构建单元测试失败,但是只是跑个testng是可以的
getKeyAll(com.exec.NewTest):org.testng.ITestNGMethod.getConstructorOrMethod()Lorg/testng/internal/ConstructorOrMethod;
解决:
更换testng的版本:
<dependency>
<groupId>testng</groupId>
<artifactId>testng</artifactId>
<version>5.12</version>
<scope>test</scope>
</dependency>
为
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
</dependency>
还没有评论,来说两句吧...