buildframework/helium/tools/preparation/bom/bom.ant.xml
author wbernard
Wed, 23 Dec 2009 19:29:07 +0200
changeset 179 d8ac696cc51f
parent 1 be27ed110b50
child 217 0f5e3a7fb6af
child 593 4367a1b2db65
permissions -rw-r--r--
helium_7.0-r14027
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     2
<!-- 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     3
============================================================================ 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     4
Name        : bom.ant.xml 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     5
Part of     : Helium 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     6
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     8
All rights reserved.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     9
This component and the accompanying materials are made available
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    11
which accompanies this distribution, and is available
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    13
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    14
Initial Contributors:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    16
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    17
Contributors:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    18
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    19
Description:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    20
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    21
============================================================================
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    22
-->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    23
<project name="preparation.bom" xmlns:hlm="http://www.nokia.com/helium">    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    24
    <description>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    25
    Creates a Bill-Of-Materials record based on the Synergy inputs.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    26
    </description>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    27
    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    28
    <property name="create.bom.workarea.root" value="."/> 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    29
    
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    30
    <!-- The target create-bom creates a Bill-Of-Material based on the SCM project 
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    31
    The target can be run in the project's root directory or the directory can be given by
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    32
    setting the property create.bom.workarea.root. The IDO builds are expected to set it to their 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    33
    projects work area directory. -->
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    34
    <target name="create-bom" depends="get-ccm-password,old-bom-log,ccm-prepare-input,prep-prepare-input">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    35
        <hlm:startSpecificLogMacro name="${prep.log.dir}/${build.id}_bom.log" regexp="${ccm.user.password}" phase="prep"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    36
        <hlm:python>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    37
