Unresolved Dependencies in sbt

15,397

Solution 1

Add this line to parent/project/plugins.sbt:

resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

Voilà. (How did I know? Because the Play 2.2 "Getting Started Guide" says so, http://www.playframework.com/documentation/2.2.x/NewApplication.)

I don't think you need the libraryDependencies thing.

Solution 2

Had a problem with

sbt.ResolveException: unresolved dependency: org.fusesource.hawtjni#hawtjni-runtime;1.8: configuration not found in org.fusesource.hawtjni#hawtjni-runtime;1.8: 'master(compile)'. Missing configuration: 'compile'. It was required from org.fusesource.leveldbjni#leveldbjni;1.7 compile

On Fedora 22 the solution was as easy as:

~]$rm -rf .ivy2/ .sbt/

I've seen various answers on the internet telling people to delete the .sbt cache, but the .ivy2/ also causes a problem. If deleting those doesn't fix it, you may also try deleting the .maven2 directory. This forces ivy/gradle/maven to redownload everything. Not ideal, but it works.

Solution 3

You mixing up Play 2.1.0 with Play 2.2.0.

Use NOT:

libraryDependencies += "play" % "play_2.10" % "2.1.0"

Use:

libraryDependencies += "com.typesafe.play" % "play_2.10" % "2.2.0"

And be sure, that you have at least one resolver for SBT.

Share:
15,397
Kevin Meredith
Author by

Kevin Meredith

Scala developer Haskell student https://www.linkedin.com/pub/kevin-meredith/11/22a/334

Updated on August 03, 2022

Comments

  • Kevin Meredith
    Kevin Meredith almost 2 years

    Running my sbt build, I get the following unresolved dependencies.

    [warn]  ::::::::::::::::::::::::::::::::::::::::::::::
    [warn]  ::          UNRESOLVED DEPENDENCIES         ::
    [warn]  ::::::::::::::::::::::::::::::::::::::::::::::
    [warn]  :: com.typesafe.play#sbt-link;2.2.0: not found
    [warn]  :: com.typesafe.play#play-exceptions;2.2.0: not found
    [warn]  :: com.typesafe.play#routes-compiler_2.10;2.2.0: not found
    [warn]  :: com.typesafe.play#templates-compiler_2.10;2.2.0: not found
    [warn]  :: com.typesafe.play#console_2.10;2.2.0: not found
    [warn]  :: net.contentobjects.jnotify#jnotify;0.94: not found
    [warn]  ::::::::::::::::::::::::::::::::::::::::::::::
    

    My project structure looks like this:

    parent
     |
      --> sbtApp1
      --> playApp
      --> sbtApp2
      --> project
          --> Build.scala
          --> plugins.sbt
      --> build.sbt
    

    My parent/project/plugins.sbt has the following: addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0")

    I added the following line to parent/build.sbt, but I'm still getting the compile-time failure.

    libraryDependencies += "play" % "play_2.10" % "2.1.0"

  • cib
    cib over 8 years
    The sad part is that I didn't install play using sbt manually like in that link, but by using activator. Your fix still worked, though, thanks!