AnsweredAssumed Answered

Problems building Red5 in Flex (Eclipse)

Question asked by zzarr on Apr 29, 2008
Latest reply on May 7, 2008 by zzarr

Hello!

 

I'm trying to compile red5 with Flex builder 3 (Eclipse)

 

 

 

 

 

My Red5 version is  0.6.2, my JRE version is 1.6.0, my jdk version is also 1.6.0 and my Apache ANT version is 1.7.0.

 

 

 

 

 

I'm trying to make my own Red5 plugin using the ApplicationAdapter class.

 

 

 

 

 

When I compile Red5 I get this output:

 

 

Buildfile: C:\Program Files\Red5\build.xml

     java.home is C:\Program Files\Adobe\Flex Builder 3\jre and the target version is 1.5

clean:

   Deleting directory C:\Program Files\Red5\bin

   Deleting directory C:\Program Files\Red5\dist

prepare:

    Created dir: C:\Program Files\Red5\bin

    Created dir: C:\Program Files\Red5\dist

    Created dir: C:\Program Files\Red5\bin\testcases

    Created dir: C:\Program Files\Red5\bin\testcases\testreports

-java6.check:

-junit.check:

compile:

     Javac version: 1.5

     Compiler adapter name: modern

     java.home is C:\Program Files\Adobe\Flex Builder 3\jre and the target version is 1.5

compile_core:

     java.home is C:\Program Files\Adobe\Flex Builder 3\jre and the target version is 1.5

compile_core_compatibility:

    Compiling 407 source files to C:\Program Files\Red5\bin

 

BUILD FAILED

C:\Program Files\Red5\build.xml:128: The following error occurred while executing this line:

C:\Program Files\Red5\build.xml:146: Error running javac.exe compiler

 

Total time: 4 seconds

 

 

 

 

 

And this error messages:

 

 

Severity and Description    Path    Resource    Location    Creation Time    Id

 

 

The project cannot be built until build path errors are resolved        cam_test1    Unknown    1209455550781    6690

Project 'cam_test1' is missing required library: 'WEB-INF/lib/test.jar'        cam_test1    Build path    1209393477656    6683

 

 

And this warnings:

 

 

 

Type safety: Unchecked cast from Set to Set<ObjectName>    RED5/src/org/red5/server/jmx    JMXAgent.java    line 168    1209378268140    6462

Type safety: Unchecked cast from Object to Map<String,Object>    RED5/src/org/red5/io/mock    Input.java    line 105    1209378269671    6576

Type safety: Unchecked cast from Object to Map<String,Object>    RED5/src/org/red5/io/object    RecordSet.java    line 113    1209378269546    6556

Type safety: Unchecked cast from Object to Map<String,Object>    RED5/src/org/red5/io/object    RecordSetPage.java    line 54    1209378269531    6554

Type safety: Unchecked cast from Object to Map<String,Object>    RED5/src/org/red5/server/script/rhino    RhinoScriptUtils.java    line 103    1209378266765    6304

Type safety: Unchecked cast from Object to Map<String,Object>    RED5/src/org/red5/server/so    ClientSharedObject.java    line 162    1209378266640    6240

Type safety: Unchecked cast from Object to Map<String,Object>    RED5/src/org/red5/server/so    ClientSharedObject.java    line 163    1209378266640    6241

Type safety: Unchecked cast from Object to Map<String,Object>    RED5/src/org/red5/server/so    SharedObject.java    line 690    1209378266609    6236

Type safety: Unchecked cast from Object to List<String>    RED5/src/org/red5/io/object    RecordSet.java    line 118    1209378269546    6558

Type safety: Unchecked cast from Object to List<List<Object>>    RED5/src/org/red5/io/object    RecordSet.java    line 115    1209378269546    6557

Type safety: Unchecked cast from Object to List<List<Object>>    RED5/src/org/red5/io/object    RecordSetPage.java    line 56    1209378269531    6555

