Phạm Lam
11/29/2024, 3:35 PM<https://packages.jetbrains.team/maven/p/teamcity-rest-client/teamcity-rest-client>
In dependencyResolutionManagement
, when I declare plugin portal first, the builds keep failing saying can't find the lib and only 1 location, the plugin portal, searched
dependencyResolutionManagement {
repositories {
gradlePluginPortal()
maven(url = "<https://packages.jetbrains.team/maven/p/teamcity-rest-client/teamcity-rest-client>")
}
}
When I move the private repo to top, it works well. I wonder why gradle doesn't keep searching in the first scenario
maven(url = "<https://packages.jetbrains.team/maven/p/teamcity-rest-client/teamcity-rest-client>")
gradlePluginPortal()
More strangely, this issue seem to happen only in my local, builds on CI look wellVampire
11/29/2024, 4:01 PMPhạm Lam
11/29/2024, 4:03 PM> Could not resolve all files for configuration ':monkey:compileClasspath'.
> Could not find teamcity-rest-client-1.7.23.jar (org.jetbrains.teamcity:teamcity-rest-client:1.7.23).
Searched in the following locations:
<https://plugins.gradle.org/m2/org/jetbrains/teamcity/teamcity-rest-client/1.7.23/teamcity-rest-client-1.7.23.jar>
Vampire
11/29/2024, 4:17 PMVampire
11/29/2024, 4:21 PM--info
or --debug
should also give some more information like how the request failed. Make sure to add --refresh-dependencies
too so that Gradle does not remember the result.Julien Plissonneau Duquène
11/29/2024, 4:32 PMrepositories {
maven {
name = "Gradle public repository"
url = uri("<https://repo.gradle.org/gradle/public>")
content {
includeGroup("net.rubygrapefruit")
includeModule("flot", "flot")
includeModule("org.gradle", "gradle-tooling-api")
includeModule("org.gradle.buildtool.internal", "configuration-cache-report")
includeModule("org.gradle.buildtool.internal", "gradle-ide-starter")
}
}
//...
}
https://github.com/gradle/gradle/blob/master/build-logic-commons/gradle-plugin/src/main/kotlin/gradlebuild.repositories.gradle.ktsVampire
11/29/2024, 4:40 PMJulien Plissonneau Duquène
11/29/2024, 4:48 PMmavenCentral()
or gradlePluginPortal()
last, so there must be something about thatVampire
11/29/2024, 4:55 PMVampire
11/29/2024, 4:55 PMPhạm Lam
11/29/2024, 5:10 PM--refresh-dependencies
flag and it works nowPhạm Lam
11/29/2024, 5:11 PM