title: How can I define two different 'distribution' tasks in gradle?
body: <p>The normal behavior of the <code>distTar</code> and <code>distZip</code> tasks from the application plugin in gradle seems to be to copy the contents of <em>src/dist</em> into the zip and tar files, but I have a subfolder in <em>src/dist</em> that I want to exclude from the default distribution, and include it for a new (extended) task, possibly to be called distZipWithJRE.</p>
  
  <p>I have been able to exclude this folder in the default task as follows:</p>
  
  <pre><code>distributions.main {
      contents {
          from('build/config/main') {
              into('config')
          }
  
          from('../src/dist') {
              exclude('jre')
          }
      }
  }
  </code></pre>
  
  <p>How can I define a second task that behaves just like the original (unmodified) task?</p>