javacommons/utils/tsrc/localisation/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="LocalisationTest" basedir="." default="deploy">
       
    20     <description>
       
    21         Localisation Test MIDlet
       
    22     </description>
       
    23 
       
    24   <import file="../../../../../build/utilities.xml"/>
       
    25 
       
    26   <property environment="env"/>
       
    27   <property name="java.src.root" location="${env.JAVA_SRC_ROOT}"/>
       
    28   <property name="java.bin.root" location="${env.JAVA_BIN_ROOT}"/>
       
    29 
       
    30   <property name="src.dir" location="../javasrc"/>
       
    31   <property name="build.dir" location="."/>
       
    32   <property name="classes.dir" location="${build.dir}/javabuild"/>
       
    33   <property name="loc.dir" location="../loc"/>
       
    34   <property name="tests.jar.filename" value="${ant.project.name}.jar"/>
       
    35   <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/>
       
    36   <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/>
       
    37   <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/>
       
    38 
       
    39   <property name="bootclasspath.cdc" location="${java.src.root}/javaruntime/jvm/ibm/j9_23/ibmdelivery/resource/lib/jclCdc11/classes.zip"/>
       
    40 
       
    41   <property name="javac.source" value="1.3"/>
       
    42   <property name="javac.target" value="1.3"/>
       
    43 
       
    44   <target name="init.my.properties" depends="init.properties">
       
    45     <property name="dist" location="${vm.extension.directory}"/>
       
    46   </target>
       
    47   
       
    48   <target name="clean" depends="init.my.properties">
       
    49     <delete dir="${classes.dir}"/>
       
    50     <delete file="${dist}/${tests.jar.filename}"/>
       
    51     <delete file="${dist}/${junit.jar.filename}"/>
       
    52     <delete file="${dist}/${junit.omj.jar.filename}"/>
       
    53   </target>
       
    54 
       
    55   <target name="init" depends="init.my.properties">
       
    56     <property name="dist" location="${vm.extension.directory}"/>
       
    57   </target>
       
    58 
       
    59   <target name="compile" depends="init">
       
    60     <delete dir="${classes.dir}"/>
       
    61     <mkdir dir="${classes.dir}"/>
       
    62     <javac source="${javac.source}" target="${javac.target}"
       
    63            destdir="${classes.dir}"
       
    64            bootclasspath="${bootclasspath.cdc}">
       
    65            <classpath>
       
    66                <pathelement location="${policyeditor.jar}"/>
       
    67                <pathelement location="${impl.cldc.jar}"/>
       
    68                <pathelement location="${impl.cdc.jar}"/>
       
    69                <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
       
    70                <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
       
    71            </classpath>
       
    72       <src path="${src.dir}"/>
       
    73     </javac>
       
    74   </target>
       
    75   
       
    76   <target name="deploy" depends="compile">
       
    77       <mkdir dir="${dist}"/>
       
    78       <jar destfile="${dist}/${tests.jar.filename}">
       
    79         <fileset dir="${classes.dir}"/>
       
    80         <!-- fileset dir="${loc.dir}"/ -->
       
    81       </jar>
       
    82 
       
    83       <zip destfile="${dist}/${tests.jar.filename}" update="true" filesonly="true">
       
    84         <zipfileset dir="${loc.dir}" prefix="resources/com/nokia/mj/impl"/>
       
    85       </zip>
       
    86 
       
    87 
       
    88       <copy file="${junit.jar.dir}/${junit.jar.filename}"
       
    89             tofile="${dist}/${junit.jar.filename}"/>
       
    90       <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
       
    91             tofile="${dist}/${junit.omj.jar.filename}"/>
       
    92   </target>
       
    93   
       
    94   <target name="main" depends="run"/>
       
    95 
       
    96   <target name="run" depends="deploy">
       
    97       <echo>Running Location Tests</echo>
       
    98       <exec executable="${java.bin.root}/bin/javainstaller">
       
    99           <arg line="test -mainclass=localisationtest.LocalisationTest"/>
       
   100       </exec>
       
   101   </target>
       
   102 
       
   103 </project>