2012-08-15 56 views
2

獲得scala,giter8,sbt(0.11.3)和maven的新鮮Homebrew安裝,並且大部分內容都會檢出。 brew醫生顯示我已經通過手動安裝pcre和python 2.7所製作的已知mods。當我得到發揮,斯卡拉模板,然後運行它的第一次,我得到SLF4J以下懸而未決DEPSTypesafe Stack play-scala示例未解決的依賴關係OSX Homebrew安裝

# sudo sbt run 
... 
[warn] ::::::::::::::::::::::::::::::::::::::::::::::         
[warn] ::   UNRESOLVED DEPENDENCIES   :: 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile 
[warn] :: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[error] {file:/Users/homedir/typesafe/my_app/}my_app/:update: sbt.ResolveException: unresolved dependency: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile 
[error] unresolved dependency: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile 
[warn] some of the dependencies were not recompiled properly, so classloader is not avaialable 
[info] Updating {file:/Users/homedir/typesafe/my_app/}my_app... 
[warn] ::::::::::::::::::::::::::::::::::::::::::::::         
[warn] ::   UNRESOLVED DEPENDENCIES   :: 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile 
[warn] :: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[error] {file:/Users/homedir/typesafe/my_app/}my_app/:update: sbt.ResolveException: unresolved dependency: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile 
[error] unresolved dependency: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile 

運行乾淨,重新加載,手動更新:

# sudo sbt 
[info] Loading project definition from /Users/homedir/typesafe/my_app/project 
[info] Set current project to my_app (in build file:/Users/homedir/typesafe/my_app/) 
[my_app] $ clean 
[success] Total time: 0 s, completed Aug 15, 2012 7:23:10 AM 
[my_app] $ reload 
[info] Loading project definition from /Users/homedir/typesafe/my_app/project 
[info] Set current project to my_app (in build file:/Users/homedir/typesafe/my_app/) 
[my_app] $ update 
[info] Updating {file:/Users/homedir/typesafe/my_app/}my_app... 
[warn] ::::::::::::::::::::::::::::::::::::::::::::::         
[warn] ::   UNRESOLVED DEPENDENCIES   :: 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile 
[warn] :: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[error] {file:/Users/homedir/typesafe/my_app/}my_app/:update: sbt.ResolveException: unresolved dependency: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile 
[error] unresolved dependency: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile 
[error] Total time: 7 s, completed Aug 15, 2012 7:23:23 AM 

什麼正確的方法來防止這一點?在初始化過程中不應該下載這些代碼?

謝謝!

+0

您是否嘗試清潔,重新加載,更新? – 2012-08-15 06:41:49

+0

是的,同樣缺少slf4j依賴於更新命令。 – Brian 2012-08-15 14:24:55

回答

2

感謝this question我結束了刪除〜/ .m2和〜/ .ivy2,然後乾淨,更新,重新加載。隨後一切正常。成功檢索到的更新命令slf4j:

[my_app] $ update 
[info] Updating {file:/Users/homedir/typesafe/my_app/}my_app... 
[info] downloading http://repo.typesafe.com/typesafe/releases/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar ... 
[info] [SUCCESSFUL ] org.slf4j#slf4j-api;1.6.1!slf4j-api.jar (1481ms) 
+0

我的預感是〜/ .m2和〜/ .ivy2的舊版本的sbt。在所有這些麻煩開始之前,我必須通過一系列的自制權限問題和舊版本的sbt(0.11.2 vs 0.11.3)。 – Brian 2012-08-15 15:18:43

+0

仍然不確定最好用sudo運行brew - 我的/ usr/local現在由我的用戶chown了,但我似乎需要sudo,無論如何。 – Brian 2012-08-15 15:28:04

0

讀這個讓我在推送/解析之前完成任務。