You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "AzazelSensei (via GitHub)" <gi...@apache.org> on 2026/08/14 19:52:01 UTC

[PR] Document that skipIfEmpty wins over forceCreation [maven-jar-plugin]

AzazelSensei opened a new pull request, #585:
URL: https://github.com/apache/maven-jar-plugin/pull/585

   `execute()` returns on `skipIfEmpty` before it looks at `forceCreation`. elharo asked to keep that and write it down, so I only touched the two parameter javadocs.
   
   - [x] Addresses just this docs issue
   - [x] I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
   


-- 
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] Document that skipIfEmpty wins over forceCreation [maven-jar-plugin]

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


-- 
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] Document that skipIfEmpty wins over forceCreation [maven-jar-plugin]

Posted by "AzazelSensei (via GitHub)" <gi...@apache.org>.
AzazelSensei commented on PR #585:
URL: https://github.com/apache/maven-jar-plugin/pull/585#issuecomment-5391438415

   Rewrote the skipIfEmpty / forceCreation javadocs with the wording from the review and rebased onto master.


-- 
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] Document that skipIfEmpty wins over forceCreation [maven-jar-plugin]

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #585:
URL: https://github.com/apache/maven-jar-plugin/pull/585#discussion_r3804187846


##########
src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java:
##########
@@ -128,6 +130,7 @@ public abstract class AbstractJarMojo implements org.apache.maven.api.plugin.Moj
 
     /**
      * Skip creating empty archives.
+     * When {@code true}, an empty classes directory skips packaging even if {@link #forceCreation} is also {@code true}.

Review Comment:
   I don't know what "an empty classes directory skips packaging" means. This feels like the wrong subject for the verb. Rewrite.



##########
src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java:
##########
@@ -119,6 +119,8 @@ public abstract class AbstractJarMojo implements org.apache.maven.api.plugin.Moj
      * This plugin can not detect the post-processing, and so leaves the post-processed JAR file in place.
      * This can lead to failures when those plugins do not expect to find their own output as an input.
      * Set this parameter to {@code true} to avoid these problems by forcing this plugin to recreate the JAR every time.
+     * This does not override {@link #skipIfEmpty}: when that flag is {@code true} and the classes directory is empty,

Review Comment:
   When {@link #skipIfEmpty} is {@code true} and the classes directory is empty, packaging is skipped even if {@code forceCreation} is true.



##########
src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java:
##########
@@ -119,6 +119,8 @@ public abstract class AbstractJarMojo implements org.apache.maven.api.plugin.Moj
      * This plugin can not detect the post-processing, and so leaves the post-processed JAR file in place.
      * This can lead to failures when those plugins do not expect to find their own output as an input.
      * Set this parameter to {@code true} to avoid these problems by forcing this plugin to recreate the JAR every time.

Review Comment:
   delete "to avoid these problems by forcing this plugin"



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