简体   繁体   English

无法安装Grails插件

[英]Trouble installing Grails plugin

I'm using Grails 1.3.7. 我正在使用Grails 1.3.7。 I'm having trouble getting Grails to automatically install plugins. 我在让Grails自动安装插件方面遇到麻烦。 I tried just one, "grails install-plugin quartz 0.4.2", which fails. 我只尝试了一个,“ grails安装插件石英0.4.2”,但失败了。 How do I adjust my Grails installation so that Grails will be able to locate and install my plugin? 如何调整我的Grails安装,以便Grails能够找到并安装我的插件? Below is the error I get … 以下是我得到的错误…

$ grails install-plugin quartz 0.4.2
Welcome to Grails 1.3.7 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: /Library/grails-1.3.7

Base Directory: /Users/davea/Documents/workspace-sts-2.6.0.SR1/NissanUSA/Technology/Leaf Microsite/eCommerce/eComm
Resolving dependencies...
Dependencies resolved in 1231ms.
Running script /Library/grails-1.3.7/scripts/InstallPlugin.groovy
Environment set to development
    [mkdir] Created dir: /Users/davea/.grails/1.3.7/plugins
Resolving plugin quartz. Please wait...

:: problems summary ::
:::: WARNINGS
    module not found: org.grails.plugins#quartz;0.4.2

==== grailsPlugins: tried

  -- artifact org.grails.plugins#quartz;0.4.2!quartz.zip:

  /Users/davea/Documents/workspace-sts-2.6.0.SR1/NissanUSA/Technology/Leaf Microsite/eCommerce/eComm/lib/quartz-0.4.2.zip

==== grailsHome: tried

  /Library/grails-1.3.7/lib/quartz-0.4.2.xml

  -- artifact org.grails.plugins#quartz;0.4.2!quartz.zip:

  /Library/grails-1.3.7/lib/quartz-0.4.2.zip

==== grailsHome: tried

  /Library/grails-1.3.7/dist/quartz-0.4.2.xml

  -- artifact org.grails.plugins#quartz;0.4.2!quartz.zip:

  /Library/grails-1.3.7/dist/quartz-0.4.2.zip

==== grailsHome: tried

  -- artifact org.grails.plugins#quartz;0.4.2!quartz.zip:

  /Library/grails-1.3.7/plugins/grails-quartz-0.4.2.zip

==== localMavenResolver: tried

  /Users/davea/.m2/repository/org/grails/plugins/quartz/0.4.2/quartz-0.4.2.pom

  -- artifact org.grails.plugins#quartz;0.4.2!quartz.zip:

  /Users/davea/.m2/repository/org/grails/plugins/quartz/0.4.2/quartz-0.4.2.zip

==== mavenCentral: tried

  http://repo1.maven.org/maven2/org/grails/plugins/quartz/0.4.2/quartz-0.4.2.pom

  -- artifact org.grails.plugins#quartz;0.4.2!quartz.zip:

  http://repo1.maven.org/maven2/org/grails/plugins/quartz/0.4.2/quartz-0.4.2.zip

==== http://snapshots.repository.codehaus.org: tried

  http://snapshots.repository.codehaus.org/org/grails/plugins/quartz/0.4.2/quartz-0.4.2.pom

  -- artifact org.grails.plugins#quartz;0.4.2!quartz.zip:

  http://snapshots.repository.codehaus.org/org/grails/plugins/quartz/0.4.2/quartz-0.4.2.zip

==== http://repository.codehaus.org: tried

  http://repository.codehaus.org/org/grails/plugins/quartz/0.4.2/quartz-0.4.2.pom

  -- artifact org.grails.plugins#quartz;0.4.2!quartz.zip:

  http://repository.codehaus.org/org/grails/plugins/quartz/0.4.2/quartz-0.4.2.zip

==== http://download.java.net/maven/2/: tried

  http://download.java.net/maven/2/org/grails/plugins/quartz/0.4.2/quartz-0.4.2.pom

  -- artifact org.grails.plugins#quartz;0.4.2!quartz.zip:

  http://download.java.net/maven/2/org/grails/plugins/quartz/0.4.2/quartz-0.4.2.zip

==== http://repository.jboss.com/maven2/: tried

  http://repository.jboss.com/maven2/org/grails/plugins/quartz/0.4.2/quartz-0.4.2.pom

  -- artifact org.grails.plugins#quartz;0.4.2!quartz.zip:

  http://repository.jboss.com/maven2/org/grails/plugins/quartz/0.4.2/quartz-0.4.2.zip

    ::::::::::::::::::::::::::::::::::::::::::::::

    ::          UNRESOLVED DEPENDENCIES         ::

    ::::::::::::::::::::::::::::::::::::::::::::::

    :: org.grails.plugins#quartz;0.4.2: not found

    ::::::::::::::::::::::::::::::::::::::::::::::


Error resolving plugin [name:quartz, group:org.grails.plugins, version:0.4.2].
Plugin not found for name [quartz] and version [0.4.2]

Thanks, - Dave 谢谢-戴夫

Looks like you're missing grailsCentral() in the repositories section of BuildConfig.groovy. 看起来您在BuildConfig.groovy的repositories部分中缺少grailsCentral() Is this an upgrade from pre-1.3? 这是1.3之前的升级吗? You need grailsCentral() in addition to grailsPlugins() and grailsHome() . 除了grailsPlugins()grailsHome()之外, grailsPlugins()需要grailsCentral() grailsHome()

In BuildConfig.groovy make sure you have the following: BuildConfig.groovy确保您具有以下内容:

repositories {

    grailsPlugins()
    grailsHome()
    grailsCentral()  // IT LOOKS LIKE YOU MIGHT BE MISSING THIS ONE
} 

If this doesn't fix the problem, and you need to connect to the internet through a proxy server, try using the commands 如果这不能解决问题,并且您需要通过代理服务器连接到Internet,请尝试使用以下命令

grails set-proxy
grails add-proxy

to configure the proxy server 配置代理服务器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM