我正在尝试使用 gradle 构建一个开源 Java 项目 lilith。但是在命令行窗口运行 gradle 时遇到这个问题:
D:\Opensource\lilith_svn\sulky-master>gradle
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'sulky-master'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve org.apache.maven.wagon:wagon-webdav-jackrabbit:1.0-beta-6
.
Required by:
:sulky-master:unspecified
> Could not GET 'http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-webdav-jackrabbit/1.0-beta-6/wagon-webdav-jackrabbit-1.0-beta-6.pom'.
> Connection to http://repo1.maven.org refused
> Could not resolve com.github.ben-manes:gradle-versions-plugin:0.4.
Required by:
:sulky-master:unspecified
> Could not GET 'http://repo1.maven.org/maven2/com/github/ben-manes/gradle-versions-plugin/0.4/gradle-versions-plugin-0.4.pom'.
> Connection to http://repo1.maven.org refused
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Total time: 44.897 secs
我发现我可以从我的网络浏览器访问目标文件。所以我对有关连接失败的错误消息感到困惑。
或者这是否意味着 gradle 程序无权访问互联网?如果是这样,请提供一些解决方法。
谢谢,特里。