views:

19

answers:

1

Hi

I'm seeking how to exclude plugins for specific environments. According to GRAILS documentation, starting with 1.3.5 it's now possible to disable a bunch of plugins. For example, I add the jetty plugin for local testing, but don't need it for deployment. I try to use the following in Config.groovy:

envname {
        . . .
        plugin {
            excludes = [ 'tomcat', 'jetty' ]
        }
}

But still, there's jetty jars in war file. I tred also

    plugin.excludes = [ 'tomcat', 'jetty' ]

This doesn't work as well:

plugin.excludes = 'tomcat, jetty'

But also without any luck. Does anybody has a working example? Thanks! P.S. Of course, war is being packaged with:

grails -Dgrails.env=envname war

A: 

I think disabling and excluding aren't the same thing. In any event, I couldn't find a reference to what you are saying is possible in 1.3.5. It isn't in the release notes. I did see this in the 1.1 release notes if you look under Plugin Scopes:

http://grails.org/1.1+Release+Notes

Do you have a link to the 1.3.5 specific info about what you're trying to achieve?

Gregg
Hi Gregg! According to http://www.grails.org/doc/latest/guide/3.%20Configuration.html#3.7.10 Plugin Dependencies, one can disable certain pluginsAccording to the issue 6653 http://jira.codehaus.org/browse/GRAILS-6653 , latter syntax should work (bug was fixed in 1.3.5).Thanks for your suggestion about disabling a plugin in certain scope, but as far as I understand, this method requires plugin recompilation.I just wandering, maybe it's possible to completely exclude the plugins from the WAR via hook etc.
BaRoN
Also edited the question text to always state that I need not to just disable but completely exclude the plugin for specified environment, thank you for suggestion.
BaRoN