ShrinkWrap is a powerful tool for building and manipulating Java archives. In fact, it is used internally to JBoss AS 7 to read archives. The goal of ShrinkWrap is to be able to create archives on the fly based on class and file structure. If you're familiar with ant and how it creates archives, ShrinkWrap is very similar except that it works based on classes declared in the JVM. This sets it apart greatly from other tools.
ShrinkWrap is a
domain specific language (DSL) for accessing, creating, and manipulating archives. It is instantiated using a static call to the
ShrinkWrap class, and takes a class as an argument to know what kind of archive we're working with. It can start as simple as ...