How to skip plugin update prompt when running GRAILS run-app?

拟墨画扇 提交于 2019-12-23 09:40:18

问题


Started a new project using Grails RC3 (Windows 7 64 bit Java 1.6)

Installed spring-security-core plugin

Now whenever i do a GRAILS run-app it prompts me to upgrade webxml-1.4 to 1.3.1 over and over again

I use IntelliJ 10.5.3 and the console does not let me type NO so I can't use the IDE to debug.

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)

Thanks


回答1:


You could try setting the --non-interactive flag, which should skip prompts.

grails run-app --non-interactive

You can manage plugin dependencies in grails by setting this BuildConfig.groovy. 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

Just remember to remove the plugin reference from 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.




回答2:


Another way to do this without using --non-interactive is to configure this in scripts/.

Add this block to 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



来源:https://stackoverflow.com/questions/8375636/how-to-skip-plugin-update-prompt-when-running-grails-run-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!