Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is an SBT resolver?

Tags:

scala

sbt

There are a lot of questions and guides about how to include SBT resolver to a project, but still there are no info about what is an SBT resolver and how can it help including dependencies to a project?

like image 949
danya tekunov Avatar asked Aug 31 '25 01:08

danya tekunov


1 Answers

sbt resolver is the configuration for repository that contains jars and their dependencies
for example the below is a resolver definition for a repository called Sonatype and it points at snapshot releases (dev versions)

resolvers += 
  "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"

When you specify a dependncy in sbt (or any other build system for that matter) the build system needs to know where to look to find that dependency. in JVM world a lot of dependencies are stored in the default maven2 repo ( https://repo1.maven.org/maven2/) but sometimes you need to use other custom repositories and you'd define add a resolver for that

like image 125
Arnon Rotem-Gal-Oz Avatar answered Sep 02 '25 17:09

Arnon Rotem-Gal-Oz