javacommons/comms/tsrc/javaapi/build/build.xml
branchRCL_3
changeset 14 04becd199f91
child 24 6c158198356e
equal deleted inserted replaced
13:f5050f1da672 14:04becd199f91
       
     1 <!--
       
     2 #
       
     3 # Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 # All rights reserved.
       
     5 # This component and the accompanying materials are made available
       
     6 # under the terms of "Eclipse Public License v1.0"
       
     7 # which accompanies this distribution, and is available
       
     8 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9 #
       
    10 # Initial Contributors:
       
    11 # Nokia Corporation - initial contribution.
       
    12 #
       
    13 # Contributors:
       
    14 #
       
    15 # Description: 
       
    16 #
       
    17 -->
       
    18 
       
    19 <project name="commstest" default="deploy.ut" basedir=".">
       
    20 
       
    21   <import file="../../../../../build/utilities.xml"/>
       
    22 
       
    23   <property environment="env"/>
       
    24   <property name="java.src.root" location="${env.JAVA_SRC_ROOT}"/>
       
    25   <property name="java.bin.root" location="${env.JAVA_BIN_ROOT}"/>
       
    26 
       
    27   <property name="src.dir" location="../javasrc"/>
       
    28   <property name="build.dir" location="../build"/>
       
    29   <property name="classes.dir" location="${build.dir}/javabuild"/>
       
    30   <property name="dist" location="${java.bin.root}/jsr/classes"/>
       
    31 
       
    32   <property name="commstest.jar.filename" value="commstest.jar"/>
       
    33   <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/>
       
    34   <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/>
       
    35   <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/>
       
    36 
       
    37   <property name="bootclasspath.cdc" location="${java.src.root}/javaruntime/jvm/ibm/j9_23/ibmdelivery/resource/lib/jclCdc11/classes.zip"/>
       
    38 
       
    39   <property name="javac.source" value="1.3"/>
       
    40   <property name="javac.target" value="1.3"/>
       
    41 
       
    42   <target name="clean" depends="init.properties">
       
    43     <delete dir="${classes.dir}"/>
       
    44     <delete file="${dist}/${commstest.jar.filename}"/>
       
    45     <delete file="${dist}/${junit.jar.filename}"/>
       
    46     <delete file="${dist}/${junit.omj.jar.filename}"/>
       
    47   </target>
       
    48 
       
    49   <target name="compile.ut" depends="init.properties">
       
    50     <mkdir dir="${classes.dir}"/>
       
    51     <javac source="${javac.source}" target="${javac.target}"
       
    52            destdir="${classes.dir}"
       
    53            bootclasspath="${bootclasspath.cdc}">
       
    54            <classpath>
       
    55                <pathelement location="${impl.cldc.jar}"/>
       
    56                <pathelement location="${impl.cdc.jar}"/>
       
    57                <pathelement location="${public.api.jar}"/>
       
    58                <pathelement location="${platform.api.jar}"/>
       
    59                <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
       
    60                <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
       
    61            </classpath>
       
    62       <src path="${src.dir}"/>
       
    63     </javac>
       
    64   </target>
       
    65 
       
    66   <target name="deploy.ut" depends="compile.ut">
       
    67       <mkdir dir="${dist}"/>
       
    68       <jar destfile="${vm.extension.directory}/${commstest.jar.filename}" basedir="${classes.dir}"/>
       
    69       <copy file="${junit.jar.dir}/${junit.jar.filename}"
       
    70             tofile="${vm.extension.directory}/${junit.jar.filename}"/>
       
    71       <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
       
    72             tofile="${vm.extension.directory}/${junit.omj.jar.filename}"/>
       
    73   </target>
       
    74 
       
    75   <target name="main" depends="clean,run"/>
       
    76 
       
    77   <target name="run" depends="deploy.ut">
       
    78       <echo>Running Comms Tests</echo>
       
    79       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
    80           <arg line="test -mainclass=com.nokia.mj.test.comms.CommsMain"/>
       
    81       </exec>
       
    82   </target>
       
    83 </project>