I can provide a ~/.sbt/repositories
file to override the repositories that SBT uses for resolving dependencies. When the file is present the default repositories aren't used.
What are the default repositories in SBT (0.13)? I want to add them to my repositories file so I can resolve dependencies inside and outside the network without having to change/move the file.
sbt/repositories. The repositories file is an external configuration for the Launcher. The exact syntax for the configuration file is detailed in the sbt Launcher Configuration.
The publishLocal action is used to publish your project to your Ivy local file repository, which is usually located at $HOME/. ivy2/local/ . You can then use this project from other projects on the same machine.
By default, sbt uses the standard Ivy home directory location ${user. home}/. ivy2/ . This can be configured machine-wide, for use by both the sbt launcher and by projects, by setting the system property sbt.
If you have JAR files (unmanaged dependencies) that you want to use in your project, simply copy them to the lib folder in the root directory of your SBT project, and SBT will find them automatically.
If you want to add to the default repositories (instead of replacing them), I think the easiest would be to create an .sbt
file inside ~/sbt/0.13/
, e.g. ~/sbt/0.13/my-resolvers.sbt
:
resolvers += "Oracle Repository" at "http://download.oracle.com/maven"
Otherwise, you can find out in the sbt console via show externalResolvers
. The entries are stored in sbt.boot.properties, which ends up as the sbt/sbt.boot.properties
file in the launcher jar (for example ~/.sbt/launchers/0.13.17/sbt-launch.jar
):
[repositories]
local
local-preloaded-ivy: file:///${sbt.preloaded-${sbt.global.base-${user.home}/.sbt}/preloaded/}, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
local-preloaded: file:///${sbt.preloaded-${sbt.global.base-${user.home}/.sbt}/preloaded/}
maven-central
typesafe-ivy-releases: https://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sbt-ivy-snapshots: https://repo.scala-sbt.org/scalasbt/ivy-snapshots/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With