buildframework/helium/build-jar.ant.xml
changeset 1 be27ed110b50
child 217 0f5e3a7fb6af
equal deleted inserted replaced
0:044383f39525 1:be27ed110b50
       
     1 <?xml version="1.0" encoding="UTF-8"?>
       
     2 <!-- 
       
     3 ============================================================================ 
       
     4 Name        : build-jar.ant.xml 
       
     5 Part of     : Helium 
       
     6 
       
     7 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     8 All rights reserved.
       
     9 This component and the accompanying materials are made available
       
    10 under the terms of the License "Eclipse Public License v1.0"
       
    11 which accompanies this distribution, and is available
       
    12 at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
    13 
       
    14 Initial Contributors:
       
    15 Nokia Corporation - initial contribution.
       
    16 
       
    17 Contributors:
       
    18 
       
    19 Description:
       
    20 
       
    21 ============================================================================
       
    22 -->
       
    23 <project name="helium-build-jar" default="help" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
       
    24     <description>
       
    25     Called by hlm-jar.bat to build helium java code
       
    26     </description>
       
    27 
       
    28     <property environment="env" />
       
    29 
       
    30     <property name="build.temp.dir" location="${env.TEMP}/helium/java" />
       
    31     <property name="src.dir" location="${helium.dir}/tools/common/java/src" />
       
    32     <property name="ext.java.lib.dir" location="${helium.dir}/external/antlibs" />
       
    33     <property name="helium.java.lib.dir" location="${helium.dir}/tools/common/java/lib" />
       
    34 
       
    35 
       
    36     <!-- Builds the Java source code for our custom Ant stuff. -->
       
    37     <target name="build-java-src" description="Builds the internal Ant custom tasks">
       
    38         <delete dir="${build.temp.dir}" />
       
    39         <mkdir dir="${build.temp.dir}" />
       
    40         <copy todir="${build.temp.dir}/class">
       
    41             <fileset dir="${src.dir}">
       
    42                 <include name="**/*.properties" />
       
    43                 <include name="**/*.xml" />
       
    44             </fileset>
       
    45         </copy>
       
    46         <javac srcdir="${src.dir}" destdir="${build.temp.dir}/class" source="1.6" target="1.6" debug="true">
       
    47             <classpath>
       
    48                 <fileset dir="${ext.java.lib.dir}" includes="**/*.jar" />
       
    49                 <fileset dir="${helium.dir}/external/helium-antlib" includes="**/*.jar" />
       
    50             </classpath>
       
    51             <exclude name="nokia/cruisecontrol/**" />
       
    52         </javac>
       
    53     </target>
       
    54 
       
    55 
       
    56     <!-- Builds the .jar file with our custom Ant tasks and loggers in. -->
       
    57     <target name="jar" depends="build-java-src" description="Builds jar for internal Ant custom tasks">
       
    58         <property file="${helium.dir}/config/version.txt" />
       
    59         <mkdir dir="${build.temp.dir}/lib" />
       
    60         <delete file="${build.temp.dir}/lib/nokia_ant.jar" />
       
    61         <copy file="${src.dir}/com/nokia/ant/antlib.xml" todir="${build.temp.dir}/class/com/nokia/ant" />
       
    62 
       
    63         <jar basedir="${build.temp.dir}/class" destfile="${build.temp.dir}/lib/nokia_ant.jar" update="true">
       
    64             <manifest>
       
    65                 <attribute name="Built-By" value="${user.name}" />
       
    66                 <section name="common">
       
    67                     <attribute name="Implementation-Title" value="Helium" />
       
    68                     <attribute name="Implementation-Version" value="${helium.version}" />
       
    69                     <attribute name="Implementation-Vendor" value="Nokia" />
       
    70                 </section>
       
    71             </manifest>
       
    72         </jar>
       
    73 
       
    74         <move file="${build.temp.dir}/lib/nokia_ant.jar" tofile="${helium.java.lib.dir}/nokia_ant.jar" />
       
    75     </target>
       
    76 
       
    77 </project>