March 2018
Intermediate to advanced
310 pages
7h 10m
English
Isn't ShrinkWrap too tedious to be useful in any real-life circumstances? After all, we don't want to manually add all classes and resources from our application to the archive. You don't have to worry about it—you will be able to obtain default deployment from the Swarm instance:
package org.packt.swarm.petstore.catalog;import org.jboss.shrinkwrap.api.Archive;import org.wildfly.swarm.Swarm;public class Main { public static void main(String[] args) throws Exception { Swarm swarm = new Swarm(); swarm.start(); //1 Archive<?> deployment = swarm.createDefaultDeployment(); swarm.deploy(deployment); }}
As you see in the preceding example, we were able to obtain the default deployment by invoking the createDefaultDeployment() ...
Read now
Unlock full access