我正在尝试从Maven Central下载一个依赖项,并且它可以在我的主机(OS X)上运行,但是当我尝试在运行CentOS的无聊的盒子中下载依赖项时出现错误。
这是错误:
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
由于它可以在我的主机上运行,而不在我的流浪者计算机上运行,所以这似乎是流浪者的问题。从我在Internet上阅读的有关此错误的内容看,它似乎是由代理问题引起的。
这是我的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'
}
这尤其令人困惑,因为我可以ping网站,wget并使用yum存储库就很好了。
该问题原来是供应商的问题。从Oracle的安装切换到openJDK 1.6之后,我现在可以下载依赖项。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句