【发布时间】:2016-07-08 22:45:10
【问题描述】:
我正在使用 Maven 3.0.3。对于我们的项目集成测试,我们需要使用 Unix 命令创建一个虚拟帧缓冲区。然而,当我们在 Windows 机器上运行我们的项目时,我们不需要这个。我们使用
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>start-xvfb</id>
<phase>process-test-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo message="Starting xvfb ..." />
<exec executable="Xvfb" spawn="true">
<arg value=":0.0" />
</exec>
</tasks>
</configuration>
</execution>
<execution>
<id>shutdown-xvfb</id>
<phase>post-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo message="Ending xvfb ..." />
<exec executable="killall">
<arg value="Xvfb" />
</exec>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
当平台不是windows时如何使上述运行,否则禁止插件的运行?谢谢, - 戴夫
【问题讨论】:
标签: maven