<project name="JEMS Installer - JBoss AS" default="unzip-thirdparty">

   <!-- Unzip/arrange the thirdpary content into a structure usable with
   the installer packs
   -->  
   <target name="unzip-thirdparty" unless="unzip-bypass.on">
      <delete dir="${jboss.dist}" />
      <!-- Extract the jboss dist -->  
      <unzip dest="output" src="${jboss.thirdparty}/jbossas/lib/jbossas-repo.zip" />
      <!-- Unpack the javaee5 binaries -->
      <!-- aop -->  
      <mkdir dir="output/javaee5/aop/client" />
      <mkdir dir="output/javaee5/aop/deploy" />
      <mkdir dir="output/javaee5/aop/lib" />
      <copy todir="output/javaee5/aop/client">
         <fileset dir="${jboss.thirdparty}/jboss/aop/lib">
            <include name="jboss-aop-jdk50-client.jar" />  
            <include name="jboss-aspect-jdk50-client.jar" />  
         </fileset>
      </copy>
      <unzip dest="output/javaee5/aop/deploy/jboss-aop-jdk50.deployer"
         src="${jboss.thirdparty}/jboss/aop/bin/jboss-aop-jdk50.deployer" />

      <!-- Prepare installer descriptors and resources -->
      <copy todir="${jboss.dist}/install">
         <fileset dir="${jboss.thirdparty}/jbossas-install/resources"/>
      </copy>
      <unzip dest="${jboss.dist}/install" src="${jboss.thirdparty}/jbossas-install/lib/resources.zip" />
   	
      <!-- Jar up the velocity templates -->
      <jar destfile="output/as-templates.jar">
         <fileset dir="${jboss.dist}/install">
            <include name="templates/**" />
         </fileset>
      </jar>


   </target>
  
</project>
