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:59 UTC
[maven-jar-plugin] 01/01: [MJAR-276] don't log useless warning when
jar creation is forced and directory does not exist
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
{