Gradle 2.6不解决bintray的依赖关系

时间:2015-08-28 16:46:34

标签: gradle bintray

我正在建立漂亮的直线前进:

$ gradle clean test war -b build.gradle
格拉德说:

:clean UP-TO-DATE
:compileJava

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not find mvc-tools.jar (net.virtalab:mvc-tools:2.1).
Searched in the following locations:
     http://dl.bintray.com/virtalab/maven/net/virtalab/mvc-tools/2.1/mvc-tools-2.1.jar

虽然给定网址上有JAR:

$ wget http://dl.bintray.com/virtalab/maven/net/virtalab/mvc-tools/2.1/mvc-tools-2.1.jar
...
HTTP request sent, awaiting response... 200 OK
Length: 27222 (27K) [application/java-archive]
...
$ file mvc-tools-2.1.jar
mvc-tools-2.1.jar: Zip archive data, at least v1.0 to extract

我的build.gradle是:

repositories {
//local maven repo if possible
mavenLocal()
//bintray
maven {
    url "http://dl.bintray.com/virtalab/maven"
}
//our jcenter cache
maven {
    url 'http://maven.virtadev.net/jcenter'
}
}

我已经做了什么?

  • 使用--debug启动(仍然不知道为什么gradle卡住)
  • rm -rf .gradle

1 个答案:

答案 0 :(得分:0)

最后通过删除~/.gradle目录

解决了问题