免责声明:我对Gradle还比较新。
我正在尝试使用Gradle(1.0-rc1)构建我的项目,通过使用来自Maven存储库的快照依赖项。
但是,当我尝试使用gradle --info dependencies
解析依赖项时,我会收到以下错误:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':dependencies'.
> Could not resolve all dependencies for configuration ':compile'.
> Could not resolve group:com.l2fprod, module:l2fprod-common-all, version:7.3.
Required by:
:test:unspecified > org.valkyriercp:valkyrie-rcp-core:1.1-SNAPSHOT
> Could not HEAD 'https://raw.github.com/Ekito/maven-repo/master/ \
snapshots/com/l2fprod/l2fprod-common-all/7.3/l2fprod-common-all-7.3.jar'.
> Could not resolve group:org.valkyriercp, module:valkyrie-rcp-resources,
version:1.1-SNAPSHOT.
Required by:
:test:unspecified > org.valkyriercp:valkyrie-rcp-core:1.1-SNAPSHOT
> Could not resolve group:org.valkyriercp, module:valkyrie-rcp,
version:1.1-SNAPSHOT.
> Could not HEAD 'https://raw.github.com/Ekito/maven-repo/master/ \
snapshots/org/valkyriercp/valkyrie-rcp/1.1-SNAPSHOT \
/valkyrie-rcp-1.1-SNAPSHOT.jar'.
但是Maven工件
valkyrie-rcp
不是一个jar,而是一个pom文件,它是我尝试下载的工件的父模块。如果我使用Maven构建项目,它可以正常运行。这里有一个简单的build.gradle
文件,可以重现这个问题:apply plugin: 'java'
dependencies {
compile group: 'org.valkyriercp', name:'valkyrie-rcp-core', version:'1.1-SNAPSHOT'
compile 'org.slf4j:slf4j-log4j12:1.6.4'
}
repositories {
mavenCentral()
maven {
url "https://raw.github.com/Ekito/maven-repo/master/snapshots/"
}
}
我做错了什么?这是Gradle与快照依赖项有关的错误吗?