我正在尝试用gradle构建一个开源Java项目,lilith.但是从cmd行窗口运行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
Run Code Online (Sandbox Code Playgroud)
我发现我可以从网络浏览器访问目标文件.所以我对有关连接失败的错误消息感到困惑.
或者这是否意味着gradle程序无权访问互联网?如果是这样,请给它一些解决方法.
谢谢,特里.
Bug*_*nny 13
打开gradle.properties并添加以下内容
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=3213
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=3213
Run Code Online (Sandbox Code Playgroud)
(您的设置可能有所不同.我的情况是我在另一台计算机上与Astrill共享VPN连接.有关详细信息,请参阅http://gradle.org/docs/current/userguide/build_environment.html.)
| 归档时间: |
|
| 查看次数: |
10483 次 |
| 最近记录: |