buildframework/helium/build-jar.ant.xml
changeset 2 39c28ec933dd
equal deleted inserted replaced
1:820b22e13ff1 2:39c28ec933dd
       
     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 env
       
    29     Load all environment variables. -->
       
    30     <property environment="env" />
       
    31 
       
    32     <!-- @type string
       
    33     @scope private
       
    34     -->
       
    35     <property name="build.temp.dir" location="${env.TEMP}/helium/java" />
       
    36     <!-- @type string
       
    37     @scope private
       
    38     -->
       
    39     <property name="src.dir" location="${helium.dir}/tools/common/java/src" />
       
    40     <!-- @type string
       
    41     @scope private
       
    42     -->
       
    43     <property name="ext.java.lib.dir" location="${helium.dir}/external/antlibs" />
       
    44     <!-- @type string
       
    45     @scope private
       
    46     -->
       
    47     <property name="helium.java.lib.dir" location="${helium.dir}/tools/common/java/lib" />
       
    48 
       
    49 
       
    50     <!-- Builds the Java source code for our custom Ant stuff. -->
       
    51     <target name="build-java-src" description="Builds the internal Ant custom tasks">
       
    52         <delete dir="${build.temp.dir}" />
       
    53         <mkdir dir="${build.temp.dir}" />
       
    54         <copy todir="${build.temp.dir}/class">
       
    55             <fileset dir="${src.dir}">
       
    56                 <include name="**/*.properties" />
       
    57                 <include name="**/*.xml" />
       
    58             </fileset>
       
    59         </copy>
       
    60         <javac srcdir="${src.dir}" destdir="${build.temp.dir}/class" source="1.6" target="1.6" debug="true">
       
    61             <classpath>
       
    62                 <fileset dir="${ext.java.lib.dir}" includes="**/*.jar" />
       
    63                 <fileset dir="${helium.dir}/external/helium-antlib" includes="**/*.jar" />
       
    64             </classpath>
       
    65             <exclude name="nokia/cruisecontrol/**" />
       
    66         </javac>
       
    67     </target>
       
    68 
       
    69 
       
    70     <!-- Builds the .jar file with our custom Ant tasks and loggers in. -->
       
    71     <target name="jar" depends="build-java-src" description="Builds jar for internal Ant custom tasks">
       
    72         <property file="${helium.dir}/config/version.txt" />
       
    73         <mkdir dir="${build.temp.dir}/lib" />
       
    74         <delete file="${build.temp.dir}/lib/nokia_ant.jar" />
       
    75         <copy file="${src.dir}/com/nokia/ant/antlib.xml" todir="${build.temp.dir}/class/com/nokia/ant" />
       
    76 
       
    77         <jar basedir="${build.temp.dir}/class" destfile="${build.temp.dir}/lib/nokia_ant.jar" update="true">
       
    78             <manifest>
       
    79                 <attribute name="Built-By" value="${user.name}" />
       
    80                 <section name="common">
       
    81                     <attribute name="Implementation-Title" value="Helium" />
       
    82                     <attribute name="Implementation-Version" value="${helium.version}" />
       
    83                     <attribute name="Implementation-Vendor" value="Nokia" />
       
    84                 </section>
       
    85             </manifest>
       
    86         </jar>
       
    87 
       
    88         <move file="${build.temp.dir}/lib/nokia_ant.jar" tofile="${helium.java.lib.dir}/nokia_ant.jar" />
       
    89     </target>
       
    90 
       
    91 </project>