SecureSocial unresolved dependency playframework
Asked Answered
E

3

5

I'm trying to add securesocial into my Play 2.3.x project. Here is what I have in my build.sbt file.

resolvers += Resolver.sonatypeRepo("releases")
libraryDependencies += "ws.securesocial" %% "securesocial" % "2.1.4"

and here is the stack trace that I am getting

[info] Loading project definition from /home/chris/dev/suredbits-web/project
[info] Set current project to suredbits-web (in build file:/home/chris/dev/suredbits-web/)
[info] Updating {file:/home/chris/dev/suredbits-web/}root...
[info] Resolving ws.securesocial#securesocial_2.11;2.1.4 ...
[warn]  module not found: ws.securesocial#securesocial_2.11;2.1.4
[warn] ==== local: tried
[warn]   /home/chris/.ivy2/local/ws.securesocial/securesocial_2.11/2.1.4/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/ws/securesocial/securesocial_2.11/2.1.4/securesocial_2.11-2.1.4.pom
[warn] ==== Typesafe Releases Repository: tried
[warn]   https://repo.typesafe.com/typesafe/releases/ws/securesocial/securesocial_2.11/2.1.4/securesocial_2.11-2.1.4.pom
[warn] ==== sonatype-releases: tried
[warn]   https://oss.sonatype.org/content/repositories/releases/ws/securesocial/securesocial_2.11/2.1.4/securesocial_2.11-2.1.4.pom
[info] Resolving jline#jline;2.12 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: ws.securesocial#securesocial_2.11;2.1.4: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Unresolved dependencies path:
[warn]      ws.securesocial:securesocial_2.11:2.1.4 (/home/chris/dev/suredbits-web/build.sbt#L13-40)
[warn]        +- com.suredbits.web:suredbits-web_2.11:0.0
sbt.ResolveException: unresolved dependency: ws.securesocial#securesocial_2.11;2.1.4: not found
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:278)
    at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:175)
    at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:157)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:151)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:151)
    at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:128)
    at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:56)
    at sbt.IvySbt$$anon$4.call(Ivy.scala:64)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
    at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
    at xsbt.boot.Using$.withResource(Using.scala:10)
    at xsbt.boot.Using$.apply(Using.scala:9)
    at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
    at xsbt.boot.Locks$.apply0(Locks.scala:31)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:64)
    at sbt.IvySbt.withIvy(Ivy.scala:123)
    at sbt.IvySbt.withIvy(Ivy.scala:120)
    at sbt.IvySbt$Module.withModule(Ivy.scala:151)
    at sbt.IvyActions$.updateEither(IvyActions.scala:157)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1318)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1315)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$85.apply(Defaults.scala:1345)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$85.apply(Defaults.scala:1343)
    at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1348)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1342)
    at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
    at sbt.Classpaths$.cachedUpdate(Defaults.scala:1360)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1300)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1275)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon$4.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:235)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved dependency: ws.securesocial#securesocial_2.11;2.1.4: not found
[error] Total time: 5 s, completed Feb 18, 2015 5:20:02 AM
Electrolyze answered 18/2, 2015 at 13:22 Comment(0)
L
4

SecureSocial 2.1.4 is not built for Scala 2.11, which is what you're using. You either need to switch back to Scala 2.10 if you want to use 2.1.4, or wait until 3.0 is released.

You can try one of the 3.0 milestones that are built for Scala 2.11, but I can't say how production ready they are.

libraryDependencies += "ws.securesocial" %% "securesocial" % "3.0-M3"
Lebar answered 18/2, 2015 at 15:20 Comment(5)
Would you recommend using securesocial for handling auth stuff?Electrolyze
I don't use it personally, but it appears to be the most widely used at this point. I would definitely recommend at least using a popular library, as you'll have some confidence that it's been vetted by a large portion of the community.Lebar
What is a popular library that is worth checking out?Electrolyze
I've explained the big three in this answer. To me, the choice between them depends on your needs. Some are more fully featured than others. I used play2-auth because I've already implemented some features myself and required a more barebones authentication systemLebar
I'm using Silhouette. I find it github.com/mohiva/play-silhouette. Its a fork of SecureSocial but I find it much easier to use and configure.Burgonet
S
3

When you use %% instead of single %, sbt tries to find the dependency version specific to your scala version... in this case securesocial_2.11. There is no SecureSocial version 2.1.4 for securesocial_2.11... at least not yet.

If you take a look at Sonatype repository for scala 2.10 and 2.11, you will see that

for 2.10 ( https://oss.sonatype.org/content/repositories/releases/ws/securesocial/securesocial_2.10/ )you have versions :

  • 2.1.3
  • 2.1.4
  • 3.0-M1-play-2.2.x
  • 3.0-M1
  • 3.0-M2
  • 3.0-M3

but for scala 2.11 ( https://oss.sonatype.org/content/repositories/releases/ws/securesocial/securesocial_2.11/ ), you have just these

  • 3.0-M1
  • 3.0-M2
  • 3.0-M3

So... you should use one of the available options for scala 2.11 or use scala 2.10.

libraryDependencies += "ws.securesocial" %% "securesocial" % "3.0-M3"
Solidstate answered 18/2, 2015 at 15:22 Comment(0)
R
0

there is an option, you should try with this.

libraryDependencies += "ws.securesocial" % "securesocial_2.11" % "2.1.4.1-for-play24"

It Works for me.

Regards!

Rabin answered 2/1, 2017 at 16:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.