buildframework/helium/tools/blocks/blocks.ant.xml
author jascui
Wed, 17 Nov 2010 13:27:16 +0800
changeset 686 3e502c8c584c
parent 645 b8d81fa19e7d
permissions -rw-r--r--
Update release information and product version.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
645
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     2
<!-- 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     3
============================================================================ 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     4
Name        : blocks.ant.xml 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     5
Part of     : Helium 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     6
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     8
All rights reserved.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     9
This component and the accompanying materials are made available
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    11
which accompanies this distribution, and is available
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    13
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    14
Initial Contributors:
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    16
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    17
Contributors:
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    18
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    19
Description:
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    20
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    21
============================================================================
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    22
-->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    23
<!--* @package preparation -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    24
<project name="blocks" xmlns:hlm="http://www.nokia.com/helium">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    25
    <description>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    26
        Blocks integration.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    27
    </description>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    28
        
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    29
    <!-- The directory where the blocks configuration will be generated.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    30
    @type string
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    31
    -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    32
    <property name="blocks.config.dir" location="${build.output.dir}/blocks/config" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    33
    <!-- The directory where the bundles will be generated.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    34
    @type string
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    35
    -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    36
    <property name="blocks.bundle.dir" location="${build.output.dir}/blocks/bundles" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    37
    <!-- The directory where the blocks metadata will be generated.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    38
    @type string
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    39
    -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    40
    <property name="blocks.metadata.dir" location="${build.output.dir}/blocks/metadata" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    41
    <!-- Name of the writer to use while creating bundles.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    42
    @type string
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    43
    -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    44
    <property name="blocks.writer" value="deb" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    45
    <!-- Number of workers to use while creating the bundles.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    46
    @type string
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    47
    -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    48
    <property name="blocks.workers" value="4" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    49
    <!-- Location of the blocks log.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    50
    @type string
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    51
    -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    52
    <property name="blocks.log.dir" location="${build.output.dir}/blocks/logs" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    53
    <!-- File extension of the blocks log.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    54
    @type string
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    55
    -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    56
    <property name="blocks.log.extension" value="blocks.log" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    57
    <!-- Boolean attribute for the packager application to support generation of packages with inter-dependency. 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    58
    @type boolean
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    59
    @scope public
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    60
    @deprecated Since 11.0
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    61
    -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    62
    <property name="blocks.interdeps.generation" value="false" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    63
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    64
    <!-- Boolean attribute for the packager application to support generation of packages with inter-dependency. 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    65
    @type boolean
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    66
    @scope public
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    67
    -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    68
    <property name="blocks.interdeps.generation.enabled" value="false" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    69
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    70
    <!--* @property internal.blocks.interdeps.generation.enabled
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    71
    Internal property set if blocks.interdeps.generation.enabled set to true. 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    72
    @type boolean
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    73
    @scope private
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    74
    @since 11.0
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    75
    -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    76
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    77
    <!--* @property blocks.enabled
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    78
    Set to true to enable blocks.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    79
    @type boolean
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    80
    @editable required
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    81
    @scope public
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    82
    @since 11.0
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    83
    -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    84
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    85
    <!--* @property internal.blocks.enabled
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    86
    Internal property to run the targets if blocks.enabled property is set to true.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    87
    @type boolean
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    88
    @scope private
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    89
    -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    90
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    91
    <!-- Check, is blocks enabled -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    92
    <condition property="internal.blocks.enabled">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    93
        <istrue value="${blocks.enabled}"/>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    94
    </condition>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    95
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    96
    <hlm:metadatafilterset id="filterset.blocks.archiving">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    97
        <metadatafilter priority="error" regex="^ERROR:.*" description="" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    98
        <metadatafilter priority="warning" regex="^WARNING:.*" description="" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    99
    </hlm:metadatafilterset>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   100
        
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   101
    <!--
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   102
        This target will run the packager application using all configurations
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   103
        generated during the build under blocks.config.dir.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   104
     -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   105
    <target name="blocks-create-bundles" if="internal.blocks.enabled">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   106
        <mkdir dir="${blocks.config.dir}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   107
        <mkdir dir="${blocks.bundle.dir}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   108
        <mkdir dir="${blocks.metadata.dir}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   109
        <mkdir dir="${blocks.log.dir}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   110
        
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   111
        <condition property="arg.blocks.target.rules" value="--targetRules=${blocks.target.rules}" else="">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   112
            <isset property="blocks.target.rules" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   113
        </condition>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   114
        
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   115
        <condition property="arg.blocks.source.rules" value="--sourceRules=${blocks.source.rules}" else="">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   116
            <isset property="blocks.source.rules" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   117
        </condition>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   118
        
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   119
        <condition property="arg.blocks.package.directives" value="--pkgDirectives=${blocks.package.directives}" else="">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   120
            <isset property="blocks.package.directives" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   121
        </condition>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   122
        
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   123
        <condition property="internal.blocks.interdeps.generation.enabled" value="true" else="false">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   124
            <or>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   125
                <istrue value="${blocks.interdeps.generation.enabled}"/>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   126
                <istrue value="${blocks.interdeps.generation}"/>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   127
            </or>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   128
        </condition>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   129
        
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   130
        <exec executable="python" failonerror="false" output="${blocks.log.dir}/${build.id}_blocks_archiving.${blocks.log.extension}">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   131
            <arg value="-m"/>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   132
            <arg value="packager.cli"/>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   133
            <arg value="--epocroot=${build.drive}/" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   134
            <arg value="--config=${blocks.config.dir}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   135
            <arg value="--outputdir=${blocks.bundle.dir}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   136
            <arg value="--metadatadir=${blocks.metadata.dir}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   137
            <arg value="--workers=${blocks.workers}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   138
            <arg value="--writer=${blocks.writer}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   139
            <arg line="${arg.blocks.target.rules}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   140
            <arg line="${arg.blocks.source.rules}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   141
            <arg line="${arg.blocks.package.directives}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   142
            <arg value="--createBundle" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   143
            <arg value="--debug" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   144
            <arg value="--interdeps=${internal.blocks.interdeps.generation.enabled}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   145
        </exec>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   146
        <hlm:metadatarecord database="${metadata.dbfile}">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   147
            <hlm:textmetadatainput>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   148
                <fileset casesensitive="false" file= "${blocks.log.dir}/${build.id}_blocks_archiving.${blocks.log.extension}"/>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   149
                <metadatafilterset refid="filterset.blocks.archiving" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   150
            </hlm:textmetadatainput>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   151
        </hlm:metadatarecord>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   152
        <hlm:blocksCreateRepositoryIndex dest="${blocks.bundle.dir}" verbose="true" failonerror="false" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   153
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   154
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   155
    <!--* @property blocks.workspace.id
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   156
     The blocks.workspace.id gets defined by the blocks-create-workspace target while reusing or
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   157
      creating a new workspace.     
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   158
     @scope public
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   159
     @since 12.0.0
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   160
     -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   161
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   162
    <!--
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   163
     The blocks-create-workspace will try to reuse existing workspace mapped on "${build.drive}/", or
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   164
     create a new one if none exists.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   165
     
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   166
     If a new workspace is created then repositories from blocks.repositories.id blocksRespositorySet
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   167
     will be added to the newly created workspace.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   168
     
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   169
     @scope public
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   170
     @since 12.0.0
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   171
     -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   172
    <target name="blocks-create-workspace" if="internal.blocks.enabled">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   173
        <if>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   174
            <hlm:blocksWorkspaceExists dir="${build.drive}/" verbose="true" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   175
            <then>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   176
                <echo>Reusing current workspace.</echo>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   177
                <hlm:blocksGetWorkspaceId wsidoutput="blocks.workspace.id" dir="${build.drive}/" verbose="true" /> 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   178
            </then>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   179
            <else>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   180
                <echo>Creating new workspace under ${build.drive}${file.separator}.</echo>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   181
                <hlm:blocksAddWorkspace name="${build.family}" dir="${build.drive}/" wsidproperty="blocks.workspace.id"  verbose="true" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   182
                <if>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   183
                    <and>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   184
                        <not>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   185
                            <hlm:blocksRepositoryExists wsid="${blocks.workspace.id}" verbose="true"/>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   186
                        </not>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   187
                        <isreference refid="blocks.repositories.id" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   188
                    </and>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   189
                    <then>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   190
                        <echo>Creating new repsoitory for workspace ID ${blocks.workspace.id}.</echo>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   191
                        <hlm:blocksAddRepository wsid="${blocks.workspace.id}">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   192
                            <repositorySet refid="blocks.repositories.id" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   193
                        </hlm:blocksAddRepository>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   194
                    </then>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   195
                    <else>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   196
                        <echo level="warning">'blocks.repositories.id' reference doesn't exist/repository already exists.</echo>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   197
                    </else>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   198
                </if>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   199
            </else>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   200
        </if>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   201
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   202
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   203
    <!--
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   204
     The blocks-install-bundles will install bundles on the workspace under build.drive.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   205
     @scope public
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   206
     @since 12.0.0
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   207
     -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   208
    <target name="blocks-install-bundles" if="internal.blocks.enabled" depends="blocks-create-workspace">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   209
        <if>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   210
            <isreference refid="blocks.bundle.filters.id" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   211
            <then>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   212
                <hlm:blocksInstallBundle wsid="${blocks.workspace.id}" verbose="true">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   213
                    <hlm:bundleFilterSet refid="blocks.bundle.filters.id" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   214
                </hlm:blocksInstallBundle>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   215
            </then>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   216
            <else>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   217
                <echo level="warning">Nothing to do, blocks.bundle.filters.id reference doesn't exist.</echo>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   218
            </else>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   219
        </if>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   220
        <if>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   221
            <isreference refid="blocks.group.filters.id" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   222
            <then>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   223
                <hlm:blocksInstallBundle wsid="${blocks.workspace.id}" verbose="true">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   224
                    <hlm:groupFilterSet refid="blocks.group.filters.id" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   225
                </hlm:blocksInstallBundle>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   226
            </then>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   227
            <else>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   228
                <echo level="warning">Nothing to do, blocks.group.filters.id reference doesn't exist.</echo>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   229
            </else>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   230
        </if>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   231
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   232
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   233
    <!--
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   234
     The blocks-update-bundles will update the workspace under build.drive.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   235
     @scope public
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   236
     @since 12.0.0
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   237
     -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   238
    <target name="blocks-update-bundles" if="internal.blocks.enabled" depends="blocks-create-workspace">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   239
        <hlm:blocksUpdate wsid="${blocks.workspace.id}" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   240
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   241
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   242
    <!--
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   243
     The blocks-add-repo will update the current workspace using repositories defined by the
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   244
     blocks.repositories.id reference.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   245
     
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   246
     @scope public
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   247
     @since 12.0.0
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   248
     -->
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   249
    <target name="blocks-add-repo" if="internal.blocks.enabled" depends="blocks-create-workspace">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   250
        <if>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   251
            <and>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   252
                <not>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   253
                    <hlm:blocksRepositoryExists wsid="${blocks.workspace.id}" verbose="true"/>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   254
                </not>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   255
                <isreference refid="blocks.repositories.id" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   256
            </and>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   257
            <then>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   258
                <hlm:blocksAddRepository wsid="${blocks.workspace.id}">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   259
                    <repositorySet refid="blocks.repositories.id" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   260
                </hlm:blocksAddRepository>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   261
            </then>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   262
            <else>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   263
                <echo level="warning">'blocks.repositories.id' reference doesn't exist/repository already exists.</echo>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   264
            </else>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   265
        </if>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   266
    </target>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   267
</project>