2

I would like to disable a specific plugin while running in development mode. Is there a generic way to achieve this in Grails 3.x?

I found the following solutions for Grails 2.x, but they won't work for Grails 3 since it uses Gradle instead of BuildConfig.groovy:

Specifically, I am looking for a way to disable the LDAP sub-plugin for the Spring Security plugin, when running in local development mode.

UPDATE: I found that org.grails.plugins.DefaultGrailsPlugin has an isEnabled method, that returns a boolean based on whether the plugin's profiles list matches the set of active profiles (e.g. "development").

But the private method that initalizes the profiles list (evaluateProfiles) appears not to be called anywhere (it should probably be called in initialisePlugin, along with other evaluate* methods).

Community
  • 1
  • 1
GreenGiant
  • 4,930
  • 1
  • 46
  • 76
  • Looking at the [source code](https://github.com/grails-plugins/grails-spring-security-ldap/blob/master/src/main/groovy/grails/plugin/springsecurity/ldap/SpringSecurityLdapGrailsPlugin.groovy), I found that you can specify `grails.plugin.springsecurity.ldap.active = false` in your configuration to disabled the LDAP plugin. However, this is specific to this plugin, not a general solution. – GreenGiant Dec 28 '16 at 23:10

0 Answers0