To deploy SBT build artifacts to repositories in Artifactory, add the following code snippets to your build.sbt
file.
For releases, add:
publishTo := Some("Artifactory Realm" at "http://<host>:<port>/artifactory/<repo-key>") credentials += Credentials("Artifactory Realm", "<host>", "<USERNAME>", "<PASS>")
For snapshots, add:
publishTo := Some("Artifactory Realm" at "http://<host>:<port>/artifactory/<repo-key>;build.timestamp=" + new java.util.Date().getTime) credentials += Credentials("Artifactory Realm", "<host>", "<USERNAME>", "<PASS>")
Where <host>:<port>
is the host URL and port on which Artifactory is running, and repo-key is the Artifactory repository to which you are deploying artifacts.