Closed burtbeckwith closed 10 years ago
Just committed da334f1 into a new branch called downgrade_to_grails_2_0 in order to separate the grails version issue from the spock one. That commit would be a partial merge of this pull request, but I've tied it to the issue #34 that another guy filed in the meantime.
Now I understand why Burt tied the two issues into a single pull request: the spock plugin dependency is strictly related to the groovy (and hence grails) version used by the application. If we depend on a certain version of it, we get a strict dependency on a certain version of groovy, and hence of grails.
Since this is not the first time we have problems with the spock plugin (see https://code.google.com/p/grails-jaxrs/issues/detail?id=74 ) I just wonder what other plugins in the same needs do!
If there are no other solutions than letting the application developers add the explicit dependency on the right version on the spock plugin, we could go temporarily for this solution, and propose to grails guys to introduce a way for plugin developers to declare a coarse/virtual dependency on another plugin (i.e. the spock one).
That should result in:
Sorry for the long digression... Thoughts?
Perhaps we could pull our Spock specific classes out of the plugin and offer them as a third party jar?
I'm sorry, I don't know enough about Spock and the relevant integration spec classes... I expect that extracting them into a separate library we would end up with a plugin companion library whose versions should reflect spock/groovy versions compatibility.
Taking a wild guess on which use cases we should support:
Correct. I'll take a look at it and see if it's feasable
If needed, it could also become a companion plugin (dedicated to spock-related jaxrs tests)
Hi @burtbeckwith
This pull request should fix issue they are talking about: https://github.com/krasserm/grails-jaxrs/pull/36
The problem was that they had test related code outside the test scope, so they change the test dependencies scope from test to compile to make it work, but breaking compatibility with any other Grails version that is not 2.2 due to changes in spock support in Groovy 2.
Cheer
I'm closing this as I've applied the fixes separately.
Thanks for this. The JAX-RS plugin bundles special base REST-API integration spec classes, and these extend classes provided by the Spock plugin. So we either have to export the Spock plugin, or every user of the JAX-RS plugin will have to explicitly add a dependency on the Spock plugin. Is there a preferable solution?