Gradle falis to find specific version of selenium in mavenCentral

I have a pretty simple build.gradle that pulls selenium from maven central. When I updated from version 2.8 to version 2.9 it all of sudden complained that it could not locate the version. I tried the same version of selenium using maven and it found the dependency. Any version of selenium less than 2.9 works fine.

build.gradle: apply plugin: ‘java’ apply plugin: ‘eclipse’

repositories {

mavenCentral() }

dependencies {

compile group: ‘org.seleniumhq.selenium’, name: ‘selenium-java’, version: ‘2.9.0’

compile group: ‘org.concordion’, name: ‘concordion’, version: ‘1.4.1’

compile group: ‘mysql’, name: ‘mysql-connector-java’, version: ‘5.1.16’

compile group: ‘com.google.code.gson’, name: ‘gson’, version: ‘1.7.1’

compile group: ‘com.j256.ormlite’, name: ‘ormlite-core’, version: ‘4.23’

compile group: ‘joda-time’, name: ‘joda-time’, version: ‘1.6.2’

compile group: ‘com.j256.ormlite’, name: ‘ormlite-jdbc’, version: ‘4.23’

compile group: ‘org.apache.httpcomponents’, name: ‘httpcore’, version: ‘4.1.1’

compile group: ‘org.apache.httpcomponents’, name: ‘httpclient’, version: ‘4.1.1’

compile group: ‘org.apache.httpcomponents’, name: ‘httpmime’, version: ‘4.1.1’

compile group: ‘org.jsoup’, name: ‘jsoup’, version: ‘1.6.0’ }

task smokeTest(type: Test, dependsOn: testClasses) {

systemProperties[‘concordion.output.dir’] = ‘build/reports/concordion’

maxParallelForks = 2

include “/specs/login//Login.class”

include “/specs/sale//Retail.class”

include “/specs/registration//Registration.class”

}

task integrationTest(type: Test, dependsOn: testClasses) {

systemProperties[‘concordion.output.dir’] = ‘build/reports/concordion’

maxParallelForks = 2

include “/specs//*.class”

exclude “**/Abstract*” }

Error: gradle iT :compileJava :: problems summary :: :::: WARNINGS

module not found: org.seleniumhq.selenium#selenium-java;2.9.0

==== clientModule: tried

==== internal-repository: tried

==== MavenRepo: tried

http://repo1.maven.org/maven2/org/seleniumhq/selenium/selenium-java/2.9.0/selenium-java-2.9.0.pom

::::::::::::::::::::::::::::::::::::::::::::::

::

UNRESOLVED DEPENDENCIES

::

::::::::::::::::::::::::::::::::::::::::::::::

:: org.seleniumhq.selenium#selenium-java;2.9.0: not found

::::::::::::::::::::::::::::::::::::::::::::::

:::: ERRORS

impossible to acquire lock for org.seleniumhq.selenium#selenium-java;2.9.0

impossible to acquire lock for org.seleniumhq.selenium#selenium-java;2.9.0

You have a stale lock file in your cache for some reason. That version of selenium works ok for me.

What version of Gradle are you using? And what OS?

------------------------------------------------------------ Gradle 1.0-milestone-4 ------------------------------------------------------------

Gradle build time: Thursday, July 28, 2011 4:38:22 AM EDT Groovy: 1.7.10 Ant: Apache Ant™ version 1.8.2 compiled on December 20 2010 Ivy: 2.2.0 JVM: 1.6.0_24 (Apple Inc. 19.1-b02-334) OS: Mac OS X 10.6.7 x86_64

milestone-4 is likely your problem. If you upgrade to milestone-5 you should be fine.

I deleted everything from ~/.gradle/caches and let it fetch everything again. That seemed to work. I’ll upgrade anyway. It clicked when you said cache…thanks.

No problems.