buildframework/helium/tools/metadata/metadata.ant.xml
author wbernard
Fri, 13 Aug 2010 14:59:05 +0300
changeset 628 7c4a911dc066
parent 587 85df38eb4012
permissions -rw-r--r--
helium_11.0.0-e00f171ca185

<?xml version="1.0" encoding="UTF-8"?>
<!-- 
============================================================================ 
Name        : metadata.ant.xml 
Part of     : Helium 

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

Initial Contributors:
Nokia Corporation - initial contribution.

Contributors:

Description:

============================================================================
-->
<!--* @package framework -->
<project name="metadata" xmlns:hlm="http://www.nokia.com/helium">
    <description>
    Metadata related ant macros and targets
    </description>

    <macrodef name="generateBuildStatus" uri="http://www.nokia.com/helium">
        <attribute name="output-dir" default="${build.signal.status.dir}"/>
        <attribute name="dbfile" default="${metadata.dbfile}" />
        <attribute name="file" />
        <sequential>
            <mkdir dir="@{output-dir}" />
            <var name="email.status.template" value="${build.status.email.template}" />
            <var name="generate.build.status.file.basename" unset="true" />
            <basename property="generate.build.status.file.basename" file="@{file}" />
            <fmpp sourceFile="${helium.dir}/tools/common/templates/log/build_status_orm.xml.ftl"
                         outputfile="@{output-dir}/${generate.build.status.file.basename}.status.xml">
                <freemarkerLinks expandProperties="yes">
                    macro: ${helium.dir}/tools/common/templates/macro
                </freemarkerLinks>
                <data expandProperties="yes">
                    dbPath: @{dbfile}
                    logpath: @{file}
                    ant: antProperties()
                </data>
            </fmpp>
            <fmpp sourceFile="${build.status.email.template}"
                         outputfile="@{output-dir}/${generate.build.status.file.basename}.status.html">
                <freemarkerLinks expandProperties="yes">
                    macro: ${helium.dir}/tools/common/templates/macro
                </freemarkerLinks>
                <data expandProperties="yes">
                    dbPath: @{dbfile}
                    logpath: @{file}
                    ant: antProperties()
                </data>
            </fmpp>
            <hlm:assertFileExists file="@{output-dir}/${generate.build.status.file.basename}.status.xml" />
            <hlm:assertFileExists file="@{output-dir}/${generate.build.status.file.basename}.status.html" />
        </sequential>
    </macrodef>
</project>