I'm attempting to package the spring-security-ldap and spring-security-core in a single plugin that supplies company standard domain-classes, controllers and some utilities. In addition, I would like to include LDAP configuration settings.
The intent is to create one plugin that all company applications can depend on for rapid development of new applications.
In my BuildConfig.groovy I have the following plugins:
compile ":spring-security-ldap:1.0.5"
compile ":spring-security-core:1.2.7"
Then in my plugin descriptor doWithSpring closure I have dynamic config settings:
config.grails.plugins.springsecurity.ldap.authorities.retrieveDatabaseRoles = true
config.grails.plugins.springsecurity.ldap.authorities.retrieveGroupRoles = true
config.grails.plugins.springsecurity.ldap.context.server = 'ldap://<myip>'
config.grails.plugins.springsecurity.ldap.context.managerDn = 'CN=<ldap_user>,CN=Users,DC=company,DC=local'
config.grails.plugins.springsecurity.ldap.context.managerPassword = 'secret'
config.grails.plugins.springsecurity.ldap.search.base //etc...
Now I also have a loadBefore
in my descriptor to say:
def loadBefore = ["springSecurityCore"]
This works great on my local machine, it's only when I have the CI software compile does it fail.
build 11-Oct-2013 09:26:30 C:\Users\me.grails\2.1.1\projects\MyApp\plugins\spring-security-ldap-1.0.5\src\java\org\codehaus\groovy\grails\plugins\springsecurity\ldap\DatabaseOnlyLdapAuthoritiesPopulator.java:22: error: package org.springframework.ldap.core does not exist build 11-Oct-2013 09:26:30 import org.springframework.ldap.core.DirContextOperations;
Is there any way to preset configuration information prior to the SpringSecurity plugins grab hold with their defaults?
Is there any way to "reload" the plugin configurations after I've changed them?
EDIT Example of plugin is now on Github