Home > Blockchain >  Failed to read artifact descriptor for pom.xml in VSCode
Failed to read artifact descriptor for pom.xml in VSCode

Time:09-14

I am trying to run a Java project in VSCode but I am getting this error:

    Failed to read artifact descriptor for org.springdoc:springdoc-openapi-ui:jar:1.6.4
    
    org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.springdoc:springdoc-openapi-ui:jar:1.6.4
/.../
        at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
    Caused by: org.apache.maven.model.resolution.UnresolvableModelException: org.springframework.cloud:spring-cloud-netflix-dependencies:pom:3.1.0 failed to transfer from https://repo.spring.io/release during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spring-release has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.cloud:spring-cloud-netflix-dependencies:pom:3.1.0 from/to spring-release (https://repo.spring.io/release): Connect timed out
        at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:176)
        at org.apache.maven.model.building.DefaultModelBuilder.importDependencyManagement(DefaultModelBuilder.java:1347)
        at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:544)
        at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:454)
        at org.apache.maven.model.building.DefaultModelBuilder.importDependencyManagement(DefaultModelBuilder.java:1381)
        at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:544)
        at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:454)
        at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:267)
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:293)
        ... 34 more
    Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: org.springframework.cloud:spring-cloud-netflix-dependencies:pom:3.1.0 failed to transfer from https://repo.spring.io/release during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spring-release has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.cloud:spring-cloud-netflix-dependencies:pom:3.1.0 from/to spring-release (https://repo.spring.io/release): Connect timed out
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:425)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:229)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:207)
        at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:172)
        ... 42 more
    Caused by: org.eclipse.aether.transfer.ArtifactTransferException: org.springframework.cloud:spring-cloud-netflix-dependencies:pom:3.1.0 failed to transfer from https://repo.spring.io/release during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spring-release has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.cloud:spring-cloud-netflix-dependencies:pom:3.1.0 from/to spring-release (https://repo.spring.io/release): Connect timed out
        at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:225)
        at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:189)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:574)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:484)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:402)
        ... 45 more
    Java(0)
    Missing artifact org.springframework.boot:spring-boot-starter:jar:2.7.1Java(0)
    /.../
    
    Missing artifact com.google.auto.value:auto-value-annotations:jar:1.9Java(0)
    Missing artifact org.springdoc:springdoc-openapi-ui:jar:1.6.4Java(0)

I installed the latest versions of Maven and JDK and also added them to PATH and verified the installation, but no success in running the project. Could anyone help me with this?

CodePudding user response:

I checked JAVA_HOME in my path, then I used mvn -U clean install in VSCode terminal. After reloading the window it is fixed

  • Related