How to use the appDependencies & maven (jbcrypt)?

650 views
Skip to first unread message

Jari Pennanen

unread,
Jun 24, 2012, 2:01:37 PM6/24/12
to play-fr...@googlegroups.com
I tried to add jbcrypt from mvnrepository.com, and it says it can't be found... 

How do I use this thing?

import sbt._
import Keys._
import PlayProject._

object ApplicationBuild extends Build {

    val appName         = "myapp"
    val appVersion      = "1.0-SNAPSHOT"

    val appDependencies = Seq(
      // Add your project dependencies here,
      "jp.t2v" %% "play20.auth" % "0.3-SNAPSHOT",
      "org.mindrot" %% "jbcrypt" % "0.3m"
    )

    val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings(
      resolvers += "play2auth repo" at "http://www.t2v.jp/maven-repo/",
      resolvers += "jbcrypt repo" at "http://mvnrepository.com/"
    )

}


After that I run "play", and playshell: "idea" and get a lot of thing, but this:

...
[error] {file:/.../*:update: sbt.ResolveException: unresolved dependency: org.mindrot#jbcrypt_2.9.1;0.3m: not found

Jari Pennanen

unread,
Jun 24, 2012, 2:13:23 PM6/24/12
to play-fr...@googlegroups.com
Found it, I went to http://mvnrepository.com/artifact/org.mindrot/jbcrypt/0.3m and noticed the tab "SBT" there was a hint, I had to write in this case:

"org.mindrot" % "jbcrypt" % "0.3m"

Notice only one percent sign, now it works.

johanandren

unread,
Jun 24, 2012, 4:56:47 PM6/24/12
to play-fr...@googlegroups.com
Just FYI:

The double percentage is a scala-library-specific which just adds the scala version to the artifact name, this is needed for scala libraries as the Scala versions are not binary compatible with each other, so there is need for one jar compiled with/for Scala 2.8 and one for 2.9.

Since jbcrypt is a Java library, no such version is needed (or exists).
Reply all
Reply to author
Forward
0 new messages