Gradle fails to resolve cucumber dependencies


(hecnabae) #1

The following script doesn’t resolve cucumber dependencies (cucumber-core, cucumber-html, cucumber-java, cucumbur-junit, cucumber-jvm-deps):

apply plugin: 'java'
apply plugin: 'idea'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    testCompile 'junit:junit:4.11'
    //testCompile 'info.cukes:cucumber-spring:1.2.4'
    testCompile 'info.cukes:cucumber-core:1.2.4'
    testCompile 'info.cukes:cucumber-html:0.2.3'
    testCompile 'info.cukes:cucumber-java:1.2.4'
    testCompile 'info.cukes:cucumber-junit:1.2.4'
    testCompile 'info.cukes:cucumber-jvm-deps:1.0.5'
} 

If I try to execute gradle dependencies I get this output:

------------------------------------------------------------
Root project
------------------------------------------------------------

archives - Configuration for archive artifacts.
No dependencies

compile - Compile classpath for source set 'main'.
No dependencies

default - Configuration for default artifacts.
No dependencies

runtime - Runtime classpath for source set 'main'.
No dependencies

testCompile - Compile classpath for source set 'test'.
+--- junit:junit:4.11
|    \--- org.hamcrest:hamcrest-core:1.3
+--- info.cukes:cucumber-core:1.2.4 FAILED
+--- info.cukes:cucumber-html:0.2.3 FAILED
+--- info.cukes:cucumber-java:1.2.4 FAILED
+--- info.cukes:cucumber-junit:1.2.4 FAILED
\--- info.cukes:cucumber-jvm-deps:1.0.5 FAILED

testRuntime - Runtime classpath for source set 'test'.
+--- junit:junit:4.11
|    \--- org.hamcrest:hamcrest-core:1.3
+--- info.cukes:cucumber-core:1.2.4 FAILED
+--- info.cukes:cucumber-html:0.2.3 FAILED
+--- info.cukes:cucumber-java:1.2.4 FAILED
+--- info.cukes:cucumber-junit:1.2.4 FAILED
\--- info.cukes:cucumber-jvm-deps:1.0.5 FAILED

BUILD SUCCESSFUL

maven can solve these dependencies correctly. ¿What can be the reason that Gradle can’t resolve it?


(Mark Vieira) #2

When using the build script snippet you provided this resolves correctly for me with Gradle 2.13. Can you run the build with --info? This perhaps might give some more insight into what is going on.


(hecnabae) #3

I upgraded from 2.8 to 2.13 and now resolves dependencies correctly . But I think that there was a problem with the repository.

Thanks for reply!


(Zabari) #4

I’m getting same error. What should I do ? BTW I’m very new to gradle.