You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "apeteri (via GitHub)" <gi...@apache.org> on 2023/11/20 10:19:13 UTC

Re: [PR] [MDEPLOY-308] Add parameter to lax project validation [maven-deploy-plugin]

apeteri commented on code in PR #39:
URL: https://github.com/apache/maven-deploy-plugin/pull/39#discussion_r1398970349


##########
src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java:
##########
@@ -285,8 +297,17 @@ private void processProject(final MavenProject project, DeployRequest request) t
             if (isFile(mavenMainArtifact.getFile())) {
                 request.addArtifact(RepositoryUtils.toArtifact(mavenMainArtifact));
             } else if (!project.getAttachedArtifacts().isEmpty()) {
-                throw new MojoExecutionException("The packaging plugin for this project did not assign "
-                        + "a main file to the project but it has attachments. Change packaging to 'pom'.");
+                if (allowIncompleteProjects) {
+                    getLog().warn("");
+                    getLog().warn("The packaging plugin for this project did not assign");

Review Comment:
   Hi @cstamas,
   
   Since `processProject` also gets called from `deployAllAtOnce`, the wording "this project" is a bit ambiguous. In addition to that, if an exception is thrown in "deploy at once" mode, it will get attributed to the last project that is marked with a deployment state enum, which can also be misleading.
   
   Is it possible to add the name of the method parameter `project` into the log and exceptions thrown from this mehod?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org