javaextensions/mobinfo/tsrc/build/build.xml
branchRCL_3
changeset 14 04becd199f91
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="mobinfotests" basedir="." default="deploy.ut">
       
    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   <property name="build.dir" location="../build"/>
       
    27   <property name="classes.dir" location="${build.dir}/javabuild"/>
       
    28   <property name="installer.jar.dir" location="${dist}"/>
       
    29   <property name="installer.jar.filename" value="installer.jar"/>
       
    30   <property name="mobinfotests.jar.filename" value="mobinfotests.jar"/>
       
    31   <property name="utils.jar.filename" value="javacommonutils.jar"/>
       
    32   <property name="logger.jar.filename" value="logger.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 <!-- Choose appropriate path depending on the platform -->
       
    43   <target name="init.component.properties">
       
    44       <property name="dist"
       
    45                value="${vm.extension.directory}"/>
       
    46       <echo message="dist = ${dist}"/>  
       
    47       <echo message="java.src.paths = ${java.src.paths}"/>
       
    48   </target>
       
    49 
       
    50   <target name="clean" depends="init.properties">
       
    51     <delete dir="${classes.dir}"/>
       
    52     <delete file="${dist}/${mobinfotests.jar.filename}"/>
       
    53     <delete file="${dist}/${junit.jar.filename}"/>
       
    54     <delete file="${dist}/${junit.omj.jar.filename}"/>
       
    55   </target>
       
    56 
       
    57   <target name="compile.ut" depends="init.properties">
       
    58     <mkdir dir="${classes.dir}"/>
       
    59     <javac source="${javac.source}" target="${javac.target}"
       
    60            destdir="${classes.dir}"
       
    61            bootclasspath="${bootclasspath.cdc}">
       
    62            <classpath>
       
    63                <pathelement location="${impl.cldc.jar}"/>
       
    64                <pathelement location="${impl.cdc.jar}"/>
       
    65                <pathelement location="${public.api.jar}"/>
       
    66                <pathelement location="${platform.api.jar}"/>
       
    67                <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
       
    68                <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
       
    69            </classpath>
       
    70       <src path="${java.src.paths}"/>
       
    71     </javac>
       
    72   </target>
       
    73 
       
    74   <target name="deploy.ut" depends="compile.ut">
       
    75       <mkdir dir="${dist}"/>
       
    76       <jar destfile="${dist}/${mobinfotests.jar.filename}" basedir="${classes.dir}"/>
       
    77       <copy file="${junit.jar.dir}/${junit.jar.filename}"
       
    78             tofile="${dist}/${junit.jar.filename}"/>
       
    79       <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
       
    80             tofile="${dist}/${junit.omj.jar.filename}"/>
       
    81   </target>
       
    82 
       
    83   <target name="run" depends="deploy.ut">
       
    84       <echo>Running MobInfo Tests</echo>
       
    85       <exec executable="${java.bin.root}/bin/javainstaller">
       
    86           <arg line="test -mainclass=com.nokia.mj.impl.properties.mobinfo.TestProperties"/>
       
    87       </exec>
       
    88   </target>
       
    89   <target name="main" depends="clean,run"/>
       
    90 
       
    91 </project>