7

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"

Schleichardt
  • 7,502
  • 1
  • 27
  • 37
Kevin Meredith
  • 41,036
  • 63
  • 209
  • 384

3 Answers3

15

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.

Seth Tisue
  • 29,985
  • 11
  • 82
  • 149
  • 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! – cib Aug 11 '15 at 15:32
3

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.

mttdbrd
  • 1,791
  • 12
  • 17
1

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.

Community
  • 1
  • 1
Schleichardt
  • 7,502
  • 1
  • 27
  • 37