|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- |
|
3 ============================================================================ |
|
4 Name : build.xml |
|
5 Part of : Helium |
|
6 |
|
7 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
8 All rights reserved. |
|
9 This component and the accompanying materials are made available |
|
10 under the terms of the License "Eclipse Public License v1.0" |
|
11 which accompanies this distribution, and is available |
|
12 at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
13 |
|
14 Initial Contributors: |
|
15 Nokia Corporation - initial contribution. |
|
16 |
|
17 Contributors: |
|
18 |
|
19 Description: |
|
20 |
|
21 ============================================================================ |
|
22 --> |
|
23 <project name="helium-build" default="help" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium"> |
|
24 <description> |
|
25 Helium targets to build helium itself. |
|
26 </description> |
|
27 |
|
28 <import file="build-jar.ant.xml"/> |
|
29 <property name="build.drive" location="${env.TEMP}/helium/temp_drive"/> |
|
30 <mkdir dir="${build.drive}/"/> |
|
31 |
|
32 <!-- @property helium.version |
|
33 @type string |
|
34 @scope private --> |
|
35 <property file="${helium.dir}/config/version.txt"/> |
|
36 <property name="release.label" value="${helium.version}"/> |
|
37 |
|
38 <!-- Override docs targets to do more for Helium. --> |
|
39 <target name="apidocs" depends="python-apidocs,java-apidocs,antdoclet,internal.docs.apidocs"/> |
|
40 <!-- Generate rst files for docs --> |
|
41 <target name="prep-textdocs" depends="overview-to-html,tools-rst-table,dependency-diagram, |
|
42 dependency-logs,release-diff,helium-user-graph,helium-prep-textdocs,internal.docs.prep-textdocs"/> |
|
43 <!-- generate all the user documentation for helium --> |
|
44 <target name="docs" depends="clean-doc-dir,database,apidocs,textdocs,add-policies-to-docs"/> |
|
45 |
|
46 <import file="helium.ant.xml"/> |
|
47 <import file="tools/startup/antserver/antserver.ant.xml"/> |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 <target name="must-property-comments"> |
|
53 <!--<xslt in="${data.model.file}" out="${data.model.parsed}" style="${data.model.xsl}"/>--> |
|
54 <for param="ant.file"> |
|
55 <fileset dir="${helium.dir}" includes="helium.ant.xml"> |
|
56 </fileset> |
|
57 <sequential> |
|
58 <script language="jython"> |
|
59 import re |
|
60 import java.io |
|
61 import org.dom4j |
|
62 import org.dom4j.io |
|
63 |
|
64 model = org.dom4j.io.SAXReader().read(java.io.File(project.getProperty("helium.dir") + '/build/datamodel.out')) |
|
65 |
|
66 user_props = model.selectNodes('//property[editStatus="must"]') |
|
67 indent = ' ' |
|
68 out = open('required_properties.txt', 'w') |
|
69 for prop in user_props: |
|
70 # print prop |
|
71 property_comment = indent + "<!--* @property " + prop.elementTextTrim('name') + "\n" |
|
72 property_comment += indent + prop.elementTextTrim('description') + "\n" |
|
73 property_comment += indent + "@type " + prop.elementTextTrim('type') + "\n" |
|
74 property_comment += indent + "@editable required\n" |
|
75 property_comment += indent + "@scope public\n" |
|
76 property_comment += indent + "-->\n\n" |
|
77 print property_comment |
|
78 out.write(property_comment) |
|
79 |
|
80 out.close() |
|
81 </script> |
|
82 </sequential> |
|
83 </for> |
|
84 </target> |
|
85 </project> |
|
86 |