title: How to start and stop jboss from apache ant build.xml file
body: <p>I have make 
  jar
  war
  EAR</p>
  
  <p>using ant and Hudson and store all files at some temp folder </p>
  
  <p>now I want to copy all war and ear files to jboss jboss/default/deploy folder using Apache ANT</p>
  
  <p>How can I do this??</p>
  
  <p>Following is my master build file
  which call all other build.xml files and make jar war ear files</p>
  
  <p>but after making this all files this don't copy all any of the files to jboss/default/deploy folder </p>
  
  <pre><code>&lt;copy todir="${jbossdeploy.dir}" overwrite="yes"&gt;
          &lt;fileset dir="${class.dir}/ear" includes="MessageBoardEAR.ear"/&gt;
  
  
      &lt;/copy&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>&lt;project name="master" &gt;
  
      &lt;property name="class.dir" location="../Source/buildwork" /&gt;
      &lt;property name="ecpsproperties.dir" location="D:\ecpsproperties\jars\platform" /&gt;
      &lt;property name="jbossdeploy.dir" location="D:\jboss-6.1.0.Final\server\default\deploy" /&gt;
  
      &lt;target name="clean"&gt;
          &lt;delete dir="${class.dir}" /&gt;
  
      &lt;/target&gt;
  
      &lt;target name="makedir"&gt;
          &lt;mkdir dir="${class.dir}" /&gt;
          &lt;mkdir dir="${class.dir}/jar" /&gt;
          &lt;mkdir dir="${class.dir}/ear" /&gt;
          &lt;mkdir dir="${class.dir}/war" /&gt;
      &lt;/target&gt;
  
  &lt;filelist id="projects" dir="."&gt;
          &lt;file name="../Source/ValueObjects/build.xml"/&gt;
          &lt;file name="../Source/ECPSValueObjects/build.xml"/&gt;
          &lt;file name="../Source/ECPSUtils/build.xml"/&gt;
          &lt;file name="../Source/CommonExceptions/build.xml"/&gt;
           &lt;file name="../Source/ECPSExceptions/build.xml"/&gt;
           &lt;file name="../Source/ECPSCommon/build.xml"/&gt;
           &lt;file name="../Source/BaseDAO/build.xml"/&gt;
           &lt;file name="../Source/PageManagerValueObjects/build.xml"/&gt;
           &lt;file name="../Source/PageManagerDAO/build.xml"/&gt;
           &lt;file name="../Source/ECPSDAO/build.xml"/&gt;
           &lt;file name="../Source/PageManagerEJBClient/build.xml"/&gt;
           &lt;file name="../Source/PartyEJBClient/build.xml"/&gt;
            &lt;file name="../Source/ReportsEJBClient/build.xml"/&gt;
           &lt;file name="../Source/StagingEJBClient/build.xml"/&gt;
            &lt;file name="../Source/MessageBoardEJBClient/build.xml"/&gt;
           &lt;file name="../Source/PageManagerFacade/build.xml"/&gt;
            &lt;file name="../Source/PartyFacade/build.xml"/&gt;
           &lt;file name="../Source/ReportsFacade/build.xml"/&gt;
            &lt;file name="../Source/StagingFacade/build.xml"/&gt;
           &lt;file name="../Source/MessageBoardFacade/build.xml"/&gt;
  
            &lt;file name="../Source/MessageBoardEJB/build.xml"/&gt;
           &lt;file name="../Source/MessageBoardEAR/build.xml"/&gt;
           &lt;file name="../Source/PageManagerEJB/build.xml"/&gt;
            &lt;file name="../Source/PageManagerEAR/build.xml"/&gt;
  
             &lt;file name="../Source/PartyEJB/build.xml"/&gt;
           &lt;file name="../Source/PartyEAR/build.xml"/&gt;
  
           &lt;file name="../Source/ReportsEJB/build.xml"/&gt;
            &lt;file name="../Source/ReportsEAR/build.xml"/&gt;
  
            &lt;file name="../Source/StagingEJB/build.xml"/&gt;
           &lt;file name="../Source/StagingEAR/build.xml"/&gt;
  
            &lt;file name="../Source/Admin/build.xml"/&gt;
           &lt;file name="../Source/eCPSClient/build.xml"/&gt;
            &lt;file name="../Source/MessageBoardServices/build.xml"/&gt;
             &lt;file name="../Source/OAuth/build.xml"/&gt;
              &lt;file name="../Source/PageManagerRest/build.xml"/&gt;
               &lt;file name="../Source/PartyServices/build.xml"/&gt;
               &lt;file name="../Source/ReportsServices/build.xml"/&gt;
            &lt;file name="../Source/StagingServices/build.xml"/&gt;
  
  
   &lt;/filelist&gt;
  
  
  
      &lt;copy todir="${jbossdeploy.dir}" overwrite="yes"&gt;
          &lt;fileset dir="${class.dir}/ear" includes="MessageBoardEAR.ear"/&gt;
  
  
      &lt;/copy&gt;
  
  
  
  
   &lt;target name="main" depends="clean, makedir"&gt;
      &lt;subant&gt;
  
        &lt;filelist refid="projects" /&gt;
  
      &lt;/subant&gt;
  
   &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>