如何在Groovy中解决未解决的依赖项异常

时间:2013-09-18 07:00:58

标签: maven grails heap-memory

如何在groovy项目中解决未解析的依赖关系和java堆空间.. 即使提供MAVEN_OPTS为-Xmx1024m,也会发生堆空间问题。 希望有人可以帮忙解决这个问题。

使用Intellij IDEA,maven 2.2.1,Groovy

==== mavenCentral: tried

      http://repo1.maven.org/maven2/javax/security/jacc/1.0/jacc-1.0.pom

      -- artifact javax.security#jacc;1.0!jacc.jar:

      http://repo1.maven.org/maven2/javax/security/jacc/1.0/jacc-1.0.jar

        module not found: org.hibernate#hibernate-cglib-repack;2.1_3

    ==== grailsPlugins: tried

      -- artifact org.hibernate#hibernate-cglib-repack;2.1_3!hibernate-cglib-repack.jar:

      C:\Documents and Settings\user\code base\trunk\war/lib/hibernate-cglib-repack-2.1_3.jar

      C:\Documents and Settings\user\code base\war\plugins\.svn/lib/hibernate-cglib-repack-2.1_3.jar

      C:\Documents and Settings\user\code base\trunk\war\plugins\hibernate-1.3.1/lib/hibernate-cglib-repack-2.1_3.jar

      C:\Documents and Settings\user\code base\trunk\war\plugins\jdbc-pool-0.1/lib/hibernate-cglib-repack-2.1_3.jar

      C:\Documents and Settings\user\code base\trunk\war\plugins\tomcat-1.3.2/lib/hibernate-cglib-repack-2.1_3.jar

    ==== grailsCentral: tried

      -- artifact org.hibernate#hibernate-cglib-repack;2.1_3!hibernate-cglib-repack.jar:

      http://svn.codehaus.org/grails-plugins/grails-hibernate-cglib-repack/tags/RELEASE_2_1_3/grails-hibernate-cglib-repack-2.1_3.jar

    ==== grailsCore: tried

      -- artifact org.hibernate#hibernate-cglib-repack;2.1_3!hibernate-cglib-repack.jar:

      http://svn.codehaus.org/grails/trunk/grails-plugins/grails-hibernate-cglib-repack/tags/RELEASE_2_1_3/grails-hibernate-cglib-repack-2.1_3.jar

    ==== localMavenResolver: tried

      C:\Documents and Settings\user/.m2/repository/org/hibernate/hibernate-cglib-repack/2.1_3/hibernate-cglib-repack-2.1_3.pom

      -- artifact org.hibernate#hibernate-cglib-repack;2.1_3!hibernate-cglib-repack.jar:

      C:\Documents and Settings\user/.m2/repository/org/hibernate/hibernate-cglib-repack/2.1_3/hibernate-cglib-repack-2.1_3.jar

    ==== mavenCentral: tried

      http://repo1.maven.org/maven2/org/hibernate/hibernate-cglib-repack/2.1_3/hibernate-cglib-repack-2.1_3.pom

      -- artifact org.hibernate#hibernate-cglib-repack;2.1_3!hibernate-cglib-repack.jar:

      http://repo1.maven.org/maven2/org/hibernate/hibernate-cglib-repack/2.1_3/hibernate-cglib-repack-2.1_3.jar

        ::::::::::::::::::::::::::::::::::::::::::::::

        ::          UNRESOLVED DEPENDENCIES         ::

        ::::::::::::::::::::::::::::::::::::::::::::::

        :: javax.security#jaas;1.0.01: not found

        :: javax.security#jacc;1.0: not found

        :: org.hibernate#hibernate-cglib-repack;2.1_3: not found

        ::::::::::::::::::::::::::::::::::::::::::::::


     [copy] Copied 3 empty directories to 2 empty directories under C:\Documents and Settings\user\code base\trunk\war\target\resources
: java.lang.OutOfMemoryError: Java heap space
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
    at _GrailsCompile$_run_closure4_closure10.doCall(_GrailsCompile.groovy:118)
    at _GrailsCompile$_run_closure4_closure10.doCall(_GrailsCompile.groovy)
    at _GrailsSettings$_run_closure10.doCall(_GrailsSettings.groovy:282)
    at _GrailsSettings$_run_closure10.call(_GrailsSettings.groovy)
    at _GrailsCompile$_run_closure4.doCall(_GrailsCompile.groovy:105)
    at _GrailsCompile$_run_closure3.doCall(_GrailsCompile.groovy:68)

1 个答案:

答案 0 :(得分:1)

查看您的跟踪,看起来内存问题不是由Maven引起的,而是在执行一些“标准”groovy代码时。尝试提升Groovy的Xmx,看看会发生什么。