You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rm...@apache.org on 2020/12/02 08:48:58 UTC

[maven-jar-plugin] branch rmannibucau/MJAR-276_avoid-useless-warning-when-jar-creation-is-forced-even-empty created (now 4027e40)

This is an automated email from the ASF dual-hosted git repository.

rmannibucau pushed a change to branch rmannibucau/MJAR-276_avoid-useless-warning-when-jar-creation-is-forced-even-empty
in repository https://gitbox.apache.org/repos/asf/maven-jar-plugin.git.


      at 4027e40  [MJAR-276] don't log useless warning when jar creation is forced and directory does not exist

This branch includes the following new commits:

     new 4027e40  [MJAR-276] don't log useless warning when jar creation is forced and directory does not exist

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-jar-plugin] 01/01: [MJAR-276] don't log useless warning when jar creation is forced and directory does not exist

Posted by rm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rmannibucau pushed a commit to branch rmannibucau/MJAR-276_avoid-useless-warning-when-jar-creation-is-forced-even-empty
in repository https://gitbox.apache.org/repos/asf/maven-jar-plugin.git

commit 4027e40376031d8be01abddeb21de16e98ea0c58
Author: Romain Manni-Bucau <rm...@gmail.com>
AuthorDate: Wed Dec 2 09:48:50 2020 +0100

    [MJAR-276] don't log useless warning when jar creation is forced and directory does not exist
---
 src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java b/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
index 68da0ec..d7b298f 100644
--- a/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
@@ -266,7 +266,10 @@ public abstract class AbstractJarMojo
             File contentDirectory = getClassesDirectory();
             if ( !contentDirectory.exists() )
             {
-                getLog().warn( "JAR will be empty - no content was marked for inclusion!" );
+                if ( !forceCreation )
+                {
+                    getLog().warn( "JAR will be empty - no content was marked for inclusion!" );
+                }
             }
             else
             {