为什么Groovy / Grape不能解决Maven Central的工件问题? [英] Why won't Groovy/Grape resolve artifacts from Maven Central?
问题描述
// Test.Groovy
@ Grab('commons-io:commons-io:1.2')
import org.apache.commons.io.CopyUtils
println已解决!
然后我尝试运行
$ ./groovy-2.1.9/bin/groovy Test.groovy
转换过程中的一般错误:抓取错误葡萄 -
[下载失败:commons-io# commons-io; 1.2!commons-io.jar]
工件是列出在maven central,可下载这里
这是值得的,各种本地文件创建在:
如果我在我的系统上创建一个新用户(在她的homedir中没有dotfiles),这个有效。所以我有一些用户特定的配置会破坏事情。我尝试删除 适合我。不清楚有什么问题...... 若要进一步挖掘,您可以启用调试,如下所示: With a fresh download of Groovy 2.1.9, I create: Then I try running which fails with
For what it's worth, various local files are created in: If I create a new user on my system (with no dotfiles in her homedir), this works. So I've got some user-specific config that's breaking things. I've tried deleting Works for me. Not clear what's wrong... To dig some more you can enable debug as follows:
这篇关于为什么Groovy / Grape不能解决Maven Central的工件问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!〜/ .groovy / grapes / commons-io / commons-io $ c $
我非常感谢关于如何调试或解决的想法!
更新
〜/ .groovy
,〜/ .m2
和〜/。常春藤
无济于事。还有什么可以做的?
$ groovy -Dgroovy.grape.report.downloads = true test
解析依赖关系:commons-io#commons-io; 1.2 {default = [default]}
准备下载工件commons-io#commons-io; 1.2!commons-io.jar
在323ms中下载64 KB:
[SUCCESSFUL] commons-io#commons-io; 1.2!commons-io.jar(306ms)
已解决!
groovy -Divy.message.logger.level = 4 test
// Test.Groovy
@Grab('commons-io:commons-io:1.2')
import org.apache.commons.io.CopyUtils
println "Resolved!"
$ ./groovy-2.1.9/bin/groovy Test.groovy
General error during conversion: Error grabbing Grapes --
[download failed: commons-io#commons-io;1.2!commons-io.jar]
The artifact is listed in maven central, downloadable here
~/.groovy/grapes/commons-io/commons-io
I'd very much appreciate ideas on how to debug or "resolve"!
Update
~/.groovy
, ~/.m2
and ~/.ivy
to no avail. What else could it be?$ groovy -Dgroovy.grape.report.downloads=true test
Resolving dependency: commons-io#commons-io;1.2 {default=[default]}
Preparing to download artifact commons-io#commons-io;1.2!commons-io.jar
Downloaded 64 Kbytes in 323ms:
[SUCCESSFUL ] commons-io#commons-io;1.2!commons-io.jar (306ms)
Resolved!
groovy -Divy.message.logger.level=4 test