我试图将一个虚拟机参数传递给Maven,特别是一套由失败保护运行的测试。虚拟机参数与maven-failsafe插件
我的pom.xml看起来是这样的:
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<argLine>-Dtest.data=true</argLine>
</configuration>
<version>2.7.2</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
...
当我运行依赖于test.data命令mvn clean verify
测试被设置为true失败了。但是,当我运行命令mvn -Dtest.data=true clean verify
时,测试全部通过。我需要在我的CI环境中为pom设置参数。
我失去了一些东西在这里?
由于提前,
皮特
第一个建议是更新到Maven-FailSafe-Plugin 2.8。你是否要求JVM? – khmarbaise 2011-04-06 16:25:45
我已更新到2.8,仍然无法正常工作。我如何知道我是否分叉JVM?我不相信我。 – Caps 2011-04-07 09:28:00
默认说你是分叉的。 – khmarbaise 2011-04-07 12:08:34