maven - 即使有插件,从 Grails 插件存储库下载也会失败
问题描述
我正在尝试将remote-control
插件与 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
令人困惑的部分是插件似乎正是它应该在的地方:
我觉得我错过了一些明显的东西——它是什么?
解决方案
该文档以另一种方式过时:添加依赖项不是必需的,实际上确实会导致问题中的解析错误(我发现插件源,而不是可用作代码依赖项的 JAR)。
删除后
compile "org.grails.plugins:remote-control:2.0"
从dependencies
,Grails 正确刷新依赖项并使用插件运行。
推荐阅读
- javascript - 如何使用 discord.js 从指定服务器中的用户删除角色?
- r - dnorm 中的错误:如何处理数学函数的非数字参数
- javascript - 用 JavaScript 访问 CSS 样式太慢了
- flutter - 当 TextField 获得焦点时触发 Flutter TextEditingController 侦听器
- javascript - SyntaxError:位置 1 处 JSON 中的意外标记 e || 400 错误请求
- python-3.x - 按一列过滤 Pandas 数据框并获取另一列中的值的总和
- if-statement - IF-THEN 和 LAG(函数)语句的问题 - 未正确分类
- java - 为什么更改我的代码中的一行会导致堆栈溢出?
- python - 如何在更新函数代码后第二次从另一个脚本导入函数
- xcode - NSComboBox 使用 NSValueTransformer 自动完成