title: Maven rename a file after everything else finishes
body: <p>I have a project which I need to rename the final output file generated by the <code>Maven Assembly Plugin</code> after everything else finishes (in the compiling/building/assembly process).</p>
  
  <p>The <code>Maven Assembly Plugin</code> is generating a final <code>.zip</code> file, based on the project's name, and I need to rename this completely to <code>final-version.oxt</code>. I'm trying to use the <code>maven-antrun-plugin</code> to rename it, as pointed by other similar questions here, but no luck (I've never used Maven or Ant before, so maybe I'm missing something).</p>
  
  <p>This is the <code>&lt;build&gt;</code> section of the project's <code>pom.xml</code>. The rename part seems to be completely ignored, since no file is generated in my <code>home</code> folder.</p>
  
  <pre><code>&lt;build&gt;
      &lt;plugins&gt;
  
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.4&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;assembly&lt;/id&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;attached&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;archive&gt;
                              &lt;manifestFile&gt;src/main/resources/META-INF/MANIFEST.MF&lt;/manifestFile&gt;
                          &lt;/archive&gt;
                          &lt;descriptors&gt;
                              &lt;descriptor&gt;src/main/assembly/ooo-jar.xml&lt;/descriptor&gt;
                              &lt;descriptor&gt;src/main/assembly/ooo.xml&lt;/descriptor&gt;
                          &lt;/descriptors&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;deploy&lt;/phase&gt;
  
                      &lt;configuration&gt;
                          &lt;tasks&gt;
                              &lt;copy file="${project.build.directory}/target/libreofficeplugin-ooo.zip"
                               tofile="/home/brunofinger/final-version.oxt" /&gt;
                          &lt;/tasks&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>