Type safety: Unchecked cast from Object to Collection<Object>    RED5/src/org/red5/server/statistics    XmlRpcScopeStatistics.java    line 171    1209378266500    6228

Type safety: The method toArray(Object[]) belongs to the raw type Collection. References to generic type Collection<E> should be parameterized    RED5/src/org/red5/server/service    ConversionUtils.java    line 171    1209378266718    6283

Type safety: The method store(Object, Object) belongs to the raw type Cache. References to generic type Cache<K,V> should be parameterized    RED5/src/org/red5/server/cache    WhirlyCacheImpl.java    line 118    1209378268218    6473

Type safety: The method store(Object, Object) belongs to the raw type Cache. References to generic type Cache<K,V> should be parameterized    RED5/src/org/red5/server/cache    WhirlyCacheImpl.java    line 120    1209378268218    6474

Type safety: The method store(Object, Object) belongs to the raw type Cache. References to generic type Cache<K,V> should be parameterized    RED5/src/org/red5/server/cache    WhirlyCacheImpl.java    line 148    1209378268218    6475

Type safety: The method retrieve(Object) belongs to the raw type Cache. References to generic type Cache<K,V> should be parameterized    RED5/src/org/red5/server/cache    WhirlyCacheImpl.java    line 106    1209378268218    6472

Type safety: The method remove(Object) belongs to the raw type Cache. References to generic type Cache<K,V> should be parameterized    RED5/src/org/red5/server/cache    WhirlyCacheImpl.java    line 158    1209378268218    6476

Type safety: The method remove(Object) belongs to the raw type Cache. References to generic type Cache<K,V> should be parameterized    RED5/src/org/red5/server/cache    WhirlyCacheImpl.java    line 166    1209378268218    6477

Type safety: The method putAll(Map) belongs to the raw type HashMap. References to generic type HashMap<K,V> should be parameterized    RED5/src/org/red5/io/flv/meta    MetaService.java    line 315    1209378269703    6592

Type safety: The method put(Object, Object) belongs to the raw type Map. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/server/net/rtmp    RTMPHandler.java    line 121    1209378267640    6381

Type safety: The method put(Object, Object) belongs to the raw type Map. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/server/net/rtmp    RTMPHandler.java    line 224    1209378267640    6383

Type safety: The method put(Object, Object) belongs to the raw type Map. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/server/net/rtmp    RTMPHandler.java    line 227    1209378267640    6384

Type safety: The method put(Object, Object) belongs to the raw type Map. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/server/stream    ClientBroadcastStream.java    line 426    1209378266468    6216

Type safety: The method put(Object, Object) belongs to the raw type HashMap. References to generic type HashMap<K,V> should be parameterized    RED5/src/org/red5/server    Shutdown.java    line 66    1209378269078    6514

Type safety: The method put(Object, Object) belongs to the raw type HashMap. References to generic type HashMap<K,V> should be parameterized    RED5/src/org/red5/server/jmx    JMXAgent.java    line 331    1209378268140    6465

Type safety: The method put(Object, Object) belongs to the raw type HashMap. References to generic type HashMap<K,V> should be parameterized    RED5/src/org/red5/server/jmx    JMXAgent.java    line 335    1209378268140    6466

Type safety: The method put(Object, Object) belongs to the raw type HashMap. References to generic type HashMap<K,V> should be parameterized    RED5/src/org/red5/server/jmx    JMXAgent.java    line 361    1209378268140    6468

Type safety: The method put(Object, Object) belongs to the raw type HashMap. References to generic type HashMap<K,V> should be parameterized    RED5/src/org/red5/server/jmx    JMXAgent.java    line 362    1209378268140    6469

Type safety: The method isAssignableFrom(Class) belongs to the raw type Class. References to generic type Class<T> should be parameterized    RED5/src/org/red5/server/service    ConversionUtils.java    line 121    1209378266718    6277

