Hi All,
I have a Maven Multimodule project where one of my modules is using the Maven
Enforcer plugin to ensure that my module build is only successfully run on Unix.
So, my configuration is as follows:
<!-- Enforce that this component can only be built on Linux -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-os</id>
<phase>validate</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireOS>
<name>linux</name>
<family>unix</family>
</requireOS>
</rules>
<fail>false</fail>
<failFast>true</failFast>
</configuration>
</execution>
</executions>
</plugin>
Obviously when I execute the Maven build on Windows, I see a warning that I am
not on Unix and then Maven proceeds to build the project anyway.
My question is: is there any way to get Maven to failFast on the warning and
skip building this particular Maven Module?
Thanks!!
Ronak Patel
Senior Software Engineer
BAE Systems NS
San Diego, CA