Playframework 2.2添加依赖(Playframework 2.2 adding dependency)

我正在努力使用Playframework 2.2的新项目。 我的问题是我找不到任何Build.scala。 这是正常的吗? 为什么? 我找不到它。

我还尝试从一个旧项目中添加一个Build.scala(项目工作正常)但是在启动play时我遇到了一个错误:

[error] java.lang.ExceptionInInitializerError

有人有想法吗?

I'm struggling with a new project using Playframework 2.2. My problem is that I can not find any Build.scala. Is it normal? why? I couldn't find it.

I also tried to add a Build.scala from an old project (the project works perfectly) but then I got an error when launching play:

[error] java.lang.ExceptionInInitializerError

Anyone has an idea?

最满意答案

您可以在build.sbt文件中指定这些,如下build.sbt :

libraryDependencies ++= Seq( // "group" % "artifact" % "version" )

确保在该块之前和之后有新的空行。

You can specify these in the build.sbt file like so:

libraryDependencies ++= Seq( // "group" % "artifact" % "version" )

Make sure you have empty new lines before and after that block.

Playframework 2.2添加依赖(Playframework 2.2 adding dependency)

我正在努力使用Playframework 2.2的新项目。 我的问题是我找不到任何Build.scala。 这是正常的吗? 为什么? 我找不到它。

我还尝试从一个旧项目中添加一个Build.scala(项目工作正常)但是在启动play时我遇到了一个错误:

[error] java.lang.ExceptionInInitializerError

有人有想法吗?

I'm struggling with a new project using Playframework 2.2. My problem is that I can not find any Build.scala. Is it normal? why? I couldn't find it.

I also tried to add a Build.scala from an old project (the project works perfectly) but then I got an error when launching play:

[error] java.lang.ExceptionInInitializerError

Anyone has an idea?

最满意答案

您可以在build.sbt文件中指定这些,如下build.sbt :

libraryDependencies ++= Seq( // "group" % "artifact" % "version" )

确保在该块之前和之后有新的空行。

You can specify these in the build.sbt file like so:

libraryDependencies ++= Seq( // "group" % "artifact" % "version" )

Make sure you have empty new lines before and after that block.