Customize folder name using same descriptor maven assembly plugin for different format
<p>I am new to maven world and I am having some problems with maven assembly plugin. I want to use the same descriptor file to generate different format with custom name for "dir" format.</p>

<p>Following is my maven assembly plugin configuration :-</p>

<pre><code>    &lt;plugin&gt;
        &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
        &lt;executions&gt;
            &lt;execution&gt;
                &lt;id&gt;assembly&lt;/id&gt;
                &lt;goals&gt;
                    &lt;goal&gt;single&lt;/goal&gt;
                &lt;/goals&gt;
                &lt;phase&gt;install&lt;/phase&gt;
                &lt;configuration&gt;
                    &lt;descriptors&gt;
                        &lt;descriptor&gt;src/main/assembly/descriptor.xml&lt;/descriptor&gt;
                    &lt;/descriptors&gt;
                    &lt;finalName&gt;service&lt;/finalName&gt;
                    &lt;appendAssemblyId&gt;false&lt;/appendAssemblyId&gt;
                    &lt;outputDirectory&gt;target&lt;/outputDirectory&gt;
                &lt;/configuration&gt;
            &lt;/execution&gt;
        &lt;/executions&gt;
    &lt;/plugin&gt;
</code></pre>

<p>This is the descriptor file :-</p>

<pre><code>&lt;assembly
        xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"&gt;
    &lt;id&gt;assembly&lt;/id&gt;
    &lt;formats&gt;
        &lt;format&gt;zip&lt;/format&gt;
    &lt;/formats&gt;
    &lt;includeBaseDirectory&gt;false&lt;/includeBaseDirectory&gt;
    &lt;baseDirectory&gt;.&lt;/baseDirectory&gt;
    &lt;files&gt;
        &lt;file&gt;
            &lt;source&gt;target/service.jar&lt;/source&gt;
            &lt;outputDirectory&gt;.&lt;/outputDirectory&gt;
            &lt;filtered&gt;false&lt;/filtered&gt;
        &lt;/file&gt;
        &lt;file&gt;
            &lt;source&gt;src/main/deploy/version.txt&lt;/source&gt;
            &lt;outputDirectory&gt;.&lt;/outputDirectory&gt;
            &lt;filtered&gt;true&lt;/filtered&gt;
        &lt;/file&gt;
        &lt;file&gt;
            &lt;source&gt;src/main/deploy/start.sh&lt;/source&gt;
            &lt;outputDirectory&gt;.&lt;/outputDirectory&gt;
            &lt;filtered&gt;true&lt;/filtered&gt;
        &lt;/file&gt;
        &lt;file&gt;
            &lt;source&gt;src/main/deploy/stop.sh&lt;/source&gt;
            &lt;outputDirectory&gt;.&lt;/outputDirectory&gt;
            &lt;filtered&gt;true&lt;/filtered&gt;
        &lt;/file&gt;
    &lt;/files&gt;
&lt;/assembly&gt;
</code></pre>

<p>I want to use the same descriptor file(basically same files to combine) into a service.zip and also create another folder in target named <strong>deploy</strong> if I add </p>

<pre><code>&lt;format&gt;dir&lt;/format&gt;
</code></pre>

<p>then it will create a folder named service under target and will have all the listed files. I want a way to customize the name of directory to "deploy". I tried checking with the documentation but could not find anything helpful unless I create another descriptor which is not the right way since my new descriptor will have same configuration as the previous one with just format as "dir".</p>

<p>Any help will be appreciated thanks in advance.</p>