title: How to upload the shaded jar after maven build?
body: <p>I would like to upload the builded jar with all dependencies via SFTP to my Raspberry Pi. Therefore I tried to use maven-deploy-plugin.</p>
  
  <p>My configuration looks like:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;artifactId&gt;maven-deploy-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.8&lt;/version&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;Raspberry Pi&lt;/id&gt;
              &lt;phase&gt;deploy&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;deploy-file&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                  &lt;pomFile&gt;pom.xml&lt;/pomFile&gt;
                  &lt;file&gt;target/${project.name}.jar&lt;/file&gt;
                  &lt;url&gt;sftp://root@192.168.2.108/home/&lt;/url&gt;
              &lt;/configuration&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>As you can already see, the uploaded jar is a shaded jar which is renamed by <code>&lt;finalName&gt;${project.name}&lt;/finalName&gt;</code></p>
  
  <p>Furthermore I included the wagon-ssh extension and defined the Raspberry Pi:</p>
  
  <pre><code>&lt;extensions&gt;
      &lt;extension&gt;
          &lt;groupId&gt;org.apache.maven.wagon&lt;/groupId&gt;
          &lt;artifactId&gt;wagon-ssh&lt;/artifactId&gt;
          &lt;version&gt;2.8&lt;/version&gt;
      &lt;/extension&gt;
  &lt;/extensions&gt;
  
  &lt;distributionManagement&gt;
      &lt;repository&gt;
          &lt;id&gt;Raspberry Pi&lt;/id&gt;
          &lt;url&gt;sftp://192.168.2.108/home&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/distributionManagement&gt;
  </code></pre>
  
  <p>However, if I execute mvn:deploy, maven will only upload the original-jar to the Raspberry Pi to the file path of groupId, artifactId and version.</p>
  
  <p>What can I do to only upload a single jar without a directory.</p>