import os
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    38
import build.model
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    39
import configuration
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    40
import nokia.nokiaccm
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    41
import ccm.extra
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    42
import ant
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    43
import sys
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    44
import traceback
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    45
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    46
session = None
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    47
try:
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    48
    runccm = ant.get_property(r'${run.ccm}')
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    49
    database = ant.get_property(r'${ccm.database}')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    50
    username = ant.get_property(r'${ccm.user.login}')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    51
    password = ant.get_property(r'${ccm.user.password}')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    52
    engine = ant.get_property(r'${ccm.engine.host}')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    53
    dbpath = ant.get_property(r'${ccm.database.path}')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    54
    waroot = ant.get_property(r'${create.bom.workarea.root}')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    55
    buildid = ant.get_property(r'${build.id}')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    56
    buildlogdir = ant.get_property(r'${build.log.dir}')
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    57
    deliveryfile = ant.get_property(r'${prep.delivery.conf.parsed}')
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    58
    oldbom = ant.get_property(r'${old.bom.log}')
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    59
    bom = None
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    60
    bomfilename = r"%s/%s_bom.xml" % (buildlogdir, buildid)
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    61
    if runccm and deliveryfile:
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    62
        cache = None
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    63
        if ant.get_property(r'${ccm.cache.xml}') is not None:
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    64
            cache = str(ant.get_property(r'${ccm.cache.xml}'))
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    65
        provider = ccm.extra.CachedSessionProvider(opener=nokia.nokiaccm.open_session, cache=cache)
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    66
            
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    67
        configBuilder = configuration.NestedConfigurationBuilder(open(deliveryfile, 'r'))
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    68
        configSet = configBuilder.getConfiguration()
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    69
        for config in configSet.getConfigurations():
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    70
            waroot = config['dir']
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    71
            print "Found wa for project %s" % waroot
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    72
                        
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    73
        if database != None:
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    74
            session = provider.get(username, password, database=database)
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    75
        else:
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    76
            session = provider.get(username, password, engine, dbpath)
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    77
            
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    78
        ccmproject =  ccm.extra.get_toplevel_project(session, waroot)
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    79
        
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    80
        config_data = {'delivery': deliveryfile, 'prep.xml': ant.get_property(r'${prep.config.file.parsed}'), 'build.id': buildid, 'ccm.database': database, 'symbian_rel_week': ant.get_property(r'${symbian.version.week}'), 'symbian_rel_ver': ant.get_property(r'${symbian.version}'), 'symbian_rel_year': ant.get_property(r'${symbian.version.year}'), 's60_version': ant.get_property(r'${s60.version}'), 's60_release': ant.get_property(r'${s60.release}'), 'currentRelease.xml': ant.get_property(r'${build.drive}') + "/currentRelease.xml"}
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    81
        config = configuration.Configuration(config_data)
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    82
        
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    83
        # let's only support the new spec model!
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    84
        bom = build.model.SynergyBOM(config, ccmproject, username=username, password=password, provider=provider)
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    85
        
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    86
        xml_writer = build.model.BOMXMLWriter(bom)
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    87
        xml_writer.write(bomfilename)
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    88
    if not bom and os.path.exists(bomfilename):
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    89
        config_data = {'prep.xml': ant.get_property(r'${prep.config.file.parsed}'), 'build.id': buildid, 'symbian_rel_week': ant.get_property(r'${symbian.version.week}'), 'symbian_rel_ver': ant.get_property(r'${symbian.version}'), 'symbian_rel_year': ant.get_property(r'${symbian.version.year}'), 's60_version': ant.get_property(r'${s60.version}'), 's60_release': ant.get_property(r'${s60.release}'), 'currentRelease.xml': ant.get_property(r'${build.drive}') + "/currentRelease.xml"}
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    90
        config = configuration.Configuration(config_data)
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    91
        bom = build.model.SimpleBOM(config, bomfilename)
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    92
    if os.path.exists(oldbom):
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    93
        xml_delta_writer = build.model.BOMDeltaXMLWriter(bom, oldbom)
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    94
        xml_delta_writer.write(buildlogdir + "/" + buildid + "_bom_delta.xml")
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    95
        delta_bom_content_validity = xml_delta_writer.validate_delta_bom_contents(buildlogdir + "/" + buildid + "_bom_delta.xml", bomfilename, oldbom)
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    96
        if((delta_bom_content_validity == False) and (ant.get_property(r'${hlm.enable.asserts}') is not None)):
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    97
            print 'Bom delta contents are not matching'
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    98
            raise Exception
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    99
        elif((delta_bom_content_validity == True) or (delta_bom_content_validity == None)):
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   100
            print 'Bom delta contents are matching.'
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   101
        elif(delta_bom_content_validity == False):
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   102
            print 'Bom delta contents are not matching.'
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   103
    else:
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   104
        print 'Old BOM log cannot be found ' + oldbom + ', skipping BOM delta creation.'
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   105
    if runccm:
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   106
        bom.close()
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   107
    if session:
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   108
        session.close()
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   109
except Exception, ex:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   110
    print 'Caught exception in BOM: ' + str(ex)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   111
    traceback.print_exc()
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   112
        </hlm:python>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   113
        <if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   114
            <available file="${build.log.dir}/${build.id}_bom.xml"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   115
            <then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   116
                <echo>${build.log.dir}</echo>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   117
                <xmltask source="${build.log.dir}/${build.id}_bom.xml" dest="${build.log.dir}/${build.id}_bom.xml" outputter="simple">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   118
                    <replace path="//bom/build/text()" withText="${build.id}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   119
                </xmltask>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   120
                <fmpp sourceRoot="${helium.dir}/tools/preparation/bom"
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   121
                      outputRoot="${prep.log.dir}" includes="bom.html.*,bom.txt.*" removeExtensions="ftl">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   122
                    <freemarkerLinks expandProperties="yes">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   123
                        macro: ${helium.dir}/tools/common/templates/macro
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   124
                    </freemarkerLinks>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   125
                    <data expandProperties="yes">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   126
                        doc: xml(${build.log.dir}/${build.id}_bom.xml)                
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   127
                    </data>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   128
                </fmpp>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   129
                
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   130
                <move file="${prep.log.dir}/bom.html" tofile="${build.log.dir}/${build.id}_bom.html"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   131
                <move file="${prep.log.dir}/bom.txt" tofile="${prep.log.dir}/${build.id}_bom.txt"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   132
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   133
                <!-- Transform bom data into the diamonds xml format: 
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   134
                     * BOM folders are flattened into tasks.
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   135
                     * Schema version is extracted from the appropriate FMPP template. -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   136
                <fmpp sourcefile="${helium.dir}/tools/common/templates/diamonds/diamonds_header.ftl" 
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   137
                      outputfile="${build.temp.dir}/diamonds_header.xml" quiet="true"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   138
                <loadfile srcfile="${build.temp.dir}/diamonds_header.xml" property="diamonds.schema.xml">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   139
                    <filterchain>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   140
                        <linecontains>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   141
                            <contains value="schema"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   142
                        </linecontains>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   143
                    </filterchain>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   144
                </loadfile>                
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   145
                <mkdir dir="${diamonds.build.output.dir}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   146
                <xmltask source="${build.log.dir}/${build.id}_bom.xml" dest="${diamonds.build.output.dir}/create-bom.xml">           
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   147
                    <insert path="bom/content" xml="${diamonds.schema.xml}" position="before"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   148
                    <remove path="bom/content/project/folder/name"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   149
                    <remove path="bom/build"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   150
                    <rename path="bom" to="diamonds-build"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   151
                </xmltask>                
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   152
                <delete file="${build.temp.dir}/diamonds_header.xml"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   153
                <replace file="${diamonds.build.output.dir}/create-bom.xml" token="&lt;folder&gt;" value="&lt;!-- &lt;folder&gt; --&gt;"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   154
                <replace file="${diamonds.build.output.dir}/create-bom.xml" token="&lt;/folder&gt;" value="&lt;!-- &lt;/folder&gt; --&gt;"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   155
                <xmltask source="${diamonds.build.output.dir}/create-bom.xml" dest="${diamonds.build.output.dir}/create-bom.xml"
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   156
                         outputter="simple">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   157
                    <remove path="//comment()"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   158
                </xmltask>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   159
             
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   160
                <hlm:assertFileExists file="${diamonds.build.output.dir}/create-bom.xml"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   161
                <hlm:assertFileExists file="${build.log.dir}/${build.id}_bom.html"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   162
                <hlm:assertFileExists file="${prep.log.dir}/${build.id}_bom.txt"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   163
                
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   164
                <runtarget target="collect-task-owner-email"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   165
            </then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   166
            <else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   167
                <echo>WARNING: ${build.log.dir}/${build.id}_bom.xml file not found.</echo>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   168
            </else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   169
        </if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   170
        
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   171
        <if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   172
            <available file="${old.bom.log}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   173
            <then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   174
                <hlm:assertFileExists file="${build.log.dir}/${build.id}_bom_delta.xml"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   175
                <fmpp sourceRoot="${helium.dir}/tools/preparation/bom"
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   176
                      outputRoot="${prep.log.dir}" includes="bom_delta.*" removeExtensions="ftl">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   177
                    <freemarkerLinks expandProperties="yes">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   178
                        macro: ${helium.dir}/tools/common/templates/macro
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   179
                    </freemarkerLinks>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   180
                    <data expandProperties="yes">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   181
                        doc: xml(${build.log.dir}/${build.id}_bom_delta.xml)                
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   182
                    </data>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   183
                </fmpp>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   184
                                
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   185
                <move file="${prep.log.dir}/bom_delta.html" tofile="${build.log.dir}/${build.id}_bom_delta.html"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   186
                <move file="${prep.log.dir}/bom_delta.txt" tofile="${prep.log.dir}/${build.id}_bom_delta.txt"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   187
                
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   188
                <hlm:assertFileExists file="${build.log.dir}/${build.id}_bom_delta.html"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   189
            </then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   190
        </if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   191
        <hlm:stopSpecificLogMacro name="${prep.log.dir}/${build.id}_bom.log" phase="prep"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   192
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   193
    
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   194
    <!-- Private: The target create-task-owner-email creates a property task.owners.email which will contain
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   195
    the list of task owners email IDs seperated by comma, the newly created property can be used thereafter
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   196
    to send emails.
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   197
    This target is automatically called by create-bom target -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   198
    <target name="collect-task-owner-email">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   199
        <if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   200
            <available file="${build.log.dir}/${build.id}_bom_delta.xml"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   201
            <then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   202
                <xmltask source="${build.log.dir}/${build.id}_bom_delta.xml" dest="${build.log.dir}/${build.id}_bom_delta.xml"> 
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   203
                    <call path="/bomDelta/content/task">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   204
                        <param name="task.delta" path="text()"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   205
                        <actions>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   206
                            <var name="task.delta" value="@{task.delta}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   207
                            <propertyregex property="delta.task.id" input="${task.delta}" regexp="^([^:]+):\s*" select="\1"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   208
                            <xmltask source="${build.log.dir}/${build.id}_bom.xml" dest="${build.log.dir}/${build.id}_bom.xml"> 
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   209
                                <call path="/bom/content/project/folder/task/owner/text()[../../id[.='${delta.task.id}']]" >
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   210
                                    <param name="task.owner" path="."/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   211
                                    <actions>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   212
                                        <var name="task.owner" value="@{task.owner}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   213
                                        <if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   214
                                            <and>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   215
                                                <isset property="task.owners"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   216
                                            </and>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   217
                                            <then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   218
                                                <var name="task.owners" value="${task.owners},${task.owner}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   219
                                            </then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   220
                                            <else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   221
                                                <var name="task.owners" value="${task.owner}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   222
                                            </else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   223
                                        </if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   224
                                    </actions>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   225
                                </call>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   226
                            </xmltask>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   227
                        </actions>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   228
                    </call>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   229
                </xmltask> 
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   230
            </then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   231
            <else>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   232
                <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   233
                    <available file="${build.log.dir}/${build.id}_bom.xml"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   234
                    <then>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   235
                        <xmltask source="${build.log.dir}/${build.id}_bom.xml" dest="${build.log.dir}/${build.id}_bom.xml"> 
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   236
                            <call path="/bom/content/project/folder/task/owner">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   237
                                <param name="task.owner" path="text()"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   238
                                <actions>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   239
                                    <var name="task.owner" value="@{task.owner}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   240
                                    <if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   241
                                        <and>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   242
                                            <isset property="task.owners"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   243
                                        </and>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   244
                                        <then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   245
                                            <var name="task.owners" value="${task.owners},${task.owner}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   246
                                        </then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   247
                                        <else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   248
                                            <var name="task.owners" value="${task.owner}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   249
                                        </else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   250
                                    </if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   251
                                </actions>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   252
                            </call>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   253
                        </xmltask> 
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   254
                    </then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   255
                </if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   256
            </else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   257
        </if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   258
        <sortlist property="task.owners" override="true" value="${task.owners}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   259
        <propertyregex property="task.owners" override="true" input="${task.owners}" regexp="([^,]+),.*\1" replace="\1" global='true'/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   260
        <for list="${task.owners}" delimiter="," param="task.owner" >
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   261
            <sequential>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   262
                <var name="task.owner" value="@{task.owner}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   263
                <hlm:ldap url="${email.ldap.server}" rootdn="${email.ldap.rootdn}" filter="uid=${task.owner}" outputproperty="task.owner.email" key="mail"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   264
                <if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   265
                    <and>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   266
                        <isset property="task.owners.email"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   267
                    </and>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   268
                    <then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   269
                        <var name="task.owners.email" value="${task.owners.email},${task.owner.email}"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   270
                    </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   271
                    <else>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   272
                        <var name="task.owners.email" value="${task.owner.email}"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   273
                    </else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   274
                </if>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   275
            </sequential>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   276
        </for>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   277
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   278
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   279
    <!-- Finds the path to the last usable XML BOM log for creating a BOM delta. --> 
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   280
    <target name="old-bom-log" unless="old.bom.log">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   281
        <property name="old.bom.log.publish.dir" value="${publish.dir}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   282
        <property name="bom.log" value="${old.bom.log.publish.dir}/logs/${build.id}_bom.xml"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   283
        <script language="jython" setbeans="false">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   284
import re
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   285
import ant
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   286
import os
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   287
from com.nokia.ant.util import Helper
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   288
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   289
previousbuildnumber = 1
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   290
buildnumber = Helper.getProperty(project, "build.number")
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   291
bomlog = project.getProperty("bom.log")
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   292
while(previousbuildnumber > 0 and previousbuildnumber != ''):
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   293
    previousbuildnumber = ant.get_previous_build_number(buildnumber)
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   294
    try:
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   295
        old_bom_log = re.sub(r'\.(%s)([\/_])' % project.getProperty("build.number"), r'.' + previousbuildnumber + r'\2', bomlog)
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   296
        if os.path.exists(old_bom_log):
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   297
            break
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   298
    except ValueError:
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   299
        self.log("Old BOM cannot be found")
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   300
    buildnumber = previousbuildnumber
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   301
project.setProperty("old.bom.log", old_bom_log)
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   302
        </script>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   303
        <echo>Previous BOM log: ${old.bom.log}</echo>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   304
        <available file="${old.bom.log}" property="old.bom.log.present"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   305
        <echo>Previous BOM log present: ${old.bom.log.present}</echo>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   306
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   307
    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   308
</project>