Can SBT publish to JFrog artifactory

后端 未结 2 1877
青春惊慌失措
青春惊慌失措 2020-12-30 12:20

My organization uses JFROG artifactory for distribution of all jars.

So far I have always used SBT for my Scala development. But now when i am searching for ways to

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-30 13:04

    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", "", "")
    

    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", "", "")
    

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

提交回复
热议问题