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 2026/08/23 09:59:35 UTC

(maven-artifact-plugin) branch master updated: add support for central-publishing-maven-plugin

This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-artifact-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new b5fa203  add support for central-publishing-maven-plugin
b5fa203 is described below

commit b5fa203a40299fd0282be3ca2fd998f7ad39f8da
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sat Aug 22 23:23:33 2026 +0200

    add support for central-publishing-maven-plugin
---
 .../apache/maven/plugins/artifact/buildinfo/PluginUtil.java    | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/maven/plugins/artifact/buildinfo/PluginUtil.java b/src/main/java/org/apache/maven/plugins/artifact/buildinfo/PluginUtil.java
index 74c30b5..e8e93d0 100644
--- a/src/main/java/org/apache/maven/plugins/artifact/buildinfo/PluginUtil.java
+++ b/src/main/java/org/apache/maven/plugins/artifact/buildinfo/PluginUtil.java
@@ -31,9 +31,13 @@ import org.codehaus.plexus.util.xml.Xpp3Dom;
  */
 class PluginUtil {
     private static final String NEXUS_STAGING = "nexus-staging";
+    private static final String CENTRAL_PUBLISHING = "central-publishing";
 
     static boolean isSkip(MavenProject project) {
-        return isSkip(project, "install") || isSkip(project, "deploy") || isSkip(project, NEXUS_STAGING);
+        return isSkip(project, "install")
+                || isSkip(project, "deploy")
+                || isSkip(project, NEXUS_STAGING)
+                || isSkip(project, CENTRAL_PUBLISHING);
     }
 
     private static boolean isSkip(MavenProject project, String id) {
@@ -44,6 +48,10 @@ class PluginUtil {
             pluginGa = "org.sonatype.plugins:" + id + "-maven-plugin";
             pluginParameter = "skipNexusStagingDeployMojo";
             pluginProperty = "skipNexusStagingDeployMojo";
+        } else if (id.equals(CENTRAL_PUBLISHING)) {
+            pluginGa = "org.sonatype.central:" + id + "-maven-plugin";
+            pluginParameter = "skipPublishing";
+            pluginProperty = "skipPublishing";
         } else {
             pluginGa = "org.apache.maven.plugins:maven-" + id + "-plugin";
             pluginParameter = "skip";