buildframework/helium/builder/build.xml
author wbernard
Wed, 16 Jun 2010 16:51:40 +0300
changeset 588 c7c26511138f
parent 587 85df38eb4012
child 628 7c4a911dc066
permissions -rw-r--r--
helium-10.0.0-bc45d50958fe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     2
<!-- 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     3
============================================================================ 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     4
Name        : build.xml 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     5
Part of     : Helium AntLib
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     6
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     8
All rights reserved.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     9
This component and the accompanying materials are made available
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    11
which accompanies this distribution, and is available
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    13
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    14
Initial Contributors:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    16
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    17
Contributors:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    18
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    19
Description:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    20
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    21
============================================================================
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    22
-->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    23
<project name="helium-builder" default="build" xmlns:au="antlib:org.apache.ant.antunit" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:ac="antlib:net.sf.antcontrib">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    24
    <property environment="env" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    25
    <taskdef name="fmpp" classname="fmpp.tools.AntTask" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    26
    <import file="delivery.ant.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    27
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    28
    <!-- Ensuring that only Ant 1.7.0 is in use. 
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    29
    <ac:if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    30
        <not>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    31
            <contains string="${ant.version}" substring="1.7.0" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    32
        </not>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    33
        <then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    34
            <fail message="Your current ant version is ${ant.version}, you must use 1.7.0" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    35
        </then>
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    36
    </ac:if>            -->
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    37
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    38
    <condition property="platform" value="win32" else="unix">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    39
        <os family="windows"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    40
    </condition>
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    41
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    42
    <dirname property="builder.dir" file="${ant.file.helium-builder}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    43
    <property name="source.root.dir" location="${builder.dir}/.." />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    44
    <property name="build.temp.dir" location="${source.root.dir}/build" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    45
    <property name="components.temp.dir" location="${build.temp.dir}/components" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    46
    <property name="component" value="*" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    47
    <property name="component.type" value="*" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    48
    <property name="component.root" value="*" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    49
    <property name="config" value="sf" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    50
    <property name="sf.delivery.zip" location="${build.temp.dir}/helium-sf-src.zip" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    51
    <property name="binary.delivery.zip" location="${build.temp.dir}/helium-bin.zip" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    52
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    53
    <fileset id="ant.build.files" dir="${source.root.dir}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    54
        <include name="${component.root}/${component.type}/${component}/build.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    55
        <exclude name="*builder/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    56
        <exclude name="*/*builder/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    57
        <exclude name="tools/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    58
        <exclude name="config/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    59
        <exclude name="doc/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    60
        <exclude name="external/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    61
        <exclude name="extensions/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    62
        <exclude name="licences/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    63
        <exclude name="tests/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    64
        <exclude name="build/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    65
    </fileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    66
  
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    67
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    68
    <target name="cleanup" description="Cleanup (delete the temp build directory)">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    69
        <delete dir="${build.temp.dir}" failonerror="false"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    70
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    71
    
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    72
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    73
    <target name="get-build-list">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    74
        <ivy:buildlist reference="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    75
            <fileset refid="ant.build.files"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    76
        </ivy:buildlist>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    77
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    78
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    79
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    80
    <target name="report" depends="get-build-list" description="Create Ivy report for each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    81
        <subant target="report" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    82
            <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    83
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    84
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    85
  
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    86
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    87
    <target name="compile" depends="get-build-list">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    88
        <subant target="compile" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    89
            <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    90
            <property name="source.root.dir" value="${source.root.dir}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    91
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    92
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    93
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    94
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    95
    <target name="build" depends="get-build-list" description="Build each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    96
        <subant target="package" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    97
            <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    98
            <property name="source.root.dir" value="${source.root.dir}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    99
            <property name="platform" value="${platform}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   100
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   101
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   102
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   103
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   104
    <target name="clean" depends="get-build-list" description="Run clean on each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   105
        <subant target="clean" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   106
            <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   107
            <property name="source.root.dir" value="${source.root.dir}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   108
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   109
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   110
  
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   111
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   112
    <target name="test" depends="get-build-list,build" description="Run test on each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   113
        <ac:for param="file" keepgoing="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   114
            <path refid="ivy.buildlist.path" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   115
            <sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   116
                <echo>Testing: @{file}</echo>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   117
                <ant antfile="@{file}" dir="@{file}/.." target="test" inheritAll="false">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   118
                    <property name="builder.dir" location="${builder.dir}" />
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   119
                    <property name="source.root.dir" location="${source.root.dir}" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   120
                </ant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   121
            </sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   122
        </ac:for>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   123
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   124
    <!-- TODO: remove after CI tools are cleaned up -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   125
    <target name="unittest" depends="test"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   126
    
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   127
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   128
    <target name="junit" depends="get-build-list" description="Run JUnit tests on each component">
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   129
        <subant target="junit" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   130
            <property name="builder.dir" location="${builder.dir}" />
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   131
            <property name="source.root.dir" location="${source.root.dir}" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   132
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   133
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   134
    
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   135
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   136
    <target name="antunit" depends="get-build-list" description="Run AntUnit tests on each component">
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   137
        <subant target="antunit" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   138
            <property name="builder.dir" location="${builder.dir}" />
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   139
            <property name="source.root.dir" location="${source.root.dir}" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   140
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   141
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   142
    
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   143
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   144
    <target name="quality" depends="get-build-list" description="Run quality checks on each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   145
        <ac:for param="file" keepgoing="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   146
            <path refid="ivy.buildlist.path" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   147
            <sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   148
                <echo>Checking @{file}</echo>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   149
                <ant antfile="@{file}" dir="@{file}/.." target="quality" inheritAll="false">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   150
                    <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   151
                    <property name="source.root.dir" value="${source.root.dir}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   152
                    <property name="platform" value="${platform}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   153
                </ant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   154
            </sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   155
        </ac:for>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   156
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   157
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   158
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   159
    <target name="checkstyle" depends="get-build-list" description="Run checkstyle on each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   160
        <ac:for param="file" keepgoing="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   161
            <path refid="ivy.buildlist.path" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   162
            <sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   163
                <ant antfile="@{file}" dir="@{file}/.." target="checkstyle" inheritAll="false">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   164
                    <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   165
                    <property name="source.root.dir" value="${source.root.dir}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   166
                    <property name="platform" value="${platform}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   167
                </ant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   168
            </sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   169
        </ac:for>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   170
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   171
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   172
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   173
    <target name="get-deps" description="Retrieving Helium dependencies">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   174
        <ac:if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   175
            <not>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   176
                <isset property="config" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   177
            </not>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   178
            <then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   179
                <fail message="config is not defined." />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   180
            </then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   181
        </ac:if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   182
        <echo>Using ${config} configuration.</echo>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   183
        <delete>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   184
            <fileset dir="${build.temp.dir}" includes="ivy/com.nokia.helium.config/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   185
        </delete>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   186
        <ivy:settings file="${source.root.dir}/${config}/settings/ivysettings.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   187
        
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   188
        <!-- the call to resolve is not mandatory, retrieve makes an implicit call if we don't -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   189
        <ivy:resolve organisation="com.nokia.helium.config" module="helium-${config}-config" revision="1.0" inline="true" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   190
        <ivy:retrieve sync="true" conf="default" organisation="com.nokia.helium.config"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   191
            module="helium-${config}-config" revision="1.0"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   192
            inline="true" type="jar"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   193
            pattern="${source.root.dir}/external/antlibs2/[artifact]-[revision].[ext]" />        
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   194
        <ivy:retrieve sync="true" conf="default" organisation="com.nokia.helium.config"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   195
            module="helium-${config}-config" revision="1.0"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   196
            inline="true" type="egg"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   197
            pattern="${source.root.dir}/external/python/lib/auto/[artifact]-[revision].[ext]" />
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   198
        <fileset id="egg.deps.fileset" dir="${source.root.dir}/external/python/lib/auto" includes="*.egg" excludes="jython*.egg" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   199
        <fmpp sourceFile="template/easy-install.pth.ftl" outputFile="${source.root.dir}/external/python/lib/auto/easy-install.pth">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   200
            <data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   201
                project: antProject()
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   202
            </data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   203
        </fmpp>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   204
        
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   205
        <fileset id="egg.hlm.deps.fileset" dir="${source.root.dir}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   206
            <include name="external/python/**/*.egg" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   207
            <exclude name="**/2.5/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   208
        </fileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   209
        <fmpp sourceFile="template/configure_jython.bat.ftl" outputFile="${source.root.dir}/external/python/configure_jython.bat">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   210
            <data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   211
                project: antProject()
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   212
            </data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   213
        </fmpp>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   214
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   215
        <fmpp sourceFile="template/configure_jython.sh.ftl" outputFile="${source.root.dir}/external/python/configure_jython.sh">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   216
            <data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   217
                project: antProject()
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   218
            </data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   219
        </fmpp>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   220
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   221
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   222
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   223
    <target name="build-helium-docs" unless="skip.docs">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   224
        <exec osfamily="windows" executable="${source.root.dir}/hlm.bat" dir="${source.root.dir}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   225
            <arg value="docs"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   226
        </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   227
        <exec osfamily="unix" executable="${source.root.dir}/hlm" dir="${source.root.dir}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   228
            <arg value="docs"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   229
        </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   230
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   231
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   232
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   233
    <target name="zip-releasable">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   234
        <delete file="${binary.delivery.zip}" failonerror="false" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   235
        <zip destfile="${binary.delivery.zip}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   236
            <zipfileset id="zip.content" dir="${source.root.dir}" prefix="helium">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   237
                <include name="hlm.bat" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   238
                <include name="helium*.ant.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   239
                <include name="build.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   240
                <include name="tools/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   241
                <include name="config/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   242
                <include name="extensions/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   243
                <include name="external/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   244
                <include name="licenses/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   245
                <include name="tests/minibuilds/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   246
                <exclude name="config/version.txt.orig" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   247
                <exclude name="**/distribution.policy.S60" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   248
            </zipfileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   249
            <zipfileset id="zip.doc" dir="${source.root.dir}/build" prefix="helium">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   250
                <include name="doc/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   251
                <exclude name="**/distribution.policy.S60" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   252
            </zipfileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   253
            <zipfileset id="zip.executable" dir="${source.root.dir}" prefix="helium" filemode="755">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   254
                <include name="hlm" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   255
            </zipfileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   256
        </zip>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   257
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   258
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   259
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   260
    <target name="get-helium-revision">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   261
        <exec executable="hg" outputproperty="hg.helium.revision">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   262
            <arg value="id" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   263
            <arg value="--id" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   264
        </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   265
        <ac:propertyregex property="helium.revision"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   266
                    input="${hg.helium.revision}"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   267
                    regexp="([a-f0-9]+).*"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   268
                    replace="\1"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   269
                    casesensitive="false" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   270
        <echo message="Revision set to: ${helium.revision}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   271
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   272
    
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   273
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   274
    <target name="update-version" depends="get-helium-revision">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   275
        <ac:if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   276
            <available file="${source.root.dir}/config/version.txt.orig" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   277
            <then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   278
                <move file="${source.root.dir}/config/version.txt.orig" tofile="${source.root.dir}/config/version.txt" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   279
            </then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   280
        </ac:if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   281
        <copy file="${source.root.dir}/config/version.txt" tofile="${source.root.dir}/config/version.txt.orig" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   282
        <property file="${source.root.dir}/config/version.txt" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   283
        <propertyfile file="${source.root.dir}/config/version.txt" comment="Helium version - DO NOT EDIT">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   284
            <entry key="helium.version" value="${helium.version}-r${helium.revision}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   285
        </propertyfile>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   286
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   287
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   288
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   289
    <target name="restore-version">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   290
        <move file="${source.root.dir}/config/version.txt.orig" tofile="${source.root.dir}/config/version.txt" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   291
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   292
    
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   293
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   294
    <target name="create-releasable" depends="get-deps,update-version,build-helium-docs,zip-releasable,restore-version" description="Create releasable binary package"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   295
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   296
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   297
    <target name="textdoc">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   298
        <delete dir="${build.temp.dir}/doc/doctmp" failonerror="false"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   299
        <copy todir="${build.temp.dir}/doc/doctmp" overwrite="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   300
            <fileset dir="${source.root.dir}/sf/doc/src"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   301
        </copy>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   302
        <copy todir="${build.temp.dir}/doc/doctmp" overwrite="true" flatten="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   303
            <fileset dir="${source.root.dir}" includes="*/java/*/**/*.rst"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   304
            <fileset dir="${source.root.dir}" includes="*/python/*/**/*.rst"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   305
        </copy>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   306
        <rstMacro version="1.0" src="${build.temp.dir}/doc/doctmp"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   307
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   308
    
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   309
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   310
    <!-- Macro to generate html docs from rst. -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   311
    <macrodef name="rstMacro">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   312
        <attribute name="version"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   313
        <attribute name="src" default="${source.root.dir}/sf/doc/src"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   314
        <attribute name="output" default="${build.temp.dir}/doc/text"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   315
        <sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   316
            <property name="sphinx.lib.dir" location="${builder.dir}/tools/sphinx/Sphinx-0.5.1-py2.5.egg/sphinx" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   317
            <exec executable="python" failonerror="${failonerror}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   318
                <env key="PYTHONPATH" path="${builder.dir}/tools/sphinx" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   319
                <arg file="${builder.dir}/tools/sphinx/sphinx-build.py"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   320
                <arg value="-b" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   321
                <arg value="html" />            
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   322
                <arg value="-D" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   323
                <arg value="version=@{version}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   324
                <arg value="-D" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   325
                <arg value="release=@{version}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   326
                <arg file="@{src}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   327
                <arg file="@{output}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   328
            </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   329
        </sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   330
    </macrodef>
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   331
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   332
</project>
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   333
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   334