在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”>
编译通过
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”>
编译通过