为什么grails run-app在编译期间尝试访问远程服务器 [英] Why grails run-app tries to access remote servers during compiling

查看:178
本文介绍了为什么grails run-app在编译期间尝试访问远程服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现在我的grails应用程序编译过程中出现了一些错误。

  |加载Grails 2.0.4 
|配置classpath
:: problems摘要::
::::错误
服务器访问错误:服务器$ b $ url url = http://plugins.grails.org /grails-shiro/tags/RELEASE_1_2_0-SNAPSHOT/shiro-1.2.0-SNAPSHOT.pom

但我可以使用我的浏览器访问上述网址。错误是什么意思?在编译期间有什么办法可以避免这些问题?或者我可以在本地编译我的grails应用程序?



当我需要一些grails插件时,我通常运行
grails install-plugin xxx
来安装xxx插件。我注意到有一些记录自动写入'application.properties'中。插件总是安装在我的〜/ .grails // projects / plugins /中,我想知道是否有方法在本地编译Grails应用程序?

解决方案

您有一个 SNAPSHOT 插件,这意味着Grails必须定期刷新此插件(每天一次)。



要禁用远程存储库,您可以使用 - offline 工作离线:

  grails --offline run-app 

或者通过添加到 BuildConfig.groovy 中完全禁用它:

  grails.offline.mode = true 

请参阅相关文件解析 - http://grails.org/doc/2.0.4/ guide / conf.html#3.7.2%20Dependency%20Repositories

PS Shiro插件的最新稳定版本是 1.1.4 ,您也可以使用而不是 1.2.0-SNAPSHOT 。稳定版本只会下载一次。


I found there are some errors during my grails application compiling.

| Loading Grails 2.0.4
| Configuring classpath
:: problems summary ::
:::: ERRORS
Server access Error: Unexpected end of file from server 
url=http://plugins.grails.org/grails-shiro/tags/RELEASE_1_2_0-SNAPSHOT/shiro-1.2.0-SNAPSHOT.pom

But I can access the above url using my browser. What does the error mean? and is there any way to avoid such problems during compiling? Or can I compile my grails app locally?

when I need some grails plugin, I usually run grails install-plugin xxx to install xxx plugins. I noticed that there are some records automatically written in 'application.properties'. And the plugins are always installed in my ~/.grails//projects/plugins/, I am wondering whether there are ways to compile grails app locally?

解决方案

You have a SNAPSHOT plugin, that means that Grails have to refresh this plugin periodically (once a day).

To disable remote repositories you can use --offline to work offline:

grails --offline run-app

Or disable it completelly by adding into BuildConfig.groovy:

grails.offline.mode=true 

See docs for Dependecy Resoultion - http://grails.org/doc/2.0.4/guide/conf.html#3.7.2%20Dependency%20Repositories

P.S. Latest stable version of Shiro plugin is 1.1.4, you could also use it instead of 1.2.0-SNAPSHOT. Stable version will be downloaded only once.

这篇关于为什么grails run-app在编译期间尝试访问远程服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