6.2. Adding a Custom Deploy Directory


EAP by default looks for deployments under the JBOSS_DIST/jboss-as/server/<instance-name>/deploy directory. However you can configure the server to include custom directories for scanning deployments. To do so, configure the BootstrapProfileFactory MC bean in JBOSS_DIST/jboss-as/server/PROFILE/conf/bootstrap/profile.xml file: add the custom directory to the applicationURIs property of the BootstrapProfileFactory, which defines a list of URLs scanned for applications (refer to Example 6.1, “The /home/me/myapps Directory Defined as Custom Deploy Directory”).

Example 6.1. The /home/me/myapps Directory Defined as Custom Deploy Directory

<bean name="BootstrapProfileFactory" class="org.jboss.system.server.profileservice.repository.
StaticProfileFactory">
   ...
   <property name="applicationURIs">
      <list elementClass="java.net.URI">
         <value>${jboss.server.home.url}deploy</value>
         <value>file:///home/me/myapps</value>
      </list>
   ...
Copy to Clipboard Toggle word wrap

Important

After modifying the JBOSS_DIST/jboss-as/server/PROFILE/conf/bootstrap/profile.xml file, you need to restart the server for the changes to take effect.
For performance reasons, adding a new deployment directory to the BootstrapProfileFactory also requires the same URL to be added to the VFSCache MC bean configuration in JBOSS_DIST/jboss-as/server/PROFILE/conf/bootstrap/vfs.xml (refer to Example 6.2, “The /home/me/myapps Directory Added to VFSCache”).

Example 6.2. The /home/me/myapps Directory Added to VFSCache

<bean name="VFSCache">
   ...
   <property name="permanentRoots">
      <map keyClass="java.net.URL" valueClass="org.jboss.virtual.spi.ExceptionHandler">
         ...
         <entry>
            <key>file:///home/me/myapps</key>
            <value><inject bean="VfsNamesExceptionHandler"/></value>
         </entry>
      </map>
   </property>
   ...
Copy to Clipboard Toggle word wrap

Important

Not adding the custom deployment directory to the VFSCache bean might result in growing disk space usage by the server.
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat