1
在我的gradle.properties文件上運行gradle build
時出現以下錯誤。Gradle:錯誤列表版本的junit#junit; 4. +
我知道我在防火牆後面,我有一個我可以使用的poxy。我已經嘗試將下面的內容添加到我的gradle.properties文件中,但我無法拉下jUnit。所有幫助讚賞!
systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
錯誤:
Error listing versions of junit#junit;4.+ using class
org.gradle.api.internal.artifacts.repositories.resolver.MavenVersionLister$1.
Will attempt an alternate way to list versions. This behaviour has been
deprecated and is scheduled to be removed in Gradle 2.0
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':testRuntime'.
> Could not resolve junit:junit:4.+.
Required by:
:HealthMonitor:1.0
> Failed to list versions for junit#junit;4.+.
> Could not list versions using M2 pattern 'http://repo1.maven.org/maven2/
[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]'.
> Could not GET 'http://repo1.maven.org/maven2/junit/junit/'.
> Connection to http://repo1.maven.org refused
的build.gradle:
apply plugin: 'java'
apply plugin: 'eclipse'
version = '1.0'
jar {
manifest {
attributes 'Implementation-Title': 'Health Monitor', 'Implementation-Version': version
}
}
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.+'
}