带有播放框架的未解决的依赖项SBT [英] Unresolved Dependencies sbt with play framework

查看:56
本文介绍了带有播放框架的未解决的依赖项SBT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我是Stack Overflow的新手,请耐心等待我正在使用Play 2.5开发一个项目,确切地说是网站上的入门示例.

As i am new to Stack Overflow please be patient i am working on a project with Play 2.5 exactly the starter example from the Website.

因为我必须使用ebean,所以我遵循在plugins.sbt中设置ebean的步骤,就像

As i have to work with ebean i followed the Steps of Setting ebean in the plugins.sbt as like

addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "3.0.0")

以及我的build.sbt文件中

and also in my build.sbt file

name := """play-java"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayEbean)

scalaVersion := "2.11.11"

libraryDependencies += javaJdbc
libraryDependencies += cache
libraryDependencies += javaWs
libraryDependencies += filters
libraryDependencies += evolutions

libraryDependencies ++= Seq(
  "mysql" % "mysql-connector-java" % "5.1.18",
  "org.webjars"               %% "webjars-play"       % "2.3.0",
  "org.webjars"               % "bootstrap"           % "3.0.0" exclude("org.webjars", "jquery"),
  "org.webjars"               % "jquery"              % "1.8.3"
)

但是我得到以下错误输出

but i get the following error output

 Resolving com.typesafe.sbt#sbt-play-ebean;3.0.0 ...
[warn]  module not found: com.typesafe.sbt#sbt-play-ebean;3.0.0
[warn] ==== local: tried
[warn]   C:\Users\Dexter66\.ivy2\local\com.typesafe.sbt\sbt-play-ebean\scala_2.11\sbt_0.13\3.0.0\ivys\ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-play-ebean_2.11_0.13/3.0.0/sbt-play-ebean-3.0.0.pom
[info] Resolving jline#jline;2.14.3 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.sbt#sbt-play-ebean;3.0.0: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]          com.typesafe.sbt:sbt-play-ebean:3.0.0 (scalaVersion=2.11, sbtVersion=0.13)
[warn]
[warn]  Note: Unresolved dependencies path:
[warn]          com.typesafe.sbt:sbt-play-ebean:3.0.0 (scalaVersion=2.11, sbtVersion=0.13) (C:\Users\Dexter66\Desktop\Uebungsprojekte_Play\play-java-starter-examp
le-2.5.x - Kopie\plugin.sbt#L1-2)
[warn]            +- play-java:play-java_2.11:1.0-SNAPSHOT
[info] Wrote C:\Users\Dexter66\Desktop\Uebungsprojekte_Play\play-java-starter-example-2.5.x - Kopie\target\scala-2.11\play-java_2.11-1.0-SNAPSHOT.pom
sbt.ResolveException: unresolved dependency: com.typesafe.sbt#sbt-play-ebean;3.0.0: not found
        at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:313)
        at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:191)
        at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:168)
        at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
        at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
        at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:133)
        at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
        at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
        at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
        at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
        at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
        at xsbt.boot.Using$.withResource(Using.scala:10)
        at xsbt.boot.Using$.apply(Using.scala:9)
        at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
        at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
        at xsbt.boot.Locks$.apply0(Locks.scala:31)
        at xsbt.boot.Locks$.apply(Locks.scala:28)
        at sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
        at sbt.IvySbt.withIvy(Ivy.scala:128)
        at sbt.IvySbt.withIvy(Ivy.scala:125)
        at sbt.IvySbt$Module.withModule(Ivy.scala:156)
        at sbt.IvyActions$.updateEither(IvyActions.scala:168)
        at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1488)
        at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1484)
        at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$121.apply(Defaults.scala:1519)
        at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$121.apply(Defaults.scala:1517)
        at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:37)
        at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1522)
        at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1516)
        at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:60)
        at sbt.Classpaths$.cachedUpdate(Defaults.scala:1539)
        at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1466)
        at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1418)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
        at sbt.std.Transform$$anon$4.work(System.scala:63)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
        at sbt.Execute.work(Execute.scala:237)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.sbt#sbt-play-ebean;3.0.0: not found

Cannot start with errors.

我也已经尝试了File->无效的缓存/重新启动方法,但也没有帮助

I also tried already the described way of File-->invalid caches/restart but also did not help

推荐答案

我认为您的问题是sbt的scala版本.
sbt 0.13适用于scala 2.10,而sbt 1.0适用于scala 2.12

I think your problem is with the scala version of the sbt.
sbt 0.13 works with scala 2.10, and sbt 1.0 works with scala 2.12

您使用的所有插件必须与sbt具有相同的scala版本

all plugins that you use must be in the same scala version as the sbt

从此行:

com.typesafe.sbt:sbt-play-ebean:3.0.0(scalaVersion = 2.11 ,sbtVersion = 0.13 )

com.typesafe.sbt:sbt-play-ebean:3.0.0 (scalaVersion=2.11, sbtVersion=0.13)

我了解您使用的是sbt 0.13.x,但是在某处将scala版本设置为2.11.x

I understand that you are using sbt 0.13.x, but somewhere set the scala version to 2.11.x

(可能在 project/build.sbt project/plugins.sbt 中)
您不应该在这些文件中设置Scala版本

(maybe in project/build.sbt or project/plugins.sbt)
you shouldn't set the scala version in those files

澄清一下,我不是在谈论

to clarify, I'm not talking about the

scalaVersion := "2.11.11"

您的build.sbt中有,很好.
我说的是sbt程序的scala版本,它是自我的

that you have in your build.sbt, it is fine.
I'm talking about the scala version of the sbt process it's self

这篇关于带有播放框架的未解决的依赖项SBT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