Version 6

    If you want to deploy an application outside the "deploy" folder of JBoss in JBossAS-5, you can add your user directory to the ProfileService bootstrap process. This will automatically pick up the specified directory and treat it as if you would put the content to the deploy/ folder. Note that all specified folders need to be fully qualified url.

     

    JBoss AS 5.0.0 EAP

    Same as the instructions for JBoss AS 5.1.x below, edit the server/${jboss.server.name}/conf/bootstrap/profile.xml.

    JBoss AS 5.1.x

    Starting with 5.1.0.Beta1 there have been some changes to the ProfileService. To add your custom folder you would need to edit the server/${jboss.server.name}/conf/bootstrap/profile.xml.


    Note - the folder names must be specified using URL syntax. For example, to specify that /home/jpai/test/deploy be used for deployment, the example below uses the value file:///home/jpai/test/deploy.

     

    <bean name="BootstrapProfileFactory"
         class="org.jboss.system.server.profileservice.repository.StaticProfileFactory">
         <property name="bootstrapURI">${jboss.server.home.url}conf/jboss-service.xml</property>
         <property name="deployersURI">${jboss.server.home.url}deployers</property>
         <property name="applicationURIs">
              <list elementClass="java.net.URI">
                   <value>${jboss.server.home.url}deploy</value>
    
                   <!-- Add your own deploy folder -->
                   <value>file:///home/jpai/test/deploy</value>
              </list>
         </property>
         ...
    </bean>

     

     

    JBoss AS 5.0.x

    In JBoss AS 5.0.0.GA you need to edit the %JBOSS_HOME%/server/< serverName>/conf/bootstrap/profile-repository.xml and add your directory to the URIs property of SerializableDeploymentRepositoryFactory bean. Here's an example, where i am adding my /home/jpai/test/deploy folder to the URIs property. Doing so, i will be able to place any deployable application in /home/jpai/test/deploy folder, so that it will be picked up for deployment:

     

    <bean name="SerializableDeploymentRepositoryFactory" 
         class="org.jboss.system.server.profileservice.repository.SerializableDeploymentRepositoryFactory">
          <property name="storeRoot">${jboss.server.base.dir}</property>
          <property name="attachmentsRoot">${jboss.server.data.dir}/attachments</property>
          <property name="applicationURIs">
             <array elementClass="java.net.URI">
                <value>${jboss.server.home.url}deploy</value>
               
                  <!-- Add my own folder -->
                <value>file:/home/jpai/test/deploy</value>
         ...
    </bean>
    

     

     

    JBoss AS 6:

     

    For JBoss AS6, see this