如何让这个插件仅在非Windows平台上运行?
问题描述:
我正在使用Maven 3.0.3。对于我们的项目集成测试,我们需要使用Unix命令创建虚拟帧缓冲区。但是,当我们在Windows机器上运行我们的项目时,我们不需要这个。我们使用如何让这个插件仅在非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>
我怎样才能让上面运行时平台未窗户和抑制插件的运行,否则?谢谢, - 戴夫
你可以给它一个逗号分隔值的OS系列? – 2017-03-21 18:11:44
我希望它只能在linux上执行 – 2017-03-21 18:41:11