griffon lazybones无法创建griffon-swing-groovy项目

时间:2017-10-31 10:03:25

标签: java swing groovy griffon lazybones

我正在遵循本指南Griffon Guide 2.12

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

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. Babun shell
  3. SDK版SDKMAN 5.5.12 + 269
  4. Lazybones

    lazybones list~ 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. 摇篮

  6. gradle -v
    Gradle 4.3 制作时间:2017-10-30 15:43:29 UTC修订:c684c202534c4138b51033b52d871939b8d38d72 Groovy:在2.4.12
    Ant:2015年6月29日编译的Apache Ant(TM)版本1.9.6 JVM:1.8.0_144(Oracle 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
    • 兀-摆动Groovy的模板1.9.1
    • 兀摆幅-java的模板-1.9.1

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

    提前致谢,

    Vanlal

1 个答案:

答案 0 :(得分: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