3

我发现在我的 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

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

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

4

1 回答 1

10

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

要禁用可用于--offline离线工作的远程存储库:

grails --offline run-app

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

grails.offline.mode=true 

请参阅 Dependecy Resoultion 的文档 - https://grails.github.io/grails2-doc/2.0.4/guide/conf.html#dependencyRepositories

PS Shiro 插件的最新稳定版是1.1.4,你也可以用它来代替1.2.0-SNAPSHOT. 稳定版只会下载一次。

于 2013-03-18T06:30:15.667 回答