为什么grails run-app在编译期间尝试访问远程服务器

Yi.*_*Yi. 3 grails

我发现在我的grails应用程序编译期间有一些错误.

| 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
Run Code Online (Sandbox Code Playgroud)

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

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

Igo*_*nov 9

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

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

grails --offline run-app
Run Code Online (Sandbox Code Playgroud)

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

grails.offline.mode=true 
Run Code Online (Sandbox Code Playgroud)

请参阅Dependecy Resoultion的文档 - http://grails.org/doc/2.0.4/guide/conf.html#3.7.2%20Dependency%20Repositories

PS的最新稳定版本四郎插件1.1.4,你还可以用它来代替的1.2.0-SNAPSHOT.稳定版只会下载一次.