我正在学习gradle,我遇到了问题..
我使用 https://github.com/spring-guides/gs-gradle.git 作为我的学习项目,我转到
cd in gs-gradle / complete
然后我运行gradle run
,我收到以下错误:
$ gradle build
:compileJava
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not resolve joda-time:joda-time:2.2.
Required by:
:complete:unspecified
> Could not GET 'https://repo1.maven.org/maven2/joda-time/joda-time/2.2/joda-
time-2.2.pom'.
> peer not authenticated
* 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: 6.452 secs
答案 0 :(得分:0)
使用最新版本的joda-time
。当前版本为2.10.5
。
在build.gradle
中,将dependency
指向compile "joda-time:joda-time:2.10.5"