sbt UNRESOLVED DEPENDENCIES io.spray#spray-http;1.2-20130822: not found

689 views
Skip to first unread message

Adrian M

unread,
Sep 12, 2013, 9:48:39 AM9/12/13
to spray...@googlegroups.com
Hi,
I'm trying to compile a project which uses spray. I use sbt for this task. However, when I do gen-idea or compile I get unresolved dependencies for the project.

The error:
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: io.spray#spray-http;1.2-20130822: not found
[warn]  :: io.spray#spray-httpx;1.2-20130822: not found
[warn]  :: io.spray#spray-util;1.2-20130822: not found
[warn]  :: io.spray#spray-routing;1.2-20130822: not found
[warn]  :: io.spray#spray-can;1.2-20130822: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run 'last document-server/*:update' for the full
 output.
[trace] Stack trace suppressed: run 'last id-server/*:update' for the full outpu
t.
[error] (document-server/*:update) sbt.ResolveException: unresolved dependency:
io.spray#spray-http;1.2-20130822: not found
[error] unresolved dependency: io.spray#spray-httpx;1.2-20130822: not found
[error] unresolved dependency: io.spray#spray-util;1.2-20130822: not found
[error] unresolved dependency: io.spray#spray-routing;1.2-20130822: not found
[error] unresolved dependency: io.spray#spray-can;1.2-20130822: not found
[error] (id-server/*:update) sbt.ResolveException: unresolved dependency: io.spr
ay#spray-http;1.2-20130822: not found
[error] unresolved dependency: io.spray#spray-can;1.2-20130822: not found
[error] Total time: 5 s, completed 12-Sep-2013 9:31:26 AM

------------------------------------------
plugins.sbt:

resolvers += Resolver.url("artifactory", url("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns)

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.7")

addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.4.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-multi-jvm" % "0.3.6")

addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.0")

resolvers += Resolver.url("untyped", url("http://ivy.untyped.com"))(Resolver.ivyStylePatterns)


addSbtPlugin("com.untyped" %% "sbt-js" % "0.5")

--------------------------------------------------------------------------------------------------------------------
Resolvers.scala:

import sbt._

object Resolvers {
  val verticalscope = "VerticalScope Nexus" at "http://corpint.verticalscope.com:9091/nexus/content/groups/public/"
}

--------------------------------------------------------------------------------------------------------------------
plugins.scala:

import sbt._

object Plugins extends Build {

  lazy val plugins = Project("plugins", file("."))
    .dependsOn(
    uri("git://github.com/bseibel/sbt-simple-junit-xml-reporter-plugin.git")
  )
}

--------------------------------------------------------------------------------------------------------------------
I also found IdServerProject.scala which might be of interest

import com.untyped.sbtjs.Plugin._
import sbt.Keys._
import sbt._
import sbtassembly.Plugin.AssemblyKeys._
import sbtassembly.Plugin._
import sbtassembly.Plugin.{PathList, MergeStrategy}

object IdServerProject extends BaseProject with IdServerDependencies {

  import GlobalSettings._

  val project = Project(
    id = "id-server",
    base = file("id-server"),
    settings = globalSettings ++ assemblySettings ++ jsSettings ++
      Seq(
        resolvers := dependencyResolvers,
        libraryDependencies ++= dependencies
      )
  ) .settings(
    (JsKeys.variableRenamingPolicy in Compile) := VariableRenamingPolicy.LOCAL,
    mergeStrategy in assembly <<= (mergeStrategy in assembly) {
      (old) => {
        case "reference.conf" => MergeStrategy.concat
        case "application.conf" => MergeStrategy.concat
        case PathList("META-INF", "MANIFEST.MF") => MergeStrategy.discard
        case PathList("META-INF", e, xs @ _*) if e.endsWith(".SF") || e.endsWith(".DSA") => MergeStrategy.discard
        case _ => MergeStrategy.first
      }
    }
  ) dependsOn (CommonProject.project)
}

trait IdServerDependencies extends GlobalDependencies with AkkaDependencies with DatastaxClientDependencies {

  import GlobalVersions._

  val spray = "io.spray" % "spray-http" % sprayVersion
  val sprayCan = "io.spray" % "spray-can" % sprayVersion

  override def dependencies = super.dependencies ++ Seq(spray, sprayCan)


}

--------------------------------------------------------------------------------------------------------------------

Thanks!

Johannes Rudolph

unread,
Sep 12, 2013, 9:56:15 AM9/12/13
to spray...@googlegroups.com
Hi Adrian,

for using the nightly builds you have to add this resolver:

resolvers += "spray nightlies" at "http://nightlies.spray.io/"

to your project settings. You seem to set your resolvers from `dependencyResolvers` which is missing from the quoted files. So this is where you have to add the nightlies resolver.

Johannes


--
You received this message because you are subscribed to the Google Groups "spray-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spray-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Johannes

-----------------------------------------------
Johannes Rudolph
http://virtual-void.net

Adrian M

unread,
Sep 12, 2013, 10:22:51 AM9/12/13
to spray...@googlegroups.com, johannes...@googlemail.com
Hi
Thanks for the help. I added that one line to plugins.sbt
That did something, but still get some missing dependencies, but only 2 warnings now and pretty much the same errors:



[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: io.spray#spray-http;1.2-20130822: not found
[warn]  :: io.spray#spray-can;1.2-20130822: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run 'last document-server/*:update' for the full
 output.
[trace] Stack trace suppressed: run 'last id-server/*:update' for the full outpu
t.
[error] (document-server/*:update) sbt.ResolveException: unresolved dependency:
io.spray#spray-http;1.2-20130822: not found
[error] unresolved dependency: io.spray#spray-httpx;1.2-20130822: not found
[error] unresolved dependency: io.spray#spray-util;1.2-20130822: not found
[error] unresolved dependency: io.spray#spray-routing;1.2-20130822: not found
[error] unresolved dependency: io.spray#spray-can;1.2-20130822: not found
[error] (id-server/*:update) sbt.ResolveException: unresolved dependency: io.spr
ay#spray-http;1.2-20130822: not found
[error] unresolved dependency: io.spray#spray-can;1.2-20130822: not found
[error] Total time: 5 s, completed 12-Sep-2013 10:19:43 AM


I also tried adding
resolvers += "spray repo" at "http://repo.spray.io"
mentioned at https://github.com/stackmob/newman/issues/49, but to no avail.

Johannes Rudolph

unread,
Sep 12, 2013, 10:29:00 AM9/12/13
to Adrian M, spray...@googlegroups.com
On Thu, Sep 12, 2013 at 4:22 PM, Adrian M <eamo...@gmail.com> wrote:
Hi
Thanks for the help. I added that one line to plugins.sbt
That did something, but still get some missing dependencies, but only 2 warnings now and pretty much the same errors:

Yep, plugins.sbt is the wrong place, there you would add resolvers to build your build project. 

You have to add it somewhere in the settings here (I replaced you previous `resolvers :=` line):

val project = Project(
    id = "id-server",
    base = file("id-server"),
    settings = globalSettings ++ assemblySettings ++ jsSettings ++
      Seq(
        resolvers ++= dependencyResolvers :+ ("spray nightlies" at "http://nightlies.spray.io/"),
        libraryDependencies ++= dependencies
      )
  )

As I said before you didn't show `dependencyResolvers` so maybe you could alternatively add it directly to the definition of `dependencyResolvers` depending on how that looks like exactly.

Adrian M

unread,
Sep 12, 2013, 11:02:58 AM9/12/13
to spray...@googlegroups.com, Adrian M, johannes...@googlemail.com
Indeed I didn't include the file that had dependencyResolvers. After making the change in that file all works :)

Thanks Johannes!

Johannes Rudolph

unread,
Sep 12, 2013, 11:03:42 AM9/12/13
to Adrian M, spray...@googlegroups.com
Cool, glad it worked.
Reply all
Reply to author
Forward
0 new messages