javacommons/utils/tsrc/build/build.xml
branchRCL_3
changeset 19 04becd199f91
child 25 9ac0a0a7da70
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="JavaCommonUtils" 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 
       
    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="javacommonutilstests.jar.filename" value="javacommonutilstests.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="javac.source" value="1.3"/>
       
    38   <property name="javac.target" value="1.3"/>
       
    39 
       
    40   <target name="clean" depends="init.properties">
       
    41     <property name="dist.dir" location="${vm.extension.directory}"/>
       
    42     <delete dir="${classes.dir}"/>
       
    43     <delete file="${dist.dir}/${javacommonutilstests.jar.filename}"/>
       
    44     <delete file="${dist.dir}/${junit.jar.filename}"/>
       
    45     <delete file="${dist.dir}/${junit.omj.jar.filename}"/>
       
    46   </target>
       
    47 
       
    48   <target name="compile.ut" depends="init.properties">
       
    49     <mkdir dir="${classes.dir}"/>
       
    50     <javac source="${javac.source}" target="${javac.target}"
       
    51            destdir="${classes.dir}">
       
    52            <classpath>
       
    53                <pathelement location="${impl.cldc.jar}"/>
       
    54                <pathelement location="${public.api.jar}"/>
       
    55                <pathelement location="${platform.api.jar}"/>
       
    56                <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
       
    57                <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
       
    58            </classpath>
       
    59       <src path="${src.dir}"/>
       
    60     </javac>
       
    61   </target>
       
    62 
       
    63   <target name="deploy.ut" depends="compile.ut">
       
    64       <property name="dist.dir" location="${vm.extension.directory}"/>
       
    65       <jar destfile="${dist.dir}/${javacommonutilstests.jar.filename}" basedir="${classes.dir}"/>
       
    66       <copy file="${junit.jar.dir}/${junit.jar.filename}"
       
    67             tofile="${dist.dir}/${junit.jar.filename}"/>
       
    68       <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
       
    69             tofile="${dist.dir}/${junit.omj.jar.filename}"/>
       
    70   </target>
       
    71 
       
    72   <target name="run" depends="deploy.ut">
       
    73       <echo>Running BufferedReaderTests</echo>
       
    74       <exec executable="${java.bin.root}/bin/javainstaller">
       
    75           <arg line="test -mainclass=com.nokia.mj.impl.utils.BufferedReaderTests"/>
       
    76       </exec>
       
    77 
       
    78   </target>
       
    79 
       
    80   <target name="main" depends="clean,run"/>
       
    81 
       
    82 </project>