Torsten Curdt’s weblog

Minijar release

Already quite a while ago I blogged about a plugin to shrink your java artifacts in size …to package only what is really required. Especially useful for people complaining that e.g. common-lang got too big. It should help to reduce the copy-and-paste attitude “I don’t need all that” and extract what you need at virtually no effort. Minijar basically builds up transitive hull seeded by the classes of your project artifact and then strips off classes that are not referenced. While doing that you can even combine and in-line all the dependencies into a single jar.

The actual dependency analysis computation for this is factored out into a separate project called “dependency” and so can be used by other projects as well. It uses the byte code toolkit ASM to extract the required information.

Until recently I held off updating minijar because I wanted it to go directly into maven. But now I’ve just turned the patch into changes for the minijar plugin and did a first alpha release over at mojo on codehaus.


Just give it a try and let me know what you think.

  • Gabe
    Minijar is great, but until you support Manifest files, I can't use it :<
  • Serge Huber
    Hi Torsten,

    First of all thanks for your plugin which seems great. I really like the idea of it, but I've never managed to get it to work. It seems to loop endlessly.

    Also how to specify the main class for the UeberJar ? Do I need to create a MANIFEST file somewhere ?

blog comments powered by Disqus