An exploded deployment is an application which is not packaged in a .war, .ear or .jar file but it's contained in a directory using these extensions (.ear, .war, etc.).

Exploded deployments are not deployed by default by WildFly. If a directory with a standard extension (.ear, .war, etc.) is placed in the deployments directory, a log message like this will be emitted:

11:21:18,021 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found demo.war in deployment directory. To trigger deployment create a file called demo.war.dodeploy

So, by default, you have to add a file named <applicationname>.dodeploy into the deployments folder to trigger the exploded deployment.

$ touch ./standalone/deployments/demo.war.dodeploy

Configuring the Deployment Scanner to auto-deploy Exploded Deployments

In order to enable automatically the scanner to deploy exploded deployments, configure it setting the auto-deploy-exploded attribute to true as follows:

<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
    <deployment-scanner path="deployments" 
                        relative-to="jboss.server.base.dir" 
                        scan-interval="5000" 
                        auto-deploy-exploded="true"/>
</subsystem>

Once configured, the deployment scanner will pick up and deploy exploded applications.

How to explode the application from WildFly CLI

By using WildFly CLI or Web console, the archive can be expanded in any local directory accessible to the application server, not necessarily under the deployments directory. Let's see how to explode an application named test.war:

/deployment=test:add(runtime-name="test.war", enabled=true, content=[{"path"=>"/home/jboss/exploded-test-dir.war", "archive"=>false}])

You need to provide appropriate values to the "runtime-name" and the "path" attributes.

  • "runtime-name" must end with the same extension as the original artifact. For example, if an WAR is deployed, the runtime name must end in ".war".
  • "path" must contain the absolute path of the exploded directory. As mentioned in the "Explode" the JEE archive section, the name must end with the appropriate JEE extension.

A successful deployment will update the standalone server configuration file with a section similar to:

    <deployments>
        <deployment name="test" runtime-name="test.war">
            <fs-exploded path="/home/jboss/exploded-test-dir.war"/>
        </deployment>
    </deployments>

Exploding a deployment using the web console

Navigate to "Deployments" and select the deployment you want to browse. Then open the context menu and choose Browse Content:

wildfly exploded deployment wildfly exploded deployment

Select Explode to explode the deployment.

0
0
0
s2sdefault

Related articles available on mastertheboss.com

How to configure JBoss to disable hot deployment ?

On JBoss AS 7 and WildFly the default rule is that archived appli

How do I make sure my MBean is deployed after my EJB ?

  If your MBean is dependant on another resource, supposing cont

How do I change the default lib directory in an ear file?

  Supposing you have an Enterprise application which has been pa

How to let JBoss deploy an application after other apps?

  If you are running JBoss AS 7 or WildFly check the following t

How to deploy an application temporarly with JBoss ?

One way to do it, is using the jboss.system:service=MainDeployer

How to add a custom JBoss archive in an Ear ?

JBoss custom archives (like .sar or .har) are not recognized by t