Chinaunix首页 | 论坛 | 博客
  • 博客访问: 190086
  • 博文数量: 40
  • 博客积分: 1768
  • 博客等级: 上尉
  • 技术积分: 410
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-28 18:15
文章分类
文章存档

2012年(4)

2011年(11)

2010年(10)

2009年(6)

2008年(9)

分类:

2010-10-20 10:40:41

64windows系统编译我们的中间件,用maven编译不过,会hang。直接用ant编译没问题。发现maven 1.0.2自带的ant1.5.3的,直接用ant 1.7.1编译时可以的,应该是ant内部实现机制不同导致的。

关于这个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:


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 () 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.xmlgoalinvoke-ant中,在调用ant的地方加入参数

编译通过

阅读(1734) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~