2 Replies Latest reply on Sep 27, 2011 11:35 AM by sudhir reddy

    AutoDeploy ant task in JBOSS6.0 Not working

    sudhir reddy Newbie

      Hi

       

      can someone help me with the autodeploy EAR file in JBoss 6.0 AS. i trie using below twiddle script:

       

      twiddle.bat invoke "jboss.system:service=MainDeployer" deploy C:\Application\dist\Application.ear

       

      It picks up the EAR and deploys in tmp location which works fine, but if i again run script with new changes in EAR it wont get deployed.

       

      please tell me is there any other way to autodeploy EAR in jboss6.0.

       

      Thanks

      Sudhir

        • 1. Re: AutoDeploy ant task in JBOSS6.0 Not working
          sudhir reddy Newbie

          i got it working in my dev environment, i will post the steps once i validate in my test env..

          • 2. Re: AutoDeploy ant task in JBOSS6.0 Not working
            sudhir reddy Newbie

            hi all

             

            i forgot to post the autodeploy steps, i was able to autodeploy in test env from another machine.

             

            define  the below properties in your properties file:

             

            JBOSS_HOME=C:/jboss-6.0.0

            JBOSS_SERVER=localhost or your server name

            JBOSS_JMX_PORT=1090

            JBOSS_USER=admin

            JBOSS_PASSWD=admin

             

            define the below targets in your ant script. and call ant deploy.

             

            <target name="undeploy">

                     <jmx:open host="${JBOSS_SERVER}" port="${JBOSS_JMX_PORT}" username="${JBOSS_USER}" password="${JBOSS_PASSWD}" />

                    

                    <jmx:invoke name="jboss.system:service=MainDeployer" operation="undeploy">

                          <arg type="java.lang.String" value="vfs:///${jboss.dir}/deploy/Application.ear"/>

                    </jmx:invoke>

                </target>

               

                <target name="copy-ear" depends="undeploy">

                      <copy file="${app.ear.dir}/Application.ear" todir="${jboss.ear.dir}"/>

                </target>

               

                <target name="deploy" depends="copy-ear">

                     <jmx:open host="${JBOSS_SERVER}" port="${JBOSS_JMX_PORT}" username="${JBOSS_USER}" password="${JBOSS_PASSWD}" />

                    

                     <jmx:invoke name="jboss.system:service=MainDeployer" operation="deploy">

                          <arg type="java.lang.String" value="vfs:///${jboss.dir}/deploy/Application.ear"/>

                     </jmx:invoke>        

                </target>

             

            this task reduced our time in autodeploying the application manually.