question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to use 1.1.0-RC with maven and just release repositories

See original GitHub issue

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

  • Kotlin version: 1.4.30
  • Library version: 1.1.0-RC
  • Kotlin platforms: JVM
  • Maven version: 3.6.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:8

github_iconTop GitHub Comments

2reactions
NatsuOnFirecommented, Feb 15, 2021

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>
1reaction
tnleeuwcommented, Feb 22, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maven Could not resolve dependencies, artifacts could not be ...
The artifactId for all the dependencies that failed to download are incorrect ... <repository> <id>org.springframework.maven.release</id> <name>Spring Maven ...
Read more >
Maven Getting Started Guide
How do I compile my test sources and run my unit tests? ... is released as version 1.0, and the new development version...
Read more >
org.codehaus.groovy - Maven Repository
License, Apache 2.0. Categories, JVM Languages. Tags, jvmlanguagegroovycodehaus. Ranking, #98 in MvnRepository (See Top Artifacts) #5 in JVM Languages.
Read more >
Maven Central Repository Search
Official search by the maintainers of Maven Central Repository. ... Introducing the new look of The Central Repository, designed to address artifact search ......
Read more >
Maven Error: Failed to collect dependencies - When trying to ...
Check the release notes if you really want to use 3.8.4 jars only then raise a ticket with MuleSoft. Else go to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found