slf4j-api的依赖性错误; 1.6.1

时间:2012-11-09 22:48:12

标签: playframework-2.0 slf4j

我得到了一个facebook连接样本,我试图弄清楚它。 我在制作新项目后立即覆盖了这个文件夹。 我甚至在教程文件夹之后覆盖了facebook文件夹的样本。

每3个项目,我已经完成了解决问题。

我自己将每个书面版本改为1.6.1 我安慰“sbt clean update reload”但它没有用

所以在那之后我找到了一些解决方案,但在这个页面上并没有找到我 “Unresolved Dependencies for a new play 2.0 scala project

Virtualeyes

'吹走〜/ .ivy2,〜/ m2'

但我根本找不到其中的两个。

c:\play\connect>sbt clean update reload

c:\play\connect>set SCRIPT_DIR=C:\play\

c:\play\connect>java -Xmx512M -jar "C:\play\sbt-launch.jar" clean update reload

[info] Loading project definition from C:\play\connect\project
[info] Set current project to FacebookConnectTestUsingPlay2 (in build file:/C:/p
lay/connect/)
[success] Total time: 0 s, completed 2012. 11. 10 오전 6:07:50
[info] Updating {file:/C:/play/connect/}FacebookConnectTestUsingPlay2...
[info] Resolving org.hibernate.javax.persistence#hibernate-jpa-2.0-api;1.0.1.Fin

[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-c
odec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponent
s#httpclient;4.1.2 compile
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[error] {file:/C:/play/connect/}FacebookConnectTestUsingPlay2/*:update: sbt.Reso
lveException: unresolved dependency: org.slf4j#slf4j-api;1.6.1: configuration no
t found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibern
ate#hibernate-validator;4.2.0.Final compile
[error] unresolved dependency: commons-codec#commons-codec;1.4: configuration no
t found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.
apache.httpcomponents#httpclient;4.1.2 compile
[error] Total time: 10 s, completed 2012. 11. 10 오전 6:08:00

1 个答案:

答案 0 :(得分:1)

我再次得到了解决方案。

基于来自

的样本

https://github.com/pawank/Facebook-Integration-in-Play-2.0-using-scribe-library

(因为它适用于版本Play 2.0而不是2.0.4)

1. plugins.sbt 更改为 addSbtPlugin(“播放”%“sbt-plugin”%“2.0.4”)

2. build.properties 更改为 sbt.version = 0.11.3

  1. 输入 sbt
  2. 输入播放
  3. 输入编译(在播放控制台中)

  4. 如果您使用“ commons-codec ”和“ org.slf4j ”进行操作,则会删除所有文件 C:\ play ** repository \ local \ org.slf4j **和C:\ play ** repository \ local \ commons-codec **

  5. 输入'sbt clean update reload '然后'播放'

  6. 它会起作用

  7. (不要忘记 Application.scala

    中的更改
    lazy val config = play.Play.application().configuration()
        val FBAppId = config.getString("fb.app.id")
        val FBAppSecret = config.getString("fb.app.secretkey")
        val FBAppCallback = config.getString("fb.app.callback")
    

    ) 就像我说的那样,源版本是最近的2.0版本