bluedawg
bluedawg

Reputation: 39

I can't import securesocial.core.java.BaseUserService; When installing securesocial in play framework

I've done the following:

  1. I've copied the contents of module-code/ into the modules/securesocial/ folder in my app root.
  2. I've updated my Build.scala to be the following:

    import sbt._
    import Keys._
    import PlayProject._
    
    object ApplicationBuild extends Build {
    
    val appName         = "XXXXXX"
    val appVersion      = "1.0-SNAPSHOT"
    
    val appDependencies = Seq(
      // Add your project dependencies here,
    )
    
    val ssDependencies = Seq(
      // Add your project dependencies here,
      "com.typesafe" %% "play-plugins-util" % "2.0.1",
      "org.mindrot" % "jbcrypt" % "0.3m"
    )
    
    val secureSocial = PlayProject(
        "securesocial", appVersion, ssDependencies, mainLang = SCALA, path = file("modules/securesocial")
    ).settings(
      resolvers ++= Seq(
        "jBCrypt Repository" at "http://repo1.maven.org/maven2/org/",
        "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
      )
    )
    
    // Only compile the bootstrap bootstrap.less file and any other *.less file in the stylesheets directory
    def customLessEntryPoints(base: File): PathFinder = (
        (base / "app" / "assets" / "stylesheets" / "bootstrap" * "bootstrap.less") +++
        (base / "app" / "assets" / "stylesheets" / "bootstrap" * "responsive.less") +++
        (base / "app" / "assets" / "stylesheets" / "bootstrap" * "tooltip.less") +++
        (base / "app" / "assets" / "stylesheets" * "*.less")
    )
    
    val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
      // Add your own project settings here
      lessEntryPoints <<= baseDirectory(customLessEntryPoints)
    ).dependsOn(secureSocial).aggregate(secureSocial)
    
  3. I've added include "securesocial.conf" to application.conf.

I can't figure out why it still gives me an error :(. The error I get is:

not found: value securesocial

Upvotes: 0

Views: 718

Answers (1)

Jorge
Jorge

Reputation: 1403

The module is available as a downloadable dependency now. If you change your Build.scala file to something like the sample below it should work:

object ApplicationBuild extends Build {
val appName         = "myapp"
val appVersion      = "1.0-SNAPSHOT"

val appDependencies = Seq(
    "securesocial" % "securesocial_2.9.1" % "2.0.6"
)
val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings(
  resolvers += Resolver.url("SecureSocial Repository", url("http://securesocial.ws/repository/releases/"))(Resolver.ivyStylePatterns)
)
}

There are detailed instructions on how to install it on the project user guide.

Upvotes: 3

Related Questions