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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]