2012-04-17 168 views
6

聲明:我對Gradle相當陌生。快照與Gradle的依賴關係

我想通過使用Maven artefact中的快照依賴項來使用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的假象valkyrie-rcp不是一個罐子,而是一個聚甲醛,它是製造品的父模塊我嘗試下載。

如果我使用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錯誤?

回答

0

我懷疑它是如何處理快照依賴關係(快照依賴關係適用於rc1)的錯誤。

唯一的例外是

你確定所需的神器 「com.l2fprod,模塊:l2fprod常見-所有版本:7.3」 是在你的倉庫? (valkyrie-rcp-core的依賴關係不應該是「com.l2fprod。common,module:12fprod-common-all,version:7.3」?)