[英]How to skip plugin update prompt when running GRAILS run-app?
Started a new project using Grails RC3 (Windows 7 64 bit Java 1.6) 使用Grails RC3(Windows 7 64位Java 1.6)开始一个新项目
Installed spring-security-core plugin 安装了spring-security-core插件
Now whenever i do a GRAILS run-app it prompts me to upgrade webxml-1.4 to 1.3.1 over and over again 现在每当我做一个GRAILS run-app时,它会提示我一遍又一遍地将webxml-1.4升级到1.3.1
I use IntelliJ 10.5.3 and the console does not let me type NO so I can't use the IDE to debug. 我使用IntelliJ 10.5.3并且控制台不允许我输入NO,所以我无法使用IDE进行调试。
Possible solutions I see in order of preference - Find a way to skip the plugin upgrade question - Manually modify the spring-security-core config somewhere to depend on webxml 1.4 - Switch to STS to develop (Console works in STS) 我按优先顺序看到的可能的解决方案 - 找到一种跳过插件升级问题的方法 - 手动修改spring-security-core配置以依赖webxml 1.4 - 切换到STS开发(控制台在STS中工作)
Thanks 谢谢
You could try setting the --non-interactive flag, which should skip prompts. 您可以尝试设置--non-interactive标志,该标志应跳过提示。
grails run-app --non-interactive
You can manage plugin dependencies in grails by setting this BuildConfig.groovy. 您可以通过设置此BuildConfig.groovy来管理grails中的插件依赖项。 See the plugin exclusions section in the User Guide -
请参阅“用户指南”中的插件排除部分 -
http://grails.org/doc/1.3.7/guide/3.%20Configuration.html#3.7.10%20Plugin%20Dependencies http://grails.org/doc/1.3.7/guide/3.%20Configuration.html#3.7.10%20Plugin%20Dependencies
Just remember to remove the plugin reference from application.properties 请记住从application.properties中删除插件引用
Note: for grails 1.3.7 grails --non-interactive run-app
will not work the switch has to come after the command as above. 注意:对于grails 1.3.7
grails --non-interactive run-app
将无法工作,交换机必须在命令之后如上所述。
Another way to do this without using --non-interactive
is to configure this in scripts/
. 不使用
--non-interactive
另一种方法是在scripts/
配置它。
Add this block to scripts/_Events.groovy
: 将此块添加到
scripts/_Events.groovy
:
def resolveDependenciesWasInteractive = false
eventResolveDependenciesStart = {
resolveDependenciesWasInteractive = isInteractive
isInteractive = false
}
eventResolveDependenciesEnd = {
isInteractive = resolveDependenciesWasInteractive
}
Taken from: http://ldaley.com/post/2616518761/disabling-grails-plugin-upgrade-confirmation 摘自: http : //ldaley.com/post/2616518761/disabling-grails-plugin-upgrade-confirmation
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.