# Transitive vs module dependency issue

**URL:** <https://discuss.gradle.org/t/transitive-vs-module-dependency-issue/24880>\
**Category:** Help/Discuss\
**Created:** [November 22, 2017, 1:48am UTC](https://discuss.gradle.org/t/transitive-vs-module-dependency-issue/24880 "2017-11-22T01:48:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oraculo](https://avatars.discourse-cdn.com/v4/letter/o/d2c977/32.png) [@Oraculo](https://discuss.gradle.org/u/Oraculo)\
**Post date:** [November 22, 2017, 1:48am UTC](https://discuss.gradle.org/t/transitive-vs-module-dependency-issue/24880/1 "2017-11-22T01:48:47Z")

</div>

Good afternoon,

Faced pretty interesting behavior I can not explain. Situation is pretty simple. We have small multi-module project with two submodules, one is api library, i.e. ‘ **com.company.web:api** ’, second submodule is a war application which has it’s own source, UI files and depends on api module as ‘**compile project(“:api”)**’. Recently new dependency was introduced in war module (another api jar) which also depends on ‘ **api** ’, adding transitive dependency on it. The problem is even though transitive dependency is a bit out of date Gradle does not perceive it as a conflict but packages two version of jar into war file, causing runtime issues:

> ~/projects/web/service$ gradle -q dependencyInsight --configuration compile --dependency api  
> project :api  
> -– compile
> 
> com.company.web:api:1.1.6

GroupId and ArtifactId are the same, so I would expect Gradle to identify this as conflict, while it keeps thinking that these are absolutely different artifacts. For sure quick workaround is:

> configurations.compile.resolutionStrategy.dependencySubstitution {  
> substitute module(‘com.company.web:api’) with project(‘:api’)  
> }

But I have a feeling that it might be kind of a bug, or feature I don’t understand. Checked dependency management manual and did not find anything related to this situation.

Any advice is appreciated.

---

<div class="post-metadata">

**Author:** ![st\_oehme](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/st_oehme/32/5249_2.png) [@st\_oehme](https://discuss.gradle.org/u/st_oehme)\
**Post date:** [November 22, 2017, 9:37am UTC](https://discuss.gradle.org/t/transitive-vs-module-dependency-issue/24880/2 "2017-11-22T09:37:15Z")

</div>

> [@Oraculo](#):
>
> GroupId and ArtifactId are the same

Gradle uses `project.group` and `project.name` for project dependencies. Make sure that your api project has these set correctly.

---

<div class="post-metadata">

**Author:** ![Oraculo](https://avatars.discourse-cdn.com/v4/letter/o/d2c977/32.png) [@Oraculo](https://discuss.gradle.org/u/Oraculo)\
**Post date:** [November 22, 2017, 6:47pm UTC](https://discuss.gradle.org/t/transitive-vs-module-dependency-issue/24880/3 "2017-11-22T18:47:45Z")

</div>

Thanks a lot, now I see the problem, we set Maven publishing properties but they do not correspond to project name/goup
