1 year ago

#231437

test-img

WinterMute

Gradle not resolving mavenLocal() dependency

I have a problem with resolving local dependency. I have a lib that I want to provide across my projects. So I've published it locally. The build.gradle looks like this:

...
plugins {
    ...
    id("maven-publish")
    ...
}

publishing {
    publications {
        create<MavenPublication>("maven") {
            groupId = "com.wintermute.chatserver.core"
            artifactId = "core"
            version = "1.0"

            from(components["java"])
        }
    }
}

In the other project, which is requiring the dependency I've added in the build.gradle this:

repositories {
    mavenLocal()
    mavenCentral()
}

But when I try to resolve the dependencies gradle complains about not resolvable dependency:

Could not resolve com.wintermute.chatserver.core:core:1.0.
Required by:
    project :

It was successfull one time, then I've deleted the cache and since this it does not work anymore. Why is that? What I am doing wrong?

maven

gradle

maven-publish

0 Answers

Your Answer

Accepted video resources