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 ShrinkWrap.create(JavaArchive.class)
to make a new Archive
. You can also import a file easily, using ShrinkWrap.createFromZipFile(JavaArchive.class,new File("myfile.jar"))
.
ShrinkWrap is meant to be easy to use, simplistic, and extensible. When you create an archive it will be deployed to your container. While Arquillian supports manual creation and deployment, it is much easier to allow Arquillian to deploy your archive for you. ShrinkWrap will make this process as simple or complex as you need, allowing you to bring in external dependencies, build complex archive structures, or even just importing a file from the file system; it's your choice.