gpt4 book ai didi

playframework - 在 Play Framework 中添加 scalaVersion 的位置

转载 作者:行者123 更新时间:2023-12-02 03:28:08 29 4
gpt4 key购买 nike

我遇到了以下建议添加 scalaVersion 的错误消息。我在我的 build.sbt 中添加了 ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) } 但这并没有解决它

[warn] Scala version was updated by one of library dependencies:
[warn] * org.scala-lang:scala-library:(2.10.0, 2.10.3, 2.10.1, 2.10.2) -> 2.10.4
[warn] To force scalaVersion, add the following:
[warn] ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }
[warn] Run 'evicted' to see detailed eviction warnings

最佳答案

当您运行此命令时:

activator new test play-scala

...这是创建的 build.sbt 文件:

name := """test"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.11.6"

libraryDependencies ++= Seq(
jdbc,
cache,
ws,
specs2 % Test
)

resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"

// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator

play-scala 模板在文件中添加了一些不受欢迎的信息,但您可以清楚地看到 scalaVersion 是如何指定的。

关于playframework - 在 Play Framework 中添加 scalaVersion 的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29119144/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com