<?xml version="1.0" encoding="UTF-8"?>
<!-- This is an Ant build script that creates a minimal jbossmq
configuration based on the default configuration
-->
<project name="Mininal JBossMQ configuration script" default="config">

   <!-- Override if the script is not run from within the
   dist/docs/examples/jms/standalone directory.
   -->
   <property name="jboss.dist" value="../../../.."/>


   <target name="common">

     <!-- get rid of any existing folder -->
     <delete dir="${jboss.dist}/server/jbossmq"/>


     <!-- We are mainly based on the minimal configuration -->
      <copy todir="${jboss.dist}/server/jbossmq">
         <fileset dir="${jboss.dist}/server/minimal">
            <exclude name="conf/jboss-service.xml"/>
            <exclude name="lib/jboss-minimal.jar"/>
         </fileset>
      </copy>
 
     <!-- We need the following from the default configuration -->
      <copy todir="${jboss.dist}/server/jbossmq">
         <fileset dir="${jboss.dist}/server/default">
            <!-- configuration -->
            <include name="conf/login-config.xml"/>
            <include name="conf/xmdesc/*"/>
            <!-- the main jboss jar -->
            <include name="lib/jboss.jar"/>
            <!-- jaas -->
            <include name="lib/jbosssx.jar"/>
            <!-- transactions -->
            <include name="lib/jboss-transaction.jar"/>
            <!-- jms interfaces -->
            <include name="lib/jboss-j2ee.jar"/>
            <!-- local db support -->
            <include name="lib/jboss-common-jdbc-wrapper.jar"/>
            <include name="lib/xalan.jar"/>
            <include name="lib/jboss-jca.jar"/>
            <include name="deploy/jbossjca-service.xml"/>
            <include name="deploy/jboss-local-jdbc.rar"/>
            <include name="conf/standardjbosscmp-jdbc.xml"/>
         </fileset>
     </copy>
     
     
      <copy todir="${jboss.dist}/server/jbossmq/conf/" overwrite="true">
         <fileset dir="${jboss.dist}/docs/examples/jms/standalone">
            <include name="jboss-service.xml"/>
         </fileset>
      </copy>
      
           
   </target>
   
   
   <target name="config" depends="common">
 
     <!-- We need the following from the default configuration -->
      <copy todir="${jboss.dist}/server/jbossmq">
         <fileset dir="${jboss.dist}/server/default">

            <!-- hypersonic -->
            <include name="lib/hsqldb*"/>
            <include name="deploy/hsqldb-ds.xml"/>
            <include name="deploy/jms/hsqldb-jdbc2-service.xml"/>
            <include name="deploy/jms/hsqldb-jdbc-state-service.xml"/>
            <!-- jbossmq -->
            <include name="lib/jbossmq.jar"/>
            <include name="deploy/jms/jbossmq-service.xml"/>
            <include name="deploy/jms/jbossmq-destinations-service.xml"/>
            <include name="deploy/jms/uil2-service.xml"/>
         </fileset>
      </copy>

   </target>
   
   <target name="config-all" depends="common">
        
 
     <!-- We need the following from the all configuration -->
      <copy todir="${jboss.dist}/server/jbossmq">
         <fileset dir="${jboss.dist}/server/all">
            
            <!-- hypersonic -->
            <include name="lib/hsqldb*"/>
            <include name="deploy/hsqldb-ds.xml"/>
            <include name="deploy-hasingleton/jms/hsqldb-jdbc2-service.xml"/>
            <include name="deploy-hasingleton/jms/hsqldb-jdbc-state-service.xml"/>
            <!-- jbossmq -->
            <include name="lib/jbossmq.jar"/>
            <include name="deploy-hasingleton/jms/jbossmq-service.xml"/>
            <include name="deploy-hasingleton/jms/jbossmq-destinations-service.xml"/>
            <include name="deploy-hasingleton/jms/uil2-service.xml"/>
            <!-- clustering -->
            <include name="lib/jgroups.jar"/>
            <include name="lib/jbossha.jar"/>
            <include name="lib/commons-logging.jar"/>
            <include name="deploy/cluster-service.xml"/>
            <include name="deploy/deploy-hasingleton-service.xml"/>
            

         </fileset>
      </copy>


      
      <copy todir="${jboss.dist}/server/jbossmq/deploy/" overwrite="true">
         <fileset dir="${jboss.dist}/docs/examples/jms/standalone">
            <include name="cluster-service.xml"/>
         </fileset>
      </copy>
      

   </target>
   
   
   
</project>
