# Gradle dependency conflict resolution debugging

**URL:** <https://discuss.gradle.org/t/gradle-dependency-conflict-resolution-debugging/13036>\
**Category:** Help/Discuss\
**Tags:** plugins\
**Created:** [December 2, 2015, 7:17pm UTC](https://discuss.gradle.org/t/gradle-dependency-conflict-resolution-debugging/13036 "2015-12-02T19:17:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tigran](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@Tigran](https://discuss.gradle.org/u/Tigran)\
**Post date:** [December 2, 2015, 7:17pm UTC](https://discuss.gradle.org/t/gradle-dependency-conflict-resolution-debugging/13036/1 "2015-12-02T19:17:10Z")

</div>

I am having multiple version of dependency of spring and gradle do weird conflict resolution.

```
| | +--- org.springframework.data:spring-data-redis:1.1.0.RELEASE
| | | +--- org.springframework:spring-context:3.1.4.RELEASE -> 4.0.0.M3 (*)

```

Basically it boost version from 3.1.4.RELEASE to 4.0.0.M3 and I cannot understand why. There are no reference for spring 4.0.0.M3 whatsoever. It is being pulled transitively, but no top artifact uses latest spring. I checked maven repositories and they have newest version of spring, so I cannot claim that gradle blindly takes last one version.

How can I troubleshoot it? I enabled debug, but there is no explanation why.  
That’s first appearance for version 4.0.0.

```
10:41:39.499 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.IvyXmlModuleDescriptorParser] post 1.3 ivy file: using exact as default matcher
10:41:39.501 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository] Using cached module metadata for module 'org.springframework:spring-tx:4.0.0.M3' in 'maven2'
```

---

<div class="post-metadata">

**Author:** ![sterling](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/sterling/32/5395_2.png) [@sterling](https://discuss.gradle.org/u/sterling)\
**Post date:** [December 2, 2015, 9:39pm UTC](https://discuss.gradle.org/t/gradle-dependency-conflict-resolution-debugging/13036/2 "2015-12-02T21:39:50Z")

</div>

If there are conflicting versions of the same dependency (e.g., spring-context in your case), Gradle will choose the latest version by default. spring-data-redis depends on 3.1.4.RELEASE of spring-context, but spring-tx depends on 4.0.0.M3 of spring-context. Gradle will choose 4.0.0.M3.

You can see this if you use `gradle dependencyInsight --dependency spring-context --configuration <your configuration name, probably compile?>` Dependency insight shows you where a particular dependency came from.

You can read more here: [https://docs.gradle.org/current/userguide/dependency\_management.html#sub:version\_conflicts](https://docs.gradle.org/current/userguide/dependency_management.html#sub:version_conflicts)

You can enforce a particular version for spring-context by forcing it.
