title: How to rename a file while unpacking an artifact with maven-dependency-plugin?
body: <p>I'm using a <code>maven-dependency-plugin</code> to unpack a jar that contains several <code>.sh</code> scripts and that works as expected. </p>
  
  <p>So I'm able to copy the files into the <code>&lt;outputDirectory&gt;${project.build.dir}/main-scripts&lt;/outputDirectory&gt;</code> </p>
  
  <p>But now I want to rename only one of them from <code>run.sh</code> to <code>run-main.sh</code> while unpacking. How could it be achieved with the dependency plugin?</p>
  
  <pre><code>&lt;plugin&gt;
                  &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;unpack&lt;/id&gt;
                          &lt;phase&gt;generate-sources&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;unpack&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;artifactItems&gt;
                                  &lt;artifactItem&gt;
                                      &lt;groupId&gt;com.main.libs&lt;/groupId&gt;
                                      &lt;artifactId&gt;main-scripts&lt;/artifactId&gt;
                                      &lt;version&gt;LATEST&lt;/version&gt;
                                      &lt;type&gt;jar&lt;/type&gt;
                                      &lt;includes&gt;*.sh&lt;/includes&gt;
                                      &lt;outputDirectory&gt;${project.build.dir}/main-scripts&lt;/outputDirectory&gt;
                                  &lt;/artifactItem&gt;
                              &lt;/artifactItems&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  </code></pre>