【问题标题】:Download from Grails plugin repository fails even though plugin is there即使有插件,从 Grails 插件存储库下载也会失败
【发布时间】:2019-04-12 19:06:21
【问题描述】:

我正在尝试将remote-control plugin 与 Grails 2.5.6 一起使用。根据文档,我将以下内容添加到BuildConfig.groovy

repositories {
    ...
    mavenRepo "http://dl.bintray.com/alkemist/maven/"
}

dependencies {
    ...
    compile "org.grails.plugins:remote-control:2.0"
}

plugins {
    test ":remote-control:2.0"
}

现在,grails refresh-dependencies 的输出是:

| Loading Grails 2.5.6
| Configuring classpath
| Downloading: org/grails/plugins/remote-control/2.0/remote-control-2.0.pom
| Downloading: io/remotecontrol/remote-core/0.7/remote-core-0.7.pom
| Downloading: io/remotecontrol/remote-transport-http/0.7/remote-transport-http-0.7.pom
| Downloading: org/grails/plugins/remote-control/2.0/remote-control-2.0.zip
| Downloading: io/remotecontrol/remote-transport-http/0.7/remote-transport-http-0.7.jar
| Downloading: io/remotecontrol/remote-core/0.7/remote-core-0.7.jar
| Error Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:remote-control:jar:2.0 in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:remote-control:jar:2.0 in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:remote-control:jar:2.0 in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Could not find artifact org.grails.plugins:remote-control:jar:2.0 in grailsCentral (https://repo.grails.org/grails/plugins)

为了突出显示,我们得到

在 grailsCentral (https://repo.grails.org/grails/plugins) 中找不到工件 org.grails.plugins:remote-control:jar:2.0

令人困惑的部分是插件似乎正是它应该在的地方:

我觉得我遗漏了一些明显的东西——那是什么?

【问题讨论】:

    标签: maven grails grails-plugin


    【解决方案1】:

    文档以另一种方式过时:添加依赖项不是必需的,实际上确实会导致问题中的解析错误(我发现 plugin 源,而不是可用作代码依赖项的 JAR )。

    删除后

    compile "org.grails.plugins:remote-control:2.0"
    

    来自dependencies,Grails 正确刷新了依赖项并与插件一起运行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-10-02
      • 2021-12-25
      • 2013-08-10
      • 1970-01-01
      • 2011-04-13
      • 1970-01-01
      • 2014-06-29
      • 1970-01-01
      相关资源
      最近更新 更多