title: Maven maven-deploy-plugin always upload twice
body: <p>I've a problem when publishing component to a Nexus repository, Maven upload the file twice:</p>
  
  <ul>
  <li>first time with maven-deploy-plugin groupId/artifactId/version parameters (that's what I want)</li>
  <li>second time with pom groupId/artifactId/version parameters (that's what I DON'T want)</li>
  </ul>
  
  <p>I launch packaging/deployment with the following command (see pom.xml file at the bottom):</p>
  
  <p><code>mvn clean package deploy:deploy-file -e -f pom.xml</code></p>
  
  <p>Here is the snippet of maven output console when handling deploy phase (the 6 first lines are correct but notice the 2 last lines with pom groupId/artifactId/version):</p>
  
  <pre class="lang-java prettyprint-override"><code>[INFO] --- maven-deploy-plugin:2.8.2:deploy-file (default-cli) @ assemblage-playbook ---
  Uploading: http://urlRepo:8080/nexus/content/repositories/snapshots/COMPOSANTS/COMPOSANT-A/1.0/COMPOSANT-A_1.0.tar.gz
  Uploaded: http://urlRepo:8080/nexus/content/repositories/snapshots/COMPOSANTS/COMPOSANT-A/1.0/COMPOSANT-A_1.0.tar.gz (2 KB at 2.7 KB/sec)
  Downloading: http://urlRepo:8080/nexus/content/repositories/snapshots/COMPOSANTS/COMPOSANT-A/maven-metadata.xml
  Downloaded: http://urlRepo:8080/nexus/content/repositories/snapshots/COMPOSANTS/COMPOSANT-A/maven-metadata.xml (321 B at 4.6 KB/sec)
  Uploading: http://urlRepo:8080/nexus/content/repositories/snapshots/COMPOSANTS/COMPOSANT-A/maven-metadata.xml
  Uploaded: http://urlRepo:8080/nexus/content/repositories/snapshots/COMPOSANTS/COMPOSANT-A/maven-metadata.xml (321 B at 1.6 KB/sec)
  Downloading: http://urlRepo:8080/nexus/content/repositories/snapshots/com/com.mycompany/assemblage-playbook/1.0-SNAPSHOT/maven-metadata.xml
  Uploading: http://urlRepo:8080/nexus/content/repositories/snapshots/com/com.mycompany/assemblage-playbook/1.0-SNAPSHOT/assemblage-playbook-1.0-20150209.154427
  </code></pre>
  
  <p>Here is my pom.xml file:</p>
  
  <pre class="lang-java prettyprint-override"><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;artifactId&gt;assemblage-playbook&lt;/artifactId&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;name&gt;assemblage-playbook&lt;/name&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;com.mycompany&lt;/groupId&gt;
          &lt;artifactId&gt;parent&lt;/artifactId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
          &lt;relativePath&gt;../../../parent/pom.xml&lt;/relativePath&gt;
      &lt;/parent&gt;
  
      &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.5.2&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;descriptors&gt;
                          &lt;descriptor&gt;assembly/playbook-assembly.xml&lt;/descriptor&gt;
                      &lt;/descriptors&gt;
                      &lt;finalName&gt;COMPOSANT-A-1.0&lt;/finalName&gt;
                      &lt;appendAssemblyId&gt;false&lt;/appendAssemblyId&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;make-assembly&lt;/id&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;single&lt;/goal&gt;
                          &lt;/goals&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-deploy-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.8.2&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;default-cli&lt;/id&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;deploy-file&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;file&gt;target/COMPOSANT-A-1.0.tar.gz&lt;/file&gt;
                              &lt;repositoryId&gt;nexus&lt;/repositoryId&gt;
                              &lt;groupId&gt;COMPOSANTS&lt;/groupId&gt;
                              &lt;artifactId&gt;COMPOSANT-A&lt;/artifactId&gt;
                              &lt;version&gt;1.0&lt;/version&gt;
                              &lt;generatePom&gt;false&lt;/generatePom&gt;
                              &lt;packaging&gt;tar.gz&lt;/packaging&gt;
                              &lt;url&gt;http://urlRepo:8080/nexus/content/repositories/snapshots&lt;/url&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>Any idee to solve it ?</p>
  
  <p>Thanks for your help.</p>
  
  <p>[EDIT]</p>
  
  <p>With the command line <code>mvn deploy:deploy-file -e -f pom.xml</code>, it works well (whitout <code>clean package</code>), but I need to package before deploy...</p>