Gradle: не удалось разрешить org.sonarsource.scanner.api: sonar-scanner-api: 2.6 - PullRequest
0 голосов
/ 26 июня 2018

Я использую Gradle версии 4.8

gradle --version

------------------------------------------------------------
Gradle 4.8
------------------------------------------------------------

Build time:   2018-06-04 10:39:58 UTC
Revision:     9e1261240e412cbf61a5e3a5ab734f232b2f887d

Groovy:       2.4.12
Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM:          1.8.0_121 (Oracle Corporation 25.121-b13)
OS:           Mac OS X 10.12 x86_64

Вот часть моего build.gradle

buildscript {
    repositories {
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies { classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2" }
}

plugins {
    id "java"
    id "jacoco"
    //id "org.sonarqube" version "2.6.2"
    id "maven-publish"
}

// To apply a third-party plugin from an external build script,
// you have to use the plugin's fully qualified class name, rather than its ID
apply plugin: org.sonarqube.gradle.SonarQubePlugin

вот команда, которую я запускаю, и последующая ошибка

gradle --refresh-dependencies clean build

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'myProj'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve org.sonarsource.scanner.api:sonar-scanner-api:2.9.0.887.
     Required by:
         project : > org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2
      > Could not resolve org.sonarsource.scanner.api:sonar-scanner-api:2.9.0.887.
         > Could not get resource 'https://plugins.gradle.org/m2/org/sonarsource/scanner/api/sonar-scanner-api/2.9.0.887/sonar-scanner-api-2.9.0.887.pom'.
            > Could not HEAD 'https://plugins.gradle.org/m2/org/sonarsource/scanner/api/sonar-scanner-api/2.9.0.887/sonar-scanner-api-2.9.0.887.pom'.
               > Connection reset
      > Could not resolve org.sonarsource.scanner.api:sonar-scanner-api:2.9.0.887.
         > Could not get resource 'https://plugins.gradle.org/m2/org/sonarsource/scanner/api/sonar-scanner-api/2.9.0.887/sonar-scanner-api-2.9.0.887.pom'.
            > Could not HEAD 'https://plugins.gradle.org/m2/org/sonarsource/scanner/api/sonar-scanner-api/2.9.0.887/sonar-scanner-api-2.9.0.887.pom'.
               > Connection reset

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

как я могу это исправить? Почему я не могу разрешить зависимости Sonarqube?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...