WildFly Exploded Deployments with auto-deploy-exploded: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 19: Line 19:
         <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
         <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
             <deployment-scanner path="deployments"  
             <deployment-scanner path="deployments"  
                                              relative-to="jboss.server.base.dir"  
                                relative-to="jboss.server.base.dir"  
                                              scan-interval="5000"  
                                scan-interval="5000"  
                                              auto-deploy-exploded="true"/>
                                auto-deploy-exploded="true"/>
         </subsystem>
         </subsystem>
</pre>
</pre>

Revision as of 23:00, 31 March 2016

Internal

Overview

Exploded deployments are not deployed by default by a WildFly instance. If a directory with a standard JEE extension (.ear, .war, etc.) is encountered in the deployments directory, a standardly configured WildFly instance will issue a log message similar to:

15:51:08,008 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found test.ear in deployment directory. To trigger deployment create a file called test.ear.dodeploy

Configuring the Deployment Scanner to Auto-Deploy Exploded Deployments

Configure the deployment scanner setting the auto-deploy-exploded attribute to true as such:

        <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 JEE archives.

Redeployment on Any File Change

A particular behavior of the deployment scanner in this configuration is that it re-deploys the artifact if detects any file change (not only on specific deployment descriptors) under the root directory of the artifact.