Describe the bug
To Reproduce
We put the following dependency on our project:
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-serialization-json</artifactId>
<version>1.1.0-RC</version>
</dependency>
The following error is popping up:
[ERROR] Failed to execute goal on project web-api: Could not resolve dependencies for project co.c.prod.jp:web-api:jar:kotlinSerialization-000101: Failed to collect dependencies at org.jetbrains.kotlinx:kotlinx-serialization-json:jar:1.1.0-RC -> org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:jar:1.1.0-RC -> org.jetbrains.kotlin:kotlin-stdlib:jar:1.4.30-270: Failed to read artifact descriptor for org.jetbrains.kotlin:kotlin-stdlib:jar:1.4.30-270: Could not transfer artifact org.jetbrains.kotlin:kotlin-stdlib:pom:1.4.30-270 from/to central-maven (http://repo1.maven.org/maven2): Transfer failed for http://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.4.30-270/kotlin-stdlib-1.4.30-270.pom 501 HTTPS Required -> [Help 1]
It seems that 1.1.0-RC is declaring a dependency on the stdlib version 1.4.30-270, which is not available on repo1.
Expected behavior
Maven project should build with no issues.
Environment
I've got the same problem.
Adding an explicit dependency on org.jetbrains.kotlin:kotlin-stdlib-common:1.4.30 seems to have fixed the problem.
that worked partially for me, but I had to force kotlin-stdlib-common, kotlin-stdlib and kotlin-stdlib-jdk8 in many places, so I decided to fall back to the workaround of the 1.0 version (related issue here)
I already had a pinned dependency on kotlin-stdlib-jdk8 in my parent pom so only needed to add -common there, I didn't need to pin any versions anywhere else.
NB: To be clear, Maven still gives me a lot of errors on this artifact not being available, however since the version is overridden by my pinned version in the parent POM dependency management, Maven can continue despite the error.
So it works, but is not ideal.
it didn't work for me, unfortunately, maven was still trying to download non-released versions.
Are you guys planning another RC soon?
I find it very weird that something is published on a release repo, but has dependencies that are not resolvable on that same repo. That's probably preventing quite a few people to try the RC, which is probably not what we want with an RC, right?
I excluded kotlin-stdlib and kotlin-stdlib-common, that force to use kotlin 1.4.30
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>1.4.30</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-serialization-json</artifactId>
<version>1.1.0-RC</version>
<exclusions>
<exclusion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
</exclusion>
<exclusion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-common</artifactId>
</exclusion>
</exclusions>
</dependency>
I think it can be closed now that version 1.1.0 is out
I think it can be closed now that version 1.1.0 is out
Indeed it seems so, I removed the exclusions and there do not appear to be any errors in the Maven project. The dependencies now point to Kotlin 1.4.30 final versions.
However, I think it's something for JetBrains to pay attention to for the next RC release that is published to Maven Central.
Most helpful comment
I excluded kotlin-stdlib and kotlin-stdlib-common, that force to use kotlin 1.4.30