Вопрос

Disclaimer: I'm fairly new with Gradle.

I'm trying to build my project with Gradle (1.0-rc1), by using a Snapshot dependency from a Maven artefact.

But when I try to resolve the dependencies using gradle --info dependencies, I get the following error :

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'.

But the Maven artefact valkyrie-rcp is not a jar, but a pom and it is the parent module of the artefact I try to download.

It works great if I use Maven to build the project.

Here is a simple build.gradle file that reproduces the issue:

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/"
    }
}

What am I doing wrong ? Is it a Gradle bug with snapshot dependencies ?

Это было полезно?

Решение

I doubt it is a bug with how gradle handles snapshot-dependencies(snapshot-dependencies works for me with rc1).

The exception is

Are you sure the required artifact "com.l2fprod, module:l2fprod-common-all, version:7.3" is in your repositories? (shouldn't the dependency for valkyrie-rcp-core be "com.l2fprod.common, module:l2fprod-common-all, version:7.3" ?)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top