3 Replies Latest reply on Sep 5, 2005 9:13 AM by skbala

    Why do I have to deploy my webapp in deploy directory?

      In real time production systems usually we will not have write permission to JBOSS install directory. That being said I should be able to deploy my webapp to a external directory and point my Jboss server to deploy my webapp from this external location.
      So far I haven't been able to find any information that tells me if I can do that. Any help will be appriciated.

        • 1. Re: Why do I have to deploy my webapp in deploy directory?
          rintin

          I'm pretty new to JBoss but this is what I found out. You can pass parameters to the startup script to indicate to JBoss that you'd like to use an alternative deploy directory.

          I use ant to start JBoss:

          <target name="jboss_start"
           description="Start JBoss server">
           <java dir="${env.JBOSS_CONFIG_DIR}" classname="org.jboss.Main" fork="true">
           <arg line="${JBOSS_ARGS}"/>
           </java>
           </target>


          The JBOSS_CONFIG_DIR can be set to anything, "/config/jboss" for example. Within that you copy the contents of what server config you would like to copy. I copied the contents of the "default" folder $JBOSS_HOME/server/default

          The ${JBOSS_ARGS} are:

          <property name="JBOSS_ARGS" value="-Djboss.server.name=${env.JBOSS_CONFIG} -Djboss.server.base.dir=${env.JBOSS_CONFIG_DIR} -Djboss.server.base.url=${env.JBOSS_CONFIG_DIR} -Djboss.server.home.url=file:${env.JBOSS_CONFIG_DIR}/${env.JBOSS_CONFIG}"/>


          These args are just telling JBoss to use something other than default.

          You should now be able to deploy your webapp in the $JBOSS_CONFIG_DIR/deploy

          Hope this helps.
          -B-

          • 2. Re: Why do I have to deploy my webapp in deploy directory?
            skbala

            Hi rintin,

            Your information had been very much useful to me. But i had a doubt in mind about how to start Jboss using build.xml file. Initially i tried using task in and <run.sh>. But the problem i found with this is that now i am unable to shutdown by using "shutdown.sh -S".

            You can say the way u did, rewrite the run.sh script in build.xml, but why should we read and understand run.sh and rewrite, i think it is all a headache..........

            Any help is highly appreciated, atleast can u provide ur build.xml file here.

            Thanks,
            satish.

            • 3. Re: Why do I have to deploy my webapp in deploy directory?
              skbala

              OOps!!

              in the previous message, it is "using exec task" in 2nd line.

              thanks,
              satish.