【问题标题】:Groovy grapes freeze after downloading artifactsGroovy 葡萄在下载工件后冻结
【发布时间】:2013-08-27 11:43:54
【问题描述】:

更新我的 ubuntu 系统后,我无法运行 groovy grapes 脚本。所有依赖项都已下载,但进程仍在大约 100 % 运行

我有 ubuntu:

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.10
Release:    12.10
Codename:   quantal

groovy 版本:

Groovy Version: 1.8.6 JVM: 1.7.0_25 Vendor: Oracle Corporation OS: Linux

我的简单脚本如下所示:

@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.6')
@GrabExclude('asm:*')

import groovyx.net.http.*
import groovy.util.CliBuilder
import groovy.xml.XmlUtil

import java.util.regex.Matcher;
import java.util.regex.Pattern;


class MyGroovyScript {

static main(args) {
    println "?????"
} 

}

输出是:

groovy -Dgroovy.grape.report.downloads=true my-groovy-script.groovy
Resolving dependency: org.codehaus.groovy.modules.http-builder#http-builder;0.6 {default=[default]}
Preparing to download artifact org.codehaus.groovy.modules.http-builder#http-builder;0.6!http-builder.jar
Preparing to download artifact org.apache.httpcomponents#httpclient;4.2.1!httpclient.jar
Preparing to download artifact net.sf.json-lib#json-lib;2.3!json-lib.jar
Preparing to download artifact org.codehaus.groovy#groovy;1.8.8!groovy.jar
Preparing to download artifact net.sourceforge.nekohtml#nekohtml;1.9.16!nekohtml.jar
Preparing to download artifact xml-resolver#xml-resolver;1.2!xml-resolver.jar
Preparing to download artifact org.apache.httpcomponents#httpcore;4.2.1!httpcore.jar
Preparing to download artifact commons-logging#commons-logging;1.1.1!commons-logging.jar
Preparing to download artifact commons-codec#commons-codec;1.6!commons-codec.jar
Preparing to download artifact commons-beanutils#commons-beanutils;1.8.0!commons-beanutils.jar
Preparing to download artifact commons-collections#commons-collections;3.2.1!commons-collections.jar
Preparing to download artifact commons-lang#commons-lang;2.4!commons-lang.jar
Preparing to download artifact net.sf.ezmorph#ezmorph;1.0.6!ezmorph.jar
Preparing to download artifact antlr#antlr;2.7.7!antlr.jar
Preparing to download artifact xerces#xercesImpl;2.9.1!xercesImpl.jar
Preparing to download artifact xml-apis#xml-apis;1.3.04!xml-apis.jar
Downloaded 9854 Kbytes in 134ms:
  [SUCCESSFUL ] org.codehaus.groovy.modules.http-builder#http-builder;0.6!http-builder.jar (5ms)
  [SUCCESSFUL ] org.apache.httpcomponents#httpclient;4.2.1!httpclient.jar (7ms)
  [SUCCESSFUL ] org.apache.httpcomponents#httpcore;4.2.1!httpcore.jar (2ms)
  [SUCCESSFUL ] commons-logging#commons-logging;1.1.1!commons-logging.jar (1ms)
  [SUCCESSFUL ] commons-codec#commons-codec;1.6!commons-codec.jar (2ms)
  [SUCCESSFUL ] net.sf.json-lib#json-lib;2.3!json-lib.jar (2ms)
  [SUCCESSFUL ] commons-beanutils#commons-beanutils;1.8.0!commons-beanutils.jar (3ms)
  [SUCCESSFUL ] commons-collections#commons-collections;3.2.1!commons-collections.jar (5ms)
  [SUCCESSFUL ] commons-lang#commons-lang;2.4!commons-lang.jar (2ms)
  [SUCCESSFUL ] net.sf.ezmorph#ezmorph;1.0.6!ezmorph.jar (24ms)
  [SUCCESSFUL ] org.codehaus.groovy#groovy;1.8.8!groovy.jar (34ms)
  [SUCCESSFUL ] antlr#antlr;2.7.7!antlr.jar (5ms)
  [SUCCESSFUL ] net.sourceforge.nekohtml#nekohtml;1.9.16!nekohtml.jar (2ms)
  [SUCCESSFUL ] xerces#xercesImpl;2.9.1!xercesImpl.jar (14ms)
  [SUCCESSFUL ] xml-apis#xml-apis;1.3.04!xml-apis.jar (3ms)
  [SUCCESSFUL ] xml-resolver#xml-resolver;1.2!xml-resolver.jar (2ms)

【问题讨论】:

  • 这只是在 2 天前在 mailing list 上。我假设您使用的是 OpenJDK 更新 25?他们改变了积分函数的工作方式,因此 Grab 已停止使用该版本的 Java
  • 是的,这正是我的问题。多谢。顺便说一句,你认为它会在新的 java 更新中修复
  • 我相信他们已经说过代码将被改回(在 Java 7 中),但没有关于 Java 8 中会发生什么的消息,或者这个修复是否是永久性的 :-( groovy.329449.n5.nabble.com/Grab-and-Java-8-td5716099.html

标签: groovy groovy-grape


【解决方案1】:

由于还没有发布答案.. 这是因为 OpenJDK7u25 而发生的,它再次与 u40 一起工作

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-12-06
    • 1970-01-01
    • 2015-06-13
    • 2020-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多