As we said before, during the standard Maven plugin operation, the resulting application contains both the Swarm server and the application that is deployed on it. We can change that behavior. Let's suppose that we deploy our application in the cloud and later push new changes to its code. Since it is the application code that changes in most cases, we would like to create the container with the server in the cloud and later push only code to it. How are we able to do it? By using hollow JARs.
Thin and hollow JARs
Using hollow JARs
You are able to configure the Maven plugin to build hollow JARs, which contain the swarm server without the actual application deployed on it. Let's return to the JAX-RS + CDI example...