javaextensions/pim/tsrc/build.xml
branchRCL_3
changeset 19 04becd199f91
equal deleted inserted replaced
16:f5050f1da672 19: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="OmjPIMTests" default="deploy.ut" basedir=".">
       
    20 
       
    21   
       
    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   <import file="../../../../build/utilities.xml"/>
       
    28 
       
    29   <property name="src.dir" location="./src"/>
       
    30   <property name="build.dir" location="."/>
       
    31   <property name="resource_path" value="${build.dir}/res"/>
       
    32   <property name="classes.dir" location="${build.dir}/javabuild"/>
       
    33   <property name="jar_dir" value="${classes.dir};${resource_path}"/>
       
    34   <property name="installer.jar.filename" value="javainstaller.jar"/>
       
    35   <property name="pimtests.jar.filename" value="OmjPIMTests.jar"/>
       
    36   <property name="utils.jar.filename" value="javacommonutils.jar"/>
       
    37   <property name="logger.jar.filename" value="logger.jar"/>
       
    38   <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/>
       
    39   <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/>
       
    40   <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/>
       
    41 
       
    42   <property name="bootclasspath.cdc" location="${java.src.root}/javaruntime/jvm/ibm/j9_23/ibmdelivery/resource/lib/jclCdc11/classes.zip"/>
       
    43 
       
    44   <property name="javac.source" value="1.3"/>
       
    45   <property name="javac.target" value="1.3"/>
       
    46   
       
    47   <target name="init.my.properties" depends="init.properties">
       
    48       <property name="dist" location="${vm.extension.directory}"/>
       
    49   </target>
       
    50 
       
    51   <target name="clean">
       
    52     <delete dir="${classes.dir}"/>
       
    53     <delete file="${dist}/${pimtests.jar.filename}"/>
       
    54     <delete file="${dist}/${junit.jar.filename}"/>
       
    55     <delete file="${dist}/${junit.omj.jar.filename}"/>
       
    56   </target>
       
    57 
       
    58   <target name="compile.ut" depends="init.properties">
       
    59 
       
    60   
       
    61 
       
    62     <property name="jars.dir" location="${jarfiles.collect.root}"/>
       
    63     <property name="jars.dir.cdc" location="${jarfiles.collect.cdc.root}"/>
       
    64     <mkdir dir="${classes.dir}"/>
       
    65     <javac source="${javac.source}" target="${javac.target}"
       
    66            destdir="${classes.dir}"
       
    67            bootclasspath="${bootclasspath.cdc}">
       
    68            <classpath>
       
    69                <pathelement
       
    70                  location="${jars.dir.cdc}/${installer.jar.filename}"/>
       
    71                <pathelement location="${impl.cldc.jar}"/>
       
    72                <pathelement location="${impl.cdc.jar}"/>
       
    73                <pathelement location="${public.api.jar}"/>
       
    74                <pathelement location="${platform.api.jar}"/>
       
    75                <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
       
    76                <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
       
    77            </classpath>
       
    78       <src path="${src.dir}"/>
       
    79     </javac>
       
    80     
       
    81     <ant antfile="${java.src.root}/tools/junit/JsrTestRunner/build/build.xml">
       
    82     </ant>
       
    83     
       
    84   </target>
       
    85 
       
    86   <target name="jar.resources">
       
    87     		<mkdir dir="${classes.dir}/res"/>
       
    88 			<copy todir="${classes.dir}/res">
       
    89 			    <fileset dir="${resource_path}" />
       
    90 			</copy>
       
    91 	</target>
       
    92 
       
    93   <target name="deploy.ut" depends="compile.ut,init.my.properties,jar.resources">
       
    94       <mkdir dir="${dist}"/>
       
    95       <jar destfile="${dist}/${pimtests.jar.filename}" basedir="${classes.dir}"/>
       
    96       <copy file="${junit.jar.dir}/${junit.jar.filename}"
       
    97             tofile="${dist}/${junit.jar.filename}"/>
       
    98       <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
       
    99             tofile="${dist}/${junit.omj.jar.filename}"/>
       
   100   </target>
       
   101 
       
   102   <target name="main" depends="clean"/>
       
   103 
       
   104   <target name="cdc" >
       
   105   <antcall target="deploy.ut">
       
   106         <param name="src.dir" location="./javasrc.cdc"/> 
       
   107         <param name="classes.dir" location="${build.dir}/javabuild.cdc"/>
       
   108        </antcall>
       
   109   </target>
       
   110 
       
   111  </project>