1

I am facing an issue in a multi-project Spring Boot gradle build. I have some common jars, and a base jar that extends the common jars. One such common jar uses Hazelcast 3.8.2.

Now, I am expecting when I use that common project as a dependency to a downstream project, the same libraries (with expected version) would be added transitively. However, unless I specifically mention the version of Hazelcast in the downstream project, a different version is being added.

I tried by manually excluding the dependency as well, like

compile("org.springframework.boot:spring-boot-starter"){
    exclude group:"com.hazelcast"
}

However, that did not work either. Using Spring Boot gradle plugin 1.4.4.RELEASE. Is this an issue with Spring Boot gradle plugin?

Thanks

sutanu dalui
  • 663
  • 7
  • 25
  • `spring-boot-gradle-plugin` forces specific versions that are known to work with spring boot. The same happens when you try to use Flyway 4, it always forces back to 3.2.1. – Marcelo Jun 13 '17 at 09:55
  • It's better to keep configuration to minimum and when you use some starter from Spring Boot only verified dependencies will be used, this also helps with upgrades because you need to change only version of Spring Boot in most cases. If you really need to force to use proper version of dependency it's easy to achieve using [DependencyResolutionStrategy](https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.ResolutionStrategy.html#org.gradle.api.artifacts.ResolutionStrategy:force(java.lang.Object%5B%5D)) – webdizz Jun 13 '17 at 21:08

0 Answers0