- The best way to create a new Play project is
sbt new playframework/play-scala-seed.g8
https://www.playframework.com/getting-started
- What is sbt version for your project? Look at
project/build.properties
.
Use sbt 1.7.2-
If you're using sbt 1.7.3+ (1.8.x) you should add the following to project/plugins.sbt
ThisBuild / libraryDependencySchemes ++= Seq(
"org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always
)
https://github.com/playframework/playframework/issues/11522
- Where did you get guice 5.1.1? Mvnrepository knows 5.1.0-
https://mvnrepository.com/artifact/com.google.inject/guice
5.1.1 is snapshot
resolvers ++= Resolver.sonatypeOssRepos("snapshots"),
libraryDependencies ++= Seq(
"com.google.inject" % "guice" % "5.1.1-SNAPSHOT",
...
https://oss.sonatype.org/content/repositories/snapshots/com/google/inject/guice/
https://oss.sonatype.org/content/groups/public/com/google/inject/guice/
JDK 8 is default. JDK 11 is supported since Play 2.8.x
https://www.playframework.com/documentation/2.8.19/Highlights28#Java-11-support
In JDK 17 some adjustments are needed
If you are using Guice you have to make use of the latest version ...
https://github.com/playframework/playframework/releases/2.8.15
But you're already using the latest (and even fresher) Guice so this should be ok.
- Sometimes there can be incompatibilities between Play and sbt versions
NoSuchMethodError with Play scala.tools.nsc.Settings.bootclasspath()
(but this is at runtime, not build time).