未安装 Grails Url 缩短插件

Posted

技术标签:

【中文标题】未安装 Grails Url 缩短插件【英文标题】:Grails Url shortener plugin not getting installed 【发布时间】:2015-04-26 05:28:20 【问题描述】:

我正在尝试在我的应用程序中添加一个新插件mentioned here,但它没有得到解决并给我一个错误,即

:: problems summary ::
:::: WARNINGS
        module not found: org.grails.plugins#url-shortener;0.2.1
    ==== grailsPlugins: tried
      -- artifact org.grails.plugins#url-shortener;0.2.1!url-shortener.zip:
      ...
    ==== grailsHome: tried
      /opt/grails/lib/org.grails.plugins/url-shortener/ivy-0.2.1.xml
      -- artifact org.grails.plugins#url-shortener;0.2.1!url-shortener.zip:
      /opt/grails/lib/org.grails.plugins/url-shortener/jars/url-shortener-0.2.1.zip
      /opt/grails/lib/org.grails.plugins/url-shortener/bundles/url-shortener-0.2.1.zip
    ==== grailsHome: tried
      /opt/grails/src/libs/url-shortener-0.2.1.xml
      -- artifact org.grails.plugins#url-shortener;0.2.1!url-shortener.zip:
      /opt/grails/src/libs/url-shortener-0.2.1.zip
    ==== grailsHome: tried
      /opt/grails/dist/url-shortener-0.2.1.xml
      -- artifact org.grails.plugins#url-shortener;0.2.1!url-shortener.zip:
      /opt/grails/dist/url-shortener-0.2.1.zip
    ==== grailsHome: tried
      /home/dhanendra-jft/.grails/2.2.0/cached-installed-plugins/url-shortener-0.2.1.xml
      -- artifact org.grails.plugins#url-shortener;0.2.1!url-shortener.zip:
      /home/dhanendra-jft/.grails/2.2.0/cached-installed-plugins/url-shortener-0.2.1.zip
    ==== grailsHome: tried
      /opt/grails/plugins/url-shortener-0.2.1.pom
      -- artifact org.grails.plugins#url-shortener;0.2.1!url-shortener.zip:
      /opt/grails/plugins/url-shortener-0.2.1.zip
    ==== grailsCentral: tried
      http://grails.org/plugins/grails-url-shortener/tags/RELEASE_0.2.1/url-shortener-0.2.1.pom
      -- artifact org.grails.plugins#url-shortener;0.2.1!url-shortener.zip:
      http://grails.org/plugins/grails-url-shortener/tags/RELEASE_0.2.1/grails-url-shortener-0.2.1.zip
    ==== localMavenResolver: tried
      /home/dhanendra-jft/.m2/repository/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.pom
      -- artifact org.grails.plugins#url-shortener;0.2.1!url-shortener.zip:
      /home/dhanendra-jft/.m2/repository/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.zip
    ==== mavenCentral: tried
      http://repo1.maven.org/maven2/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.pom
      -- artifact org.grails.plugins#url-shortener;0.2.1!url-shortener.zip:
      http://repo1.maven.org/maven2/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.zip
    ==== http://snapshots.repository.codehaus.org: tried
      http://snapshots.repository.codehaus.org/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.pom
      -- artifact org.grails.plugins#url-shortener;0.2.1!url-shortener.zip:
      http://snapshots.repository.codehaus.org/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.zip
    ==== http://repository.codehaus.org: tried
      http://repository.codehaus.org/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.pom
      -- artifact org.grails.plugins#url-shortener;0.2.1!url-shortener.zip:
      http://repository.codehaus.org/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.zip
    ==== http://download.java.net/maven/2/: tried
      http://download.java.net/maven/2/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.pom
      -- artifact org.grails.plugins#url-shortener;0.2.1!url-shortener.zip:
      http://download.java.net/maven/2/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.zip
    ==== http://repository.jboss.com/maven2/: tried
      http://repository.jboss.com/maven2/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.pom
      -- artifact org.grails.plugins#url-shortener;0.2.1!url-shortener.zip:
      http://repository.jboss.com/maven2/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.zip
    ==== http://www.arquetipos.co.cr/blog/files/grails-image-tools-1.0.4.zip: tried
      http://www.arquetipos.co.cr/blog/files/grails-image-tools-1.0.4.zip/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.pom
      -- artifact org.grails.plugins#url-shortener;0.2.1!url-shortener.zip:
      http://www.arquetipos.co.cr/blog/files/grails-image-tools-1.0.4.zip/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.zip
    ==== http://repo1.maven.org/maven2/com/paypal/sdk/permissionssdk/2.3.106/: tried
      http://repo1.maven.org/maven2/com/paypal/sdk/permissionssdk/2.3.106/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.pom
      -- artifact org.grails.plugins#url-shortener;0.2.1!url-shortener.zip:
      http://repo1.maven.org/maven2/com/paypal/sdk/permissionssdk/2.3.106/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.zip
    ==== http://repo1.maven.org/maven2/com/paypal/sdk/merchantsdk/2.5.106/: tried
      http://repo1.maven.org/maven2/com/paypal/sdk/merchantsdk/2.5.106/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.pom
      -- artifact org.grails.plugins#url-shortener;0.2.1!url-shortener.zip:
      http://repo1.maven.org/maven2/com/paypal/sdk/merchantsdk/2.5.106/org/grails/plugins/url-shortener/0.2.1/url-shortener-0.2.1.zip
        ::::::::::::::::::::::::::::::::::::::::::::::
        ::          UNRESOLVED DEPENDENCIES         ::
        ::::::::::::::::::::::::::::::::::::::::::::::
        :: org.grails.plugins#url-shortener;0.2.1: not found
        ::::::::::::::::::::::::::::::::::::::::::::::

插件的文档是here

我目前正在使用 grails 2.2.0,并且如前所述,该插件可用于此版本的 grails。

我尝试在插件块中的 BuildConfig.groovy 中添加此依赖项,并尝试在依赖项中添加此依赖项。

【问题讨论】:

我遇到了同样的问题,在这里查看对我们有用的解决方案:***.com/q/28836824/311525 【参考方案1】:

2.2 或更小版本中提供的默认 grails 存储库现在不起作用。我们通过在 BuildConfig.groovy 文件中的 grails.project.dependency.resolution 闭包中添加以下行来解决此问题:

grails.project.dependency.resolution = 

repositories 

      ********

    mavenRepo "http://repo.grails.org/grails/repo/"

      ********


*Scott's answer的重复答案

【讨论】:

以上是关于未安装 Grails Url 缩短插件的主要内容,如果未能解决你的问题,请参考以下文章

Grails codenarc脚本未安装

Grails ehcache 插件 - 另一个未命名的 CacheManager 已存在于同一 VM 中

CSS 文件中的 URL 被 Grails 资源插件 1.2.7 破坏

grails-spring-security-rest 插件和悲观锁定

由于未解决的依赖关系,grails install plugin blazeds 失败

Grails 无法安装插件