Permalink
Browse files

Handle empty archives

  • Loading branch information...
1 parent 6260fff commit f1c276d7993fe2f7793234cfcc0b2d3156781097 Stuart McCulloch committed Jul 8, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/main/java/com/tonicsystems/jarjar/JarJarMojo.java
@@ -207,6 +207,12 @@ public void execute()
}
}
+ if ( !archiver.getResources().hasNext() )
+ {
+ getLog().info( "Nothing to JarJar" );
+ return;
+ }
+
archiver.createArchive();
// JARJAR UBER-ZIP
@@ -248,7 +254,7 @@ public void execute()
}
catch ( final Throwable e )
{
- throw new MojoExecutionException( "Unable to JarJar: " + input, e );
+ throw new MojoExecutionException( "Unable to JarJar: " + input + " cause: " + e.getMessage(), e );
}
}
}

0 comments on commit f1c276d

Please sign in to comment.