mirror of https://github.com/apache/maven.git
allow empty JARs
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163702 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b512b2e7a2
commit
e3c15069c5
|
@ -159,7 +159,15 @@ public class JarMojo
|
|||
|
||||
try
|
||||
{
|
||||
archiver.getArchiver().addDirectory( new File( outputDirectory ), DEFAULT_INCLUDES, DEFAULT_EXCLUDES );
|
||||
File contentDirectory = new File( outputDirectory );
|
||||
if ( !contentDirectory.exists() )
|
||||
{
|
||||
getLog().warn( "JAR will be empty - no content was marked for inclusion!" );
|
||||
}
|
||||
else
|
||||
{
|
||||
archiver.getArchiver().addDirectory( contentDirectory, DEFAULT_INCLUDES, DEFAULT_EXCLUDES );
|
||||
}
|
||||
|
||||
// create archive
|
||||
Manifest configuredManifest = archiver.getManifest( project, mainClass, packageName,
|
||||
|
|
Loading…
Reference in New Issue