Search code examples
scalaplayframeworksbtplayframework-2.2securesocial

Play build.scala to build.sbt isn't working for secureSocial plugin. I don't understand why?


I'm new in playFrameWork I'm trying to figure out how the build.sbt file works in play framework 2.2 i'm also trying to make the secureSocial plugin works

In the sample app of the plugin secureSocial, there is a built.scala containing :

import sbt._
import Keys._
import play.Project._

object ApplicationBuild extends Build {

    val appName         = "SecureTestApp"
    val appVersion      = "1.0"

    val appDependencies = Seq(
      "ws.securesocial" %% "securesocial" % "master-SNAPSHOT"
    )
    val main = play.Project(appName, appVersion, appDependencies).settings(
      resolvers += Resolver.sonatypeRepo("snapshots")
    )
}   

Whith the command play run, everything wrok fine and the page is showing itself AnyWay, as i understand it, i should be able to delete project/built.scala and replace it by /build.sbt. i think my file is ok and look like this :

name := "SecureTestApp"

version := "1.0-SNAPSHOT"

libraryDependencies ++= Seq(
"securesocial" %% "securesocial" % "master-SNAPSHOT"
)

resolvers += Resolver.url("Scala Sbt", url("http://repo.scala-sbt.org/scalasbt/sbt-plugin-snapshots"))(Resolver.ivyStylePatterns)

resolvers += Resolver.sonatypeRepo("snapshots")

play.Project.playScalaSettings

This time the play run command work fine the server launch itself but when i launch and test the app homePage, i get the error : Compilation error "object RuntimeEnvironment is not a member of package securesocial.core"

Play is no longer able to find the package secureSocial. And i don't understand why? What am i doing wrong?

is there a parametter someWhere to set?

Thanks in advance for any answer!

Edit : whith the line

"ws.securesocial" %% "securesocial" % "2.1.3"

put in both file, play doensn't fine the dependency in both for package secureSocial.


Solution

  • I think the problem is that this object simply does not exist in the version that is published to the repository. If you take a look at the sources, there is no file RuntimeEnvironment.scala in which it is supposed to be defined.

    Further if you check the date when the file appeared on github it is 7th May, and the last modified date in the repo shows 23-Jan-2014.

    So the bottom line is that your build is working just fine, but the library you're using is not the one that in in the master branch on the github at the moment.