Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't SBT download my own libraryDependencies?

Tags:

sbt

I'm setting up the dependencies for my first Scala project using SBT.

This is my build.sbt file:

name := "MyProj"

version := "1.0"

scalaVersion := "2.9.2"

libraryDependencies += "org.eclipse.jgit" % "org.eclipse.jgit" % "2.0.0.201206130900-r"

When I run update inside the interactive mode, it updates something from org.scala-lang... but it never downloads my dependencies. How do I get it to install/download dependencies?

like image 430
Tower Avatar asked Aug 31 '12 17:08

Tower


1 Answers

Some of the common repositories are already predefined, but it looks like your library is not in them, so you have to add the Eclipse repository to the list of resolvers (add this line to build.sbt):

resolvers += "jgit-repository" at "http://download.eclipse.org/jgit/maven"

just like you would in maven (with <repository>...</repository> record)

Don't forget to reload your sbt console and then update to fetch the dependency or just start sbt afresh.

like image 169
om-nom-nom Avatar answered Dec 08 '22 09:12

om-nom-nom