mikehearn
07/28/2022, 1:52 PMUnable to find a variant of org.jetbrains.kotlin:kotlin-test:1.6.10
? This just started now so I'm wondering if someone accidentally yanked an artifact from some repository. Not sure what the best channel to ask about this is.tapchicoma
07/28/2022, 1:56 PMmikehearn
07/28/2022, 1:57 PM> Could not resolve all files for configuration ':hydraulic.conveyor.tools.pom2json:testRuntimeClasspath'.
> Could not resolve org.jetbrains.kotlin:kotlin-test:1.6.10.
Required by:
project :hydraulic.conveyor.tools.pom2json
> Unable to find a variant of org.jetbrains.kotlin:kotlin-test:1.6.10 providing the requested capability org.jetbrains.kotlin:kotlin-test-framework-junit5:
- Variant compile provides org.jetbrains.kotlin:kotlin-test:1.6.10
- Variant runtime provides org.jetbrains.kotlin:kotlin-test:1.6.10
- Variant platform-compile provides org.jetbrains.kotlin:kotlin-test-derived-platform:1.6.10
- Variant platform-runtime provides org.jetbrains.kotlin:kotlin-test-derived-platform:1.6.10
- Variant enforced-platform-compile provides org.jetbrains.kotlin:kotlin-test-derived-enforced-platform:1.6.10
- Variant enforced-platform-runtime provides org.jetbrains.kotlin:kotlin-test-derived-enforced-platform:1.6.10
(there is no stack trace, I can use the --stacktrace flag if you want)tapchicoma
07/28/2022, 1:58 PMmikehearn
07/28/2022, 2:00 PMmbonnin
07/28/2022, 2:02 PMmikehearn
07/28/2022, 2:21 PM"kotlin-test-framework-impl"
and "kotlin-test-junit5"
but not kotlin-test-framework-junit5
indeed.Vampire
07/28/2022, 4:30 PM--refresh-dependencies
fixes is.mikehearn
07/28/2022, 5:33 PMmavenLocal()
had been placed above mavenCentral()
. Didn't matter until today - presumably recently I opened a project that resolved kotlin-test into the local repository, at which point Gradle started finding the artifacts but not the gradle .module file. It was confusing because the error message does name some variants that the artifact exports so it took a while to think of this, as there's no useful debug logging that showed where it was trying to resolve from. Presumably, the variants it names are synthetic.Vampire
07/28/2022, 5:36 PMmavenLocal()
if possible.
And if you really need to, then you should at least use a repository content filter to only take things from there you know are good.
Maven local repository is broken by design.
It is not a pure repository, it is a mixture of repository and cache for Maven.
So as soon as a Maven project requested some file it is cached there, and then Gradle sees a broken state like you observed.Paul Woitaschek
07/30/2022, 1:25 PMexclusiveContent
for everything but mavenCentral and googlegildor
08/01/2022, 3:55 PMilya.gorbunov
08/01/2022, 5:43 PMVampire
08/01/2022, 5:50 PMmavenLocal()
ilya.gorbunov
08/01/2022, 5:57 PMmavenLocal
repository declared above the repo from which the artifacts should have been resolved.Vampire
08/01/2022, 6:00 PM