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

slachiewicz pushed a commit to branch maven-deploy-plugin-4.x
in repository https://gitbox.apache.org/repos/asf/maven-deploy-plugin.git

commit 21fa43ab357ac17d5e89e2d7700e21db12c51935
Author: Guillaume Nodet <[email protected]>
AuthorDate: Sat Oct 10 12:28:53 2026 +0000

    Fix allowIncompleteProjects branch: remove artifact and consolidate warning
    
    Two issues in the allowIncompleteProjects branch:
    - The main artifact was not removed from toDeploy, causing the deployer
      to receive a directory path and fail — defeating the purpose of the
      warn-and-continue path
    - The warning was split across multiple getLog().warn() calls; consolidate
      into a single call matching the install plugin style
---
 src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java 
b/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
index 18ad8df..832581d 100644
--- a/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
+++ b/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
@@ -479,12 +479,11 @@ public class DeployMojo extends AbstractDeployMojo {
                                 + " deploying POM and per-module artifacts 
only.");
                         toDeploy.remove(deployable);
                     } else if (allowIncompleteProjects) {
-                        getLog().warn("");
-                        getLog().warn("The packaging plugin for this project 
did not assign");
-                        getLog().warn("a main file to the project but it has 
attachments. Change packaging to 'pom'.");
-                        getLog().warn("");
-                        getLog().warn("Incomplete projects like this will fail 
in future Maven versions!");
-                        getLog().warn("");
+                        getLog().warn("The packaging plugin for this project 
did not assign"
+                                + " a main file to the project but it has 
attachments."
+                                + " Change packaging to 'pom'."
+                                + " Incomplete projects like this will fail in 
future Maven versions!");
+                        toDeploy.remove(deployable);
                     } else {
                         throw new MojoException("The packaging plugin for this 
project did not assign "
                                 + "a main file to the project but it has 
attachments. Change packaging to 'pom'.");

Reply via email to