We are in the process of upgrading our grails 2.0.3
application to grails 2.2.0
with groovy 2 and jdk 1.7. However, we found that grails 2.2.0
comes with protobuf-java 2.4.1
which is causing a mismatch with a jar that our application uses to talk to the backend. That system uses protobuf-java 2.3.0
. So any communication with that system fails.
We have tried excluding protobuf-java using the excludes tag in BuildConfig.groovy like so -
inherits("global") { excludes 'protobuf-java' }
We thought this would exclude only the version 2.4.1 that we got from grails. However, that seems to exclude all versions of this jar, even the one that we get as a transitive dependency from this jar we are using. If we try to use the excludes tag and then include the protobuf-java as a dependency in our pom with a version of 2.3.0, application restart fails with grails errors.
My questions:
Is there a way that I can exclude only the specific version of protobuf-java jar (ie 2.4.1) using the excludes jar
Is excluding one of the inherited dependencies of grails (protobuf java 2.4.1 in our case) and using a downgraded version advisable
If exclusion is not an option, is there any other better way of solving this issue