How can I enable or disable a maven profile based on whether the VM that is executing maven is a 32 bit or a 64 bit JVM ?
I tried this:
<activation>
<os>
<arch>x86</arch>
</os>
</activation>
or amd64
respectively to detect a 32/64 bit VM, but this fails on a 32 bit VM running on a 64 bit Windows as it activates the 64 bit profile.
In a Sun VM,
check for the system property sun.arch.data.model
<profiles>
<profile>
<id>32bitstuff</id>
<activation>
<property>
<name>sun.arch.data.model</name>
<value>32</value>
</property>
</activation>
</profile>
<profile>
<id>64bitstuff</id>
<activation>
<property>
<name>sun.arch.data.model</name>
<value>64</value>
</property>
</activation>
</profile>
</profiles>
Reference:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With