title: How to execute an FTP upload task after assembly:single in Maven?
body: <p>I'm using the <code>pom.xml</code> file shown below to build a certain JAR file (<code>myproduct-1.0-SNAPSHOT-jar-with-dependencies.jar</code>) using <code>mvn assembly:single</code>.</p>
  
  <p>I want to be able to upload that file via FTP as described in <a href="https://stackoverflow.com/questions/15884708/maven-deployment-with-ftp-uploading-i-want-to-upload-just-the-war-file-but-is-u">another question</a>.</p>
  
  <p>I added the following code part in order to be able to do the upload using <code>mvn install:install</code>:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&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.7&lt;/version&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;phase&gt;install&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;install&lt;/goal&gt;
              &lt;/goals&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
      &lt;configuration&gt;
          &lt;target&gt;
              &lt;property name="file_name" value="myproduct-1.0-SNAPSHOT-jar-with-dependencies.jar" /&gt;
              &lt;ant antfile="${basedir}/build.xml"&gt;
                  &lt;target name="upload" /&gt;
              &lt;/ant&gt;
          &lt;/target&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>I get the error <code>Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install (default-cli) on project ...: The packaging for this project did not assign a file to the build artifact -&gt; [Help 1]</code>.</p>
  
  <p>How can I upload the file generated by <code>mvn assembly:single</code> via FTP (either using a separate call, or right after the <code>myproduct-1.0-SNAPSHOT-jar-with-dependencies.jar</code> has been generated) ?</p>
  
  <p>Here's the <code>pom.xml</code> file:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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.mycompany&lt;/groupId&gt;
      &lt;artifactId&gt;myproduct&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;bukkit-repo&lt;/id&gt;
              &lt;url&gt;http://repo.bukkit.org/content/groups/public/&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;maven-restlet&lt;/id&gt;
              &lt;name&gt;Public online Restlet repository&lt;/name&gt;
              &lt;url&gt;http://maven.restlet.com&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
      &lt;dependencies&gt;
          [...]
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;descriptorRefs&gt;
                          &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
                      &lt;/descriptorRefs&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.7&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;install&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;install&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
                  &lt;configuration&gt;
                      &lt;target&gt;
                          &lt;property name="file_name" value="myproduct-1.0-SNAPSHOT-jar-with-dependencies.jar" /&gt;
                          &lt;ant antfile="${basedir}/build.xml"&gt;
                              &lt;target name="upload" /&gt;
                          &lt;/ant&gt;
                      &lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>