gpt4 book ai didi

grails - 当我将应用程序复制到新计算机时,Grails希望降级我的插件

转载 作者:行者123 更新时间:2023-12-02 15:02:14 24 4
gpt4 key购买 nike

当我将我的应用复制到另一台机器上并执行“grails run-app”操作时,grails似乎在更新其本地插件方面跳过了一步。 (我的意思是第一台计算机刚刚完成Downloading: plugins-list.xml,但是当我在第二台计算机上运行该应用程序时,新计算机将不会执行该步骤。)我收到以下消息:

Loading Grails 2.0.3
Configuring classpath

Environment set to development.....
Packaging Grails application
You currently already have a version of the plugin installed [resources-1.1.6]. Do you want to update to [resources-1.1.5]? [y,n] n
Plugin resources-1.1.5 install aborted
Compiling 92 source files

我是否正在正确诊断此问题,以及如何强制进行更新?另外,如果我接受降级,我的应用程序也会中断。不确定该怎么做,因为它在1.1.5上工作了一段时间。

我感觉正在发生的事情是,当grails的插件魔术最近一次更新时,grails在项目中做了一个注释,因此当我移动项目时,其他grails错误地认为它刚刚更新。这完全正确吗?

最佳答案

您是在BuildConfig.groovy文件中指定插件还是要使用install-plugin命令“安装”插件?我的读物表明不再建议使用install-plugin命令,而应该在BuildConfig.groovy文件中指定插件,然后Grails会处理该插件,而不管您在什么计算机上部署。

例:

plugins {
/*
* build - dependency that is only needed by the build process
* compile - dependency that is needed at both compile-time and runtime. This is the most common case
* provided - dependency that is needed at compile-time but should not be packaged with the app (usually because it is provided by the container). An example is the Servlet API
* runtime - dependency that is needed to run the application, but not compile it e.g. JDBC implementation for specific database vendor. This would not typically be needed at compile-time because code depends only the JDBC API, rather than a specific implementation thereof
* test - dependency that is only needed by the tests
*/
runtime ":cached-resources:1.0"
runtime ":database-migration:1.1"
runtime ":hibernate:$grailsVersion"
runtime ":jquery:1.7.1"
runtime ":resources:1.1.6"
runtime ":yui-minify-resources:0.1.4"
runtime ":zipped-resources:1.0"

compile ":cache-headers:1.1.5"
compile ":commentable:0.8.1"
compile ":jquery-ui:1.8.15"
compile ":joda-time:1.4"
compile ":searchable:0.6.3"
compile ":spring-security-ldap:1.0.6" // Also installs spring-security-core

build ":tomcat:$grailsVersion"

}

还要注意,某些插件在 dependencies文件的 BuildConfig.groovy部分中也需要一个特殊的条目。 JodaTime插件就是这样一种插件。
dependencies {
compile "org.jadira.usertype:usertype.jodatime:1.9"
}

插件的文档应指定 dependencies节中是否需要任何条目。

关于grails - 当我将应用程序复制到新计算机时,Grails希望降级我的插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11424420/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com