jeffwils / grails-spring-security-saml

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

#24 - Exclude test domain classes from package #27

Closed irstevenson closed 6 years ago

irstevenson commented 6 years ago

Needed to use the new configuration and exclusion idiom to ensure that the three test domain classes are not in the distributed JAR. This involves an exclusion SpringSecuritySamlGrailsPlugin to ensure no resource entries in the grails-plugin.xml; and then also a jar block to exclude the classes from the final JAR.

Testing

After doing a ./gradlew jar and making sure that the classes were not in the JAR and no mentions in META-INF/grails-plugin.xml, I did a ./gradlew install and tested in my test app. All still worked, and on inspecting the schema of a file based H2 instance, confirmed the additional tables were no longer being created.

irstevenson commented 6 years ago

Heya @valentingoebel ,

I've pretty well tested this, but if you could give it a quick sanity check that'd be great. If not, I'll go ahead and merge in the next day or two. ;)

Cheers.

valentingoebel commented 6 years ago

I can confirm that the jar file no longer contains the test classes. The grails uml plugin also no longer shows the domain classes.