Maven: Finding out whether running in a 32 or a 64 bit JVM

Posted by Thomas Lötzer on Stack Overflow See other posts from Stack Overflow or by Thomas Lötzer
Published on 2010-05-18T06:10:01Z Indexed on 2010/05/18 6:10 UTC
Read the original article Hit count: 243

Filed under:
|
|
|

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.

© Stack Overflow or respective owner

Related posts about maven-2

Related posts about maven