From 8c516f161ce3ab91003d27790f0c9d0f4bf67fae Mon Sep 17 00:00:00 2001 From: Tobias Roeser Date: Fri, 15 Jul 2022 11:59:04 +0200 Subject: [PATCH] Revised the Maven release documentation and made some fixes (#1951) Pull request: https://github.com/com-lihaoyi/mill/pull/1951 --- .../ROOT/pages/Common_Project_Layouts.adoc | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/Common_Project_Layouts.adoc b/docs/antora/modules/ROOT/pages/Common_Project_Layouts.adoc index dcb330d4bf3..8138bb12ae4 100644 --- a/docs/antora/modules/ROOT/pages/Common_Project_Layouts.adoc +++ b/docs/antora/modules/ROOT/pages/Common_Project_Layouts.adoc @@ -313,8 +313,12 @@ object foo extends ScalaModule with PublishModule { You can make a module publishable by extending `PublishModule`. `PublishModule` then needs you to define a `publishVersion` and `pomSettings`. -The `artifactName` defaults to the name of your module (in this case `foo`) but -can be overridden. The `organization` is defined in `pomSettings`. +The `artifactName` defaults to the name of your module (in this case `foo`) but can be overridden. +The `organization` is defined in `pomSettings`. + +You may also check and update the values of `sonatypeUri` and `sonatypeSnapshotUri`, which may not be correct if you have a newer Sonatype account (when created after Feb. 2021). + +=== Staging Releases Once you've mixed in `PublishModule`, you can publish your libraries to maven central via: @@ -365,15 +369,20 @@ mill mill.scalalib.PublishModule/publishAll \ --sonatypeSnaphostUri http://example.company.com/snapshot ---- -NOTE: That as of Feb. 2021 any new Sonatype accounts have been created on -`s01.oss.sonatype.org`, so you'll want to ensure you set the relevant URIs to -match. - - `https://s01.oss.sonatype.org/service/local` - for the `--sonatypeUri` - - `https://s01.oss.sonatype.org/content/repositories/snapshots` - for `sonatypeSnapshotUri` +[NOTE] +-- +Since Feb. 2021 any new Sonatype accounts have been created on +`s01.oss.sonatype.org`, so you'll want to ensure you set the relevant URIs to match. + +* `https://s01.oss.sonatype.org/service/local` - for the `--sonatypeUri` +* `https://s01.oss.sonatype.org/content/repositories/snapshots` - for `sonatypeSnapshotUri` +-- + +=== Non-Staging Releases (classic Maven uploads) -If the site does not support staging release as `oss.sonatype.org` does (for +If the site does not support staging releases as `oss.sonatype.org` and `s01.oss.sonatype.org` do (for example, a self-hosted OSS nexus site), you can pass in the -`--stagingRelease false` to simply upload release artifacts to corresponding +`--stagingRelease false` option to simply upload release artifacts to corresponding maven path under `sonatypeUri` instead of staging path. [source,bash]