Sbt publishing to repository

If you run a maven repository for your own company/projects here is how you can publish your artifacts using SBT. The repository manager I use is archiva but it should be similar for nexus etc too.

in your build.sbt file

credentials += Credentials("Repository Archiva Managed internal Repository","", "admin", "somepass")
//or use a file
//credentials += Credentials(Path.userHome / ".ivy2" / ".archiva-cred")
publishMavenStyle := true
publishArtifact in Test := false
publishTo := {
  val archiva = ""
    Some("internal"  at archiva + "internal")

important points:

If you are using a file to store your credentials (which is the better way) here is the file format

realm=Repository Archiva Managed internal Repository


Similar posts

Powered by TF-IDF/Cosine similarity

First published on 2018-05-09

Generated on May 29, 2024, 10:02 PM


Mobile optimized version. Desktop version.