13

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?

anonymoose
  • 151
  • 5
  • http://stackoverflow.com/questions/10031382/sbt-0-11-2-use-only-corporate-nexus-repository-for-dependencies/16985954#16985954 this looks similar to my issue, but I'm using a newer version of play and I do not have a .sbt directory. I'm not sure if ~ (home) in that thread is referring to %PLAY_HOME% or %USER_HOME% – anonymoose Apr 01 '14 at 20:02

1 Answers1

1

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)
Roman Kazanovskyi
  • 3,370
  • 1
  • 21
  • 22