Search code examples
jbosswildflywildfly-10

External location of *-ds.xml files which can be deployed in Wildfly 10


I am new to Wildfly 10.1 version. When *-ds.xml files are placed in deployment folder (under standalone), they get deployed. How can we configure an external folder (folder other than standalone and preferably outside Wildfly folder) to place all our *-ds.xml files that will get deployed in Wildfly ? Any particular configuration.

The same was done in Jboss 4 by configuring URLDeploymentScanner in jboss-service.xml.


Solution

  • This can be done by configuring external 'deployment' directory. For this you have to modify deployment-scanner subsystem in standalone.xml file, like as:

      <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
                <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>
    
                <deployment-scanner name="new-external-deployment-scanner" path="/home/path/deployments" scan-interval="5000" />
            </subsystem>
    

    With this configuration change you will be able to deploy *-ds.xml files and other application from default deploy and new deploy directory.