如何根据执行maven的虚拟机是32位还是64位JVM来启用或禁用maven配置文件?
我试过这个:
<activation> <os> <arch>x86</arch> </os> </activation>
或 amd64 分别检测32/64位虚拟机,但在64位Windows上运行的32位虚拟机上失败,因为它激活了64位配置文件。
amd64
在太阳VM中, 检查系统属性 sun.arch.data.model
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>
参考文献: