没有build.gradle for serenity插件

时间:2015-06-11 03:52:02

标签: build.gradle

我正在尝试在我的机器上创建一个宁静项目。为此,我在其中一个本地目录和执行的命令gradle build中创建了以下build.gradle文件。

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

你能帮我解决这个问题吗?谢谢!

1 个答案:

答案 0 :(得分:0)

就我而言,域名不可用,错误会在一段时间后自行消失。 在这种情况下,您还可以更改镜像存储库,例如更改 http://repo1.maven.org/maven2/com/android/tools/build/gradle 这是一个文档链接:https://docs.gradle.org/current/userguide/artifact_dependencies_tutorial.html#N10621