javacommons/utils/tsrc/build/build.xml
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 04 Oct 2010 00:10:53 +0300
changeset 79 2f468c1958d0
parent 26 dc7c549001d5
permissions -rw-r--r--
Revision: v2.2.15 Kit: 201039

<!--
#
# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Nokia Corporation - initial contribution.
#
# Contributors:
#
# Description: 
#
-->

<project name="JavaCommonUtils" basedir="." default="deploy.ut">

  <import file="../../../../build/utilities.xml"/>

  <property environment="env"/>
  <property name="java.src.root" location="${env.JAVA_SRC_ROOT}"/>
  <property name="java.bin.root" location="${env.JAVA_BIN_ROOT}"/>

  <property name="src.dir" location="../javasrc"/>
  <property name="build.dir" location="../build"/>
  <property name="classes.dir" location="${build.dir}/javabuild"/>
  <property name="javacommonutilstests.jar.filename" value="javacommonutilstests.jar"/>
  <property name="utils.jar.filename" value="javacommonutils.jar"/>
  <property name="logger.jar.filename" value="logger.jar"/>
  <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/>
  <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/>
  <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/>

  <property name="javac.source" value="1.3"/>
  <property name="javac.target" value="1.3"/>

  <target name="clean" depends="init.properties">
    <property name="dist.dir" location="${vm.extension.directory}"/>
    <delete dir="${classes.dir}"/>
    <delete file="${dist.dir}/${javacommonutilstests.jar.filename}"/>
    <delete file="${dist.dir}/${junit.jar.filename}"/>
    <delete file="${dist.dir}/${junit.omj.jar.filename}"/>
  </target>

  <target name="compile.ut" depends="init.properties">
    <mkdir dir="${classes.dir}"/>
    <javac source="${javac.source}" target="${javac.target}"
           destdir="${classes.dir}">
           <classpath>
               <pathelement location="${impl.cldc.jar}"/>
               <pathelement location="${public.api.jar}"/>
               <pathelement location="${platform.api.jar}"/>
               <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
               <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
           </classpath>
      <src path="${src.dir}"/>
    </javac>
  </target>

  <target name="deploy.ut" depends="compile.ut">
      <property name="dist.dir" location="${vm.extension.directory}"/>
      <mkdir dir="${dist.dir}"/>
      <jar destfile="${dist.dir}/${javacommonutilstests.jar.filename}" basedir="${classes.dir}"/>
      <copy file="${junit.jar.dir}/${junit.jar.filename}"
            tofile="${dist.dir}/${junit.jar.filename}"/>
      <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
            tofile="${dist.dir}/${junit.omj.jar.filename}"/>
  </target>

  <target name="run" depends="deploy.ut">
      <echo>Running BufferedReaderTests</echo>
      <exec executable="${java.bin.root}/bin/javainstaller">
          <arg line="test -mainclass=com.nokia.mj.impl.utils.BufferedReaderTests"/>
      </exec>

      <echo>Running ConcurrencyTests</echo>
      <exec executable="${java.bin.root}/bin/javainstaller">
          <arg line="test -mainclass=com.nokia.mj.impl.utils.concurrency.ConcurrencyTests"/>
      </exec>

  </target>

  <target name="main" depends="clean,run"/>

</project>