jeffwils / grails-spring-security-saml

Grails Spring Security SAML2.0 Plugin for Grails 3
8 stars 24 forks source link

Plugin includes superfluous domain classes #24

Closed irstevenson closed 6 years ago

irstevenson commented 6 years ago

Plugin version: 3.3.0 Grails version: 3.3.3

The JAR for this plugin includes the classes for the test domain classes (saml.TestRole, saml.TestSamlUser and saml.TestUserRole). And the META-INF/grails-plugin.xml then includes these as resources. This results in the creation of matching tables. I've confirmed this quickly by chaning the datasource in my test app to be a file based H2 database, and then inspecting the schema.

I came across this in my efforts to convert an internal plugin which also has the above three domain classes for testing. In trying to fix it I've been attempting to follow the documentation as per Customizing Plugin Contents. But at best this results in a broken plugin, as the references still remain in grails-plugin.xml, and then at start up it can't find those classes.

This plugin (saml) also has setup exclusions for domain classes in SpringSecuritySamlGrailsPlugin.groovy but unfortunately to no effect.

Ahhh, well while writing this I fixed my other plugin thanks to this:

It looks as though the syntax has changed for pluginExcludes - no package specific. So we need to:

P.S. I observed this is not new in 3.3.0, as I inspected the 3.1.2 JAR and its got the same.