gnodet-bot commented on code in PR #594:
URL: https://github.com/apache/maven-jar-plugin/pull/594#discussion_r4093069719
##########
src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java:
##########
@@ -120,15 +120,21 @@ public abstract class AbstractJarMojo implements
org.apache.maven.api.plugin.Moj
private PathMatcherFactory matcherFactory;
/**
- * Require the jar plugin to build new <abbr>JAR</abbr> files even if none
of the contents appear to have changed.
+ * Require the JAR plugin to build new <abbr>JAR</abbr> files even if none
of the contents appear to have changed.
* By default, this plugin looks to see if the output <abbr>JAR</abbr>
files exist and inputs have not changed.
- * If these conditions are true, the plugin skips creation of the
<abbr>JAR</abbr> files.
- * This does not work when other plugins, like the maven-shade-plugin, are
configured to post-process the JAR.
- * This plugin cannot 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 recreate the JAR every time.
- * When {@link #skipIfEmpty} is {@code true} and the classes directory is
empty, packaging is skipped even if
- * {@code forceCreation} is true.
+ * If these conditions are true, by default the plugin skips creation of
the <abbr>JAR</abbr> files.
+ * But if this parameter is {@code true}, change detection is disabled and
the JAR will be created every time.
+ * This parameter is ignored if {@link #skipIfEmpty} is {@code true} and
there are no files to include in the JAR.
+ *
+ * <p><b>When to use:</b>
+ * Skipping JAR creation does not work when other plugins, like the
maven-shade-plugin,
+ * are configured to post-process the JAR. Leaving the post-processed JAR
file in place
+ * can lead to failures when those plugins do not expect to find their own
output as an input.
+ * Setting this parameter to {@code true} avoids this problem.
+ * Starting with <b>4.0.0-beta-2</b>, setting this parameter can be
unnecessary because the JAR plugin
+ * compares also the file lengths and checks if the JAR file contains
additional entries.
Review Comment:
Nit: "compares also the file lengths" — word order is non-standard English.
The adverb should come before the verb.
```suggestion
* also compares the file lengths and checks if the JAR file contains
additional entries.
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]