You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2025/07/19 20:11:39 UTC
(maven-studies) branch deploy updated: first evaluation
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch deploy
in repository https://gitbox.apache.org/repos/asf/maven-studies.git
The following commit(s) were added to refs/heads/deploy by this push:
new d664832b8 first evaluation
d664832b8 is described below
commit d664832b87d8c6eac4c8f9d3fed69e53b51ec7f8
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sat Jul 19 22:11:31 2025 +0200
first evaluation
---
1.5_DISCOVERY-njord.md | 21 +++++++++++++++++++++
README.md | 32 +++++++++++++++++++++++++++++++-
2 files changed, 52 insertions(+), 1 deletion(-)
diff --git a/1.5_DISCOVERY-njord.md b/1.5_DISCOVERY-njord.md
index be18e7d64..c49128a77 100644
--- a/1.5_DISCOVERY-njord.md
+++ b/1.5_DISCOVERY-njord.md
@@ -443,6 +443,27 @@ $ mvn -Pnjord -N njord:list
```
</details>
+ mvn -Pnjord -N njord:status
+
+Credentials and other details on publication are configured in `~/.m2/settings.xml` though a `<server>`:
+
+ <server>
+ <id>sonatype-central-portal</id>
+ <username>$TOKEN1</username>
+ <password>$TOKEN2</password>
+ <configuration>
+ <!-- Sonatype Central Portal publisher -->
+ <njord.publisher>sonatype-cp</njord.publisher>
+ <!-- Releases are staged locally (if omitted, would go directly to URL as per POM) -->
+ <njord.releaseUrl>njord:template:release-sca</njord.releaseUrl>
+ <!-- Only if you want snapshots locally staged (if omitted, would go directly to URL as per POM) -->
+ <njord.snapshotUrl>njord:template:snapshot-sca</njord.snapshotUrl>
+ </configuration>
+ </server>
+
+See [Migrating projects](https://maveniverse.eu/docs/njord/migration/) for detailed documentation.
+
TODO: dig into the upload aspects explained in [Using it](https://maveniverse.eu/docs/njord/using-it/) documentation...
+`mvn njord:publish` requires to define which artifactstore to publish (as there may be many): what about automation?
Running with Maven 4 gives exact same result.
diff --git a/README.md b/README.md
index 3d1495983..bb4cc31ad 100644
--- a/README.md
+++ b/README.md
@@ -19,4 +19,34 @@ This will be followed by an evaluation based on differences:
- preparation for Maven 4,
- anything new or unexpected
- TBD...
+Whatever solution is chosen, the fact that Maven Central Portal now provides an API where we upload one single archive deployment bundle help resrtying upload if anything goes unexpected.
+
+## Option 1: deploy to file:/target/staging and manual/scripted upload
+
+Pro: Configuring is easy, then script creating a tar or zip archive and upload with UI or `curl`.
+
+Limitation: scripting for upload (like it or not)
+
+## Option 2: Sonatype central-publishing-maven-plugin
+
+Pro: Easy to configure.
+
+Drawbacks:
+- no configuration in `pom.xml` `distributionManagement`
+- plugin not OSS
+- plugin deletes `maven-deploy-plugin` at runtime, which confuses plugins like `maven-artifact-plugin`, `cyclonedx-maven-plugin` or `spdx-maven-plugin` which detect skipped modules for deployment
+- does not work for Maven 4 (runtime deletion of a plugin binding will probably be a blocker)
+
+## Option 3: njord
+
+Pro: respects Maven's `pom.xml` `distributionManagement`, even hiding difference between SNAPSHOT and release, and hiding the fact that upload URL is different from download URL for Maven Central (something many tools don't manage well)
+
+Con: not clear how to automate publication when there are multiple stores
+
+Having a plugin to decouple Maven's build from publication to remote gives great opportunities to better manage the staging of content during build vs the upload/publication once build is ok.
+
+## Option 4: JReleaser
+
+Pro: does a lot
+
+Con: does a lot, and replaces classical Maven release plugin