2013-10-18 280 views
6

運行我的sbt構建,我收到以下未解決的依賴關係未解決的依賴關係sbt

[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] :::::::::::::::::::::::::::::::::::::::::::::: 

我的項目結構如下:

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

我的父母/項目/ plugins.sbt有以下幾點: addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0")

我添加以下行父/ build.sbt ,但我仍然遇到編譯時失敗。

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

回答

14

此行添加到parent/project/plugins.sbt

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

瞧。 (我怎麼知道的?因爲Play 2.2「入門指南」這樣說,所以http://www.playframework.com/documentation/2.2.x/NewApplication。)

我不認爲你需要libraryDependencies的東西。

+0

令人難過的是,我沒有像使用鏈接那樣手動安裝sbt,而是使用了激活器。不過,您的修復仍然有效,謝謝! – cib

3

有一個問題,

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 

在Fedora 22中的解決方案是一樣容易:

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

我見過的互聯網告訴人們刪除名.bst緩存在不同的答案,但.ivy2 /也造成一個問題。如果刪除這些文件不能解決問題,您也可以嘗試刪除.maven2目錄。這迫使常春藤/ gradle/maven重新下載所有內容。不理想,但它的工作原理。

相關問題