Skip to content

Document that skipIfEmpty wins over forceCreation - #585

Open
AzazelSensei wants to merge 1 commit into
apache:masterfrom
AzazelSensei:docs-560-skipifempty-forcecreation
Open

Document that skipIfEmpty wins over forceCreation#585
AzazelSensei wants to merge 1 commit into
apache:masterfrom
AzazelSensei:docs-560-skipifempty-forcecreation

Conversation

@AzazelSensei

Copy link
Copy Markdown

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.

  • Addresses just this docs issue
  • I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004

When both flags are true and the classes directory is empty, packaging
is skipped. forceCreation is not consulted.

Closes apache#560

/**
* Skip creating empty archives.
* When {@code true}, an empty classes directory skips packaging even if {@link #forceCreation} is also {@code true}.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants