6

I'm using SNAPSHOT version of graphhopper library.

Is there posibility to use older version of snapshot? I tried:

 compile(group: 'com.graphhopper', name: 'graphhopper', version: '0.6-20151126.110118-54') {  

    exclude group: 'com.google.protobuf', module: 'protobuf-java'
    exclude group: 'org.openstreetmap.osmosis', module: 'osmosis-osm-binary'
    exclude group: 'org.apache.xmlgraphics', module: 'xmlgraphics-commons'
}

As repository I use: maven { url "https://oss.sonatype.org/content/groups/public/" }

I've tried also this repository:

maven {url "https://oss.sonatype.org/content/repositories/snapshots/"}

but it also cannot be found.

Could not find com.graphhopper:graphhopper:0.6-20151126.110118-54.
 Searched in the following locations:
     https://jcenter.bintray.com/com/graphhopper/graphhopper/0.6-20151126.110118-54/graphhopper-0.6-20151126.110118-54.pom
     https://jcenter.bintray.com/com/graphhopper/graphhopper/0.6-20151126.110118-54/graphhopper-0.6-20151126.110118-54.jar
     https://oss.sonatype.org/content/groups/public/com/graphhopper/graphhopper/0.6-20151126.110118-54/graphhopper-0.6-20151126.110118-54.pom
     https://oss.sonatype.org/content/groups/public/com/graphhopper/graphhopper/0.6-20151126.110118-54/graphhopper-0.6-20151126.110118-54.jar
     file:/D:/adt-bundle-windows-x86/sdk/extras/android/m2repository/com/graphhopper/graphhopper/0.6-20151126.110118-54/graphhopper-0.6-20151126.110118-54.pom
     file:/D:/adt-bundle-windows-x86/sdk/extras/android/m2repository/com/graphhopper/graphhopper/0.6-20151126.110118-54/graphhopper-0.6-20151126.110118-54.jar
     file:/D:/adt-bundle-windows-x86/sdk/extras/google/m2repository/com/graphhopper/graphhopper/0.6-20151126.110118-54/graphhopper-0.6-20151126.110118-54.pom
     file:/D:/adt-bundle-windows-x86/sdk/extras/google/m2repository/com/graphhopper/graphhopper/0.6-20151126.110118-54/graphhopper-0.6-20151126.110118-54.jar

I have tried also using local path to the gradle cache (after deleting newest snapshot dirs and leaving version I want to use) but no success. If it's impossible, is there any way to stop downloading new SNAPSNOT versions?

Thanks for help.

Derek K
  • 2,756
  • 1
  • 21
  • 37

2 Answers2

5

Check out this link: https://issues.gradle.org/browse/GRADLE-2784 Should have been fixed in April. Which Gradle version do you use?

tomasulo
  • 1,252
  • 8
  • 9
  • Thanks for the answer, but nothing changed, I updated to Gradle 1.3.1 version and get: Failed to resolve: com.graphhopper:graphhopper:0.6-20151203.190126-58 – Derek K Dec 04 '15 at 13:37
  • 1
    Yes, the fix has been released in version 2.4-rc-1. – tomasulo Dec 04 '15 at 13:40
  • I thought android gradle plugin version. After changing Gradle version by modifying gradle-wrapper.properties file to distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip everything is WORKING nice :-) Thank you very much! – Derek K Dec 04 '15 at 13:56
2

This is fixed in Gradle 2.4 by GRADLE-2784, see the gradle 2.4 release notes.

NB: you shouldn't include the word SNAPSHOT in the artifact version, eg:

dependencies {
  compile "org.company:my-lib:1.0.0-20150102.010203-20"
}
tekumara
  • 8,357
  • 10
  • 57
  • 69