0

我正在构建非常直截了当:

$ 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

虽然给定 URL 上有 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
4

1 回答 1

0

~/.gradle最后通过删除目录解决了问题

于 2015-08-28T19:38:11.060 回答