On Wed, Nov 4, 2009 at 1:00 PM, Patel, Ronak Avinash (US SSA)
<[email protected]> wrote:
> 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.
[del]
> 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?
I'm not sure that enforcer is the correct approach. With Maven you
can't take away something once it is added.
An alternative is to use a profile, that way maven doesn't even
attempt to build your module on non-conforming systems.
In your parent project add something like:
<profiles>
<profile>
<id>run-only-on-linux</id>
<activation>
<os>
<name>linux</name>
<family>unix</family>
</os>
</activation>
<modules>
<module>YOUR_MODULE_NAME_HERE</module>
</modules>
</profile>
</profiles>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]