topical media & game development

talk show tell print

basic-mysql-18-JSPApp-build.xml / xml



  <?xml version="1.0"?>
  <!--
  
  
***************************************************************************** Author: Geoff Moes and Robert Sheldon Project: Begining MySQL - Chapter 18 Module: dvdrentals.js Date: 12/10/04 Description: This file is the and build script for the java JSP application. *****************************************************************************

  
  
  -->
  
  <project name="Mysql Java application" default="all" basedir=".">
  
     <target name="init">
             <property name="dirs.base" value="{basedir}"/>
                  <property name="web" value="{dirs.base}/web"/>
                  <property name="deploymentdescription" value="{dirs.base}/deploymentdescriptors"/>
  
                  <property name="warFile" value="dvdapp.war"/>
                  <property name="earFile" value="dvdapp.ear"/>
  
                  <property name="earDir" value="{dirs.base}/build/ear"/>
                  <property name="warDir" value="{dirs.base}/build/war"/>
  
        <!-- Create Web-inf and classes directories -->
                  <mkdir dir="{warDir}/WEB-INF"/>
  
        <!-- Create Meta-inf and classes directories -->
                  <mkdir dir="{earDir}/META-INF"/>
  
          </target>
  
          <!-- Main target  -->
          <target name="all" depends="init,buildWar,buildEar"/>
  
          <!-- Create the War File -->
          <target name="buildWar" depends="init">
             <copy todir="{warDir}/WEB-INF">
                     <fileset dir="{deploymentdescription}" includes="web.xml" />
             </copy>
  
             <copy todir="{warDir}">
                     <fileset dir="{web}" includes="**/*.*" />
             </copy>
  
        <!-- Create war file and place in ear directory -->
                  <jar jarfile="{earDir}/{warFile}" basedir="{warDir}" />
          </target>
  
          <!-- Create the War File -->
     <target name="buildEar" depends="init">
             <copy todir="{earDir}/META-INF">
                     <fileset dir="{deploymentdescription}" includes="application.xml" />
             </copy>
  
        <!-- Create ear file and place in ear directory -->
                  <jar jarfile="{dirs.base}/{earFile}" basedir="{earDir}" />
  
        <copy file="{dirs.base}/{earFile}" todir="C:\jboss-4.0.0RC1\server\default\deploy"/>
      </target>
  </project>


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.