Announcement:1.0.0-alpha-12 Released
Painless Packaging for Java
Shrinkwrap provides a simple mechanism to assemble archives like JARs, WARs, and EARs with a friendly, fluent API.
JavaArchive archive = ShrinkWrap.create(JavaArchive.class,"archive.jar")
.addClasses(MyClass.class,MyOtherClass.class)
.addResource("mystuff.properties");
From there you may deploy directly into any supported integration container like JBoss EmbeddedAS, GlassFish v3 Embedded, Jetty, or OpenEJB. Or perhaps you'd like to export the archive to a file or exploded directory structure. Maybe you'd prefer to serialize it over the network to a remote host. The possibilities are limitless.
To boot, ShrinkWrap is the supported deployment mechanism of the Arquillian project, and together we render the testing of true enterprise components amiable as a puppy. Where Java EE brought a POJO programming model to application development, we've brought it to testing. You handle your business logic; we'll do the rest.
To foster community participation, the majority of documentation and examples are available through our Wiki.
Releases are available either via our Downloads section, or through the JBoss Maven Repository, which we recommend is configured in ${userHomeDir}/.m2/settings.xml:
<settings>
...
<profiles>
...
<profile>
<id>jboss-public-repository</id>
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>jboss-public-repository</activeProfile>
</activeProfiles>
...
</settings>
ShrinkWrap may then be declared as a dependency:
<project>
...
<dependencies>
...
<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-api</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-impl-base</artifactId>
<scope>test</scope> <!-- Don't rely upon internals for compilation -->
</dependency>
...
</dependencies>
...
</project>
Prerequisites
ShrinkWrap is designed to have a minimal dependency set.
- JRE5+ Runtime
- No external libraries
External Blogs and Articles
- Organizing deployments with Arquillian and Shrinkwrap
-
Arquillian and ShrinkWrap are undoubtedly great tools for tests automation. However one of the most difficult parts is usually deployment description.
- Cruickshanks presenterer Arquillian [Luke 18, 2012]
-
Kevin Cruickshanks (@kevincruick) er en kompis fra studietiden ved Universitetet i Bergen. Det er ikke så ofte vi ser hverandre lengre, men fra tid til annen stiller han opp på NNUG-møter, og da er det alltid hyggelig. Arquillian er en spennende plattform for automatiserte integrasjonstester for Java-utviklere. I denne tutorialen git Kevin deg en grundig innføring.
- Is there such a thing as the NoMock movement?
-
For years we have learned that we all should do this. Unit tests are good, unit tests need mocks. Therefor we unit test, and therefor we mock. Life was simple. Lately however a growing group of people seem out to disturb our perfect little world. Their creed: “Mocks are wrong. We should use real objects”. They don’t seem to have a name yet, but following the NoSQL movement, let’s call them the NoMock movement.
Useful Links
Recent Commits
- mdulac SHRINKWRAP-456 Correct the error message when a imported file does not exist.
- Apr 19, 2013 9:32 AM
- mmatloka SHRINKWRAP-455 Fixed path containing children delete from imported archive
- Apr 19, 2013 7:06 AM
- mmatloka SHRINKWRAP-450 Compiler plugin configuration fix - build do not working due to lack of JAVA7_HOME environment variable
- Apr 18, 2013 5:07 AM
- mmatloka SHRINKWRAP-452 Eclipse java template year updated
- Apr 18, 2013 5:01 AM
- FrzMe SHRINKWRAP-451 Attributes identify directories based on if they are an directory in the
- Apr 10, 2013 9:24 AM