Groovy现在安装HTTPBuilder Codehaus关机了吗? [英] Groovy install HTTPBuilder now that Codehaus shutdown?
问题描述
我是一个groovy n00b并尝试使用http-builder,但网络上的所有示例都只引用了不起作用的相同的 @Grab
语句。我认为这是因为codehaus.org不再托管groovy的东西。我尝试从
我想知道这是否与Mac相关,以及宾果。我将这个脚本上传到我的CentOS服务器,它运行得很好。有一些与MacOSX + groovy有关的问题导致了这个问题。
明白了!它看起来像是问题的maven缓存。
我找到了解决方案本页:
rm -rf〜/ .m2 / repository〜/ .groovy / grapes
我以前曾尝试删除〜/ .groovy / grapes
缓存,但这并没有解决问题。删除〜/ .m2 / repository
实际上是为我做的。
I'm a groovy n00b and trying to use http-builder, but ALL of the examples on the web just reference the same @Grab
statement which doesn't work. I assume it is because codehaus.org isn't hosting groovy stuff anymore. I've tried downloading the source from github and building it with Maven, but the build fails.
How and where am I supposed to get httpbuilder for groovy?
Things I've already tried:
Deleting the grapes directory from this post didn't work.
I got this code snippet from this other post, but it doesn't work for me either.
@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.7' )
def http = new groovyx.net.http.HTTPBuilder('http://www.codehaus.org')
println http
Here is the error in the IntelliJ console:
/Users/kenny/Sites/inadaydevelopment.com/reports/fetch_windows_appstore_report.groovy
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during conversion: Error grabbing Grapes --
[download failed: xerces#xercesImpl;2.9.1!xercesImpl.jar,
download failed: xml-apis#xml-apis;1.3.04!xml-apis.jar]
EDIT 1:
Tried running it from the command line, still same error message.
Tried grab artifacts
in IntelliJ, but that failed too:
I wondered if it was Mac related, and bingo. I uploaded this script to my CentOS server and it ran just fine. There is something related to MacOSX+groovy that is causing the problem.
Got it! It looks like it was the maven cache that was the problem.
I found the solution on this page:
rm -rf ~/.m2/repository ~/.groovy/grapes
I had previously tried removing the ~/.groovy/grapes
cache, but that didn't fix the problem. Removing the ~/.m2/repository
is what actually did it for me.
这篇关于Groovy现在安装HTTPBuilder Codehaus关机了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!