You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2005/04/23 17:21:32 UTC

svn commit: r164394 - /maven/components/trunk/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java

Author: brett
Date: Sat Apr 23 08:21:31 2005
New Revision: 164394

URL: http://svn.apache.org/viewcvs?rev=164394&view=rev
Log:
directories don't always come first - make them if they don't exist

Modified:
    maven/components/trunk/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java

Modified: maven/components/trunk/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java?rev=164394&r1=164393&r2=164394&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java (original)
+++ maven/components/trunk/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java Sat Apr 23 08:21:31 2005
@@ -222,14 +222,11 @@
         {
             JarEntry entry = (JarEntry) e.nextElement();
 
-            if ( entry.isDirectory() )
+            if ( !entry.isDirectory() )
             {
-                new File( tempLocation, entry.getName() ).mkdir();
-            }
-            else
-            {
-                IOUtil.copy( jar.getInputStream( entry ),
-                             new FileOutputStream( new File( tempLocation, entry.getName() ) ) );
+                File outFile = new File( tempLocation, entry.getName() );
+                outFile.getParentFile().mkdirs();
+                IOUtil.copy( jar.getInputStream( entry ), new FileOutputStream( outFile ) );
             }
         }
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org