Type safety: The method isAssignableFrom(Class) belongs to the raw type Class. References to generic type Class<T> should be parameterized    RED5/src/org/red5/server/service    ConversionUtils.java    line 193    1209378266718    6286

Type safety: The method add(Object) belongs to the raw type List. References to generic type List<E> should be parameterized    RED5/src/org/red5/server/midi    SharedMidiObject.java    line 86    1209378267968    6414

Type safety: The method add(Object) belongs to the raw type List. References to generic type List<E> should be parameterized    RED5/src/org/red5/server/midi    SharedMidiObject.java    line 87    1209378267968    6415

Type safety: The method add(Object) belongs to the raw type List. References to generic type List<E> should be parameterized    RED5/src/org/red5/server/midi    SharedMidiObject.java    line 88    1209378267968    6416

Type safety: The method add(Object) belongs to the raw type HashSet. References to generic type HashSet<E> should be parameterized    RED5/src/org/red5/server/service    ConversionUtils.java    line 356    1209378266734    6300

Type safety: The method add(Object) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized    RED5/src/org/red5/server/net/rtmp/codec    RTMPProtocolDecoder.java    line 718    1209378267500    6370

Type safety: The method add(Object) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized    RED5/src/org/red5/server/net/rtmp/codec    RTMPProtocolDecoder.java    line 722    1209378267500    6371

Type safety: The method add(Object) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized    RED5/src/org/red5/server/service    ConversionUtils.java    line 166    1209378266718    6282

Type safety: The method add(Object) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized    RED5/src/org/red5/server/service    ConversionUtils.java    line 312    1209378266734    6293

Type safety: The method add(Object) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized    RED5/src/org/red5/server/service    ServiceUtils.java    line 163    1209378266656    6258

Type safety: The expression of type Set needs unchecked conversion to conform to Set<String>    RED5/src/org/red5/server    Scope.java    line 739    1209378269187    6516

Type safety: The expression of type Set needs unchecked conversion to conform to Set<Cache>    RED5/src/org/red5/server/cache    EhCacheImpl.java    line 117    1209378268234    6480

Type safety: The expression of type Set needs unchecked conversion to conform to Collection<IClient>    RED5/src/org/red5/server    ClientRegistry.java    line 96    1209378269328    6529

Type safety: The expression of type Map needs unchecked conversion to conform to Map<String,Object>    RED5/src/org/red5/server/net/rtmp    RTMPHandler.java    line 230    1209378267640    6385

Type safety: The expression of type Map needs unchecked conversion to conform to Map<String,Object>    RED5/src/org/red5/server/net/rtmp    RTMPHandler.java    line 322    1209378267640    6386

