grails install-plugin does not work for me

匿名 (未验证) 提交于 2019-12-03 02:33:02

问题:

I received a very odd error when I run 'grails install spring-security-core 1.2.4'in my window's command line

            ::::::::::::::::::::::::::::::::::::::::::::::              ::          UNRESOLVED DEPENDENCIES         ::              ::::::::::::::::::::::::::::::::::::::::::::::              :: org.grails.plugins#spring-security-core;1.2.4: not found              :::::::::::::::::::::::::::::::::::::::::::::: 

:::: ERRORS Server access Error: Permission denied: connect url=http://svn.codehaus.org/grails-plugins/grails-spring-security-core/tags/RELEASE_1_2_4/grails-spring-security-core-1.2.4.zip

    Server access Error: Permission denied: connect url=http://svn.codehaus.org/grails/trunk/grails-plugins/grails-spring-security-core/tags/RELEASE_1_2_4/grails-spring-security-core-1.2.4.zip 

Error resolving plugin [name:spring-security-core, group:org.grails.plugins, version:1.2.4]. Plugin not found for name [spring-security-core] and version [1.2.4]

Strangely I can download the zip file by providing the url (http://svn.codehaus.org/grails-plugins/grails-spring-security-core/tags/RELEASE_1_2_4/grails-spring-security-core-1.2.4.zip) in my browser.

Anybody experienced same issue?

If I omit the version number in the command line, I see the url string is totally wrong:

  ==== grailsCentral: tried 
    -- artifact org.grails.plugins#spring-security-core;latest.integration!spring-security-core.zip:      http://svn.codehaus.org/grails-plugins/grails-spring-security-core/tags/LATEST_RELEASE/grails-spring-security-core-[revision].zip    ==== grailsCore: tried      -- artifact org.grails.plugins#spring-security-core;latest.integration!spring-security-core.zip:      http://svn.codehaus.org/grails/trunk/grails-plugins/grails-spring-security-core/tags/LATEST_RELEASE/grails-spring-security-core-[revision].zip            ::::::::::::::::::::::::::::::::::::::::::::::            ::          UNRESOLVED DEPENDENCIES         ::            ::::::::::::::::::::::::::::::::::::::::::::::            :: org.grails.plugins#spring-security-core;latest.integration: not found            :::::::::::::::::::::::::::::::::::::::::::::: 

By the way, I am using Grails 1.3.7. Thanks!!

回答1:

Just a small tip but you can also install plugin from a zip file from your local file system ... since you already have it.

grails install-plugin ../my-plugin-0.1.zip 


回答2:

Go into your project's BuildConfig.groovy

/[Your_Project_Name]/grails-app/conf/BuildConfig.groovy 

Find the repositiories section:

repositories { grailsPlugins() grailsHome() grailsCentral()

// uncomment the below to enable remote dependency resolution // from public Maven repositories //mavenLocal() mavenCentral() //mavenRepo "http://snapshots.repository.codehaus.org" //mavenRepo "http://repository.codehaus.org" //mavenRepo "http://download.java.net/maven/2/" //mavenRepo "http://repository.jboss.com/maven2/" 

}

Search for mavenCentral().
Uncomment this line out. This will then enable remote dependency resolution.

Then try the install-plugin command on the command line.

Here is an example:

install-plugin mail 

or

install-plugin http://plugins.grails.org/grails-mail/tags/RELEASE_1_0-SNAPSHOT/grails-mail-1.0-SNAPSHOT.zip  

If running install-plugin on the command line does not work for you, you can try the plugin manager.

Right-click your project -> Grails Tools(Towards the bottom) -> Grails Plugin Manager.

Search for your plugin then install and click the OK button.



回答3:

If You have to use Proxy to connect to the Internet, try this:

http://grails.org/doc/latest/ref/Command%20Line/add-proxy.html http://grails.org/doc/latest/ref/Command%20Line/set-proxy.html



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!