Hi,
I wanted to create zip out of directory. For that I am using
maven-assembly-plugin.
It looks like this :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptor>installer-assembly.xml</descriptor>
<finalName>test</finalName>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
My installer-assembly.xml looks like :
<assembly>
<id>bin</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>release/</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>**/spec/</exclude>
</excludes>
<fileMode>0770</fileMode>
</fileSet>
</fileSets>
</assembly>
It creates test.zip for me.
But when I unzip this "test.zip" into directory "dir", I get structure like
:
dir
|-test
|-different files
Query here is, is there any way to create a zip in such a way that, I will
get following structure :
dir
|-different file
Means it wont create folder name with test and then zip it with name
test.zip.
Instead of that, I want to zip content of folder with file name test.zip.
Any kind of help will be appreciated.
--
*Thanks*
*Vinayak S. Samak*
*Please don't print this Email unless you really need to. This will
preserve trees on planet earth.*
*Save Electricity, Water & Paper!! Go green for better tomorrow :)*
*[image: See full size image]*