【发布时间】:2013-05-12 23:50:52
【问题描述】:
Maven 故障安全插件不会在我的项目上运行。如果我运行 mvn verify,则只运行surefire。如果我输入 mvn failsafe:verify 它会失败并出现以下错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.11:verify (default-cli) on project experiment-server: /home/user/workspace/MyProject-Main/MyProject-IntegrationTest/target/failsafe-summary.xml (The system cannot find the path specified) -> [Help 1]
所以我基本上有同样的问题:failsafe plugin won't run on one project but will run on another -- why? 不同的是我的 pom 已经看起来像这样:
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.14.1</version>
<executions>
<execution>
<id>failsafe-integration-tests</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>failsafe-verify</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
这就是解决这个家伙问题的方法。除了这个网站上的解决方案对我不起作用。有人能指出我在哪里搞砸了吗?
我还有一个问题,我想在预集成阶段使用 exec-maven-plugin 启动服务器。但是当我尝试 mvn-verify 时,它是执行的最后一件事。
【问题讨论】:
标签: integration-testing maven-failsafe-plugin