public static Archive<?> createDeployment() {
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "subdirectory.ear");
final JavaArchive jarOne = ShrinkWrap.create(JavaArchive.class, "ejb.jar");
jarOne.addClass(MessageBean.class);
ear.addAsModule(new ArchiveAsset(jarOne, ZipExporter.class), "subdir/ejb/ejb.jar");
final WebArchive war = ShrinkWrap.create(WebArchive.class, "web.war");
war.addClass(MessageServlet.class);
ear.addAsModule(new ArchiveAsset(war, ZipExporter.class), "subdir/web/web.war");
logger.info(ear.toString(true));
return ear;
}