Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scala Play / SBT Change Order of Resolvers

Tags:

scala

sbt

Is there a way to change the order Resolvers are chosen during build time. My goal is to have the typesafe repo attempted last, after local, and internal repo is tried and not found.

My *.boot.properties in my play (you see that I replaced 'typesafe' with my local):

[repositories]
  local
  maven-local
  play-local: file:///C:/path/to/my/play/repository/locl/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
  typesafe-ivy-releases: https://locl/repo/address/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
  maven-central

However, during my build, the typesafe repo is still loaded

[debug]         URLRepository(typesafe-ivy-releases,Patterns(ivyPatterns=List(http://repo.typesafe.com/typesafe/ivy-releases/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]), artifactPatterns=List(http://repo.typesafe.com/typesafe/ivy-releases/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]), isMavenCompatible=false))

Any ideas on how to make the typesafe repo go after other resolvers?

like image 709
anonymoose Avatar asked Apr 01 '14 18:04

anonymoose


1 Answers

As I understand you want to use local repository as more as possible. You don't need an order of repositories. Just use SBT key setting:

val offline = true

Here is an explanation of it from SBT documentation:

val offline = SettingKey[Boolean]("offline", "Configures sbt to work without a network connection where possible.", ASetting)
like image 144
Roman Kazanovskyi Avatar answered Nov 10 '22 04:11

Roman Kazanovskyi