Can SBT publish to JFrog artifactory

SBT can publish/resolve from Artifactory without any special plugin.

For example, you can use the following in your build.sbt to publish released to Artifactory:

publishTo := Some("Artifactory Realm" at "http://localhost:8081/artifactory/libs-release-local")
credentials += Credentials("Artifactory Realm", "localhost", "<USERNAME>", "<PASS>")

Or the following to publish SNAPSHOTs (unique):

publishTo := Some("Artifactory Realm" at "http://localhost:8081/artifactory/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
credentials += Credentials("Artifactory Realm", "localhost", "<USERNAME>", "<PASS>")

If you are using Artifactory 4.x, you can use the "Set Me Up" feature for getting the required settings for working with SBT

enter image description here


Use ~/.sbt/.credentials way more secure and more flexible for developers and CI being on the same environment.

https://www.scala-sbt.org/1.x/docs/Publishing.html#Credentials

enter image description here