title: buildr: package dependencies into a single jar
body: <p>I have a java project that is built with <a href="http://buildr.apache.org/" rel="nofollow noreferrer">buildr</a> and that has some external dependencies:</p>
  
  <pre><code>repositories.remote &lt;&lt; "http://www.ibiblio.org/maven2"
  repositories.remote &lt;&lt; "http://packages.example/"
  
  define "myproject" do
    compile.options.target = '1.5'
    project.version = "1.0.0"
    compile.with 'dependency:dependency-xy:jar:1.2.3'
    compile.with 'dependency2:dependency2:jar:4.5.6'
  
    package(:jar)
  end
  </code></pre>
  
  <p>I want this to build a single standalone jar file that includes all these dependencies.</p>
  
  <p>How do I do that?</p>
  
  <p>(there's a logical followup question: <a href="https://stackoverflow.com/questions/1284769/package-java-applet-with-minimal-dependencies-autojar-plugin-for-buildr">How can I strip all the unused code from the included dependencies and only package the classes I actually use</a>?)</p>