Jgrapht: Unable to setup jgrapht with gradle

Created on 8 Jun 2014  ·  3Comments  ·  Source: jgrapht/jgrapht

Hi,

I'm new to both jgrapht and gradle so it is entirely possible that I'm missing something that is absolutely trivial.

I have added this to my build.gradle
compile 'org.jgrapht:jgrapht:0.9.0'

After this I do a gradle build and this is my gradle cache, it seems that it is unable to download the jar for jgrapht.
nikhil ~/.g/c/m/files-2.1> find . | grep '.jar$' ./junit/junit/4.11/28e0ad201304e4a4abf999ca0570b7cffc352c3c/junit-4.11-sources.jar ./junit/junit/4.11/4e031bb61df09069aeb2bffb4019e7a5034a4ee0/junit-4.11.jar ./org.hamcrest/hamcrest-core/1.3/1dc37250fbc78e23a65a67fbbaf71d2e9cbc3c0b/hamcrest-core-1.3-sources.jar ./org.hamcrest/hamcrest-core/1.3/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1.3.jar ./org.slf4j/slf4j-api/1.7.5/654135274d4c27132ea208a4ec07f344bdb83bcb/slf4j-api-1.7.5-sources.jar ./org.slf4j/slf4j-api/1.7.5/6b262da268f8ad9eff941b25503a9198f0a0ac93/slf4j-api-1.7.5.jar

But I can see that the pom has been downloaded
nikhil ~/.g/c/m/files-2.1> find . | grep '.pom$' ./junit/junit/4.11/cddf7490ffe839978cf5d6c944c01f2a8cb70a49/junit-4.11.pom ./org.hamcrest/hamcrest-core/1.3/872e413497b906e7c9fa85ccc96046c5d1ef7ece/hamcrest-core-1.3.pom ./org.hamcrest/hamcrest-parent/1.3/80391bd32bfa4837a15215d5e9f07c60555c379a/hamcrest-parent-1.3.pom ./org.javabits.jgrapht/jgrapht/0.9.1/807e3b9202e811eb85411d4f23a36d1d9f33ed6d/jgrapht-0.9.1.pom ./org.jgrapht/jgrapht/0.9.0/8ce3cbdd6ebcfecc6d1dde4c23f16605439a9615/jgrapht-0.9.0.pom

I only have maven central in my sources. Is jgrapht not present there?
If not is there some other source I could add to my build.gradle to get this to work. I don't want to be downloading jars and adding them to the classpath all the time.

invalid

Most helpful comment

This works for me:

    def jgraphtVersion = '0.9.1'
    compile "org.jgrapht:jgrapht-core:$jgraphtVersion"

I have been using this since gradle 1.x and am now using 2.4 and 2.9

All 3 comments

dependencies {
  compile group: 'org.jgrapht', name: 'jgrapht-ext', version:'0.9.0'
}

works for me...

Declaring a dependency on jgrapht-ext doesn't download the jgrapht-core jar... it could be somewhat related to pom contents, however for me the issue is reproducible only using gradle versions before 2.1 (complains for _Resource missing. [HTTP HEAD: https://repo1.maven.org/maven2/org/jgrapht/jgrapht/0.9.0/jgrapht-0.9.0.jar]_)

This works for me:

    def jgraphtVersion = '0.9.1'
    compile "org.jgrapht:jgrapht-core:$jgraphtVersion"

I have been using this since gradle 1.x and am now using 2.4 and 2.9

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jsichi picture jsichi  ·  12Comments

jsichi picture jsichi  ·  12Comments

io7m picture io7m  ·  53Comments

haerrel picture haerrel  ·  5Comments

IngerMathilde picture IngerMathilde  ·  5Comments