There are already a lot of topics regarding mavenLocal()
, but I think I’ve stumbled upon something different.
I have a lib build by Maven and main project that uses Gradle. Since I’m debugging lib, I’m using HEAD-SNAPSHOT
version from oss.sonatype.org:
repositories {
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
mavenCentral()
}
dependencies {
compile 'com.github.tdesjardins:gwt-ol3:HEAD-SNAPSHOT'
}
If I now list dependencies, I get gwt-ol3
and all of it’s transitive dependencies, as expected.
However, if I download, build and install that lib locally and add mavenLocal()
to repositories:
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile 'com.github.tdesjardins:gwt-ol3:HEAD-SNAPSHOT'
}
Now I’m getting only gwt-ol3
, but none of it dependencies. And here is the fun part - if I substitute mavenLocal()
with a url pointing to my local folder where it is located:
repositories {
maven {
url '/home/gkresic/.m2/repository'
}
mavenCentral()
}
dependencies {
compile 'com.github.tdesjardins:gwt-ol3:HEAD-SNAPSHOT'
}
then I get all the dependencies right again.
Things I’ve verified:
- POM in local repo is exactly the same as the one on oss.sonatype.org
- if I create blank Maven project with same configuration, I get dependencies right
Gradle is at latest version, 4.0.1.