免责声明:我对 Gradle 还很陌生。
我正在尝试使用来自 Maven 人工制品的快照依赖项来使用 Gradle (1.0-rc1) 构建我的项目。
但是当我尝试使用解决依赖关系时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 artefactvalkyrie-rcp
不是一个 jar,而是一个 pom,它是我尝试下载的 artefact 的父模块。
如果我使用 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 错误吗?