This project is a fork of https://github.com/project-ncl/sbt-publish-with-headers
Why forking?
- The initial plugin doesn't seem to be published to Maven Central
- We brought fixes, improvements and changed how the plugin works.
This plugin allows you to publish artifacts to a Maven repository with custom HTTP headers.
It also automatically configure your sbt project so that it can fetch dependencies from a Maven repository with custom HTTP headers.
Enable the plugin in your project/plugins.sbt
file:
addSbtPlugin("com.guizmaii" % "sbt-publish-with-headers" % "1.0.0")
Configure the plugin in your build.sbt
file:
publishToWithHeaders := Some("my-repo-requiring-custom-headers" at "https://maven-repo-host/path")
headersToPublishWith := Seq("header-key" -> "header-value", "header-key-2" -> "header-value-2")
To publish to a Maven repository with http headers run:
sbt publishWithHeaders
There's nothing for you to do.
The plugin will automatically configure your sbt project so that it can fetch dependencies from your Maven repository requiring custom HTTP headers.