buildframework/helium/build.xml
changeset 587 85df38eb4012
parent 217 0f5e3a7fb6af
child 590 360bd6b35136
child 628 7c4a911dc066
equal deleted inserted replaced
217:0f5e3a7fb6af 587:85df38eb4012
    22 -->
    22 -->
    23 <project name="helium-build" default="help" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium"> 
    23 <project name="helium-build" default="help" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium"> 
    24     <description>
    24     <description>
    25         Helium targets to build helium itself.
    25         Helium targets to build helium itself.
    26     </description>
    26     </description>
       
    27     <property environment="env" />
    27     
    28     
    28     <import file="build-jar.ant.xml"/>
       
    29     <property name="build.drive" location="${env.TEMP}/helium/temp_drive"/>
    29     <property name="build.drive" location="${env.TEMP}/helium/temp_drive"/>
    30     <mkdir dir="${build.drive}/"/> 
    30     <mkdir dir="${build.drive}/"/> 
    31     
    31     
    32     <!-- @property helium.version
    32     <!--* @property helium.version
    33     @type string
    33     @type string
    34     @scope private -->
    34     @scope private -->
    35     <property file="${helium.dir}/config/version.txt"/>
    35     <property file="${helium.dir}/config/version.txt"/>
    36     <property name="release.label" value="${helium.version}"/>
    36     <property name="release.label" value="${helium.version}"/>
    37 
    37 
       
    38     <property name="doc.src.dir" location="${basedir}/doc/src" />
    38     <!-- Override docs targets to do more for Helium. -->
    39     <!-- Override docs targets to do more for Helium. -->
    39     <target name="apidocs" depends="python-apidocs,java-apidocs,antdoclet,internal.docs.apidocs"/>
    40     <target name="apidocs" depends="python-apidocs,internal.docs.apidocs"/>
    40     <!-- Generate rst files for docs -->
    41     <!-- Generate rst files for docs -->
    41     <target name="prep-textdocs" depends="overview-to-html,tools-rst-table,dependency-diagram,
    42     <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         dependency-logs,release-diff,helium-user-graph,internal.docs.prep-textdocs,helium-prep-textdocs"/>
    43     <!-- generate all the user documentation for helium -->
    44     <!-- generate all the user documentation for helium -->
    44     <target name="docs" depends="clean-doc-dir,database,apidocs,textdocs,add-policies-to-docs"/>
    45     <target name="docs" depends="clean-docs,database,apidocs,textdocs"/>
    45     
    46     
    46     <import file="helium.ant.xml"/>
    47     <import file="helium.ant.xml"/>
    47     <import file="tools/startup/antserver/antserver.ant.xml"/>
    48     <import file="tools/startup/antserver/antserver.ant.xml"/>
    48          
       
    49     
    49     
    50     
    50     <resources id="textdoc.paths">
    51     
    51         <path>
    52     <target name="must-property-comments">
    52             <pathelement path="${doc.src.dir}"/>
    53         <!--<xslt in="${data.model.file}" out="${data.model.parsed}" style="${data.model.xsl}"/>-->
    53             <pathelement path="${basedir}/extensions/nokia/doc/src"/>
    54         <for param="ant.file">
    54         </path>
    55             <fileset dir="${helium.dir}" includes="helium.ant.xml">
    55     </resources>
    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 
    56 
    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 + "&lt;!--* @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 + "--&gt;\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>
    57 </project>
    86 
    58