Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0"?>
- <project name="beetlemed" basedir="." default="help">
- <property file="build.properties"/>
- <target name="help">
- <echo>Beetle Med - Please run one of the following commands.</echo>
- <echo>To compile and deploy the web-app, run: </echo>
- <echo> ant deploy.webapp</echo>
- <echo>To compile and deploy the flex application, run: </echo>
- <echo> ant compile.flex.main compile.flex.modules deploy.webapp</echo>
- <echo>To compile and run web-app tests, run:</echo>
- <echo> ant run.webapp.tests</echo>
- <echo>To compile and run flex tests, run:</echo>
- <echo> ant compile.flex.tests run.flex.tests</echo>
- <echo>To run a clean build of the flex application, run:</echo>
- <echo> ant clean.flex compile.flex.main compile.flex.modules</echo>
- </target>
- <!-- GLOBAL -->
- <target name="clean.all">
- <delete dir="${bin.dir}" includes="**/*"
- includeemptydirs="true"/>
- </target>
- <target name="clean.java">
- <delete dir="${main.java.bin.dir}" includes="**/*"
- includeemptydirs="true"/>
- </target>
- <target name="clean.flex">
- <delete dir="${main.flex.bin.dir}" includes="**/*"
- includeemptydirs="true"/>
- </target>
- <target name="clean.tests">
- <delete dir="${test.java.bin.dir}"/>
- <delete dir="${test.java.report.dir}"/>
- <delete dir="${test.java.output.dir}"/>
- <delete dir="${test.flex.report.dir}"/>
- <delete dir="${test.flex.output.dir}"/>
- </target>
- <target name="clean.deploy">
- <delete dir="${webapp.build.dir}"/>
- </target>
- <target name="prepare">
- <taskdef resource="flexTasks.tasks"
- classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
- <mkdir dir="${main.java.bin.dir}"/>
- <mkdir dir="${main.flex.bin.dir}"/>
- <mkdir dir="${main.flex.modules.bin.dir}"/>
- <mkdir dir="${test.java.bin.dir}"/>
- <mkdir dir="${test.flex.bin.dir}"/>
- <mkdir dir="${test.java.output.dir}"/>
- <mkdir dir="${test.java.report.dir}"/>
- <mkdir dir="${test.flex.output.dir}"/>
- <mkdir dir="${test.flex.report.dir}"/>
- </target>
- <!-- WEBAPP -->
- <target name="compile.webapp" depends="prepare">
- <javac srcdir="${main.java.src.dir}"
- destdir="${main.java.bin.dir}"
- optimize="${java.compiler.optimize}"
- fork="${java.compiler.fork}"
- memorymaximumsize="${java.compiler.maxmemory}">
- <classpath>
- <filelist>
- <file name="${red5.home}/red5.jar"/>
- <file name="${red5.home}/boot.jar"/>
- </filelist>
- <fileset dir="${red5.lib.dir}" includes="**/*"/>
- <fileset dir="${main.java.lib.dir}" includes="**/*"/>
- </classpath>
- </javac>
- <copy todir="${main.java.bin.dir}">
- <fileset dir="${main.java.src.dir}"
- excludes="**/*.java"/>
- </copy>
- <jar destfile="${main.java.jar.file}">
- <fileset dir="${main.java.bin.dir}"/>
- </jar>
- </target>
- <target name="deploy.webapp" depends="compile.webapp">
- <mkdir dir="${webapp.build.dir}/${ant.project.name}/WEB-INF/lib"/>
- <copy todir="${webapp.build.dir}/${ant.project.name}/WEB-INF/lib"
- file="${main.java.jar.file}"/>
- <copy todir="${webapp.build.dir}/${ant.project.name}/WEB-INF/lib">
- <fileset dir="${main.java.lib.dir}" includes="**/*"/>
- </copy>
- <copy todir="${webapp.build.dir}/${ant.project.name}">
- <fileset dir="${web.dir}" includes="**/*"/>
- </copy>
- <copy todir="${webapp.build.dir}/${ant.project.name}">
- <fileset dir="${main.flex.bin.dir}"
- includes="**/*.swf"/>
- </copy>
- <copy todir="${red5.webapps.dir}">
- <fileset dir="${webapp.build.dir}"
- includes="**/*"/>
- </copy>
- </target>
- <target name="compile.webapp.tests" depends="compile.webapp">
- <javac srcdir="${test.java.src.dir}"
- destdir="${test.java.bin.dir}">
- <classpath>
- <filelist>
- <file name="${red5.home}/red5.jar"/>
- <file name="${red5.home}/boot.jar"/>
- <file name="${bin.dir}/${ant.project.name}.jar"/>
- </filelist>
- <fileset dir="${red5.lib.dir}" includes="**/*"/>
- <fileset dir="${main.java.lib.dir}" includes="**/*"/>
- <fileset dir="${test.java.lib.dir}" includes="**/*"/>
- </classpath>
- </javac>
- </target>
- <target name="run.webapp.tests" depends="compile.webapp.tests">
- <junit printsummary="true">
- <classpath>
- <filelist>
- <file name="${red5.home}/red5.jar"/>
- <file name="${red5.home}/boot.jar"/>
- <file name="${bin.dir}/${ant.project.name}.jar"/>
- </filelist>
- <fileset dir="${red5.lib.dir}" includes="**/*.jar"/>
- <fileset dir="${main.java.lib.dir}" includes="**/*.jar"/>
- <fileset dir="${test.java.lib.dir}" includes="**/*.jar"/>
- <fileset dir="${test.java.bin.dir}" includes="**/*.class"/>
- </classpath>
- <formatter type="xml"/>
- <batchtest todir="${test.java.output.dir}">
- <fileset dir="${test.java.bin.dir}" includes="**/*TestCase*"/>
- </batchtest>
- </junit>
- <junitreport>
- <fileset dir="${test.java.output.dir}" includes="**/*"/>
- <report todir="${test.java.report.dir}"/>
- </junitreport>
- </target>
- <!-- FLEX -->
- <macrodef name="compile-application">
- <attribute name="target"/>
- <attribute name="destfile"/>
- <sequential>
- <mxmlc file="@target@"/>
- </sequential>
- </macrodef>
- <target name="compile.flex.main" depends="prepare">
- </target>
- <target name="compile.flex.modules" depends="prepare">
- </target>
- </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement