I published a jar in my repo, lets call it A.jar, which generated following dependency in pom:
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180130</version>
<scope>compile</scope>
</dependency>
In another project, lets call it B, I have declared following dependency in the build.gradle:
compile 'my.test:A.jar' // With version etc, just to illustrate.
In the files used by this project B, I get following compile error:
error: cannot resolve symbol JSONArray
This JSONArray is part of the org.json.json library.
Am I forced from Project B build.gradle to add also the compile dependency for org.json? is this the default behaviour?
--> compile group: 'org.json', name: 'json', version: '20180130'
From my point of view, it should make sense that when I am already downloading required dependencies for A.jar, it also adds them as dependencies to Project B