2

I am trying to add the blueprints-sail-graph (located here) dependency via sbt, and it is having trouble resolving one of the sail dependencies. I am new to Java/Scala development and will really appreciate your help! The following is my build.sbt file:

scalaVersion := "2.10.3"

libraryDependencies ++= Seq(
  "org.scalatest" % "scalatest_2.10" % "2.0" % "test" withSources() withJavadoc(),
  "org.scalacheck" %% "scalacheck" % "1.10.0" % "test" withSources() withJavadoc(),
  "com.tinkerpop.blueprints" % "blueprints-rexster-graph" % "2.6.0" withSources() withJavadoc(),
  "com.tinkerpop.blueprints" % "blueprints-sail-graph" % "2.5.0"
)

unmanagedBase := baseDirectory.value / "lib"

resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"

resolvers += "Scala-Tools Maven2 Snapshots Repository" at "http://scala-tools.org/repo-snapshots"

resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"

resolvers += "JBoss repository" at "https://repository.jboss.org/nexus/content/repositories/"

The error I get from sbt is:

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.restlet.jse#org.restlet;2.1.1: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: org.restlet.jse#org.restlet;2.1.1: not found

The warnings above this error message are:

[info] Resolving org.restlet.jse#org.restlet;2.1.1 ...
[warn]  module not found: org.restlet.jse#org.restlet;2.1.1
[warn] ==== local: tried
[warn]   /home/d2b2/.ivy2/local/org.restlet.jse/org.restlet/2.1.1/ivys/ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/org/restlet/jse/org.restlet/2.1.1/org.restlet-2.1.1.pom
[warn] ==== Sonatype OSS Snapshots: tried
[warn]   https://oss.sonatype.org/content/repositories/snapshots/org/restlet/jse/org.restlet/2.1.1/org.restlet-2.1.1.pom
[warn] ==== Scala-Tools Maven2 Snapshots Repository: tried
[warn]   http://scala-tools.org/repo-snapshots/org/restlet/jse/org.restlet/2.1.1/org.restlet-2.1.1.pom
[warn] ==== Local Maven Repository: tried
[warn]   file:///home/d2b2/.m2/repository/org/restlet/jse/org.restlet/2.1.1/org.restlet-2.1.1.pom
[warn] ==== JBoss repository: tried
[warn]   https://repository.jboss.org/nexus/content/repositories/org/restlet/jse/org.restlet/2.1.1/org.restlet-2.1.1.pom

I know that the sail dependency is the issue becuase if I remove it, sbt compiles without a problem. I added the additional resolvers hoping that one of them would contain this jar -- in fact JBoss appears to, but for some reason it still did not work. I also tried many different versions of blueprints-sail-graph unsuccessfully. I am not sure what else to do, please help me get this dependency resolved.

Thanks for all the help!

EDIT: According to another post, this jar needs to be specifically added to Ivy -- hope that saves someone some time. I tried a few things with Ivy but did not succeed :(

Community
  • 1
  • 1
CodeKingPlusPlus
  • 15,383
  • 51
  • 135
  • 216

1 Answers1

3

Add the following to list of resolvers:

resolvers += "Restlet Repositories" at "http://maven.restlet.org"

By the way you can use sbt predefined attributes. The whole sbt build file will be like this:

import sbt.Resolver.mavenLocal

scalaVersion := "2.10.3"

unmanagedBase := baseDirectory.value / "lib"

resolvers ++= Seq(
  mavenLocal,
  "Restlet Repository" at "http://maven.restlet.org/",
  "JBoss Repository" at "https://repository.jboss.org/nexus/content/repositories/",
  "Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/",
  "Scala-Tools Snapshots" at "http://scala-tools.org/repo-snapshots/"
)

libraryDependencies ++= Seq(
  "org.scalatest" % "scalatest_2.10" % "2.0" % "test" withSources() withJavadoc(),
  "org.scalacheck" %% "scalacheck" % "1.10.0" % "test" withSources() withJavadoc(),
  "com.tinkerpop.blueprints" % "blueprints-rexster-graph" % "2.6.0" withSources() withJavadoc(),
  "com.tinkerpop.blueprints" % "blueprints-sail-graph" % "2.5.0"
)
Nader Ghanbari
  • 4,120
  • 1
  • 23
  • 26
  • any chance you can help me with this: http://stackoverflow.com/questions/26519485/resolviing-sbt-dependencies – CodeKingPlusPlus Oct 23 '14 at 00:46
  • Also, how did you know that "http://maven.restlet.org/" existed? Where can someone with no information find this? – CodeKingPlusPlus Oct 23 '14 at 00:50
  • 1
    First of all you can search maven artifacts in [mvnrepository](http://mvnrepository.com). You can search it in search engines as well. "org.restlet maven dependency" will be a good search. SO is also your friend. – Nader Ghanbari Oct 23 '14 at 04:15
  • 1
    I will take a look for sure and try to find out what's the problem. – Nader Ghanbari Oct 23 '14 at 04:16
  • I think I figured it out -- I'll post a potential solution. Let me know if you see anything inherently wrong as I don't know what I am doing. – CodeKingPlusPlus Oct 23 '14 at 04:42