buildframework/helium/build.xml
author wbernard
Thu, 04 Mar 2010 15:10:37 +0200
changeset 217 0f5e3a7fb6af
parent 179 d8ac696cc51f
child 587 85df38eb4012
permissions -rw-r--r--
helium_8.0-r15308
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        : build.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="helium-build" default="help" xmlns:au="org.apache.ant.antunit" 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
        Helium targets to build helium itself.
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
    
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    28
    <import file="build-jar.ant.xml"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    29
    <property name="build.drive" location="${env.TEMP}/helium/temp_drive"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    30
    <mkdir dir="${build.drive}/"/> 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    31
    
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    32
    <!-- @property helium.version
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    33
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    34
    @scope private -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    35
    <property file="${helium.dir}/config/version.txt"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    36
    <property name="release.label" value="${helium.version}"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    37
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    38
    <!-- Override docs targets to do more for Helium. -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    39
    <target name="apidocs" depends="python-apidocs,java-apidocs,antdoclet,internal.docs.apidocs"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    40
    <!-- Generate rst files for docs -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    41
    <target name="prep-textdocs" depends="overview-to-html,tools-rst-table,dependency-diagram,
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    42
        dependency-logs,release-diff,helium-user-graph,helium-prep-textdocs,internal.docs.prep-textdocs"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    43
    <!-- generate all the user documentation for helium -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    44
    <target name="docs" depends="clean-doc-dir,database,apidocs,textdocs,add-policies-to-docs"/>
1
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
    <import file="helium.ant.xml"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    47
    <import file="tools/startup/antserver/antserver.ant.xml"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    48
         
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    49
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    50
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    51
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    52
    <target name="must-property-comments">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    53
        <!--<xslt in="${data.model.file}" out="${data.model.parsed}" style="${data.model.xsl}"/>-->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    54
        <for param="ant.file">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    55
            <fileset dir="${helium.dir}" includes="helium.ant.xml">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    56
            </fileset>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    57
            <sequential>     
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    58
                <script language="jython">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    59
import re
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    60
import java.io
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    61
import org.dom4j
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    62
import org.dom4j.io
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    63
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    64
model = org.dom4j.io.SAXReader().read(java.io.File(project.getProperty("helium.dir") + '/build/datamodel.out'))
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    65
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    66
user_props = model.selectNodes('//property[editStatus="must"]')
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    67
indent = '    '
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    68
out = open('required_properties.txt', 'w')
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    69
for prop in user_props:
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    70
#    print prop
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    71
    property_comment = indent + "&lt;!--* @property " + prop.elementTextTrim('name') + "\n"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    72
    property_comment += indent + prop.elementTextTrim('description') + "\n"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    73
    property_comment += indent + "@type " + prop.elementTextTrim('type') + "\n"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    74
    property_comment += indent + "@editable required\n"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    75
    property_comment += indent + "@scope public\n"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    76
    property_comment += indent + "--&gt;\n\n"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    77
    print property_comment
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    78
    out.write(property_comment)
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    79
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    80
out.close()
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    81
                </script>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    82
            </sequential>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    83
        </for>                               
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    84
    </target>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    85
</project>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    86