Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Handle empty archives

  • Loading branch information...
commit f1c276d7993fe2f7793234cfcc0b2d3156781097 1 parent 6260fff
authored July 08, 2011
8  src/main/java/com/tonicsystems/jarjar/JarJarMojo.java
@@ -207,6 +207,12 @@ public void execute()
207 207
                 }
208 208
             }
209 209
 
  210
+            if ( !archiver.getResources().hasNext() )
  211
+            {
  212
+                getLog().info( "Nothing to JarJar" );
  213
+                return;
  214
+            }
  215
+
210 216
             archiver.createArchive();
211 217
 
212 218
             // JARJAR UBER-ZIP
@@ -248,7 +254,7 @@ public void execute()
248 254
         }
249 255
         catch ( final Throwable e )
250 256
         {
251  
-            throw new MojoExecutionException( "Unable to JarJar: " + input, e );
  257
+            throw new MojoExecutionException( "Unable to JarJar: " + input + " cause: " + e.getMessage(), e );
252 258
         }
253 259
     }
254 260
 }

0 notes on commit f1c276d

Please sign in to comment.
Something went wrong with that request. Please try again.