title: Clean way to combine multiple jars? Preferably using Ant
body: <p>I have runtime dependencies on some external jars that I would like to "rejar" into a single jar. These external dependencies are stored in an external_jars directory, and I'd like to be able to not have to list them all (i.e., not to need to change my build scripts if my dependencies change). Any thoughts?</p>
  
  <p>Google gave me a good answer on how to do this - if you don't mind listing out each jar as a dependency:</p>
  
  <p><a href="http://markmail.org/message/zijbwm46maxzzoo5" rel="noreferrer">http://markmail.org/message/zijbwm46maxzzoo5</a></p>
  
  <p>Roughly, I want something along the lines of the following, which would combine all jars in the lib directory into out.jar (with some sane overwrite rules).</p>
  
  <pre><code>jar -combine -out out.jar -in lib/*.jar
  </code></pre>