Type safety: The expression of type List[http://] needs unchecked conversion to conform to List<SimpleBWControlService.TokenRequest>[|http://] needs unchecked conversion to conform to List<SimpleBWControlService.TokenRequest>[]    RED5/src/org/red5/server/stream    SimpleBWControlService.java    line 543    1209378266125    6202

Type safety: The expression of type Iterator needs unchecked conversion to conform to Iterator<String>    RED5/src/org/red5/server/cache    EhCacheImpl.java    line 161    1209378268234    6481

Type safety: The expression of type Iterator needs unchecked conversion to conform to Iterator<Map.Entry>    RED5/src/org/red5/server/statistics    XmlRpcScopeStatistics.java    line 164    1209378266500    6225

Type safety: The expression of type HashMap needs unchecked conversion to conform to Map<String,?>    RED5/src/org/red5/server    Shutdown.java    line 70    1209378269078    6515

Type safety: The expression of type HashMap needs unchecked conversion to conform to Map<String,?>    RED5/src/org/red5/server/jmx    JMXAgent.java    line 367    1209378268140    6470

ThreadLocal is a raw type. References to generic type ThreadLocal<T> should be parameterized    RED5/src/org/red5/server    DebugPooledByteBufferAllocator.java    line 65    1209378269281    6522

ThreadLocal is a raw type. References to generic type ThreadLocal<T> should be parameterized    RED5/src/org/red5/server    DebugPooledByteBufferAllocator.java    line 65    1209378269281    6523

The serializable class MainServlet does not declare a static final serialVersionUID field of type long    RED5/src/org/red5/server    MainServlet.java    line 50    1209378269234    6518

The serializable class ClientList does not declare a static final serialVersionUID field of type long    RED5/src/org/red5/server    ClientList.java    line 26    1209378269343    6530

The local variable writeDelta is never read    RED5/src/org/red5/server/stream    PlaylistSubscriberStream.java    line 1895    1209378266312    6206

The local variable consumer is never read    RED5/src/org/red5/server/stream    ClientBroadcastStream.java    line 463    1209378266468    6217

The import org.mortbay.jetty.webapp.WebAppContext is never used    RED5/src/org/red5/server    JettyLoader.java    line 32    1209378269250    6521

The field MetaService.fis is never read locally    RED5/src/org/red5/io/flv/meta    MetaService.java    line 56    1209378269703    6577

SoftReference is a raw type. References to generic type SoftReference<T> should be parameterized    RED5/src/org/red5/server/cache    CacheImpl.java    line 129    1209378268250    6482

SoftReference is a raw type. References to generic type SoftReference<T> should be parameterized    RED5/src/org/red5/server/cache    CacheImpl.java    line 191    1209378268250    6483

Set is a raw type. References to generic type Set<E> should be parameterized    RED5/src/org/red5/io/amf    Output.java    line 258    1209378269968    6654

Set is a raw type. References to generic type Set<E> should be parameterized    RED5/src/org/red5/io/amf3    Output.java    line 428    1209378269890    6638

Set is a raw type. References to generic type Set<E> should be parameterized    RED5/src/org/red5/io/flv/meta    MetaData.java    line 192    1209378269718    6598

Set is a raw type. References to generic type Set<E> should be parameterized    RED5/src/org/red5/server    AttributeStore.java    line 298    1209378269390    6539

Set is a raw type. References to generic type Set<E> should be parameterized    RED5/src/org/red5/server    AttributeStore.java    line 299    1209378269390    6540

Set is a raw type. References to generic type Set<E> should be parameterized    RED5/src/org/red5/server/api    ICastingAttributeStore.java    line 104    1209378268921    6506

Set is a raw type. References to generic type Set<E> should be parameterized    RED5/src/org/red5/server/service    ConversionUtils.java    line 353    1209378266734    6297

Set is a raw type. References to generic type Set<E> should be parameterized    RED5/src/org/red5/server/so    ClientSharedObject.java    line 392    1209378266640    6248

Set is a raw type. References to generic type Set<E> should be parameterized    RED5/src/org/red5/server/so    ClientSharedObject.java    line 393    1209378266640    6249

MetaData is a raw type. References to generic type MetaData<K,V> should be parameterized    RED5/src/org/red5/io/flv/meta    IMetaService.java    line 77    1209378269734    6604

MetaData is a raw type. References to generic type MetaData<K,V> should be parameterized    RED5/src/org/red5/io/flv/meta    MetaService.java    line 310    1209378269703    6587

MetaData is a raw type. References to generic type MetaData<K,V> should be parameterized    RED5/src/org/red5/io/flv/meta    MetaService.java    line 311    1209378269703    6588

MetaData is a raw type. References to generic type MetaData<K,V> should be parameterized    RED5/src/org/red5/io/flv/meta    MetaService.java    line 311    1209378269703    6589

MetaCue is a raw type. References to generic type MetaCue<K,V> should be parameterized    RED5/src/org/red5/io/flv/meta    MetaCue.java    line 96    1209378269718    6600

MetaCue is a raw type. References to generic type MetaCue<K,V> should be parameterized    RED5/src/org/red5/io/flv/meta    MetaCue.java    line 96    1209378269718    6601

MetaCue is a raw type. References to generic type MetaCue<K,V> should be parameterized    RED5/src/org/red5/io/flv/meta    MetaData.java    line 191    1209378269718    6596

MetaCue is a raw type. References to generic type MetaCue<K,V> should be parameterized    RED5/src/org/red5/io/flv/meta    MetaData.java    line 191    1209378269718    6597

MetaCue is a raw type. References to generic type MetaCue<K,V> should be parameterized    RED5/src/org/red5/io/flv/meta    MetaService.java    line 271    1209378269703    6586

Map.Entry is a raw type. References to generic type Map<K,V>.Entry<K,V> should be parameterized    RED5/src/org/red5/io/amf    Output.java    line 285    1209378269968    6657

Map.Entry is a raw type. References to generic type Map<K,V>.Entry<K,V> should be parameterized    RED5/src/org/red5/io/amf    Output.java    line 285    1209378269968    6658

Map.Entry is a raw type. References to generic type Map<K,V>.Entry<K,V> should be parameterized    RED5/src/org/red5/io/amf3    Output.java    line 448    1209378269890    6641

Map.Entry is a raw type. References to generic type Map<K,V>.Entry<K,V> should be parameterized    RED5/src/org/red5/io/amf3    Output.java    line 448    1209378269890    6642

Map.Entry is a raw type. References to generic type Map<K,V>.Entry<K,V> should be parameterized    RED5/src/org/red5/server    Client.java    line 222    1209378269359    6531

Map.Entry is a raw type. References to generic type Map<K,V>.Entry<K,V> should be parameterized    RED5/src/org/red5/server/statistics    XmlRpcScopeStatistics.java    line 164    1209378266500    6224

Map.Entry is a raw type. References to generic type Map<K,V>.Entry<K,V> should be parameterized    RED5/src/org/red5/server/statistics    XmlRpcScopeStatistics.java    line 166    1209378266500    6227

Map is a raw type. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/io/flv    IFLV.java    line 81    1209378269828    6633

Map is a raw type. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/io/flv    IFLV.java    line 88    1209378269828    6634

Map is a raw type. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/io/flv/impl    FLV.java    line 118    1209378269812    6621

Map is a raw type. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/io/flv/impl    FLV.java    line 123    1209378269812    6622

Map is a raw type. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/io/flv/meta    MetaService.java    line 314    1209378269703    6590

Map is a raw type. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/io/flv/meta    MetaService.java    line 314    1209378269703    6591

Map is a raw type. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/samples/services    EchoService.java    line 80    1209378269406    6545

Map is a raw type. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/samples/services    EchoService.java    line 80    1209378269406    6546

Map is a raw type. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/samples/services    EchoService.java    line 105    1209378269406    6549

Map is a raw type. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/samples/services    IEchoService.java    line 84    1209378269390    6541

Map is a raw type. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/samples/services    IEchoService.java    line 84    1209378269390    6542

Map is a raw type. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/server    AttributeStore.java    line 288    1209378269390    6537

Map is a raw type. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/server    AttributeStore.java    line 289    1209378269390    6538

Map is a raw type. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/server/api    ICastingAttributeStore.java    line 95    1209378268921    6505

Map is a raw type. References to generic type Map<K,V> should be parameterized    RED5/src/org/red5/server/messaging    AbstractMessage.java    line 46    1209378268078    6436

 

 

 

 

 

This is build.xml:

 

 

<?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}/library.properties"/>

        <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}/library.properties"/>

        <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}/admin/WEB-INF/classes"/>

        <mkdir dir="${webapps.dir}/admin/WEB-INF/lib"/>

        <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: $"/>         <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="$"

             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="$"              source="${java.target_version}" target="${java.target_version}" memoryMaximumSize="1024m"              excludes="**/*.jsp,org/red5/server/script/**" listfiles="false"/>     </target>     <!-- Demos -->     <target name="compile_demos" depends="prepare">         <javac sourcepath="" srcdir="${webapps.dir}/admin/WEB-INF/src" destdir="${webapps.dir}${tmp.war.dir}/admin/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="$" source="${java.target_version}" target="${java.target_version}"/>

        <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="$" 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="$" 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="$" 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="$" 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="$" 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="$" source="${java.target_version}" target="${java.target_version}"/>

    </target>

    <!-- Scripting -->

    <target name="compile_script" if="java6.installed" depends="prepare">

        <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="$"              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" depends="prepare">         <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="$"

             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: $"/>         <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="$"

             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/admin/WEB-INF/classes"/>

        <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/admin/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: $"/>         <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="$"

             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/admin/WEB-INF/classes"/>

        <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/admin/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.

    http://www.yworks.com/en/products_ydoc.htm

    -->

    <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$${ydoc.home}/lib/class2svg.jar$${ydoc.home}/resources$${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 - red5@osflash.org"/>

                <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 - red5@osflash.org"/>

                <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}/admin/WEB-INF/lib/admin.jar">

            <fileset dir="${webapps.dir}/admin/WEB-INF/classes">

                <include name="**"/>

            </fileset>

        </jar>

        <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>

        <jar destfile="${webapps.dir}/cam_test1/WEB-INF/lib/cam_test1.jar">

            <fileset dir="${webapps.dir}/test/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"/>

            <!-- enable the following 2 lines if your using jmx with ssl -->

            <!--

            <jvmarg value="-Djavax.net.ssl.keyStore=${config.dir}/keystore.jmx"/>

            <jvmarg value="-Djavax.net.ssl.keyStorePassword=password"/>

            -->

        </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"/>

            <!-- enable the following 2 lines if your using jmx with ssl -->

            <!--

            <jvmarg value="-Djavax.net.ssl.keyStore=${config.dir}/keystore.jmx"/>

            <jvmarg value="-Djavax.net.ssl.keyStorePassword=password"/>

            -->

        </java>

    </target>

    <target name="server">

        <antcall target="server_java5" inheritAll="true" inheritRefs="true"/>

        <antcall target="server_java6" inheritAll="true" inheritRefs="true"/>

    </target>

    <target name="shutdown" depends="compile">

        <java classname="org.red5.server.Shutdown" 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"/>

            <!-- enable the following 5 lines if your using jmx with ssl and auth -->

            <!--

            <jvmarg value="-Djavax.net.ssl.trustStore=${config.dir}/truststore.jmx"/>

            <jvmarg value="-Djavax.net.ssl.trustStorePassword=trustword"/>

            <arg value="9999"/>

            <arg value="red5user"/>

            <arg value="changeme"/>

            -->

        </java>

    </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 jmx support files into the webapp classpath -->

        <copy todir="${classes.dir}/WEB-INF/classes">

            <fileset dir="conf">

                <include name="*.jmx"/>

                <include name="access.properties"/>

                <include name="password.properties"/>

            </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"/>

                <exclude name="GroboUtils-5-core.jar"/>

                <exclude name="junit*.jar"/>

            </lib>

            <manifest>

                <attribute name="Built-By" value="RED5 Project - red5@osflash.org"/>

                <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>

        <!-- copy the jmx support files into the webapp classpath -->

        <copy todir="${classes.dir}/WEB-INF/classes">

            <fileset dir="conf">

                <include name="*.jmx"/>

                <include name="access.properties"/>

                <include name="password.properties"/>

            </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"/>

                <exclude name="GroboUtils-5-core.jar"/>

                <exclude name="junit*.jar"/>

            </lib>

            <lib dir="${lib.dir}/java5">

                <exclude name="*.properties"/>

            </lib>

            <manifest>

                <attribute name="Built-By" value="RED5 Project - red5@osflash.org"/>

                <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>

 

 

 

Please help me!

 

 

Greetings

 

 

Outcomes