我正在尝试在我的机器上创建一个serenity项目。为此,我在一个本地目录中创建了下面的build.gradle文件,并执行了命令gradle build。
repositories {
mavenLocal()
jcenter()
}
buildscript {
repositories {
mavenLocal()
jcenter()
}
dependencies {
classpath("net.serenity-bdd:serenity-gradle-plugin:1.0.47")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'net.serenity-bdd.aggregator'
dependencies {
testCompile 'net.serenity-bdd:core:1.0.47'
testCompile 'net.serenity-bdd:serenity-junit:1.0.47'
testCompile('junit:junit:4.11')
testCompile('org.assertj:assertj-core:1.7.0')
testCompile('org.slf4j:slf4j-simple:1.7.7')
}
gradle.startParameter.continueOnFailure = true 我在命令提示符上看到下面的错误消息。
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'Serenity'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve net.serenity-bdd:serenity-gradle-plugin:1.0.47.
Required by:
:Serenity:unspecified
> Could not GET 'https://jcenter.bintray.com/net/serenity-bdd/serenity-gra
dle-plugin/1.0.47/serenity-gradle-plugin-1.0.47.pom'.
> Connection to https://jcenter.bintray.com refused你能帮我解决这个问题吗?谢谢!
发布于 2015-06-25 21:23:13
在我的例子中,域不可用,错误会在一段时间后自行消失。在这种情况下,您还可以更改镜像存储库,例如更改为http://repo1.maven.org/maven2/com/android/tools/build/gradle,这是一个文档链接:https://docs.gradle.org/current/userguide/artifact_dependencies_tutorial.html#N10621
https://stackoverflow.com/questions/30771252
复制相似问题