一些非常奇怪的事情正在发生。我的pom.xml中有以下依赖项:
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
<type>pom</type>
<scope>test</scope>
</dependency>该项目编译得非常完美。但是,一旦我将这个依赖项中的cucumber版本更改为1.2.6,我在编译该程序时就会得到一个错误:
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project gp-it-test-product: Fatal error compiling我还尝试使用最新的cucumber版本:
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-junit -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>6.10.1</version>
<scope>test</scope>
</dependency>但是我得到了同样的错误。为什么会发生这种情况?1.2.5版工作正常
发布于 2021-03-11 16:17:02
它在version 1.2.5 check the maven repository之后被移到另一个组io.cucumber中
发布于 2021-03-12 17:27:33
好吧,我终于解决了这个问题。问题不在于maven,而在于黄瓜。我在代码中使用的一些旧包似乎消失了,所以我必须将所有旧的导入更改为新的导入,并根据新版本进行一些其他更改以使其正常工作。我发布的空指针异常是由于Scenario类的包发生了更改。
https://stackoverflow.com/questions/66578555
复制相似问题