Apache Ant is an excellent and popular Java based build system. It has several built-in commands (tasks in Ant lingo) one of which allows you to create Jar file from your existing class file and resources. What if you wanted to include not just class files but selective contents of other jar files too and make a single big jar file?

Ant provides an undocumented way to include the contents of multiple jar files within a single jar file.
Ant Jar task actually allows you to include multiple zipfileset as sub-elements. You can use zipfileset to include contents of other jar (and zip files) within your (big) jar file.

While zipfileset is documented as a sub-element of zip task, nowhere it is mentioned that it also works in a jar task.

An example of using zipfileset:

[jar destfile="${build-abc}/abc.jar" duplicate="fail" index="true">
[zipfileset src="${compile-lib}/demo.jar" includes="**/*.class"/>
[/jar>

Note: Replace [ with < as WordPress User Interface is buggy and doesn't allow you to use < without immediately following it with a space!