Skip to content

Commit 4027e40

Browse files
committed
[MJAR-276] don't log useless warning when jar creation is forced and directory does not exist
1 parent 4bf3895 commit 4027e40

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,10 @@ public File createArchive()
266266
File contentDirectory = getClassesDirectory();
267267
if ( !contentDirectory.exists() )
268268
{
269-
getLog().warn( "JAR will be empty - no content was marked for inclusion!" );
269+
if ( !forceCreation )
270+
{
271+
getLog().warn( "JAR will be empty - no content was marked for inclusion!" );
272+
}
270273
}
271274
else
272275
{

0 commit comments

Comments
 (0)