[ 
https://issues.apache.org/jira/browse/MDEPLOY-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17787927#comment-17787927
 ] 

ASF GitHub Bot commented on MDEPLOY-308:
----------------------------------------

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?





> Add parameter to lax project validation
> ---------------------------------------
>
>                 Key: MDEPLOY-308
>                 URL: https://issues.apache.org/jira/browse/MDEPLOY-308
>             Project: Maven Deploy Plugin
>          Issue Type: Improvement
>          Components: deploy:deploy
>            Reporter: Tamas Cservenak
>            Priority: Major
>             Fix For: 3.1.1
>
>
> Affects all releases of m-deploy-p of 3.x line.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to