Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)

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

like image 633
Stephane Rainville Avatar asked Dec 04 '11 13:12

Stephane Rainville


2 Answers

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.

like image 135
Tomas Lin Avatar answered Nov 11 '22 17:11

Tomas Lin


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

like image 25
Tuomas Valtonen Avatar answered Nov 11 '22 17:11

Tuomas Valtonen