- <?xml version="1.0" ?>
- <project name="RED5" basedir="." default="all">
- <!-- user overides for project properties -->
- <property file="${user.home}/build.properties"/>
- <!-- base project properties -->
- <property file="build.properties"/>
- <!-- project properties -->
- <property environment="env"/>
- <property name="java.home" value="${env.JDK_HOME}"/>
- <property name="src.dir" value="src"/>
- <property name="dist.dir" value="dist"/>
- <property name="lib.dir" value="lib"/>
- <property name="classes.dir" value="bin"/>
- <property name="webapps.dir" value="webapps"/>
- <property name="debug.state" value="true"/>
- <property name="config.dir" value="conf"/>
- <property name="javadoc.dir" value="doc/api"/>
- <!-- Special directory destination for build war - unused in normal server build -->
- <property name="tmp.war.dir" value=""/>
- <!-- JUNIT TESTING -->
- <property name="test.dir" value="test"/>
- <property name="testclass.dir" value="bin/testcases"/>
- <property name="testreports.dir" value="${testclass.dir}/testreports"/>
- <property name="testdoc.dir" value="doc/test"/>
- <path id="project.classpath">
- <fileset dir="${lib.dir}" includesfile="${lib.dir}/library.properties"/>
- <fileset dir="${lib.dir}" includesfile="${lib.dir}/java6.properties"/>
- </path>
- <path id="script.classpath">
- <fileset dir="${lib.dir}" includesfile="${lib.dir}/script.properties"/>
- <pathelement location="${classes.dir}"/>
- </path>
- <!-- For use with pre-java6 environment -->
- <path id="project_compatibility.classpath">
- <fileset dir="${lib.dir}" includesfile="${lib.dir}/library.properties"/>
- <fileset dir="${lib.dir}/java5" includesfile="${lib.dir}/java5/java5.properties"/>
- </path>
- <!-- For use with pre-java6 environment -->
- <path id="script_compatibility.classpath">
- <fileset dir="${lib.dir}" includesfile="${lib.dir}/script.properties"/>
- <fileset dir="${lib.dir}/java5" includesfile="${lib.dir}/java5/java5.properties"/>
- <pathelement location="${classes.dir}"/>
- </path>
- <path id="webapps.classpath">
- <fileset dir="${lib.dir}">
- <filename name="*.jar"/>
- </fileset>
- <pathelement location="${classes.dir}"/>
- </path>
- <path id="full.classpath">
- <fileset dir="${lib.dir}" includesfile="${lib.dir}/library.properties"/>
- <fileset dir="${lib.dir}" includesfile="${lib.dir}/java6.properties"/>
- <fileset dir="${lib.dir}" includesfile="${lib.dir}/script.properties"/>
- <fileset dir="./">
- <filename name="red5.jar"/>
- </fileset>
- </path>
- <path id="full_compatibility.classpath">
- <fileset dir="${lib.dir}" includesfile="${lib.dir}/library.properties"/>
- <fileset dir="${lib.dir}/java5" includesfile="${lib.dir}/java5/java5.properties"/>
- <fileset dir="${lib.dir}" includesfile="${lib.dir}/script.properties"/>
- <fileset dir="./">
- <filename name="red5.jar"/>
- </fileset>
- </path>
- <echo>java.home is ${java.home} and the target version is ${java.target_version}</echo>
- <target name="-junit.check">
- <available property="junit.installed" classname="junit.framework.TestCase"/>
- </target>
- <target name="-java6.check">
- <condition property="java6.installed" value="true">
- <and>
- <available property="java6.installed" classname="javax.script.Bindings"/>
- <equals arg1="${java.target_version}" arg2="1.6"/>
- </and>
- </condition>
- </target>
- <!-- setup the directories for building -->
- <target name="prepare">
- <mkdir dir="${classes.dir}"/>
- <mkdir dir="${dist.dir}"/>
- <mkdir dir="${testclass.dir}"/>
- <mkdir dir="${testreports.dir}"/>
- <mkdir dir="${webapps.dir}/echo/WEB-INF/classes"/>
- <mkdir dir="${webapps.dir}/echo/WEB-INF/lib"/>
- <mkdir dir="${webapps.dir}/fitcDemo/WEB-INF/classes"/>
- <mkdir dir="${webapps.dir}/fitcDemo/WEB-INF/lib"/>
- <mkdir dir="${webapps.dir}/midiDemo/WEB-INF/classes"/>
- <mkdir dir="${webapps.dir}/midiDemo/WEB-INF/lib"/>
- <mkdir dir="${webapps.dir}/oflaDemo/WEB-INF/classes"/>
- <mkdir dir="${webapps.dir}/oflaDemo/WEB-INF/lib"/>
- <mkdir dir="${webapps.dir}/test/WEB-INF/classes"/>
- <mkdir dir="${webapps.dir}/test/WEB-INF/lib"/>
- <mkdir dir="${webapps.dir}/tutorial/WEB-INF/classes"/>
- <mkdir dir="${webapps.dir}/tutorial/WEB-INF/lib"/>
- </target>
- <!-- do a clean -->
- <target name="clean">
- <delete dir="${classes.dir}"/>
- <delete dir="${dist.dir}"/>
- <delete dir="${javadoc.dir}"/>
- <delete dir="${testdoc.dir}"/>
- <delete includeemptydirs="true">
- <fileset dir="${webapps.dir}/" includes="**/*.class"/>
- </delete>
- <delete includeemptydirs="true">
- <fileset dir="${webapps.dir}/" includes="**/*.jar"/>
- </delete>
- </target>
- <target name="compile" depends="-java6.check, -junit.check, prepare">
- <condition property="java.target_version" value="1.5">
- <not>
- <isset property="java.target_version"/>
- </not>
- </condition>
- <echo message="Javac version: ${java.target_version}"/>
- <condition property="compiler" value="${build.compiler}${java.target_version}">
- <equals arg1="${build.compiler}" arg2="javac"/>
- </condition>
- <property name="compiler" value="${build.compiler}"/>
- <echo message="Compiler adapter name: ${compiler}"/>
- <antcall target="compile_core" inheritAll="true" inheritRefs="true"/>
- <antcall target="compile_core_compatibility" inheritAll="true" inheritRefs="true"/>
- <antcall target="compile_demos" inheritAll="true" inheritRefs="true"/>
- <antcall target="compile_script" inheritAll="true" inheritRefs="true"/>
- <antcall target="compile_script_compatibility" inheritAll="true" inheritRefs="true"/>
- </target>
- <!-- Core -->
- <target name="compile_core" if="java6.installed">
- <javac sourcepath="" srcdir="${src.dir}" destdir="${classes.dir}" classpathref="project.classpath"
- optimize="${build.optimize}" verbose="${build.verbose}" fork="${build.fork}" nowarn="${build.nowarn}"
- deprecation="${build.deprecation}" debug="${debug.state}" compiler="${compiler}"
- source="${java.target_version}" target="${java.target_version}" memoryMaximumSize="1024m"
- excludes="**/*.jsp,org/red5/server/script/**" listfiles="false"/>
- </target>
- <target name="compile_core_compatibility" unless="java6.installed">
- <javac sourcepath="" srcdir="${src.dir}" destdir="${classes.dir}" classpathref="project_compatibility.classpath"
- optimize="${build.optimize}" verbose="${build.verbose}" fork="${build.fork}" nowarn="${build.nowarn}"
- deprecation="${build.deprecation}" debug="${debug.state}" compiler="${compiler}"
- source="${java.target_version}" target="${java.target_version}" memoryMaximumSize="1024m"
- excludes="**/*.jsp,org/red5/server/script/**" listfiles="false"/>
- </target>
- <!-- Demos -->
- <target name="compile_demos">
- <javac sourcepath="" srcdir="${webapps.dir}/echo/WEB-INF/src" destdir="${webapps.dir}${tmp.war.dir}/echo/WEB-INF/classes"
- classpathref="webapps.classpath" optimize="${build.optimize}" verbose="${build.verbose}"
- fork="${build.fork}" nowarn="${build.nowarn}" deprecation="${build.deprecation}"
- debug="${debug.state}" compiler="${compiler}" source="${java.target_version}" target="${java.target_version}"/>
- <javac sourcepath="" srcdir="${webapps.dir}/fitcDemo/WEB-INF/src" destdir="${webapps.dir}${tmp.war.dir}/fitcDemo/WEB-INF/classes"
- classpathref="webapps.classpath" optimize="${build.optimize}" verbose="${build.verbose}"
- fork="${build.fork}" nowarn="${build.nowarn}" deprecation="${build.deprecation}"
- debug="${debug.state}" compiler="${compiler}" source="${java.target_version}" target="${java.target_version}"/>
- <javac sourcepath="" srcdir="${webapps.dir}/midiDemo/WEB-INF/src" destdir="${webapps.dir}/midiDemo/WEB-INF/classes"
- classpathref="webapps.classpath" optimize="${build.optimize}" verbose="${build.verbose}"
- fork="${build.fork}" nowarn="${build.nowarn}" deprecation="${build.deprecation}"
- debug="${debug.state}" compiler="${compiler}" source="${java.target_version}" target="${java.target_version}"/>
- <javac sourcepath="" srcdir="${webapps.dir}/oflaDemo/WEB-INF/src" destdir="${webapps.dir}${tmp.war.dir}/oflaDemo/WEB-INF/classes"
- classpathref="webapps.classpath" optimize="${build.optimize}" verbose="${build.verbose}"
- fork="${build.fork}" nowarn="${build.nowarn}" deprecation="${build.deprecation}"
- debug="${debug.state}" compiler="${compiler}" source="${java.target_version}" target="${java.target_version}"/>
- <mkdir dir="${webapps.dir}/oflaDemo/WEB-INF/classes/applications"/>
- <copy todir="${webapps.dir}/oflaDemo/WEB-INF/classes/applications">
- <fileset dir="${webapps.dir}/oflaDemo/WEB-INF/src/applications"/>
- </copy>
- <javac sourcepath="" srcdir="${webapps.dir}/test/WEB-INF/src" destdir="${webapps.dir}/test/WEB-INF/classes"
- classpathref="webapps.classpath" optimize="${build.optimize}" verbose="${build.verbose}"
- fork="${build.fork}" nowarn="${build.nowarn}" deprecation="${build.deprecation}"
- debug="${debug.state}" compiler="${compiler}" source="${java.target_version}" target="${java.target_version}"/>
- <javac sourcepath="" srcdir="${webapps.dir}/tutorial/WEB-INF/src" destdir="${webapps.dir}${tmp.war.dir}/tutorial/WEB-INF/classes"
- classpathref="webapps.classpath" optimize="${build.optimize}" verbose="${build.verbose}"
- fork="${build.fork}" nowarn="${build.nowarn}" deprecation="${build.deprecation}"
- debug="${debug.state}" compiler="${compiler}" source="${java.target_version}" target="${java.target_version}"/>
- </target>
- <!-- Scripting -->
- <target name="compile_script" if="java6.installed">
- <javac sourcepath="" srcdir="${src.dir}" destdir="${classes.dir}" classpathref="script.classpath"
- optimize="${build.optimize}" verbose="${build.verbose}" fork="${build.fork}" nowarn="${build.nowarn}"
- deprecation="${build.deprecation}" debug="${debug.state}" compiler="${compiler}"
- source="${java.target_version}" target="${java.target_version}" memoryMaximumSize="1024m"
- includes="org/red5/server/script/**" listfiles="false"/>
- </target>
- <target name="compile_script_compatibility" unless="java6.installed">
- <javac sourcepath="" srcdir="${src.dir}" destdir="${classes.dir}" classpathref="script_compatibility.classpath"
- optimize="${build.optimize}" verbose="${build.verbose}" fork="${build.fork}" nowarn="${build.nowarn}"
- deprecation="${build.deprecation}" debug="${debug.state}" compiler="${compiler}"
- source="${java.target_version}" target="${java.target_version}" memoryMaximumSize="1024m"
- includes="org/red5/server/script/**" listfiles="false"/>
- </target>
- <target name="compile_war" depends="-java6.check, -junit.check, prepare">
- <condition property="java.target_version" value="1.6">
- <not>
- <isset property="java.target_version"/>
- </not>
- </condition>
- <echo message="Javac version: ${java.target_version}"/>
- <condition property="compiler" value="${build.compiler}${java.target_version}">
- <equals arg1="${build.compiler}" arg2="javac"/>
- </condition>
- <property name="compiler" value="${build.compiler}"/>
- <echo message="Compiler adapter name: ${compiler}"/>
- <mkdir dir="${classes.dir}/WEB-INF/classes"/>
- <javac sourcepath="" srcdir="${src.dir}" destdir="${classes.dir}/WEB-INF/classes" classpathref="project.classpath"
- optimize="${build.optimize}" verbose="${build.verbose}" fork="${build.fork}" nowarn="${build.nowarn}"
- deprecation="${build.deprecation}" debug="${debug.state}" compiler="${compiler}"
- source="${java.target_version}" target="${java.target_version}" memoryMaximumSize="1024m"
- excludes="**/*.jsp, org/red5/server/script/**, org/red5/server/jetty/**, org/red5/server/midi/**, org/red5/server/net/rtmpt/*Loader.java, org/red5/server/net/servlet/RTMPTServlet.java, org/red5/server/net/servlet/StatisticsServlet.java, org/red5/server/net/servlet/ZAMFGatewayServlet.java, org/red5/server/ContextLoader.java, org/red5/server/DebugPooledByteBufferAllocator.java, org/red5/server/JettyLoader.java, org/red5/server/Standalone.java, org/red5/server/TomcatLoader.java"
- listfiles="false"/>
- <!-- only certain classes from selected demos are copied to the war -->
- <mkdir dir="${classes.dir}/tmp/echo/WEB-INF/classes"/>
- <mkdir dir="${classes.dir}/tmp/fitcDemo/WEB-INF/classes"/>
- <mkdir dir="${classes.dir}/tmp/oflaDemo/WEB-INF/classes"/>
- <mkdir dir="${classes.dir}/tmp/SOSample/WEB-INF/classes"/>
- <mkdir dir="${classes.dir}/tmp/tutorial/WEB-INF/classes"/>
- <!-- demos are compiled to a temporary directory -->
- <antcall target="compile_demos" inheritAll="true" inheritRefs="true">
- <param name="classes.dir" value="${classes.dir}/WEB-INF/classes"/>
- <param name="tmp.war.dir" value="/../${classes.dir}/tmp"/>
- </antcall>
- <!-- copy compiled demo classes to the primary war classes directory -->
- <copy todir="${classes.dir}/WEB-INF/classes">
- <fileset dir="${classes.dir}/tmp/echo/WEB-INF/classes"/>
- <fileset dir="${classes.dir}/tmp/fitcDemo/WEB-INF/classes"/>
- <fileset dir="${classes.dir}/tmp/oflaDemo/WEB-INF/classes"/>
- <fileset dir="${classes.dir}/tmp/SOSample/WEB-INF/classes"/>
- <fileset dir="${classes.dir}/tmp/tutorial/WEB-INF/classes"/>
- </copy>
- <!-- demo stream files -->
- <copy todir="${classes.dir}/streams">
- <fileset dir="${webapps.dir}/oflaDemo/streams"/>
- </copy>
- <!-- remove directories we dont want in the war -->
- <delete dir="${classes.dir}/tmp"/>
- <delete dir="${classes.dir}/testcases"/>
- <antcall target="compile_script" inheritAll="true" inheritRefs="true">
- <param name="classes.dir" value="${classes.dir}/WEB-INF/classes"/>
- </antcall>
- <antcall target="compile_script_compatibility" inheritAll="true" inheritRefs="true">
- <param name="classes.dir" value="${classes.dir}/WEB-INF/classes"/>
- </antcall>
- </target>
- <target name="compile_war_java5" depends="-junit.check, prepare">
- <condition property="java.target_version" value="1.5">
- <not>
- <isset property="java.target_version"/>
- </not>
- </condition>
- <echo message="Javac version: ${java.target_version}"/>
- <condition property="compiler" value="${build.compiler}${java.target_version}">
- <equals arg1="${build.compiler}" arg2="javac"/>
- </condition>
- <property name="compiler" value="${build.compiler}"/>
- <echo message="Compiler adapter name: ${compiler}"/>
- <mkdir dir="${classes.dir}/WEB-INF/classes"/>
- <javac sourcepath="" srcdir="${src.dir}" destdir="${classes.dir}/WEB-INF/classes" classpathref="project_compatibility.classpath"
- optimize="${build.optimize}" verbose="${build.verbose}" fork="${build.fork}" nowarn="${build.nowarn}"
- deprecation="${build.deprecation}" debug="${debug.state}" compiler="${compiler}"
- source="${java.target_version}" target="${java.target_version}" memoryMaximumSize="1024m"
- excludes="**/*.jsp, org/red5/server/script/**, org/red5/server/jetty/**, org/red5/server/midi/**, org/red5/server/net/rtmpt/*Loader.java, org/red5/server/net/servlet/RTMPTServlet.java, org/red5/server/net/servlet/StatisticsServlet.java, org/red5/server/net/servlet/ZAMFGatewayServlet.java, org/red5/server/ContextLoader.java, org/red5/server/DebugPooledByteBufferAllocator.java, org/red5/server/JettyLoader.java, org/red5/server/Standalone.java, org/red5/server/TomcatLoader.java"
- listfiles="false"/>
- <!-- only certain classes from selected demos are copied to the war -->
- <mkdir dir="${classes.dir}/tmp/echo/WEB-INF/classes"/>
- <mkdir dir="${classes.dir}/tmp/fitcDemo/WEB-INF/classes"/>
- <mkdir dir="${classes.dir}/tmp/oflaDemo/WEB-INF/classes"/>
- <mkdir dir="${classes.dir}/tmp/SOSample/WEB-INF/classes"/>
- <mkdir dir="${classes.dir}/tmp/tutorial/WEB-INF/classes"/>
- <!-- demos are compiled to a temporary directory -->
- <antcall target="compile_demos" inheritAll="true" inheritRefs="true">
- <param name="classes.dir" value="${classes.dir}/WEB-INF/classes"/>
- <param name="tmp.war.dir" value="/../${classes.dir}/tmp"/>
- </antcall>
- <!-- copy compiled demo classes to the primary war classes directory -->
- <copy todir="${classes.dir}/WEB-INF/classes">
- <fileset dir="${classes.dir}/tmp/echo/WEB-INF/classes"/>
- <fileset dir="${classes.dir}/tmp/fitcDemo/WEB-INF/classes"/>
- <fileset dir="${classes.dir}/tmp/oflaDemo/WEB-INF/classes"/>
- <fileset dir="${classes.dir}/tmp/SOSample/WEB-INF/classes"/>
- <fileset dir="${classes.dir}/tmp/tutorial/WEB-INF/classes"/>
- </copy>
- <!-- demo stream files -->
- <copy todir="${classes.dir}/streams">
- <fileset dir="${webapps.dir}/oflaDemo/streams"/>
- </copy>
- <!-- remove directories we dont want in the war -->
- <delete dir="${classes.dir}/tmp"/>
- <delete dir="${classes.dir}/testcases"/>
- <antcall target="compile_script" inheritAll="true" inheritRefs="true">
- <param name="classes.dir" value="${classes.dir}/WEB-INF/classes"/>
- </antcall>
- <antcall target="compile_script_compatibility" inheritAll="true" inheritRefs="true">
- <param name="classes.dir" value="${classes.dir}/WEB-INF/classes"/>
- </antcall>
- </target>
- <target name="javadoc_compatibility" description="Generate JavaDoc" unless="java6.installed">
- <echo message="Path: ${env.Path}"/>
- <!-- Determine the location of Suns api docs -->
- <condition property="javadoc.loc" value="javase/6">
- <equals arg1="${java6.installed}" arg2="true"/>
- </condition>
- <condition property="javadoc.loc" value="j2se/1.5.0">
- <not>
- <equals arg1="${java6.installed}" arg2="true"/>
- </not>
- </condition>
- <echo message="Javadoc api stub: ${javadoc.loc}"/>
- <javadoc useexternalfile="true" failonerror="false" verbose="false" classpathref="full_compatibility.classpath"
- destdir="${javadoc.dir}" author="true" version="true" use="true" splitindex="true"
- windowtitle="Red5 Server Documentation">
- <fileset dir="${src.dir}" defaultexcludes="yes">
- <include name="org/red5/**"/>
- <exclude name="**/*.xml"/>
- <exclude name="**/*.xsd"/>
- </fileset>
- <doctitle><![CDATA[<h1>Red5 Server Documentation</h1>]]></doctitle>
- <bottom><![CDATA[<i>Copyright © 2006-2007 <a href="http://osflash.org/red5" target="_blank">the Red5 project</a>.</i>]]></bottom>
- <tag name="todo" scope="all" description="To do:"/>
- <group title="Public API" packages="org.red5.server.api:org.red5.server.api.*"/>
- <group title="Network Protocols" packages="org.red5.server.net:org.red5.server.net.*"/>
- <group title="Streaming" packages="org.red5.server.stream:org.red5.server.stream.*"/>
- <group title="IO Packages" packages="org.red5.io:org.red5.io.*"/>
- <group title="Scripting" packages="org.red5.server.script:org.red5.server.script.*"/>
- <link href="http://java.sun.com/${javadoc.loc}/docs/api"/>
- <link href="http://jetty.mortbay.org/apidocs"/>
- <link href="http://directory.apache.org/subprojects/mina/apidocs"/>
- <link href="http://www.springframework.org/docs/api"/>
- <link href="http://www.opensymphony.com/quartz/api"/>
- </javadoc>
- </target>
- <target name="javadoc" description="Generate JavaDoc" if="java6.installed">
- <echo message="Path: ${env.Path}"/>
- <!-- Determine the location of Suns api docs -->
- <condition property="javadoc.loc" value="javase/6">
- <equals arg1="${java6.installed}" arg2="true"/>
- </condition>
- <condition property="javadoc.loc" value="j2se/1.5.0">
- <not>
- <equals arg1="${java6.installed}" arg2="true"/>
- </not>
- </condition>
- <echo message="Javadoc api stub: ${javadoc.loc}"/>
- <javadoc useexternalfile="true" failonerror="false" verbose="false" classpathref="full.classpath"
- destdir="${javadoc.dir}" author="true" version="true" use="true" splitindex="true"
- windowtitle="Red5 Server Documentation">
- <fileset dir="${src.dir}" defaultexcludes="yes">
- <include name="org/red5/**"/>
- <exclude name="**/*.xml"/>
- <exclude name="**/*.xsd"/>
- </fileset>
- <doctitle><![CDATA[<h1>Red5 Server Documentation</h1>]]></doctitle>
- <bottom><![CDATA[<i>Copyright © 2006-2007 <a href="http://osflash.org/red5" target="_blank">the Red5 project</a>.</i>]]></bottom>
- <tag name="todo" scope="all" description="To do:"/>
- <group title="Public API" packages="org.red5.server.api:org.red5.server.api.*"/>
- <group title="Network Protocols" packages="org.red5.server.net:org.red5.server.net.*"/>
- <group title="Streaming" packages="org.red5.server.stream:org.red5.server.stream.*"/>
- <group title="IO Packages" packages="org.red5.io:org.red5.io.*"/>
- <group title="Scripting" packages="org.red5.server.script:org.red5.server.script.*"/>
- <link href="http://java.sun.com/${javadoc.loc}/docs/api"/>
- <link href="http://jetty.mortbay.org/apidocs"/>
- <link href="http://directory.apache.org/subprojects/mina/apidocs"/>
- <link href="http://www.springframework.org/docs/api"/>
- <link href="http://www.opensymphony.com/quartz/api"/>
- </javadoc>
- </target>
- <!--
- yDoc - Javadoc UML Extension
- This will enable you to generate and automatically integrate clear and concise UML diagrams into your Java API documentation.
- [url]http://www.yworks.com/en/products_ydoc.htm[/url]
- -->
- <target name="javadoc-ydoc">
- <!-- Determine the location of Suns api docs -->
- <condition property="javadoc.loc" value="javase/6">
- <equals arg1="${java6.installed}" arg2="true"/>
- </condition>
- <condition property="javadoc.loc" value="j2se/1.5.0">
- <not>
- <equals arg1="${java6.installed}" arg2="true"/>
- </not>
- </condition>
- <echo message="Javadoc api stub: ${javadoc.loc}"/>
- <property name="ydoc.home" value="C:/dev/ydoc"/>
- <property name="ps" value="${path.separator}"/>
- <javadoc source="${java.target_version}" destdir="${javadoc.dir}" additionalparam="-breakiterator"
- useexternalfile="true" failonerror="false" verbose="false" classpathref="full.classpath"
- author="true" version="true" use="true" splitindex="true" windowtitle="Red5 Server Documentation">
- <packageset dir="${src.dir}">
- <include name="org/red5/**"/>
- <exclude name="**/*.xml"/>
- <exclude name="**/*.xsd"/>
- </packageset>
- <doclet name="ydoc.doclets.YStandard" path="${ydoc.home}/lib/ydoc.jar${ps}${ydoc.home}/lib/class2svg.jar${ps}${ydoc.home}/resources${ps}${ydoc.home}/doc">
- <param name="-author"/>
- <param name="-generic"/>
- <param name="-umlautogen"/>
- <param name="-filterpath" value="${ydoc.home}/lib/ydoc.jar"/>
- <param name="-filter" value="ydoc.filters.ExcludeFilter"/>
- <param name="-tag" value="y.precondition"/>
- <param name="-tag" value="y.postcondition"/>
- <param name="-tag" value="y.complexity"/>
- <param name="-tag" value="param"/>
- <param name="-tag" value="return"/>
- <param name="-tag" value="see"/>
- <param name="-tag" value="y.uml"/>
- </doclet>
- <doctitle><![CDATA[<h1>Red5 Server Documentation</h1>]]></doctitle>
- <bottom><![CDATA[<i>Copyright © 2006-2007 <a href="http://osflash.org/red5" target="_blank">the Red5 project</a>.</i>]]></bottom>
- <tag name="todo" scope="all" description="To do:"/>
- <group title="Public API" packages="org.red5.server.api:org.red5.server.api.*"/>
- <group title="Network Protocols" packages="org.red5.server.net:org.red5.server.net.*"/>
- <group title="Streaming" packages="org.red5.server.stream:org.red5.server.stream.*"/>
- <group title="IO Packages" packages="org.red5.io:org.red5.io.*"/>
- <group title="Scripting" packages="org.red5.server.script:org.red5.server.script.*"/>
- <link href="http://java.sun.com/${javadoc.loc}/docs/api"/>
- <link href="http://jetty.mortbay.org/apidocs"/>
- <link href="http://directory.apache.org/subprojects/mina/apidocs"/>
- <link href="http://www.springframework.org/docs/api"/>
- <link href="http://www.opensymphony.com/quartz/api"/>
- </javadoc>
- </target>
- <target name="jar_java5" unless="java6.installed">
- <loadfile property="library.java5.jars" srcFile="${lib.dir}/java5/java5.properties">
- <filterchain>
- <tokenfilter>
- <trim/>
- <ignoreblank/>
- </tokenfilter>
- <striplinecomments>
- <comment value="#"/>
- </striplinecomments>
- <prefixlines prefix=" lib/java5/"/>
- <striplinebreaks/>
- </filterchain>
- </loadfile>
- <echo message="Jar launch classpath: conf/${library.jars} ${library.java5.jars} ${script.jars}"/>
- <jar destfile="red5.jar">
- <fileset dir="${classes.dir}">
- <include name="**"/>
- <exclude name="testcases/**"/>
- </fileset>
- <manifest>
- <attribute name="Built-By" value="RED5 Project - [email]red5@osflash.org[/email]"/>
- <attribute name="Built-On" value="${build.TODAY}"/>
- <attribute name="Main-Class" value="org.red5.server.Standalone"/>
- <attribute name="Class-Path" value="conf/ ${library.jars} ${library.java5.jars} ${script.jars}"/>
- </manifest>
- <metainf dir="${src.dir}/META-INF">
- <include name="**"/>
- </metainf>
- </jar>
- </target>
- <target name="jar_java6" if="java6.installed">
- <loadfile property="library.java6.jars" srcFile="${lib.dir}/java6.properties">
- <filterchain>
- <tokenfilter>
- <trim/>
- <ignoreblank/>
- </tokenfilter>
- <striplinecomments>
- <comment value="#"/>
- </striplinecomments>
- <prefixlines prefix=" lib/"/>
- <striplinebreaks/>
- </filterchain>
- </loadfile>
- <echo message="Jar launch classpath: conf/${library.jars} ${library.java6.jars} ${script.jars}"/>
- <jar destfile="red5.jar">
- <fileset dir="${classes.dir}">
- <include name="**"/>
- <exclude name="testcases/**"/>
- </fileset>
- <manifest>
- <attribute name="Built-By" value="RED5 Project - [email]red5@osflash.org[/email]"/>
- <attribute name="Built-On" value="${build.TODAY}"/>
- <attribute name="Main-Class" value="org.red5.server.Standalone"/>
- <attribute name="Class-Path" value="conf/ ${library.jars} ${library.java6.jars} ${script.jars}"/>
- </manifest>
- <metainf dir="${src.dir}/META-INF">
- <include name="**"/>
- </metainf>
- </jar>
- </target>
- <target name="jar" description="Make Archive" depends="compile">
- <tstamp prefix="build">
- <format property="TODAY" pattern="d-MMMM-yyyy" locale="en"/>
- </tstamp>
- <!-- Load the library props files to generate a class-path for the jar -->
- <loadfile property="library.jars" srcFile="${lib.dir}/library.properties">
- <filterchain>
- <tokenfilter>
- <trim/>
- <ignoreblank/>
- </tokenfilter>
- <striplinecomments>
- <comment value="#"/>
- </striplinecomments>
- <prefixlines prefix=" lib/"/>
- <striplinebreaks/>
- </filterchain>
- </loadfile>
- <loadfile property="script.jars" srcFile="${lib.dir}/script.properties">
- <filterchain>
- <tokenfilter>
- <trim/>
- <ignoreblank/>
- </tokenfilter>
- <striplinecomments>
- <comment value="#"/>
- </striplinecomments>
- <prefixlines prefix=" lib/"/>
- <striplinebreaks/>
- </filterchain>
- </loadfile>
- <mkdir dir="${classes.dir}/conf"/>
- <copy todir="${classes.dir}/conf">
- <fileset dir="${config.dir}"/>
- </copy>
- <antcall target="jar_java5" inheritAll="true" inheritRefs="true"/>
- <antcall target="jar_java6" inheritAll="true" inheritRefs="true"/>
- <jar destfile="${webapps.dir}/echo/WEB-INF/lib/echo.jar">
- <fileset dir="${webapps.dir}/echo/WEB-INF/classes">
- <include name="**"/>
- </fileset>
- </jar>
- <jar destfile="${webapps.dir}/fitcDemo/WEB-INF/lib/fitcDemo.jar">
- <fileset dir="${webapps.dir}/fitcDemo/WEB-INF/classes">
- <include name="**"/>
- </fileset>
- </jar>
- <jar destfile="${webapps.dir}/midiDemo/WEB-INF/lib/midiDemo.jar">
- <fileset dir="${webapps.dir}/midiDemo/WEB-INF/classes">
- <include name="**"/>
- </fileset>
- </jar>
- <!-- copy scripts -->
- <mkdir dir="webapps/oflaDemo/WEB-INF/classes/applications"/>
- <copy todir="webapps/oflaDemo/WEB-INF/classes/applications">
- <fileset dir="webapps/oflaDemo/WEB-INF/src/applications"/>
- </copy>
- <jar destfile="webapps/oflaDemo/WEB-INF/lib/oflaDemo.jar">
- <fileset dir="webapps/oflaDemo/WEB-INF/classes">
- <include name="**"/>
- </fileset>
- </jar>
- <jar destfile="${webapps.dir}/test/WEB-INF/lib/test.jar">
- <fileset dir="${webapps.dir}/test/WEB-INF/classes">
- <include name="**"/>
- </fileset>
- </jar>
- <jar destfile="${webapps.dir}/tutorial/WEB-INF/lib/tutorial.jar">
- <fileset dir="${webapps.dir}/tutorial/WEB-INF/classes">
- <include name="**"/>
- </fileset>
- </jar>
- </target>
- <target name="dist" description="Make Binary Distribution" depends="clean, jar, javadoc, javadoc_compatibility">
- <copy todir="${dist.dir}/doc">
- <fileset dir="doc"/>
- </copy>
- <copy todir="${dist.dir}/lib">
- <fileset dir="lib"/>
- </copy>
- <copy todir="${dist.dir}/conf">
- <fileset dir="conf"/>
- </copy>
- <copy todir="${dist.dir}/webapps">
- <fileset dir="webapps">
- <include name="**"/>
- <exclude name="**/classes/**"/>
- <exclude name="**/src/**"/>
- </fileset>
- </copy>
- <copy todir="${dist.dir}">
- <fileset dir="./">
- <include name="red5.jar"/>
- <include name="red5.bat"/>
- <include name="red5.sh"/>
- <include name="license.txt"/>
- </fileset>
- </copy>
- </target>
- <target name="installerdist" description="Make Installer Distribution" depends="dist">
- <copy todir="${dist.dir}">
- <fileset dir="./">
- <include name=".classpath"/>
- <include name=".project"/>
- <include name=".springBeans"/>
- <include name="build.xml"/>
- <include name="build.properties"/>
- </fileset>
- </copy>
- <copy todir="${dist.dir}/src">
- <fileset dir="src"/>
- </copy>
- <copy todir="${dist.dir}/swf">
- <fileset dir="swf"/>
- </copy>
- <copy todir="${dist.dir}/webapps">
- <fileset dir="webapps">
- <include name="**/src/**"/>
- </fileset>
- </copy>
- </target>
- <target name="server_java5" depends="compile" unless="java6.installed">
- <java classname="org.red5.server.Standalone" fork="true">
- <classpath>
- <pathelement location="${config.dir}"/>
- <pathelement location="${classes.dir}"/>
- <path refid="full_compatibility.classpath"/>
- </classpath>
- <jvmarg value="-Djava.security.manager"/>
- <jvmarg value="-Djava.security.policy=${config.dir}/red5.policy"/>
- </java>
- </target>
- <target name="server_java6" depends="compile" if="java6.installed">
- <java classname="org.red5.server.Standalone" fork="true">
- <classpath>
- <pathelement location="${config.dir}"/>
- <pathelement location="${classes.dir}"/>
- <path refid="full.classpath"/>
- </classpath>
- <jvmarg value="-Djava.security.manager"/>
- <jvmarg value="-Djava.security.policy=${config.dir}/red5.policy"/>
- </java>
- </target>
- <target name="server">
- <antcall target="server_java5" inheritAll="true" inheritRefs="true"/>
- <antcall target="server_java6" inheritAll="true" inheritRefs="true"/>
- </target>
- <!-- Experimental UDP Server -->
- <target name="udp_java5" depends="compile" unless="java6.installed">
- <java classname="org.red5.server.net.udp.Standalone" fork="true">
- <classpath>
- <pathelement location="${config.dir}"/>
- <pathelement location="${classes.dir}"/>
- <path refid="full_compatibility.classpath"/>
- </classpath>
- <jvmarg value="-Djava.security.manager"/>
- <jvmarg value="-Djava.security.policy=${config.dir}/red5.policy"/>
- </java>
- </target>
- <target name="udp_java6" depends="compile" if="java6.installed">
- <java classname="org.red5.server.net.udp.Standalone" fork="true">
- <classpath>
- <pathelement location="${config.dir}"/>
- <pathelement location="${classes.dir}"/>
- <path refid="full.classpath"/>
- </classpath>
- <jvmarg value="-Djava.security.manager"/>
- <jvmarg value="-Djava.security.policy=${config.dir}/red5.policy"/>
- </java>
- </target>
- <target name="udp">
- <antcall target="udp_java5" inheritAll="true" inheritRefs="true"/>
- <antcall target="udp_java6" inheritAll="true" inheritRefs="true"/>
- </target>
- <target name="run-tests" if="junit.installed" depends="compiletests" description="Run JUnit tests and generate HTML reports">
- <junit fork="true" haltonfailure="no" printsummary="no" showoutput="no" dir="${testreports.dir}">
- <classpath>
- <path refid="full.classpath"/>
- <pathelement location="${testclass.dir}"/>
- </classpath>
- <formatter type="xml"/>
- <batchtest todir="${testreports.dir}">
- <fileset dir="${testclass.dir}">
- <include name="**/*Test.class"/>
- <exclude name="**/Abstract*Test.class"/>
- <exclude name="**/*AbstractTest.class"/>
- </fileset>
- </batchtest>
- </junit>
- <junitreport todir="${test.dir}">
- <fileset dir="${testreports.dir}">
- <include name="TEST-*.xml"/>
- </fileset>
- <report format="frames" todir="${testdoc.dir}"/>
- </junitreport>
- </target>
- <target name="compiletests" depends="jar" if="junit.installed" description="Compiles junit test classes">
- <javac srcdir="${test.dir}" destdir="${testclass.dir}">
- <classpath>
- <path refid="full.classpath"/>
- </classpath>
- <include name="**/*.java"/>
- </javac>
- </target>
- <target name="webwar" description="Make Web Archive" depends="compile_war">
- <tstamp prefix="build">
- <format property="TODAY" pattern="d-MMMM-yyyy" locale="en"/>
- </tstamp>
- <copy todir="${classes.dir}">
- <fileset dir=".">
- <include name="license.txt"/>
- </fileset>
- </copy>
- <copy todir="${classes.dir}">
- <fileset dir="webapps/root">
- <include name="**/*.html"/>
- <include name="**/*.jsp"/>
- <include name="**/*.js"/>
- <include name="**/*.css"/>
- <include name="**/*.ico"/>
- <include name="**/*.swf"/>
- <include name="**/*.flv"/>
- <exclude name="WEB-INF"/>
- </fileset>
- </copy>
- <!-- rename index for war only -->
- <move file="${classes.dir}/index_war.html" tofile="${classes.dir}/index.html"/>
- <copy todir="${classes.dir}/WEB-INF">
- <fileset dir="conf/war">
- <include name="*.xml"/>
- <include name="*.properties"/>
- <exclude name="web.xml"/>
- </fileset>
- </copy>
- <!-- copy the red5 properties into the webapp classpath -->
- <copy todir="${classes.dir}/WEB-INF/classes" file="${classes.dir}/WEB-INF/red5.properties"/>
- <war destfile="${dist.dir}/red5.war" webxml="conf/war/web.xml">
- <fileset dir="${classes.dir}"/>
- <lib dir="${lib.dir}">
- <exclude name="test/**"/>
- <exclude name="java5/**"/>
- <exclude name="*.properties"/>
- <exclude name="jsp*.jar"/>
- <exclude name="servlet*.jar"/>
- <exclude name="catalina*.jar"/>
- <exclude name="tomcat*.jar"/>
- <exclude name="jetty*.jar"/>
- <exclude name="jasper*.jar"/>
- <exclude name="ehcache-1.2.3.jar"/>
- <exclude name="whirlycache-1.0.1_lite.jar"/>
- </lib>
- <manifest>
- <attribute name="Built-By" value="RED5 Project - [email]red5@osflash.org[/email]"/>
- <attribute name="Built-On" value="${build.TODAY}"/>
- </manifest>
- </war>
- </target>
- <target name="webwar_java5" description="Make Web Archive for Java 1.5" depends="compile_war_java5">
- <tstamp prefix="build">
- <format property="TODAY" pattern="d-MMMM-yyyy" locale="en"/>
- </tstamp>
- <copy todir="${classes.dir}">
- <fileset dir=".">
- <include name="license.txt"/>
- </fileset>
- </copy>
- <copy todir="${classes.dir}">
- <fileset dir="webapps/root">
- <include name="**/*.html"/>
- <include name="**/*.jsp"/>
- <include name="**/*.js"/>
- <include name="**/*.css"/>
- <include name="**/*.ico"/>
- <include name="**/*.swf"/>
- <include name="**/*.flv"/>
- <exclude name="WEB-INF"/>
- </fileset>
- </copy>
- <!-- rename index for war only -->
- <move file="${classes.dir}/index_war.html" tofile="${classes.dir}/index.html"/>
- <copy todir="${classes.dir}/WEB-INF">
- <fileset dir="conf/war">
- <include name="*.xml"/>
- <include name="*.properties"/>
- <exclude name="web.xml"/>
- </fileset>
- </copy>
- <!-- copy the red5 properties into the webapp classpath -->
- <copy todir="${classes.dir}/WEB-INF/classes" file="${classes.dir}/WEB-INF/red5.properties"/>
- <war destfile="${dist.dir}/red5.war" webxml="conf/war/web.xml">
- <fileset dir="${classes.dir}"/>
- <lib dir="${lib.dir}">
- <exclude name="test/**"/>
- <exclude name="java5/**"/>
- <exclude name="mina*.jar"/>
- <exclude name="*.properties"/>
- <exclude name="jsp*.jar"/>
- <exclude name="servlet*.jar"/>
- <exclude name="catalina*.jar"/>
- <exclude name="tomcat*.jar"/>
- <exclude name="jetty*.jar"/>
- <exclude name="jasper*.jar"/>
- <exclude name="ehcache-1.2.3.jar"/>
- <exclude name="whirlycache-1.0.1_lite.jar"/>
- </lib>
- <lib dir="${lib.dir}/java5">
- <exclude name="*.properties"/>
- </lib>
- <manifest>
- <attribute name="Built-By" value="RED5 Project - [email]red5@osflash.org[/email]"/>
- <attribute name="Built-On" value="${build.TODAY}"/>
- </manifest>
- </war>
- </target>
- <target name="all" depends="clean, prepare, compile, jar, javadoc"/>
- <target name="usage">
- <echo message="Type ant -p for available targets"/>
- </target>
- </project>
复制代码 |