title: How can I deploy a zip file created with the maven-antrun-plugin?
body: <p>I'm using the maven-antrun-plugin to do a bunch of work with Ant, which ultimately results in a zip file.  I'd like to deploy the zip file to our maven server (Artifactory).  The maven-antrun-portion works as intended and successfully creates the zip file; however deployment fails with the following error message:</p>
  
  <p><code>org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.6:deploy (default-deploy) on project projectname: The packaging for this project did not assign a file to the build artifact</code></p>
  
  <p>My POM file is as follows:</p>
  
  <pre><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;groupId&gt;com.company.division&lt;/groupId&gt;
      &lt;artifactId&gt;projectname&lt;/artifactId&gt;
      &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;com.company.product&lt;/groupId&gt;
          &lt;artifactId&gt;parentproject&lt;/artifactId&gt;
          &lt;version&gt;1.0.0&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;distributionManagement&gt;
          &lt;snapshotRepository&gt;
              &lt;id&gt;artifactory&lt;/id&gt;
              &lt;name&gt;artifactory-snapshots&lt;/name&gt;
              &lt;url&gt;http://localartifactoryserver/artifactory/libs-snapshot-local&lt;/url&gt;
              &lt;uniqueVersion&gt;false&lt;/uniqueVersion&gt;
          &lt;/snapshotRepository&gt;
      &lt;/distributionManagement&gt;
  
      &lt;dependencies&gt;
          &lt;!-- Some dependencies... --&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;!-- Compiler plugin --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3.2&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.6&lt;/source&gt;
                      &lt;target&gt;1.6&lt;/target&gt;
                      &lt;encoding&gt;UTF8&lt;/encoding&gt;
                      &lt;optimize&gt;true&lt;/optimize&gt;
                  &lt;/configuration&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;version&gt;1.6&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;compile&lt;/id&gt;
                          &lt;phase&gt;compile&lt;/phase&gt;
                          &lt;configuration&gt;
                              &lt;target&gt;
                                  &lt;!-- Do lots of other stuff with Ant. --&gt;
  
                                  &lt;!-- Create a zip file. --&gt;
                                  &lt;zip basedir="mydir" destfile="${WORKSPACE}/MyZip.zip" /&gt;
                              &lt;/target&gt;
                          &lt;/configuration&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;run&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.6&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;groupId&gt;${project.groupId}&lt;/groupId&gt;
                      &lt;artifactId&gt;${project.artifactId}&lt;/artifactId&gt;
                      &lt;version&gt;${project.version}&lt;/version&gt;
                      &lt;packaging&gt;zip&lt;/packaging&gt;
                      &lt;file&gt;MyZip.zip&lt;/file&gt;
                      &lt;url&gt;${project.distributionManagement.snapshotRepository.url}&lt;/url&gt;
                  &lt;/configuration&gt;
                &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>When I invoke this (from the parent POM) with <code>mvn -U -pl projectname clean deploy</code> I get the aforementioned error during the deploy phase.  Does anyone know what I'm doing wrong or how I can fix this?</p>