{"id":16129147,"url":"https://github.com/laughedelic/sbt-publish-more","last_synced_at":"2025-07-15T13:22:57.940Z","repository":{"id":141990821,"uuid":"102912277","full_name":"laughedelic/sbt-publish-more","owner":"laughedelic","description":":outbox_tray: Publish artifacts to more than one repository","archived":false,"fork":false,"pushed_at":"2018-04-15T12:00:19.000Z","size":32,"stargazers_count":23,"open_issues_count":4,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-16T00:22:57.800Z","etag":null,"topics":["artifacts","publish-resolvers","publishing","sbt","sbt-plugin","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laughedelic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-08T23:23:01.000Z","updated_at":"2023-02-09T17:05:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"870050b1-0cc1-4dc7-b8e9-54911de8519d","html_url":"https://github.com/laughedelic/sbt-publish-more","commit_stats":{"total_commits":32,"total_committers":2,"mean_commits":16.0,"dds":0.0625,"last_synced_commit":"41fcdb930ede3d8515226a39e754a9e5f8c566cf"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/laughedelic/sbt-publish-more","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laughedelic%2Fsbt-publish-more","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laughedelic%2Fsbt-publish-more/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laughedelic%2Fsbt-publish-more/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laughedelic%2Fsbt-publish-more/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laughedelic","download_url":"https://codeload.github.com/laughedelic/sbt-publish-more/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laughedelic%2Fsbt-publish-more/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265437658,"owners_count":23765125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artifacts","publish-resolvers","publishing","sbt","sbt-plugin","scala"],"created_at":"2024-10-09T22:09:08.615Z","updated_at":"2025-07-15T13:22:57.919Z","avatar_url":"https://github.com/laughedelic.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sbt-publish-more\n\n[![](https://travis-ci.org/laughedelic/sbt-publish-more.svg?branch=master)](https://travis-ci.org/laughedelic/sbt-publish-more)\n[![](https://img.shields.io/codacy/1654e088ec3d43cdae2180d47e769997.svg)](https://www.codacy.com/app/laughedelic/sbt-publish-more)\n[![](https://img.shields.io/github/release/laughedelic/sbt-publish-more/all.svg)](https://github.com/laughedelic/sbt-publish-more/releases/latest)\n[![](https://img.shields.io/badge/license-LGPLv3-blue.svg)](https://www.tldrlegal.com/l/lgpl-3.0)\n[![](https://img.shields.io/badge/contact-gitter_chat-dd1054.svg)](https://gitter.im/laughedelic/sbt-publish-more)\n\nThis SBT plugin allows you to publish artifacts **to more than one repository**.\n\nIt's inspired by the [sbt-multi-publish](https://github.com/davidharcombe/sbt-multi-publish) plugin, which is unfortunately completely outdated and uses another, more limited approach.\n\nIt may be useful to be able to publish your project to several repositories at once, for example:\n  * to the community Bintray repository\n  * to your company's private server\n  * to some local/proxy repository\n\nBut the `publishTo` setting accepts _only one_ resolver. This is where this plugin comes to the rescue!\n\n\n## Usage\n\nAdd plugin to your `project/plugins.sbt`:\n\n```scala\naddSbtPlugin(\"laughedelic\" % \"sbt-publish-more\" % \"\u003cversion\u003e\")\n```\n\n(see the latest release version on the badge above)\n\n\u003e **Requirements:** This plugins requires sbt 1.x\n\n\u003e **NOTE:** This plugin is in active development, so things are likely to change. Check [release notes](https://github.com/laughedelic/sbt-publish-more/releases) and usage section in the Readme every time you update to a new version.\n\n#### TL;DR\n\n1. Set `publishResolvers := Seq(...)`\n2. Call `publishAll` task\n\n### Multiple publish resolvers\n\nIf you want to publish to several repositories you just need to set the `publishResolvers` setting. For the example from above it will look like this:\n\n```scala\npublishResolvers := Seq(\n  publishTo.in(bintray).value,\n  Resolver.url(\"my-company-repo\", url(\"https://company.com/releases/\")),\n  Resolver.file(\"my-local-repo\", file(\"path/to/my/local/maven-repo\"))\n)\n```\n\nSee [sbt documentation][resolvers-docs] for more types of resolvers.\n\nSetting `publishResolvers` will also set `publishTo` to the first resolver in the list.\n\nNow you can call `publishAll` task to publish to every resolver in the `publishResolvers` list. Note that if you want it to be the default behavior, you should change the standard `publish` task:\n\n```scala\npublish := publishAll.value\n```\n\n\n### Different publish configurations (_experimental_)\n\nBy default it will publish to each repository with the same default publish configuration (that is stored in the [`publishConfiguration`][default-publish-configuration] setting), as if you would call normal `publish` task several times while manually changing `publishTo` setting.\n\nBut you may want to publish to _different repositories with different configurations_. For example, maven-style vs. ivy-style patterns, or different sets of artifacts. So this plugin adds a setting `publishCustomConfigs`, which stores a mapping of `Resolver`s to their corresponding [`PublishConfiguration`]s.\n\nSay you want to publish to one repository maven-style (default) and to the other ivy-style. First, you should define your publish resolvers (in `build.sbt`):\n\n```scala\nlazy val repo1 = Resolver.file(\"repo1\",  file(\"example/repo1\"))\nlazy val repo2 = Resolver.file(\"repo2\",  file(\"example/repo2\"))(Resolver.ivyStylePatterns)\n\npublishResolvers := Seq(repo1, repo2)\n```\n\nIt's better to define values for resolvers, because we will need to refer to them in the next step. The second one needs explicit ivy-style patterns, because the default is maven-style.\n\nThen we add a custom configuration for `repo2`:\n\n```scala\npublishCustomConfigs ++= Map(\n  repo2 -\u003e publishConfiguration.value.withPublishMavenStyle(false)\n)\n```\n\nThis will make it generate the `ivy.xml` artifact. Now when you call `publishAll` you will get your maven-style artifacts in `repo1` and ivy-style artifacts (with `ivy.xml`) in `repo2`.\n\nYou can change any other [`PublishConfiguration`] parameters this way and do it for every particular repository you want to publish to.\n\n\n[resolvers-docs]: http://www.scala-sbt.org/1.x/docs/Resolvers.html\n[default-publish-configuration]: https://github.com/sbt/sbt/blob/1.x/main/src/main/scala/sbt/Defaults.scala#L1911-L1923\n[`PublishConfiguration`]: https://github.com/sbt/librarymanagement/blob/1.x/core/src/main/contraband-scala/sbt/librarymanagement/PublishConfiguration.scala\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaughedelic%2Fsbt-publish-more","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaughedelic%2Fsbt-publish-more","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaughedelic%2Fsbt-publish-more/lists"}