-1

我正在关注本指南Gri​​ffon Guide 2.12

我被困在2.2.1。在$lazybones create griffon-swing-groovy console行中创建项目 我收到以下错误:

lazybones create griffon-swing-groovy console                                          ~
Creating project from template griffon-swing-groovy (latest) in 'console'

java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(Unknown Source)
        at java.net.SocketInputStream.read(Unknown Source)
        at java.io.BufferedInputStream.fill(Unknown Source)
        at java.io.BufferedInputStream.read1(Unknown Source)
        at java.io.BufferedInputStream.read(Unknown Source)
        at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
        at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
        at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        at org.codehaus.groovy.runtime.ResourceGroovyMethods.configuredInputStream(ResourceGroovyMethods.java:1978)
        at org.codehaus.groovy.runtime.ResourceGroovyMethods.newInputStream(ResourceGroovyMethods.java:1991)
        at org.codehaus.groovy.runtime.ResourceGroovyMethods.withInputStream(ResourceGroovyMethods.java:1657)
        at uk.co.cacoethes.lazybones.commands.PackageDownloader$_downloadPackage_closure1.doCall(PackageDownloader.groovy:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
        at groovy.lang.Closure.call(Closure.java:423)
        at groovy.lang.Closure.call(Closure.java:439)
        at org.codehaus.groovy.runtime.IOGroovyMethods.withStream(IOGroovyMethods.java:1316)
        at org.codehaus.groovy.runtime.ResourceGroovyMethods.withOutputStream(ResourceGroovyMethods.java:1627)
        at uk.co.cacoethes.lazybones.commands.PackageDownloader.downloadPackage(PackageDownloader.groovy:32)
        at uk.co.cacoethes.lazybones.commands.PackageDownloader$downloadPackage.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:138)
        at uk.co.cacoethes.lazybones.commands.CreateCommand.doExecute(CreateCommand.groovy:89)
        at uk.co.cacoethes.lazybones.commands.AbstractCommand.execute(AbstractCommand.groovy:30)
        at uk.co.cacoethes.lazybones.LazybonesMain.main(LazybonesMain.groovy:89)

我正在使用以下环境进行开发

  1. Windows 7旗舰版
  2. 巴邦贝壳
  3. SDK版本 SDKMAN 5.5.12+269
  4. 懒骨头

    lazybones 列表 ~ griffon/griffon-lazybones-templates 中的可用模板

    griffon-javafx-groovy
    griffon-javafx-java
    griffon-javafx-kotlin
    griffon-lanterna-groovy
    griffon-lanterna-java
    griffon-pivot-groovy
    griffon-pivot-java
    griffon-plugin
    griffon-swing-groovy
    griffon-swing-java
    
  5. 摇篮

gradle -v
Gradle 4.3 Build time: 2017-10-30 15:43:29 UTC Revision:c684c202534c4138b51033b52d871939b8d38d72 Groovy:2.4.12
Ant:Apache Ant(TM) 版本 1.9.6 编译于 2015 年 6 月 29 日
JVM:1.8.0_144 Corporation 25.144-b01)
操作系统:Windows 7 6.1 x86

我还手动下载了模板以下内容在 .lazybones/templates 中可用

  • griffon-javafx-groovy-template-1.9.1
  • griffon-javafx-java-template-1.9.1
  • 格里芬插件模板 1.9.1
  • griffon-swing-groovy-template-1.9.1
  • griffon-swing-java-template-1.9.1

我仍然无法使用lazybones 创建任何项目。我无法理解我遇到的问题。

提前致谢,

万拉尔

4

1 回答 1

0

这很奇怪,我可以使用所有工具的最新版本成功地创建一个应用程序,从头开始,正如

[tmp]> ls -l ~/.lazybones/templates/
[tmp]> lazybones --version
Lazybones version 0.8.3
[tmp]> gradle --version

------------------------------------------------------------
Gradle 4.3
------------------------------------------------------------

Build time:   2017-10-30 15:43:29 UTC
Revision:     c684c202534c4138b51033b52d871939b8d38d72

Groovy:       2.4.12
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_144 (Oracle Corporation 25.144-b01)
OS:           Mac OS X 10.12.5 x86_64

[tmp]> lazybones create griffon-swing-groovy sample
Creating project from template griffon-swing-groovy (latest) in 'sample'
Define value for 'group' [org.example]: 

 ... snip snip ...

Project created in sample!
[tmp]> ls -l ~/.lazybones/templates/
total 1024
-rw-r--r--+ 1 aalmiray  staff   510K Oct 31 18:28 griffon-swing-groovy-1.12.0.zip
[tmp]> 

值得一提的是,griffon-swing-groovy模板的最新版本是1.12.0。您可以在创建应用程序时指定版本号,例如

lazybones create griffon-swing-groovy 1.12.0 sample
于 2017-11-01T00:31:29.890 回答