Search code examples
javascalaplayframeworkdeadbolt-2

Deadbolt 2.5 - Error while importing SBT project


Sorry in advance for my bad english..

Today I wanted to implement Deadbolt in my project. I read the documentation in this webstite, but at the begining I had problems.

At the first instruction it says that I need to add these lines in my built.sbt file.

libraryDependencies ++= Seq(
"be.objectify" %% "deadbolt-scala" % "2.5.1-SNAPSHOT"
)

resolvers += Resolver.sonatypeRepo("snapshots")




I use IntellijIDEA and when I refresh the project I have this error.

SBT 'Simulateur' project refresh failed Error:Error:Error while importing SBT project:

[info] Resolving com.typesafe.play#play-doc_2.11;1.2.2 ...

[info] Resolving org.pegdown#pegdown;1.4.0 ...

[info] Resolving org.parboiled#parboiled-java;1.1.5 ...

[info] Resolving org.parboiled#parboiled-core;1.1.5 ...

[info] Resolving org.ow2.asm#asm;4.1 ...

[info] Resolving org.ow2.asm#asm-tree;4.1 ...

[info] Resolving org.ow2.asm#asm-analysis;4.1 ...

[info] Resolving org.ow2.asm#asm-util;4.1 ...

[info] Resolving jline#jline;2.12.1 ...

[warn] ::::::::::::::::::::::::::::::::::::::::::::::

[warn] :: UNRESOLVED DEPENDENCIES ::

[warn] ::::::::::::::::::::::::::::::::::::::::::::::

[warn] :: be.objectify#deadbolt-scala_2.11;2.5.1-SNAPSHOT: not found

[warn] ::::::::::::::::::::::::::::::::::::::::::::::

[trace] Stack trace suppressed: run 'last *:update' for the full output.

[trace] Stack trace suppressed: run 'last :ssExtractDependencies' for the full output.

[error] (
:update) sbt.ResolveException: unresolved dependency:be.objectify#deadbolt-scala_2.11;2.5.1-SNAPSHOT: not found

[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: be.objectify#deadbolt-scala_2.11;2.5.1-SNAPSHOT: not found

[error] Total time: 18 s, completed 20 déc. 2016 22:00:15

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0

See complete log in C:\Users\PCDamien.IntelliJIdea2016.2\system\log\sbt.last.log




Now I will show my built.sbt file

name := "Simulateur"

version := "1.0"

lazy val `simulateur` = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.11.7"

libraryDependencies ++= Seq( jdbc , cache , ws   , specs2 % Test, "be.objectify" %% "deadbolt-scala" % "2.5.1-SNAPSHOT" )

unmanagedResourceDirectories in Test <+=  baseDirectory ( _ /"target/web/public/test" )  

resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases"

resolvers += Resolver.sonatypeRepo("snapshots")

routesGenerator := StaticRoutesGenerator

Thank you in advance for your help ! :)


Solution

  • Sorry, this is entirely my fault. I released 2.5.1 a couple of days ago and forgot to update the version when I moved the documentation from beta to final.

    The correct dependency is

    libraryDependencies ++= Seq(
      "be.objectify" %% "deadbolt-scala" % "2.5.1"
    )
    

    This has been corrected on the web site you reference.