Unresolved dependencies in sbt

Starting 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 is as follows:

 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 still get a compilation failure.

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

+6
source share
3 answers

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

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

Voila. (As I found out, 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.

+14
source

There was 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 

In Fedora 22, the solution was as simple as:

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

I saw various answers on the Internet telling people to remove the .sbt cache, but .ivy2 / also causes a problem. If deleting these files does not resolve the problem, you can also try deleting the .maven2 directory. This causes ivy / gradle / maven to reload everything. Not perfect, but it works.

+3
source

You are mixing Play 2.1.0 with Play 2.2.0.

Use NOT:

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

Using:

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

And make sure you have at least one resolver for SBT.

+1
source

Source: https://habr.com/ru/post/956288/


All Articles