告诉Gradle以下内容最简单的方法是什么:
检索'junit'依赖关系并采用其最新的'release'版本.
管理Maven和Ivy存储库对我来说有点新鲜.我尝试了以下步骤,导致Could not resolve dependency ...错误:
compile "junit:junit:latest.release"用存储库设置为只写mavenCentral() (但是,如果我说"junit:junit:4.10",它就可以工作).
compile "junit:junit:latest.release"使用存储库写入以下方式:
ivy {
// I also tried 'http://maven.org' and other possible variants.
url "http://repo1.maven.org"
layout "maven"
}
Run Code Online (Sandbox Code Playgroud)尝试使用Spring Source Ivy存储库:
ivy {
artifactPattern "http://repository.springsource.com/ivy/libraries/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
ivyPattern "http://repository.springsource.com/ivy/libraries/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
}
Run Code Online (Sandbox Code Playgroud)也许我误解了一些事情.为什么获得最新版本的依赖是如此艰巨的任务?