Document that skipIfEmpty wins over forceCreation - #585
Open
AzazelSensei wants to merge 1 commit into
Open
Conversation
When both flags are true and the classes directory is empty, packaging is skipped. forceCreation is not consulted. Closes apache#560
elharo
self-requested a review
August 18, 2026 12:49
elharo
requested changes
Aug 18, 2026
|
|
||
| /** | ||
| * Skip creating empty archives. | ||
| * When {@code true}, an empty classes directory skips packaging even if {@link #forceCreation} is also {@code true}. |
Contributor
There was a problem hiding this comment.
I don't know what "an empty classes directory skips packaging" means. This feels like the wrong subject for the verb. Rewrite.
| @@ -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. | |||
Contributor
There was a problem hiding this comment.
delete "to avoid these problems by forcing this plugin"
| * 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, |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
execute()returns onskipIfEmptybefore it looks atforceCreation. elharo asked to keep that and write it down, so I only touched the two parameter javadocs.