playframework-2.2

Why does sbt report missing libraries for Scala 2.10.2 (since Aug, 1th)?

女生的网名这么多〃 提交于 2019-12-01 04:03:36
问题 I've got a number of Play 2.2.x apps that have been building without problem for months. However, starting on 1 Aug 2014, I started getting the following warnings and errors: Getting org.scala-sbt sbt 0.13.0 ... :: problems summary :: :::: WARNINGS module not found: org.scala-lang#scala-library;2.10.2 ==== local: tried /Users/dpope/.ivy2/local/org.scala-lang/scala-library/2.10.2/ivys/ivy.xml ==== typesafe-ivy-releases: tried repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library

Scala Play 2.2 application crashes after deploying in Heroku: target/start No such file or directory

≯℡__Kan透↙ 提交于 2019-12-01 03:34:45
I've been fighting with this for hours and I can't figure out why after deploying my Scala Play 2.2 application in Heroku I get this stacktrace: 2013-09-30T01:05:09.413177+00:00 heroku[web.1]: Starting process with command `target/start -Dhttp.port=18174 $PLAY_OPTS` 2013-09-30T01:05:10.931893+00:00 app[web.1]: bash: target/start: No such file or directory 2013-09-30T01:05:12.382399+00:00 heroku[web.1]: Process exited with status 127 2013-09-30T01:05:12.414050+00:00 heroku[web.1]: State changed from starting to crashed I've tried several Procfile versions with no success, some examples are: web

Upgrading project to version 2.2.0 of the Play Framework

匆匆过客 提交于 2019-12-01 02:18:31
When upgrading a play project to 2.2.0 the following error comes up: sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.2.0: not found Edit the following line in project/plugin.sbt: addSbtPlugin("play" % "sbt-plugin" % "2.2.0") to addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0") Make sure you have the correct version of sbt in build.properties : sbt.version=0.13.0 There are even more things, that you need to do to upgrade your application: Play 2.2 migration guide While upgrading, you may face a problem to package your application as .war Play 2.1.4 onwards, support for

How to disable ScalaDoc generation in dist task in Play 2.2.x (using project/build.scala)?

懵懂的女人 提交于 2019-11-30 10:56:56
问题 Adding the following settings to the build.sbt file of a Play 2.2.x app does not disable Scaladoc generation. How can it be disabled? play.Project(appName, appVersion, appDependencies) .settings(scalaVersion := "2.10.3") .settings(jsSettings : _*) .settings( publishArtifact in (Compile, packageDoc) := false, publishArtifact in packageDoc := false ) 回答1: Add the following settings to the Play project: sources in (Compile,doc) := Seq.empty publishArtifact in (Compile, packageDoc) := false With

Play ! 2.2.4 / Akka : tests failed when run together, but ok separately

吃可爱长大的小学妹 提交于 2019-11-30 09:08:46
I have a controller that ask s an actor before answering and two test cases: When I run play test the second test fails When I run play testOnly ApplicationSpec and play testOnly IntegrationSpec , both succeed I think that the Akka system is shut down by the first test and not started again by the second test, but why ? And how can I work around that ? The controller: object Application extends Controller { implicit val _ = Timeout(3 seconds) val gamesManagerRef = Akka.system().actorOf(GamesManager.props) def index = Authenticated.async { implicit request => (gamesManagerRef ? GamesManager

Overriding onRouteRequest with custom handler in Play! scala

天大地大妈咪最大 提交于 2019-11-30 09:02:16
问题 I'm using Play 2.2.1 and trying to override the onRouteRequest function in GlobalSettings. All the examples that I found online are for before Play 2.2.x and they don't seem to work in 2.2.x. Basically want to set some custom stuff in the response header for all responses. So far, I've tried the following, based on this: object Global extends GlobalSettings { override def onRouteRequest(request: RequestHeader): Option[Handler] = { super.onRouteRequest(request).map { handler => handler match {

Play framework 2.2.1: Create Http.Context for tests

安稳与你 提交于 2019-11-30 05:07:16
I've been trying to create an Http.Context for tests using its constructor unsuccessfully. Does anybody see what I'm doing wrong? I've looked at the following but it only applies to Play 2.0: Play framework 2.0: Store values in Http.Context It looks like the class changed for 2.2.1 and it has more parameters for the constructor as shown here: https://github.com/playframework/playframework/blob/2.1.x/framework/src/play/src/main/java/play/mvc/Http.java This my code: import java.util.Map; import java.util.Collections; import org.junit.*; import static org.mockito.Mockito.*; import play.mvc.*;

How to disable ScalaDoc generation in dist task in Play 2.2.x (using project/build.scala)?

…衆ロ難τιáo~ 提交于 2019-11-29 22:54:39
Adding the following settings to the build.sbt file of a Play 2.2.x app does not disable Scaladoc generation. How can it be disabled? play.Project(appName, appVersion, appDependencies) .settings(scalaVersion := "2.10.3") .settings(jsSettings : _*) .settings( publishArtifact in (Compile, packageDoc) := false, publishArtifact in packageDoc := false ) Jacek Laskowski Add the following settings to the Play project: sources in (Compile,doc) := Seq.empty publishArtifact in (Compile, packageDoc) := false With the change it should be as follows: play.Project(appName, appVersion, appDependencies)

Play Framework 2.2.1 - Compilation error: “method render in class index cannot be applied to given types;”

流过昼夜 提交于 2019-11-29 14:19:14
I am new to Play Framework, and attempting to build a Todo-list from this manual. When I try to run the application I get the error: Compilation Error error: method render in class index cannot be applied to given types; My code is (the relevant parts): MainController.java : final static Form<Task> taskForm = Form.form(Task.class); public static Result tasks() { return ok( views.html.index.render(Task.all(), taskForm) ); } index.sacala.html : @(tasks: List[Models.Task], taskForm: Form[Models.Task]) I looked around, the closest thread I found was this one, but I was not able to resolve the

Play ! 2.2.4 / Akka : tests failed when run together, but ok separately

 ̄綄美尐妖づ 提交于 2019-11-29 13:34:19
问题 I have a controller that ask s an actor before answering and two test cases: When I run play test the second test fails When I run play testOnly ApplicationSpec and play testOnly IntegrationSpec , both succeed I think that the Akka system is shut down by the first test and not started again by the second test, but why ? And how can I work around that ? The controller: object Application extends Controller { implicit val _ = Timeout(3 seconds) val gamesManagerRef = Akka.system().actorOf