15
我正在使用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