2016-02-11 37 views
0

我需要在grails 2.4.3中安裝rest-client-builder 2.1.1,但我的網絡訪問非常有限,並且在代理之後。我從https://repo.grails.org下載插件的整個文件夾,該文件是:在grails中安裝rest-client-builder 2.1.1 2.4.3手動安裝

  • 其餘客戶端建設者-2.1.1-plugin.xml的
  • 其餘客戶端建設者-2.1.1-plugin.xml中。 MD5
  • 其餘客戶端建設者-2.1.1-plugin.xml.sha1
  • 其餘客戶端建設者 - 2.1.1.pom其餘客戶端建設者 - 2.1.1.pom.md5
  • 休息-client-builder-2.1.1.pom.sha1 rest-client-builder-2.1.1.zip
  • rest-client-builder-2.1.1.zip.md5 rest-client-builder-2。 1.1.zip.sha1

我複製到該地址我的文件夾的.m2: .m2目錄/庫/組織/ Grails的/插件/ REST客戶端建設者/ 2.1.1 但是當我運行: grails.org(使用--stacktrace查看完整的跟蹤)

這是完整的跟蹤(帶 - 使用--stacktrace查看完整跟蹤)grails.org(安裝插件rest-client-builder 2.1.1,我有以下錯誤: ) -stacktrace)

Error installing plugin: grails.org (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.) 
java.net.UnknownHostException: grails.org 
    at InstallPlugin$_run_closure1.doCall(InstallPlugin.groovy:70) 
    at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) 
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185) 
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy) 
    at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90) 
    at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy) 
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185) 
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy) 
    at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) 
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) 
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) 
    at gant.Gant.withBuildListeners(Gant.groovy:427) 
    at gant.Gant.this$2$withBuildListeners(Gant.groovy) 
    at gant.Gant$this$2$withBuildListeners$0.callCurrent(Unknown Source) 
    at gant.Gant.dispatch(Gant.groovy:415) 
    at gant.Gant.this$2$dispatch(Gant.groovy) 
    at gant.Gant.invokeMethod(Gant.groovy) 
    at gant.Gant.executeTargets(Gant.groovy:591) 
    at gant.Gant.executeTargets(Gant.groovy:590) 
| Error Error installing plugin: grails.org 

¿有什麼幫助嗎? 在此先感謝

+0

也許使用--stacktrace看到完整的痕跡? –

回答

0

好,對我來說它的工作:

  1. 安裝cntlm並在終端配置我的代理
  2. 運行的設置:

    Grails的增加,代理客戶端「 - 主機= http://localhost/「 」--port = 3128「

(3128是cntlm的defaul端口)

  • 添加該配置上BuildConfig.groovy

    repositories { 
    ... 
    mavenRepo "http://repo.grails.org/grails/plugins" 
    mavenRepo "http://repo1.maven.org/maven2" 
    } 
    
    plugins { 
    ... 
    //REST plugin 
         compile ":rest-client-builder:2.1.1" 
    }