Maven编译:执行javac失败 [英] Maven compilation: Failure executing javac

查看:120
本文介绍了Maven编译:执行javac失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试使用Maven 2.2.1和JDK 1.6.0_23在Windows Server 2003下编译新签出的代码时,我们遇到了一个例外。运行具有相同Maven和JDK版本的Ubuntu的几台机器在编译完全相同的源时没有任何问题。

Here is an exception we get when trying to compile a freshly checked out code under Windows Server 2003 with Maven 2.2.1 and JDK 1.6.0_23. Several machines running Ubuntu with the same Maven and JDK version have no problems at all compiling the exact same source.

尝试提供备用Maven选项(即MAVEN_OPTS = -Xms256m - Xmx1024m)无济于事。

Have tried providing alternative Maven options (i.e. MAVEN_OPTS=-Xms256m -Xmx1024m) to no avail.

这个问题可能是什么原因以及可能的解决方案是什么? Thanx。

What could be the cause of this problem and what would be a possible solution? Thanx.

[INFO] Compilation failure

Failure executing javac, but could not parse the error:


The system is out of resources.
Consult the following stack trace for details.
java.lang.StackOverflowError
    at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:1799)
    at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1522)
    at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
    at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:377)
    at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1241)
    at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1210)
    at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
   ... then trace repeats multiple times


推荐答案

试试

MAVEN_OPTS = -Xms256m -Xmx1024m -Xss1024k

注意:-Xss,应根据可用硬件

Note: -Xss , should be set according to hardware available

这篇关于Maven编译:执行javac失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