在64位windows系统编译,用maven编译不过,会hang

在64位windows系统编译我们的中间件,用maven编译不过,会hang。直接用ant编译没问题。发现maven 1.0.2自带的ant是1.5.3的,直接用ant 1.7.1编译时可以的,应该是ant内部实现机制不同导致的。
http://youtrack.jetbrains.net/issue/IDEA-26198
关于这个bug的解决方案,这个bug与下面的item 8有点关系
I may have found the bug. I created a run config in IntelliJ so that i could debug ant inside intellij. When i paused the jvm running ant one thread was stuck on:

at java.net.Inet4AddressImpl.getLocalHostName(Native Method)

A quick google on this resulted in:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4939977

Short version, when you create a tempfile the localhostname is used when generating the random filename for the tempfile. This hangs when another thread is trying to read System.in

So when i added -noinput to the program params of my run config for ant the hang did not occur. This workaround also works for the built-in ant runner. Just edit your ant settings (http://www.jetbrains.com/idea/webhelp/ant-build-tool-window.html) and add -noinput to "Ant command line". Voila, now it runs from inside intellij. At least for me. ;)
Btw, I have used the jre with idea and the latest 1.6 (u18) jdk, same result.

解决方案,在maven.xml的goal,invoke-ant中,在调用ant的地方加入参数
<arg value=”-noinput”>
编译通过
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值