简体   繁体   中英

How do i reference something in the play framework sbt file?

If my dependence is this:

"ws.securesocial" %% "securesocial" % "2.1"

ie

libraryDependencies ++= Seq(
    "ws.securesocial" %% "securesocial" % "2.1"
)

Then what is the resolver meant to look like - and how would i find a different, um, version?

I have this as my resolver (same file, next line):

resolvers += "Maven (sontaype) Repository" at "https://oss.sonatype.org/content/repositories/snapshots"

Don't ask me why maven repo is called sonatype, that's dumb! Anyway, how can i find out what versions to put as the dependency? I don't want to use snapshot - but the link i have is , which is stupid (why would anyone use snapshot?) - how can i get stable releases?

Ugh! Who makes this stuff?

I'm still not sure how it works - play does things magically, and honestly i wish it wouldn't.

Anyway - as in my question, only some fool tutorial used the snapshot release (never ever, ever use a snapshot release. Always use stable! There is never a reason to use snapshot!)

So you now have:

libraryDependencies ++= Seq(
    "ws.securesocial" %% "securesocial" % "2.1.4-for-play24"
)

resolvers += "Maven (sontaype) Repository" at "https://oss.sonatype.org/content/repositories/releases"

Ok, so we're pointing at stable - now for our case, you'd go to

https://oss.sonatype.org/content/repositories/releases

then "ws", then "securesocial", and now play does magic - it seems to "know" to look at 2.11? I'm not sure why, it just does. So I went into "2.11" , and then selected

"2.1.4-for-play24"

Because why not? I'm not even sure if this thing is still being developed, or why it is for 2.4 and not 2.5 or 2.6!!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM