title: How to package, compress and deploy binaries as zip/tar.gz from a github repo with maven/travis to bintray.com generic repo
body: <p>Since Github disabled the downloads, we need to use a new service (like Bintray.com) for publishing our binaries. For our usecase I need to build a package (using appassembler-maven-plugin), then zip and tar.gz this build and deploy it to bintray.</p>
  
  <p>It would be nice if a nightly builds will be shipped by travis and releases from hand with the mvn release plugin.</p>
  
  <p>Currently the pom looks like this:</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;myproject&lt;/groupId&gt;
      &lt;artifactId&gt;myproject&lt;/artifactId&gt;
      &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;scm&gt;
          &lt;url&gt;https://github.com/d0x/fromGithubToBintray&lt;/url&gt;
          &lt;connection&gt;scm:git:git://github.com/d0x/fromGithubToBintray.git&lt;/connection&gt;
          &lt;developerConnection&gt;scm:git:git@github.com:d0x/fromGithubToBintray.git&lt;/developerConnection&gt;
      &lt;/scm&gt;
  
      &lt;developers&gt;
          &lt;developer&gt;
              &lt;name&gt;Christian Schneider&lt;/name&gt;
              &lt;url&gt;https://github.com/d0x&lt;/url&gt;
              &lt;id&gt;d0x&lt;/id&gt;
          &lt;/developer&gt;
      &lt;/developers&gt;
  
  &lt;!--    &lt;distributionManagement&gt; --&gt;
  &lt;!--        &lt;repository&gt; --&gt;
  &lt;!--            &lt;id&gt;bintray&lt;/id&gt; --&gt;
  &lt;!--            &lt;url&gt;https://api.bintray.com/maven/d0x/fromGithubToBintray/downloads&lt;/url&gt; --&gt;
  &lt;!--        &lt;/repository&gt; --&gt;
  &lt;!--    &lt;/distributionManagement&gt; --&gt;
  
  
      &lt;properties&gt;
          &lt;mainClass&gt;fromGithubToBintray.Main&lt;/mainClass&gt;
  
          &lt;java-version&gt;1.7&lt;/java-version&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;!-- ... --&gt;        
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
  
              &lt;!-- To build a clean binary pacakge to distribute --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;appassembler-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;programs&gt;
                          &lt;program&gt;
                              &lt;mainClass&gt;${mainClass}&lt;/mainClass&gt;
                              &lt;name&gt;fromGithubToBintray&lt;/name&gt;
                          &lt;/program&gt;
                      &lt;/programs&gt;
  
                      &lt;extraJvmArguments&gt;-Djava.awt.headless=true&lt;/extraJvmArguments&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;!-- To specify the Java Version --&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;${java-version}&lt;/source&gt;
                      &lt;target&gt;${java-version}&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-release-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;useReleaseProfile&gt;false&lt;/useReleaseProfile&gt;
                      &lt;releaseProfiles&gt;release&lt;/releaseProfiles&gt;
                      &lt;autoVersionSubmodules&gt;true&lt;/autoVersionSubmodules&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>How to tune the pom file to do that?</p>
  
  <p><strong>Reproduce:</strong></p>
  
  <p>I uploaded the small example to github: <a href="https://github.com/d0x/fromGithubToBintray" rel="nofollow">https://github.com/d0x/fromGithubToBintray</a></p>
  
  <p>To exectue it do the following:</p>
  
  <ol>
  <li>git clone <a href="https://github.com/d0x/fromGithubToBintray.git" rel="nofollow">https://github.com/d0x/fromGithubToBintray.git</a></li>
  <li>cd fromGithubToBintray</li>
  <li>mvn clean package appassembler:assemble</li>
  <li>chmod +x target/appassembler/bin/fromGithubToBintray</li>
  <li>./target/appassembler/bin/fromGithubToBintray</li>
  </ol>
  
  <p>This should print <code>You did it!</code>. Now the goal is to upload compress and upload this appassembler folder to bintray.</p>
  
  <p><strong>Research done:</strong></p>
  
  <ul>
  <li><a href="http://veithen.blogspot.de/2013/05/github-bintray-maven-release-plugin.html" rel="nofollow">This tutorial</a> shows how to use Bintray.com to publish to a Maven Repository.</li>
  <li>Also I saw that the Netty project host <a href="http://netty.io/downloads.html" rel="nofollow">its downloads</a> on bintray. But in their Poms either in Jenkins I don't see bintray related stuff.</li>
  </ul>