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

2

7

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

Tetreault answered 4/12, 2011 at 13:30 Comment(0)
H
12

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.

Hydracid answered 4/12, 2011 at 18:52 Comment(1)
Finally got it working after flushing the user/grails/project directory in Windows and of course a grails clean. Extra thanks for the application.properties removal notice as IntelliJ adds it automatically.Tetreault
R
1

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

Roderich answered 1/5, 2016 at 12:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.