How do I make this plugin run only on non-Windows platforms?

后端 未结 1 1396
清歌不尽
清歌不尽 2021-01-01 17:51

I\'m using Maven 3.0.3. For our project integration testing, we require a virtual frame buffer to be created, using Unix commands. However, when we run our project on the

相关标签:
1条回答
  • 2021-01-01 18:26

    You can do this with profiles. There is profile activation switch for OS settings. And the plugin is so intelligent, you can use negation.

    <profiles>
      <profile>
        <activation>
          <os>
            <family>!windows</family>
          </os>
        </activation>
        <build>
          <plugins>
            <plugin>
              ...
            </plugin>
          </plugins>
        </build>
        ...
      </profile>
    </profiles>
    

    Further information about profiles can be found here, and about the values you can use here.

    0 讨论(0)
提交回复
热议问题