0

Maven Central から依存関係をダウンロードしようとしていますが、ホスト マシン (OS X) で動作しますが、CentOS を実行している vagrant ボックスで依存関係をダウンロードしようとするとエラーが発生します。

これはエラーです:

Could not resolve all dependencies for configuration ':compileClasspath'.
    Could not resolve org.slf4j:slf4j-api:1.7.21.
     Required by:
         :gradle-2.14.1:1.0.SNAPSHOT
       Could not resolve org.slf4j:slf4j-api:1.7.21.
          Could not initialize class org.apache.http.conn.ssl.SSLConnectionSocketFactory
       Could not resolve org.slf4j:slf4j-api:1.7.21.
          Could not initialize class org.apache.http.conn.ssl.SSLConnectionSocketFactory
       Could not resolve org.slf4j:slf4j-api:1.7.21.
          Could not initialize class org.apache.http.conn.ssl.SSLConnectionSocketFactory 

私のホストマシンでは動作しますが、vagrant マシンでは動作しないため、これは vagrant の問題のようです。このエラーについてインターネットで読んだところによると、プロキシの問題が原因のようです。

  • これは vagrant がプロキシとして機能していることを意味しますか?
  • もしそうなら、どのように設定しますか?

これが私のbuild.gradleファイルです:

apply plugin: 'java'

version = '1.0.SNAPSHOT'

sourceSets {
    main {
        java {
            exclude 'src/main/java/thirdparty/**'
            exclude 'src/main/java/thirdparty/closingmarket/**'
        }
    }
}

repositories {
    jcenter()
    mavenCentral()
    maven {
        url "https://mvnrepository.com/artifact"
    }
}

dependencies {
    compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.21'
}

Web サイト、wget に ping を実行し、yum リポジトリを問題なく使用できるため、これは特に混乱を招きます。

4

1 に答える 1