buildframework/helium/tools/common/common.ant.xml
changeset 628 7c4a911dc066
parent 588 c7c26511138f
child 645 b8d81fa19e7d
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
    65  Helium configuration
    65  Helium configuration
    66 -------------------------------------------
    66 -------------------------------------------
    67         </echo>
    67         </echo>
    68         <runtarget target="config"/>
    68         <runtarget target="config"/>
    69         <diagnostics/>
    69         <diagnostics/>
    70         <hlm:database/>
    70         <echo>
       
    71             
       
    72 Java properties
       
    73 ---------------
       
    74         </echo>
       
    75         <script language="beanshell">
       
    76             properties = System.getProperties();
       
    77             properties.list(System.out);
       
    78         </script>
    71     </target>
    79     </target>
    72     
    80     
    73     <!-- Sets the properties that are dependent on build.number -property. 
    81     <!-- Sets the properties that are dependent on build.number -property. 
    74     
    82     
    75     The properties are:
    83     The properties are:
   250             <then>
   258             <then>
   251                 <antcall target="database"/>
   259                 <antcall target="database"/>
   252             </then>
   260             </then>
   253         </if>
   261         </if>
   254         <if>
   262         <if>
   255             <isset property="help.target"/>
   263             <isset property="help.item"/>
   256             <then>
   264             <then>
   257                 <fmpp sourcefile="${helium.dir}/tools/common/templates/help_text.txt.ftl" outputfile="build/help_text.txt" quiet="true">
   265                 <fmpp sourcefile="${helium.dir}/tools/common/templates/help_text.txt.ftl" outputfile="build/help_text.txt" quiet="true">
   258                     <data expandProperties="yes">
   266                     <data expandProperties="yes">
   259                         xml: xml(${database.file})
   267                         xml: xml(${database.file})
   260                         helpTarget: ${help.target}
   268                         helpItem: ${help.item}
   261                     </data>
   269                     </data>
   262                 </fmpp>
   270                 </fmpp>
   263                 <loadfile srcfile="build/help_text.txt" property="help.text"/>
   271                 <loadfile srcfile="build/help_text.txt" property="help.text"/>
   264                 <echo>${help.text}</echo>                
   272                 <echo>${help.text}</echo>                
   265             </then>
   273             </then>
   331     
   339     
   332     <!-- Generates an Ant XML database file.
   340     <!-- Generates an Ant XML database file.
   333         
   341         
   334     This lists all the targets and information about them. -->
   342     This lists all the targets and information about them. -->
   335     <target name="database">
   343     <target name="database">
   336         <mkdir dir="${basedir}/build"/>
   344         <hlm:databaseMacro file="${database.file}" scope="private"/>
   337         <hlm:database output="${database.file}">
       
   338             <fileset dir="${helium.dir}">
       
   339                 <include name="config/signaling_config_default.ant.xml"/>
       
   340                 <include name="config/stages_config_default.ant.xml"/>
       
   341                 <include name="config/metadata_filter_config_default.ant.xml"/>
       
   342             </fileset>
       
   343         </hlm:database>
       
   344     </target>
   345     </target>
   345     
   346     
   346     
   347     
   347     <!-- Looks for lint-style issues with the Ant files in Helium, using the antlint task. -->
   348     <!-- Looks for lint-style issues with the Ant files in Helium, using the antlint task. -->
   348     <target name="antlint">
   349     <target name="antlint">
   360                 <exclude name="**/test/test_*.xml"/>
   361                 <exclude name="**/test/test_*.xml"/>
   361                 <exclude name="external/**"/>
   362                 <exclude name="external/**"/>
   362                 <exclude name="**/tests/data/**"/>
   363                 <exclude name="**/tests/data/**"/>
   363                 <exclude name="build/**"/>
   364                 <exclude name="build/**"/>
   364             </fileset>
   365             </fileset>
   365             <hlm:checkTabCharacter severity="error" enabled="true"/>
   366             <hlm:checkTabCharacter severity="error" />
   366             <hlm:checkPropertyName severity="warning" enabled="true" regexp="([a-z0-9[\\d\\_\\.\\@\\{\\}\\$]]*)" />
   367             <hlm:checkPropertyName severity="warning" regexp="([a-z0-9[\\d\\_\\.\\@\\{\\}\\$]]*)" />
   367             <hlm:checkTargetName severity="warning" enabled="true" regexp="([a-z0-9[\\d\\-]]*)" />
   368             <hlm:checkTargetName severity="warning" regexp="([a-z0-9[\\d\\-]]*)" />
   368             <hlm:checkIndentation severity="error" enabled="true"/>
   369             <hlm:checkIndentation severity="error" />
   369             <hlm:checkPresetDefMacroDefName severity="warning" enabled="true" regexp="([a-z0-9][a-zA-Z0-9]*)" />       
   370             <hlm:checkPresetDefMacroDefName severity="warning" regexp="([a-z0-9][a-zA-Z0-9]*)" />       
   370             <hlm:checkProjectName severity="warning" enabled="true" regexp="([a-z0-9[\\d\\.\\_\\-]]*)" />
   371             <hlm:checkProjectName severity="warning" regexp="([a-z0-9[\\d\\.\\_\\-]]*)" />
   371             <hlm:checkDescription severity="warning" enabled="true"/>
   372             <hlm:checkDescription severity="warning" />
   372             <hlm:checkFileName severity="warning" enabled="true" regexp="^build.xml$|ant.xml$|antlib.xml$" />
   373             <hlm:checkFileName severity="warning" regexp="^build.xml$|ant.xml$|antlib.xml$" />
   373             <hlm:checkRunTarget severity="warning" enabled="true"/>
   374             <hlm:checkRunTarget severity="warning" />
   374             <hlm:checkAntCall severity="warning" enabled="true"/>
   375             <hlm:checkAntCall severity="warning" />
   375             <hlm:checkScriptSize severity="warning" enabled="true"/>
   376             <hlm:checkScriptSize severity="warning" />
   376             <hlm:checkUseOfIfInTargets severity="warning" enabled="true"/>
   377             <hlm:checkUseOfIfInTargets severity="warning" />
   377             <hlm:checkJythonScript severity="error" enabled="true" outputDir="${helium.build.dir}/jep"/>
   378             <hlm:checkJythonScript severity="error" outputDir="${helium.build.dir}/jep"/>
   378             <hlm:checkScriptCondition severity="warning" enabled="true" outputDir="${helium.build.dir}/scriptcondition"/>
   379             <hlm:checkScriptCondition severity="warning" outputDir="${helium.build.dir}/scriptcondition"/>
   379             <hlm:checkPythonTasks severity="warning" enabled="true" outputDir="${helium.build.dir}/python"/>
   380             <hlm:checkPythonTasks severity="warning" outputDir="${helium.build.dir}/python"/>
   380             <hlm:checkUseOfEqualsTask severity="warning" enabled="true"/>
   381             <hlm:checkUseOfEqualsTask severity="warning" />
   381             <hlm:checkScriptDefNameAttributes severity="error" enabled="true"/>
   382             <hlm:checkScriptDefNameAttributes severity="error" />
   382             <hlm:checkScriptDefStyle severity="warning" enabled="true"/>
   383             <hlm:checkScriptDefStyle severity="warning" />
   383             <hlm:checkScriptDef severity="error" enabled="true" outputDir="${helium.build.dir}/beanshell"/>
   384             <hlm:checkScriptDef severity="error" outputDir="${helium.build.dir}/beanshell"/>
   384             <hlm:checkDuplicateNames severity="warning" enabled="true"/>
   385             <hlm:checkDuplicateNames severity="warning" />
       
   386             <hlm:checkTryCatchBlock severity="warning" />
   385             
   387             
   386             <!-- Reporters -->
   388             <!-- Reporters -->
   387             <hlm:antlintCheckstyleReporter file="${helium.build.dir}/report/antlint/antlint_report.xml" />
   389             <hlm:antlintCheckstyleReporter file="${helium.build.dir}/report/antlint/antlint_report.xml" />
   388             <hlm:antlintConsoleReporter />            
   390             <hlm:antlintConsoleReporter />            
   389         </hlm:antlint>
   391         </hlm:antlint>
   390         <fileset id="jep.files" dir="${helium.build.dir}">
   392         <fileset id="jep.files" dir="${helium.build.dir}">
   391             <include name="jep/**/*.py"/>
   393             <include name="jep/**/*.py"/>
   392             <include name="python/**/*.py"/>
   394             <include name="python/**/*.py"/>
   393         </fileset>
   395         </fileset>
   394         <antcall target="pylint" inheritRefs="true">
   396         <!--<antcall target="pylint" inheritRefs="true">
   395             <reference refid="jep.files" torefid="python.files" />
   397             <reference refid="jep.files" torefid="python.files" />
   396         </antcall>
   398         </antcall>-->
   397         <cs:checkstyle config="builder/java/config/java_checkstyle_config.xml">
   399         <cs:checkstyle config="builder/java/config/java_checkstyle_config.xml">
   398             <fileset dir="${helium.build.dir}/beanshell" includes="**/*.java"/>
   400             <fileset dir="${helium.build.dir}/beanshell" includes="**/*.java"/>
   399             <formatter type="plain"/>
   401             <formatter type="plain"/>
   400         </cs:checkstyle>
   402         </cs:checkstyle>
   401         
   403         
   446     <!-- Macro test target. -->
   448     <!-- Macro test target. -->
   447     <target name="macro-test">
   449     <target name="macro-test">
   448         <hlm:fooMacro/>
   450         <hlm:fooMacro/>
   449     </target>
   451     </target>
   450 
   452 
       
   453    <!--* @property hlm.final.target
       
   454    This property defines a target that will be run after build completion, whatever the 
       
   455    status of the build is.   
       
   456    @type string
       
   457    @scope public
       
   458    @since 10.0
       
   459    -->
       
   460 
   451 </project>
   461 </project>
   452     
   462     
   453 
   463 
   454 
   464 
   455 
   465