Tower
Tower

Reputation: 102945

Why doesn't SBT download my own libraryDependencies?

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?

Upvotes: 12

Views: 14103

Answers (1)

om-nom-nom
om-nom-nom

Reputation: 62855

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.

Upvotes: 14

Related Questions