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

[GitHub] [maven-deploy-plugin] cstamas opened a new pull request, #39: [MDEPLOY-308] Add parameter to lax project validation

cstamas opened a new pull request, #39:
URL: https://github.com/apache/maven-deploy-plugin/pull/39

   ---
   
   https://issues.apache.org/jira/browse/MDEPLOY-308


-- 
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


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

Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on code in PR #39:
URL: https://github.com/apache/maven-deploy-plugin/pull/39#discussion_r1399049468


##########
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:
   Sure! Quality patches accepted.



-- 
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


[GitHub] [maven-deploy-plugin] cstamas merged pull request #39: [MDEPLOY-308] Add parameter to lax project validation

Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas merged PR #39:
URL: https://github.com/apache/maven-deploy-plugin/pull/39


-- 
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


[GitHub] [maven-deploy-plugin] slawekjaranowski commented on a diff in pull request #39: [MDEPLOY-308] Add parameter to lax project validation

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on code in PR #39:
URL: https://github.com/apache/maven-deploy-plugin/pull/39#discussion_r1143445694


##########
src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java:
##########
@@ -126,6 +126,18 @@ public class DeployMojo extends AbstractDeployMojo {
     @Parameter(property = "maven.deploy.skip", defaultValue = "false")
     private String skip = Boolean.FALSE.toString();
 
+    /**
+     * Set this to <code>true</code> to allow incomplete project processing. By default, such projects are forbidden
+     * and Mojo will fail to process them. Incomplete project is a Maven Project that has any other packaging than
+     * "pom" and has no main artifact packaged. In the majority of cases, what user really wants here is a project
+     * with "pom" packaging and some classified artifact attached (typical example is some assembly being packaged
+     * and attached with classifier).
+     *
+     * @since 3.1.1

Review Comment:
   3.2.0 - new feature 😄 



-- 
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


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

Posted by "apeteri (via GitHub)" <gi...@apache.org>.
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