Merge
authorZheng Shen <zheng.shen@nokia.com>
Wed, 13 Oct 2010 16:31:27 +0800
changeset 648 d5a8d436d33b
parent 647 53d1ab72f5bc (current diff)
parent 645 b8d81fa19e7d (diff)
child 649 02d78c9f018e
Merge
buildframework/helium/config/logging.conf.ftl
buildframework/helium/doc/src/manual/stage_ats.rst.inc.ftl
buildframework/helium/doc/src/manual/stage_final.rst.inc.ftl
buildframework/helium/doc/src/manual/stage_matti.rst.inc.ftl
buildframework/helium/sf/doc/src/index.rst
buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/taskdefs/AntConfigLintTask.java
buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/types/AntLintCheck.java
buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/types/LintIssue.java
buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/types/PropertyNameCheck.java
buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/types/WrongTypePropertyCheck.java
buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/AntLintHandler.java
buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckPythonTasks.java
buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptDef.java
buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptDefNameAttributes.java
buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/AllTargetDiamondsListener.java
buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsClient.java
buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsExceptionStatusUpdate.java
buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsListenerImpl.java
buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsPostBuildStatusUpdate.java
buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/StageDiamondsListener.java
buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/TargetDiamondsListener.java
buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/ant/HeliumListener.java
buildframework/helium/sf/java/legacy/src/com/nokia/ant/BuildStatusDef.java
buildframework/helium/sf/java/legacy/src/com/nokia/ant/Database.java
buildframework/helium/sf/java/legacy/src/com/nokia/ant/HeliumLogger.java
buildframework/helium/sf/java/legacy/src/com/nokia/ant/HelpDef.java
buildframework/helium/sf/java/legacy/src/com/nokia/ant/Signal.java
buildframework/helium/sf/java/legacy/src/com/nokia/ant/helium.antlib.xml
buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/StopLogToConsoleTask.java
buildframework/helium/sf/java/legacy/tests/antunit/run-scenario.ant.xml
buildframework/helium/sf/java/legacy/tests/antunit/test_feature_enabled_flags.ant.xml
buildframework/helium/sf/java/legacy/tests/scenarii/bld.sh
buildframework/helium/sf/java/legacy/tests/scenarii/build.bat
buildframework/helium/sf/java/legacy/tests/scenarii/property/feature.ant.xml
buildframework/helium/sf/java/legacy/tests/scenarii/test/build.xml
buildframework/helium/sf/java/legacy/tests/src/com/nokia/ant/HeliumLoggerTest.java
buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/Handler.java
buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/StatusAndLogListener.java
buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/StageLogging.java
buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/Notifier.java
buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/SignalExceptionMessage.java
buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/SignalNeverFailMessage.java
buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/SignalStatus.java
buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/SignalStatusList.java
buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/SignalList.java
buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/SMSNotifier.java
buildframework/helium/sf/java/signaling/src/templates/email.html.ftl
buildframework/helium/sf/java/signaling/src/templates/email_default.html.ftl
buildframework/helium/sf/java/signaling/src/templates/email_subject.txt.ftl
buildframework/helium/sf/java/signaling/tests/antunit/signaling_test.ant.xml
buildframework/helium/sf/python/pythoncore/lib/ats3/matti/MattiDrops.py
buildframework/helium/sf/python/pythoncore/lib/ats3/matti/__init__.py
buildframework/helium/sf/python/pythoncore/lib/ats3/matti/template/matti_demo.xml
buildframework/helium/sf/python/pythoncore/lib/ats3/matti2.py
buildframework/helium/sf/python/pythoncore/lib/ats3/matti_template.xml
buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_matti.py
buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_matti2.py
buildframework/helium/sf/python/pythoncore/tests/data/matti/matti_template.xml
buildframework/helium/sf/python/pythoncore/tests/data/matti/test.rb
buildframework/helium/sf/python/pythoncore/tests/data/matti/test_all_present.xml
buildframework/helium/sf/python/pythoncore/tests/data/matti/test_all_present_sierra_disabled.xml
buildframework/helium/tools/common/templates/codescanner/codescanner.ant.xml.ftl
buildframework/helium/tools/common/templates/codescanner/codescanner.mk.ftl
buildframework/helium/tools/common/templates/coverity/coverity.summary.html.ftl
buildframework/helium/tools/common/templates/coverity/coverity.summary.xml.ftl
buildframework/helium/tools/common/templates/db2xml.xml.ftl
buildframework/helium/tools/common/templates/ido/ido-ant-copy.xml.ftl
buildframework/helium/tools/common/templates/ido/ido-cenrep-gen.xml.ftl
buildframework/helium/tools/common/templates/ido/ido-cmt-ant.xml.ftl
buildframework/helium/tools/common/templates/ido/ido-confml-validate.ant.xml.ftl
buildframework/helium/tools/common/templates/ido/ido-export.ant.xml.ftl
buildframework/helium/tools/common/templates/ido/ido-robot-zip.ant.xml.ftl
buildframework/helium/tools/common/templates/ido/ready.txt.ftl
buildframework/helium/tools/common/templates/ido/task-publish.ant.xml.ftl
buildframework/helium/tools/common/templates/ido/zip-ant-wa-copy.xml.ftl
buildframework/helium/tools/common/templates/integration/build-duplicates.html.ftl
buildframework/helium/tools/common/templates/integration/internal-exports.html.ftl
buildframework/helium/tools/common/templates/integration/validate-policy.log.ftl
buildframework/helium/tools/common/templates/integration/validate-policy.log.xml.ftl
buildframework/helium/tools/common/templates/quality/cone-validate.xml.ftl
buildframework/helium/tools/preparation/bom/bom.html.ftl
buildframework/helium/tools/preparation/bom/bom.txt.ftl
buildframework/helium/tools/preparation/bom/bom_delta.html.ftl
buildframework/helium/tools/preparation/bom/bom_delta.txt.ftl
buildframework/helium/tools/quality/compatibility_analyser/ca_config_template.txt
sbsv2/raptor/util/ext/gccxml.tar.gz
sbsv2/raptor/util/gccxml.mk
--- a/buildframework/helium/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -1,70 +1,80 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-============================================================================ 
-Name        : build.xml 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
--->
-<project name="helium-build" default="help" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium"> 
-    <description>
-        Helium targets to build helium itself.
-    </description>
-    <property environment="env" />
-    
-    <property name="build.drive" location="${env.TEMP}/helium/temp_drive"/>
-    <mkdir dir="${build.drive}/"/> 
-    
-    <!--* @property helium.version
-    @type string
-    @scope private -->
-    <property file="${helium.dir}/config/version.txt"/>
-    <property name="release.label" value="${helium.version}"/>
-
-    <property name="doc.src.dir" location="${basedir}/doc/src" />
-    <!-- Override docs targets to do more for Helium. -->
-    <target name="apidocs" depends="internal.docs.apidocs"/>
-    <!-- Generate rst files for docs -->
-    <target name="prep-textdocs" depends="overview-to-html,dependency-diagram,
-        dependency-logs,release-diff,helium-user-graph,internal.docs.prep-textdocs,helium-prep-textdocs"/>
-    <!-- generate all the user documentation for helium -->
-    <target name="docs" depends="clean-docs,docs-database,apidocs,textdocs"/>
-    
-    <!-- Generates an Ant XML database file showing only public content.
-    @scope private    
-    -->
-    <target name="docs-database">
-        <hlm:databaseMacro file="${public.database.file}" scope="public"/>
-    </target>
-    
-    <import file="helium.ant.xml"/>
-    <import file="tools/startup/antserver/antserver.ant.xml"/>
-    
-    <if>
-        <isset property="nokia.dir"/>
-        <then>
-            <resources id="textdoc.paths">
-                <path>
-                    <pathelement path="${doc.src.dir}"/>
-                    <pathelement path="${basedir}/extensions/nokia/doc/src"/>
-                </path>
-            </resources>
-        </then>
-    </if>
-
-</project>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : build.xml 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="helium-build" default="help" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium"> 
+    <description>
+        Helium targets to build helium itself.
+    </description>
+    <property environment="env" />
+    
+    <property name="build.drive" location="${env.TEMP}/helium/temp_drive"/>
+    <mkdir dir="${build.drive}/"/> 
+    
+    <!--* @property helium.version
+    @type string
+    @scope private -->
+    <property file="${helium.dir}/config/version.txt"/>
+    <property name="release.label" value="${helium.version}"/>
+
+    <property name="doc.src.dir" location="${basedir}/doc/src" />
+    <!-- Override docs targets to do more for Helium. -->
+    <target name="apidocs" depends="internal.docs.apidocs"/>
+    <!-- Generate rst files for docs -->
+    <target name="prep-textdocs">
+        <parallel>
+            <antcall target="overview-to-html"/>
+            <antcall target="dependency-diagram"/>
+            <antcall target="dependency-logs"/>
+            <antcall target="release-diff"/>
+            <antcall target="helium-user-graph"/>
+        </parallel>
+        <antcall target="internal.docs.prep-textdocs"/>
+        <antcall target="helium-prep-textdocs"/>
+    </target>
+    
+    <!-- generate all the user documentation for helium -->
+    <target name="docs" depends="clean-docs,docs-database,apidocs,textdocs,docs-check-links"/>
+    
+    <!-- Generates an Ant XML database file showing only public content.
+    @scope private    
+    -->
+    <target name="docs-database">
+        <hlm:databaseMacro file="${public.database.file}" scope="public"/>
+    </target>
+    
+    <import file="helium.ant.xml"/>
+    <import file="tools/startup/antserver/antserver.ant.xml"/>
+    
+    <if>
+        <isset property="nokia.dir"/>
+        <then>
+            <resources id="textdoc.paths">
+                <path>
+                    <pathelement path="${doc.src.dir}"/>
+                    <pathelement path="${basedir}/extensions/nokia/doc/src"/>
+                </path>
+            </resources>
+        </then>
+    </if>
+
+</project>
+
Binary file buildframework/helium/builder/antlibs/jeldoclet.jar has changed
--- a/buildframework/helium/builder/bld.bat	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/builder/bld.bat	Wed Oct 13 16:31:27 2010 +0800
@@ -28,7 +28,7 @@
 
 set JYTHONPATH=%BUILDER_HOME%\antlibs\jython-2.5-py2.5.egg
 set PATH=%JAVA_HOME%\bin;%PATH%
-ant -lib %BUILDER_HOME%\antlibs %*
+call ant -lib %BUILDER_HOME%\antlibs %*
 if "%ERRORLEVEL%" neq "0" (goto error)
 endlocal
 goto :eof
--- a/buildframework/helium/builder/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/builder/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -20,7 +20,7 @@
 
 ============================================================================
 -->
-<project name="helium-builder" default="build" xmlns:au="antlib:org.apache.ant.antunit" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:ac="antlib:net.sf.antcontrib">
+<project name="helium-builder" default="build" xmlns:au="antlib:org.apache.ant.antunit" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:ac="antlib:net.sf.antcontrib" xmlns:hlm="http://www.nokia.com/helium">
     <property environment="env" />
     <taskdef name="fmpp" classname="fmpp.tools.AntTask" />
     <import file="delivery.ant.xml" />
@@ -49,6 +49,7 @@
     <property name="config" value="sf" />
     <property name="sf.delivery.zip" location="${build.temp.dir}/helium-sf-src.zip" />
     <property name="binary.delivery.zip" location="${build.temp.dir}/helium-bin.zip" />
+    <property name="doc.build.dir" location="${build.temp.dir}/doc/api" />
     
     <fileset id="ant.build.files" dir="${source.root.dir}">
         <include name="${component.root}/${component.type}/${component}/build.xml" />
@@ -64,11 +65,24 @@
         <exclude name="build/**" />
     </fileset>
   
-    
+    <!-- Add macro in order to avoid the use of failonerror="false" in the delete task -->
+    <macrodef name="deleteIfDirExists">
+        <attribute name="dir"/>
+        <sequential>
+            <ac:if>
+                <available file="@{dir}" type="dir" />
+                <then>
+                    <delete dir="@{dir}" />
+                </then> 
+            </ac:if>        
+        </sequential>
+    </macrodef>
+
+   
     <target name="cleanup" description="Cleanup (delete the temp build directory)">
-        <delete dir="${build.temp.dir}" failonerror="false"/>
-        <delete dir="${source.root.dir}/external/antlibs2" failonerror="false" />
-        <delete dir="${source.root.dir}/external/python/lib/auto" failonerror="false" />
+        <deleteIfDirExists dir="${build.temp.dir}" />
+        <deleteIfDirExists dir="${source.root.dir}/external/antlibs2" />
+        <deleteIfDirExists dir="${source.root.dir}/external/python/lib/auto" />
     </target>
     
     
@@ -236,7 +250,7 @@
             inline="true" type="jar"
             pattern="${source.root.dir}/external/antlibs2/[artifact]-[revision].[ext]" />
         <delete>
-           <fileset dir="${source.root.dir}" includes="external/python/lib/auto/zipnotsafe/**" />
+            <fileset dir="${source.root.dir}" includes="external/python/lib/auto/zipnotsafe/**" />
         </delete>
         <ivy:retrieve sync="true" conf="default" organisation="com.nokia.helium.config"
             module="helium-${config}-config" revision="1.0"
@@ -362,7 +376,7 @@
     
     
     <target name="textdoc">
-        <delete dir="${build.temp.dir}/doc/doctmp" failonerror="false"/>
+        <deleteIfDirExists dir="${build.temp.dir}/doc/doctmp" />
         <copy todir="${build.temp.dir}/doc/doctmp" overwrite="true">
             <fileset dir="${source.root.dir}/sf/doc/src"/>
         </copy>
@@ -383,7 +397,7 @@
         <attribute name="output" default="${build.temp.dir}/doc/text"/>
         <sequential>
             <property name="sphinx.lib.dir" location="${builder.dir}/tools/sphinx/Sphinx-0.5.1-py2.5.egg/sphinx" />
-            <exec executable="python" failonerror="${failonerror}">
+            <exec executable="python" failonerror="true">
                 <env key="PYTHONPATH" path="${builder.dir}/tools/sphinx" />
                 <arg file="${builder.dir}/tools/sphinx/sphinx-build.py"/>
                 <arg value="-b" />
@@ -397,6 +411,32 @@
             </exec>
         </sequential>
     </macrodef>
+
+    <!-- Generate Ant API documentation using jeldoclet. -->
+    <target name="jeldoclet">
+        <path id="doclet-classpath">
+            <fileset dir="${build.temp.dir}" includes="**/*.jar"/>
+            <pathelement path="${java.class.path}/"/>
+        </path>
+        <javadoc destdir="${build.temp.dir}"
+           docletpathref="doclet-classpath"
+           useexternalfile="true"
+           failonerror="true">
+            <sourcepath>
+                <dirset dir="${source.root.dir}">
+                    <include name="*/java/*/src"/>
+                </dirset>
+            </sourcepath>
+            <doclet name="com.jeldoclet.JELDoclet"/>
+        </javadoc>
+        <fmpp sourceFile="${builder.dir}/tools/antdoclet/doclet_list.rst.ftl"
+            outputFile="${build.temp.dir}/temp/doc/helium-antlib/tasks.rst">
+            <data expandProperties="yes">
+                doc: xml(${build.temp.dir}/jel.xml)
+                ant: antProperties()
+            </data>
+        </fmpp>
+    </target>
     
 </project>
 
--- a/buildframework/helium/builder/java/macros.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/builder/java/macros.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -291,10 +291,11 @@
                             <arg line="/c build.bat unittest " />
                             <arg value="-Dbuilder.dir=${builder.dir}" />
                         </exec>
-                        <exec osfamily="unix" executable="./bld.sh" dir="${basedir}/tests" failonerror="true">
+                        <exec osfamily="unix" executable="/bin/bash" dir="${basedir}/tests" failonerror="true">
                             <env key="ANT_ARGS" value="-lib ${lib.dir} -lib ${module.temp.dir}/backup/${ant.project.name}.jar -lib ${builder.dir}/antlibs -Dpython.path=${python.path}" />
                             <env key="PYTHONPATH" value="${python.path}" />
                             <env key="JYTHONPATH" value="${python.path}" />
+                            <arg value="./bld.sh" />
                             <arg line="unittest" />
                             <arg value="-Dbuilder.dir=${builder.dir}" />
                         </exec>
Binary file buildframework/helium/builder/python/lib/pkg_resources.pyc has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/builder/tools/antdoclet/doclet_list.rst.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,86 @@
+<#--
+============================================================================ 
+Name        : doclet_list.rst.ftl
+Part of     : Helium 
+
+Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+=======================
+Helium Ant Tasks/ Types
+=======================
+   
+.. contents::
+
+<#assign lastcategory=''/>
+<#list doc.jel.jelclass as x>
+    <#list x.@superclass as superclass>
+        <#assign category=x.@package/>
+        <#assign name=x.@type/>
+        <#assign t1=''/>
+        <#assign t2=''/>
+        <#if (superclass?contains('Task') || superclass?contains('Type')) && !x.@abstract[0]??>
+            <#list x.comment.attribute as attribute>
+                <#list attribute.description?split(' ') as value>
+                    <#if value?contains("category=")>
+                        <#assign category=value?replace('category=', '')?replace('"', '')/>
+                        <#if category != lastcategory>
+${category}
+=============
+
+                        </#if>
+                        <#assign lastcategory=category/>
+                    </#if>
+                    <#if value?contains("name=")>
+                        <#assign name=value?replace('name=', '')?replace('"', '')/>
+                    </#if>
+                </#list>
+            </#list>
+<#if superclass?contains('Task')>Task</#if><#if superclass?contains('Type')>Type</#if>: ${name}
+----------------------------------------------------------------------------
+            <#list x.comment.description as description>
+.. raw:: html
+
+    ${description}
+            </#list>
+
+<#list x.methods.method as method>
+   <#if method.@name?starts_with('set')>
+      <#if t1 != 'true'>
+      <#assign t1='true'/>
+.. csv-table:: Parameters
+   :header: "Attribute", "Description", "Required?"
+   
+      </#if>
+   ${method.@name?replace('set', '', 'f')?uncap_first}, <#list method.comment.description as d>"${d?replace('\n', '')}"</#list>,<#list method.comment.attribute as a><#if a.@name?starts_with('@ant')>${(a.@name == '@ant.required')?string}</#if></#list>
+   </#if>
+</#list>
+
+<#list x.methods.method as method>
+   <#if method.@name?starts_with('add') && method["count(params/param)"] == 1>
+      <#if t2 != 'true'>
+      <#assign t2='true'/>
+.. csv-table:: Parameters accepted as nested elements
+   :header: "Type", "Description", "Required?"
+   
+      </#if>
+   <#list method.params.param as d>"${d.@type?uncap_first}"</#list>, <#list method.comment.description as d>"${d?replace('\n', '')}"</#list>,<#list method.comment.attribute as a><#if a.@name?starts_with('@ant')>${(a.@name == '@ant.required')?string}</#if></#list>
+   </#if>
+</#list>
+
+        </#if>
+    </#list>
+</#list>
--- a/buildframework/helium/config/diamonds_config_default.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/config/diamonds_config_default.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -108,7 +108,7 @@
         <hlm:fileMessage file="${diamonds.build.output.dir}/create-bom.xml" />
     </hlm:targetMessageTrigger>
 
-    <hlm:targetMessageTrigger id="post-coverity.id" target="post-coverity" >
+    <hlm:targetMessageTrigger id="post-coverity.id" target="gen-coverity-report" >
         <hlm:fmppMessage sourceFile="${helium.dir}/tools/common/templates/diamonds/coverity.xml.ftl">
             <data expandProperties="yes">
                 ant: antProperties()
@@ -182,4 +182,15 @@
         </hlm:fmppMessage>
     </hlm:targetMessageTrigger>
 
+    <!-- Declaring Diamonds sublisteners -->
+    <hlm:targetTimingMessageListener id="target.timing.message.listener" />
+    <hlm:targetMessageListener id="target.message.listener" />
+    <hlm:stageMessageListener id="stage.message.listener">
+        <hlm:fmppMessage sourceFile="${helium.dir}/tools/common/templates/diamonds/diamonds_stage.xml.ftl">
+            <data expandProperties="yes">
+                ant: antProperties()
+            </data>
+        </hlm:fmppMessage>
+    </hlm:stageMessageListener>
+
 </project>
\ No newline at end of file
--- a/buildframework/helium/config/logging.conf.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-<#--
-============================================================================ 
-Name        : logging.conf.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-[formatters]
-keys: simple,detailed
- 
-[handlers]
-keys: console,syslog
- 
-[loggers]
-keys: root,dp
- 
-[formatter_simple]
-format: %(levelname)s:%(name)s:%(message)s
-
-[formatter_detailed]
-format: %(levelname)s:%(name)s: %(module)s:%(lineno)d: %(message)s
-
-[handler_console]
-class: StreamHandler
-args: []
-formatter: simple
-
-[handler_syslog]
-class: handlers.SysLogHandler
-args: [('myhost.mycorp.net', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_USER]
-formatter: detailed
-
-[logger_root]
-level: INFO
-handlers: syslog
-
-[logger_dp]
-<#if ant?keys?seq_contains("dp.debug") || ant?keys?seq_contains("debug")>
-level: DEBUG
-<#else>
-level: INFO
-</#if>
-handlers: console
-qualname: dp
\ No newline at end of file
--- a/buildframework/helium/config/metadata_filter_config_default.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/config/metadata_filter_config_default.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -60,9 +60,20 @@
 
     <hlm:metadatafilterset id="filterset.sbs.cli">
         <metadatafilter priority="error" regex="^sbs:\s+error:.*" description="sbs cli error" />
+        <metadatafilter priority="error" regex="^Error:\[ERROR\].*" description="coverity cli error" />
         <metadatafilter priority="warning" regex="^sbs:\s+warning:.*" description="sbs cli warning" />
     </hlm:metadatafilterset>
     
+    <hlm:metadatafilterset id="filterset.coverity.output.cli">
+        <metadatafilter priority="error" regex="\[ERROR\].*" description="coverity cli error" />
+        <metadatafilter priority="error" regex="\[FATAL\].*" description="coverity fatal cli error" />
+        <metadatafilter priority="error" regex="^Error:.*" description="coverity cli error" />
+    </hlm:metadatafilterset>
+    
+    <hlm:metadatafilterset id="filterset.coverity.error.cli">
+        <metadatafilter priority="error" regex=".*" description="coverity cli error" />
+    </hlm:metadatafilterset>
+    
     <hlm:metadatafilterset id="filterset.sbs.checksource">
         <metadatafilter priority="error" regex="^Actual case on disk   ->.*" description="sbs checksource error" />
     </hlm:metadatafilterset>
@@ -138,7 +149,7 @@
         <metadatafilterset refid="filterset.common" />
     </hlm:metadatafilterset>
     
-    <hlm:metadatafilterset id="filterset.matti">
+    <hlm:metadatafilterset id="filterset.tdriver">
         <metadatafilterset refid="filterset.common" />
     </hlm:metadatafilterset>
     
--- a/buildframework/helium/config/signaling_config_default.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/config/signaling_config_default.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -159,8 +159,8 @@
 
     <hlm:signalInput id="testAlertsSignalInput" failbuild="now" />
 
-    <hlm:signalInput id="fotaSignalInput" failbuild="never">
-        <hlm:notifierListRef refid="fotaSignalInput" />
+    <hlm:signalInput id="fotaSignalInput" failbuild="defer">
+        <hlm:notifierListRef refid="defaultFailNotifier" />
     </hlm:signalInput>
 
     <hlm:signalInput id="archivePolicyErrorSignalInput" failbuild="never">
@@ -185,6 +185,21 @@
             </notifierInput>
         </signalNotifierInput>
     </hlm:signalListenerConfig>
+    
+    <hlm:signalListenerConfig id="prepWorkAreaSignal2" target="cleanup-work-area" message="Errors during Preparing Work Area">
+        <hlm:targetCondition>
+            <hlm:hasSeverity severity="error" file="${build.cache.log.dir}/signals/${build.id}_cleanup_work_area.log.status.xml" />
+        </hlm:targetCondition>
+        <signalNotifierInput>
+            <signalInput refid="prepWorkAreaSignalInput" />
+            <notifierInput>
+                <fileset dir="${build.cache.log.dir}" >
+                    <include name="signals/${build.id}_cleanup_work_area*" />
+                    <include name="${build.id}_cleanup_work_area*" />
+                </fileset>
+            </notifierInput>
+        </signalNotifierInput>
+    </hlm:signalListenerConfig>
 
     <hlm:signalListenerConfig id="preparationSignal" target="prep-fail" message="Errors during preparation">
         <targetCondition>
@@ -290,15 +305,15 @@
         </signalNotifierInput>
     </hlm:signalListenerConfig>
 
-    <hlm:signalListenerConfig id="mattiSignal" target="matti-test" message="ATS MATTI creation had errors">
+    <hlm:signalListenerConfig id="tDriverSignal" target="tdriver-test" message="ATS TDRIVER creation had errors">
         <targetCondition>
-            <hlm:hasSeverity severity="error" file="${build.signal.status.dir}/${build.id}_matti.log.status.xml" />
+            <hlm:hasSeverity severity="error" file="${build.signal.status.dir}/${build.id}_tdriver.log.status.xml" />
         </targetCondition>
         <signalNotifierInput>
             <signalInput refid="atsSignalInput" />
             <notifierInput>
                 <fileset dir="${build.log.dir}" >
-                    <include name="**/${build.id}_matti*" />
+                    <include name="**/${build.id}_tdriver*" />
                 </fileset>
             </notifierInput>
         </signalNotifierInput>
@@ -322,7 +337,7 @@
 
     <hlm:signalListenerConfig id="signalValidatePolicyInvalidOrMissing" target="render-validate-policy" message="Policy file validation had errors">
         <targetCondition>
-            <hlm:hasSeverity severity="error" file="${build.signal.status.dir}/${build.id}_validate-policy.summary.status.xml" />
+            <hlm:hasSeverity severity="error" file="${build.signal.status.dir}/${build.id}_validate-policy.summary.xml.status.xml" />
         </targetCondition>
         <signalNotifierInput>
             <signalInput refid="signalValidatePolicyInvalidOrMissingInput" />
--- a/buildframework/helium/config/stages_config_default.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/config/stages_config_default.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -26,6 +26,10 @@
     </description>
     
     <taskdef resource="com/nokia/helium/logger/ant/antlib.xml" uri="http://www.nokia.com/helium" />
+
+    <!-- Registering the stage recorder. -->
+    <hlm:stagerecorderlistener id="stage.recorder.listener.id" />
+
     
     <!-- Build Stage Summary configuration -->
     <!-- Comment out below line to skip displaying build stage summary at end of build process -->
--- a/buildframework/helium/config/version.txt	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/config/version.txt	Wed Oct 13 16:31:27 2010 +0800
@@ -1,5 +1,5 @@
 #Helium version - DO NOT EDIT
 #Fri Dec 18 15:07:03 EET 2009
-last.major.helium.version=10.0.0
-second.last.major.helium.version=9.0
-helium.version=11.0.0
+last.major.helium.version=11.0.0
+second.last.major.helium.version=10.0.0
+helium.version=12.0.0a
--- a/buildframework/helium/doc/api_rst/macros_list.rst.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/api_rst/macros_list.rst.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -33,11 +33,15 @@
 </#list>
 
 .. csv-table:: Helium macros
-   :header: "Macro", "Project", "Summary"
+   :header: "Macro", "Project/Antlib", "Summary"
    
 <#list macroCache?keys?sort as name>
 <#assign macro=macroCache[name]>
-    ":hlm-t:`${name}`", "${macro?parent.name}", "${macro.summary?replace("^", "    ", "rm")?replace("\"", "\"\"", "rm")?trim}"
+<#assign prefix = "project">
+<#if macro?parent.name?contains("antlib")>
+    <#assign prefix = "antlib">
+</#if>
+    ":hlm-t:`${name}`", "`${macro?parent.name} <${prefix}-${macro?parent.name}.html>`_", "${macro.summary?replace("^", "    ", "rm")?replace("\"", "\"\"", "rm")?trim}"
 </#list>
 
 
--- a/buildframework/helium/doc/api_rst/properties_list.rst.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/api_rst/properties_list.rst.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -34,7 +34,7 @@
    
 <#list propertyCache?keys?sort as name>
 <#assign property=propertyCache[name]>
-    ":hlm-t:`${name}`", "${property?parent.name}", "${property.summary?replace("^", "    ", "rm")?replace("\"", "\"\"", "rm")?trim}", "<#if property.defaultValue?length &lt; 25>${property.defaultValue}</#if>"
+    ":hlm-t:`${name}`", "`${property?parent.name} <project-${property?parent.name}.html>`_", "${property.summary?replace("^", "    ", "rm")?replace("\"", "\"\"", "rm")?trim}", "<#if property.defaultValue?length &lt; 25>${property.defaultValue}</#if>"
 </#list>
 
 
--- a/buildframework/helium/doc/api_rst/targets_list.rst.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/api_rst/targets_list.rst.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -34,7 +34,7 @@
    
 <#list targetCache?keys?sort as name>
 <#assign target=targetCache[name]>
-    ":hlm-t:`${name}`", "${target?parent.name}", "${target.summary?replace("^", "    ", "rm")?replace("\"", "\"\"", "rm")?trim}"
+    ":hlm-t:`${name}`", "`${target?parent.name} <project-${target?parent.name}.html>`_", "${target.summary?replace("^", "    ", "rm")?replace("\"", "\"\"", "rm")?trim}"
 </#list>
 
 
--- a/buildframework/helium/doc/helium_custom/api_changes.rst.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/helium_custom/api_changes.rst.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -50,7 +50,7 @@
 =============
 <#list doc.apiChanges.target?sort as target>
     <#if target.@state == 'added'>
-* `${target} <api/helium/target-${target}.html>`_
+* :hlm-t:`${target}`
     </#if>
 </#list>
 
@@ -66,7 +66,7 @@
 ================
 <#list doc.apiChanges.property?sort as property>
     <#if property.@state == 'added'>
-* `${property} <api/helium/property-${property}.html>`_
+* :hlm-p:`${property}`
     </#if>
 </#list>
 
@@ -82,7 +82,7 @@
 ============
 <#list doc.apiChanges.macro?sort as macro>
     <#if macro.@state == 'added'>
-* `${macro} <api/helium/macro-${macro}.html>`_
+* ${macro}
     </#if>
 </#list>
 
--- a/buildframework/helium/doc/src/.templates/indexcontent.html.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/.templates/indexcontent.html.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -28,10 +28,12 @@
       <p class="biglink"><a class="biglink" href="{{ pathto("releasenotes/index") }}">Release notes</a><br/>
          <span class="linkdescr">what's new</span></p>
 </#if>
-      <p class="biglink"><a class="biglink" href="{{ pathto("quick_start_guide") }}">Quick Start Guide</a><br/>
+      <p class="biglink"><a class="biglink" href="{{ pathto("quick_start_guide") }}">Quick start guide</a><br/>
          <span class="linkdescr">start here</span></p>
       <p class="biglink"><a class="biglink" href="{{ pathto("feature_list") }}">Feature list</a><br/>
          <span class="linkdescr">what is supported</span></p>
+      <p class="biglink"><a class="biglink" href="{{ pathto("new_user_tutorial") }}">New user tutorial</a><br/>
+         <span class="linkdescr">covers the basics</span></p>
       <p class="biglink"><a class="biglink" href="{{ pathto("manual/index") }}">Manual</a><br/>
          <span class="linkdescr">reference docs</span></p>
     </td><td width="50%">
--- a/buildframework/helium/doc/src/architecture.rst	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/architecture.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -68,7 +68,7 @@
 Practices
 =========
 
-Files created in Ant, Perl, Python or XML syntax must follow the `Style guide <coding_conventions.html>`_.
+Files created in Ant, Perl, Python or XML syntax must follow the `Style guide <development/coding_conventions.html>`_.
 
 
 .. index::
@@ -88,15 +88,8 @@
 See the reference API documentation:
 
 * `Helium API`_
-* `Java APIs`_
-* `Python APIs`_
-* `Custom Ant tasks`_
 
 .. _`Helium API` : api/helium/index.html
-.. _`Java APIs` : api/java/index.html
-.. _`Python APIs` : api/python/index.html
-.. _`Custom Ant tasks` : api/ant/index.html
-
 
 .. index::
   single: Tools and scripts locations
--- a/buildframework/helium/doc/src/development/coding_conventions.rst	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/development/coding_conventions.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -46,7 +46,7 @@
 Documentation
 =============
 
-Standalone documents like this design document and the user guide are documented in reStructuredText__ format.
+Standalone documents like this design document and the user guide are documented in reStructuredText_ format.
 
 __ http://docutils.sourceforge.net/rst.html
 
@@ -73,8 +73,31 @@
    "``hlm-p``", "Properties"
    "``hlm-m``", "Macros"
    
-   It is **not** possible to link to the task or anything in the Java documentation. 
+   
+.. note:: It is **not** possible to link to tasks or anything in the Java documentation. 
    
+A section of RST documentation might look like this::
+
+    The :hlm-t:`foo` target requires the :hlm-p:`bar` property to be defined. It uses the :hlm-t:`bazMacro` macro.
+
+Fields from the API elements can also be embedded in the RST documentation using an index-like syntax::
+
+    :hlm-p:`bar[summary]`
+    
+This would extract the ``summary`` field of the ``bar`` property and insert it into the document. The available fields are:
+    
+.. csv-table:: API element fields
+   :header: "Field", "Description"
+   
+   "summary", "The first sentence or section of the documentation."
+   "documentation", "The whole documentation text."
+   "scope", "The visibility scope."
+   "defaultValue", "The default value if one is defined. Properties only."
+   "type", "The type of the element. Properties only."
+   "editable", "Whether definition is required or optional. Properties only."
+   "deprecated", "Deprecation message."
+    
+    
 Creating Index References
 `````````````````````````
 
@@ -129,7 +152,7 @@
    :header: "Tag", "Applies to", "Description"
 
    "scope", "All elements", "The scope or visibility of the element. Valid values are ``public`` (default), ``protected`` and ``private``."
-   "editable", "All types", "Whether this element should be overridden or defined by the user. Valid values are ``required`` and ``optional``"
+   "editable", "All types", "Indicates whether the property must be defined or not. Valid values are ``required`` and ``optional``. ``required`` means it must be defined for the related feature to work. The user must define it if there is no default value, i.e. it is not already defined in Helium."
    "type", "Properties", "The type of the property value. Valid values are ``string`` (default), ``integer``, ``boolean``."
    "deprecated", "All elements", "Documents that the element is deprecated and may be removed in a future release. The text should describe what to use instead."
 
@@ -341,7 +364,7 @@
 
 * Unit tests are written for each Python module.
 * They should follow the Nose_ testing framework conventions.
-* The test suite is run by calling :hlm-t:`py-unittest`.
+* The test suite is run by calling ``bld test``.
 
 .. _Nose : http://somethingaboutorange.com/mrl/projects/nose/
 
@@ -364,7 +387,7 @@
 * `Twisted Coding Standard`_ (but with a grain of salt):
 
 .. _`PEP 8 - Style Guide for Python Code` : http://www.python.org/dev/peps/pep-0008/
-.. _`Twisted Coding Standard` : http://twistedmatrix.com/trac/browser/trunk/doc/development/policy/coding-standard.xhtml?format=raw
+.. _`Twisted Coding Standard` : http://twistedmatrix.com/documents/current/core/development/policy/coding-standard.html
 
 
 .. index::
--- a/buildframework/helium/doc/src/development/developer_guide.rst	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/development/developer_guide.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -249,7 +249,7 @@
 Also all setter methods visible through Ant must be documented properly using *@ant.required* 
 or *@ant.not-required* javadoc style attributes.
 
-You can find more information on how to document Ant tasks using the doclet plugin on http://doclet.neuroning.com/. 
+You can find more information on how to document Ant tasks using the doclet plugin on http://antdoclet.neuroning.com/.
 
 General coding guidelines
 -------------------------
@@ -264,7 +264,7 @@
 ----------------------------
 
 In order to match as must as  configurability concepts, Helium custom types and tasks must follow  development guidelines as 
-much as possible. You can find then on http://.apache.org/_task_guidelines.html.
+much as possible. You can find then on http://ant.apache.org/ant_task_guidelines.html.
 
 Logging
 -------
@@ -414,6 +414,15 @@
 
 Debug logs for component tests can be found at ``/build/components/<component>/xunit``.
 
+Filtering Python tests using nose
+---------------------------------
+
+Python unit tests are run through the nose testing framework. To run just a single Python test module, use::
+
+    bld test -Dcomponent=pythoncore -Dnose.args=amara
+    
+The value of ``nose.args`` is passed through to nose.
+
 
 .. index::
   single: Assertions
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/doc/src/manual/blocks.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,110 @@
+..  ============================================================================ 
+    Name        : blocks.rst
+    Part of     : Helium 
+    
+    Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+    All rights reserved.
+    This component and the accompanying materials are made available
+    under the terms of the License "Eclipse Public License v1.0"
+    which accompanies this distribution, and is available
+    at the URL "http://www.eclipse.org/legal/epl-v10.html".
+    
+    Initial Contributors:
+    Nokia Corporation - initial contribution.
+    
+    Contributors:
+    
+    Description:
+    
+    ============================================================================
+
+.. index::
+  module: Blocks
+
+======
+Blocks
+======
+
+.. contents::
+
+.. _`Blocks-Intro-label`:
+
+Blocks Introduction
+====================
+
+Blocks is a packaging framework, which allows you to create bundles 
+with interdependencies (like rpm or deb packages) base on the outcome of the build.
+
+
+Enabling Blocks input generation
+================================
+
+The input generation consists in gathering data from build steps throughout the build to allow the generation
+of the future bundle. Not all the steps are supported, so the build engineer must keep in mind that custom
+exports or modification of the binaries after a controlled build step might lead to bundles with inconsistent content.
+ 
+In order to enable blocks input generation you simply need to define the **blocks.enabled** property to true. Intermediate 
+configuration file will be generated under **blocks.config.dir**.
+
+e.g::
+   
+   hlm -Dblocks.enabled=true....
+
+
+Currently supported steps are:
+ * SBSv2 compilation
+ * Configuration export using cMaker (only if cmaker-what is called)
+ * ROM image creation
+
+
+Bundle generation
+=================
+
+Once the data have been gathered during the build, it is then possible to create bundles. To do so you need to call the 
+**blocks-create-bundles** target. Generated bundle will be created under **blocks.bundle.dir**.
+
+e.g::
+   
+   hlm -Dblocks.enabled=true .... blocks-create-bundles
+   
+
+Blocks workspace management with Helium 
+=======================================
+
+Helium allows you to use any build environment as Blocks workspace. The :hlm-t:`blocks-create-workspace` will handle the
+automatic creation of workspace base on the current build.drive used. If the current build.drive represent an
+already existing workspace then it will reuse it. The :hlm-p:blocks.workspace.id property will contain the Blocks workspace
+id. Also when new workspace is created some repositories can be automatically added using the **blocks.repositories.id** reference
+to an hlm:blocksRepositorySet object.
+
+::
+   
+   <hlm:blocksRepositorySet id="blocks.repositories.id">
+       <repository name="test-repo" url="file:E:\my-repo" />
+   </hlm:blocksRepositorySet>
+   
+
+
+Installing bundles
+==================
+The :hlm-t:`blocks-install-bundles` target will allow you to install packages under the workspace, to do so, you can configure
+the following references using patternset:
+
+::
+   
+   <patternset id="blocks.bundle.filter.id">
+       <include name="some.pkg.name.*" /> 
+       <exclude name="some.other.pkg.name.*" /> 
+   </patternset>
+
+   <patternset id="blocks.group.filter.id">
+       <include name="some.pkg.name.*" /> 
+       <exclude name="some.other.pkg.name.*" /> 
+   </patternset>
+   
+      
+The **blocks.bundle.filter.id** patternset will allow you to filter bundles based on their name. And **blocks.bundle.filter.id** patternset will allow you
+to install group selected group of bundles.
+
+Finally the workspace can be updated using the :hlm-t:`blocks-update-bundles` target.
+  
--- a/buildframework/helium/doc/src/manual/configuring.rst	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/manual/configuring.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -84,7 +84,7 @@
         <import file="${helium.dir}/helium.ant.xml"/>
     </project>
 
-Note that here the default target is :hlm-t:`product-build` so this would be used for a product build configuration. In reality it would need many more properties to be complete.
+Note that here the default target is ``product-build`` so this would be used for a product build configuration. In reality it would need many more properties to be complete.
 
 Refer to the `configuration reference`_ for a full list of all Helium Ant properties.
 
@@ -188,9 +188,7 @@
 Viewing target dependencies
 ===========================
 
-The :hlm-t:`deps` target can be used to display a list of the target dependencies for a given target. See the `manual page`_ for more information. Also the :hlm-t:`execlist` command works in a similar way but shows a dialog showing a separated list of all the dependent targets and then just the top-level of dependencies, to help with continuing a build on the command line.
-
-.. _`manual page`: ../api/helium/target-deps.html
+The :hlm-t:`deps` target can be used to display a list of the target dependencies for a given target. Also the :hlm-t:`execlist` command works in a similar way but shows a dialog showing a separated list of all the dependent targets and then just the top-level of dependencies, to help with continuing a build on the command line.
 
 
 .. index::
--- a/buildframework/helium/doc/src/manual/configuring_features.rst.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/manual/configuring_features.rst.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -18,12 +18,12 @@
     
     ============================================================================
 
-####################
+###########################
 Configuring Helium Features
-####################
+###########################
 
 Introduction
--------------------------------
+------------
 
 This describes how to configure the Helium features.
 
@@ -36,15 +36,15 @@
     Enabling blocks features.
     Enabling to use dragonfly and many more.
 
-Properties need to be defined for enabling/disabling the features.
--------------------------------------------------------------
+Properties need to be defined for enabling/disabling the features
+-----------------------------------------------------------------
 <#assign propertyCache = {}>
 <#list doc.antDatabase.project.property as property>
     <#assign propertyCache = propertyCache + {property.name: property}>
 </#list>
  
 .. csv-table:: Feature properties
-   :header: "Property name", "Description", "Allowed value", "Deprecated property"
+   :header: "Property name", "Description", "Default value", "Deprecated property"
    
 <#list propertyCache?keys?sort as name>
 <#assign property=propertyCache[name]>
@@ -58,7 +58,7 @@
             <#assign deprecatedMessage="${deprecatedName.deprecated}">
         </#if>
     </#list>
-    ":hlm-p:`${name}`", "${property.summary?replace("^", "    ", "rm")?replace("\"", "\"\"", "rm")?trim}", "true/false", "${deprecatedProperty}${deprecatedMessage}"
+    ":hlm-p:`${name}`", "${property.summary?replace("^", "    ", "rm")?replace("\"", "\"\"", "rm")?trim}", "${property.defaultValue}", "${deprecatedProperty}${deprecatedMessage}"
 </#if>
 </#list>
    
--- a/buildframework/helium/doc/src/manual/coverity.rst	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/manual/coverity.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -217,6 +217,8 @@
 
     machine coverity login <user name> password <password>
 
+.. _`.netrc file`: configuring.html?highlight=netrc#passwords
+
 .. csv-table:: Coverity feature flags
    :header: "Flags to set", "Action performed", "Allowed value"
    
--- a/buildframework/helium/doc/src/manual/documentation.rst.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/manual/documentation.rst.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -33,10 +33,6 @@
 APIs
 ====
 
-* `Search API`_
-
-.. _`Search API`: ../api/index.html
-
 * `Helium API`_
 
     The `Helium API`_ specifies all the available Ant_ targets and their 
@@ -50,19 +46,20 @@
 
 .. _`Helium Antlib`: ../helium-antlib/index.html
 
+<#if !(ant?keys?seq_contains("sf"))>
+
 * `Ant Tasks`_
 
-.. _`Ant Tasks`: ../api/ant/index.html
+.. _`Ant Tasks`: ../api/doclet/index.html
 
-<#if !(ant?keys?seq_contains("sf"))>
 Customer APIs
 -------------
 
 * `IDO API`_
 * `DFS70501 API`_
 
-.. _`IDO API`: ../ido/api/helium/index.html
-.. _`DFS70501 API`: ../dfs70501/api/helium/index.html
+.. _`IDO API`: http://helium.nmp.nokia.com/doc/ido/api/helium/index.html
+.. _`DFS70501 API`: http://helium.nmp.nokia.com/doc/dfs70501/api/helium/index.html
 </#if>
 
 Building custom documentation
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/doc/src/manual/final.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,63 @@
+..
+    ============================================================================ 
+    Name        : final.rst
+    Part of     : Helium 
+    
+    Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+    All rights reserved.
+    This component and the accompanying materials are made available
+    under the terms of the License "Eclipse Public License v1.0"
+    which accompanies this distribution, and is available
+    at the URL "http://www.eclipse.org/legal/epl-v10.html".
+    
+    Initial Contributors:
+    Nokia Corporation - initial contribution.
+    
+    Contributors:
+    
+    Description:
+    
+    ============================================================================
+
+.. index::
+  single: Stage - Final operations
+
+Final operations
+================
+
+Final operation are steps which could happen at the workflow completion.
+
+
+Running a target at build completion
+------------------------------------
+
+Helium offers the possibility to run a final target despite any error which could occur during the build.
+The configuration of the target is done using the **hlm.final.target** property.
+
+e.g:
+::
+   
+   <property name="hlm.final.target" value="my-final-target" />
+   
+
+Running action on failure
+-------------------------
+
+The signaling framework will automatically run all signalExceptionConfig in case of Ant failure at the
+end of the build. 
+
+This example shows how simple task can be run in case of failure: 
+::
+   
+       <hlm:signalExceptionConfig id="signal.exception.config">
+           <hlm:notifierList>
+               <hlm:executeTaskNotifier>
+                   <echo>Signal: ${r'$'}{signal.name}</echo>
+                   <echo>Message: ${r'$'}{signal.message}</echo>
+                   <runtarget target="build-log-summary" />
+               </hlm:executeTaskNotifier>
+           </hlm:notifierList>
+       </hlm:signalExceptionConfig>
+   
+
+
--- a/buildframework/helium/doc/src/manual/index.rst.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/manual/index.rst.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -19,10 +19,15 @@
 
 ============================================================================
 -->
-###################################
-  Helium Manual
-###################################
+#############
+Helium Manual
+#############
 
+.. raw:: html
+
+   <table border="0" cellspacing="0" cellpadding="10">
+   <tr valign="top">
+   <td width="50%" style="border-right: 1px solid black">
 
 .. toctree::
    :maxdepth: 2
@@ -36,7 +41,14 @@
    configuring_features
    running
    stages
-   stage_matti
+   
+.. raw:: html
+
+   </td><td width="50%">
+
+.. toctree::
+   :maxdepth: 2
+   
 <#if !ant?keys?seq_contains("sf")>
    nokiastages
    datapackage
@@ -48,7 +60,9 @@
    messaging
    metrics
    coverity
+   final
 
-   
-   
-   
+.. raw:: html
+
+   </td></tr>
+   </table>
\ No newline at end of file
--- a/buildframework/helium/doc/src/manual/introduction.rst	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/manual/introduction.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -40,7 +40,7 @@
 
 It is recommended to read the Ant_ documentation before learning about Helium. An understanding of XML_ is also needed as Ant_ is configured using an XML_ format.
 
-.. _Ant: http://Ant.apache.org/
+.. _Ant: http://ant.apache.org/
 .. _XML: http://www.w3.org/XML/
 
 .. index::
--- a/buildframework/helium/doc/src/manual/metrics.rst	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/manual/metrics.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -45,7 +45,7 @@
 ====================
 To enable logging to diamonds from Helium one needs to ensure that:
 
-* The properties :hlm-p:`diamonds.host` and :hlm-p:`diamonds.port` are set correctly.
+* The properties ``diamonds.host`` and ``diamonds.port`` are set correctly.
 * By default they are taken from ``helium/tools/common/companyproperties.ant.xml``, but can be overridden by using:
 
   * **Command line**    
@@ -83,8 +83,8 @@
    "``diamonds.host``", "Diamonds server address"
    "``diamonds.port``", "Server port number"
    "``diamonds.path``", "Builds path in Diamonds server"
-   ":hlm-p:`build.family`", "Category of product"
-   ":hlm-p:`stages`", "Start and end target of a stages with logical stage name"
+   "``build.family``", "Category of product"
+   "``stages``", "Start and end target of a stages with logical stage name"
    ":hlm-p:`sysdef.configurations.list`", "System definition name list to log component faults"
    ":hlm-p:`build.name`", "Name of product"
    ":hlm-p:`release.label`", "Name of release"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/doc/src/manual/stage_ats.rst.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,712 @@
+..  ============================================================================ 
+    Name        : stage_ats.rst.ftl
+    Part of     : Helium 
+    
+    Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+    All rights reserved.
+    This component and the accompanying materials are made available
+    under the terms of the License "Eclipse Public License v1.0"
+    which accompanies this distribution, and is available
+    at the URL "http://www.eclipse.org/legal/epl-v10.html".
+    
+    Initial Contributors:
+    Nokia Corporation - initial contribution.
+    
+    Contributors:
+    
+    Description:
+    
+    ============================================================================
+
+.. index::
+  module: Testing
+
+=======
+Testing
+=======
+
+This is a good start for Helium users who want to setup test automation using ATS4. (**ATS3 users**, please `read here`_  .)
+
+.. _`read here`: stage_ats_old.html
+
+
+
+.. contents::
+
+
+  
+Helium Test Automation
+======================
+
+Helium can be used to auomate testing. For this purpose, test asset must be alligned with the standard guidelines for writing the tests.  
+
+Helium supports several test frameworks including `STIF`_, `TEF`_, RTest, MTF, `SUT`_, QtTest `EUnit`_, TDriver and ASTE. (`Description of test frameworks`_) 
+
+Most of the above mentioned test frameworks share common configuration to setup TA environemnet. However, there are a few exceptions, which are discussed below under the headings of every test framework.
+
+
+
+<#if !(ant?keys?seq_contains("sf"))>
+.. _`STIF`: http://s60wiki.nokia.com/S60Wiki/STIF
+.. _`TEF`: http://s60wiki.nokia.com/S60Wiki/TEF_%28TestExecute_Framework%29
+.. _`EUnit`: http://s60wiki.nokia.com/S60Wiki/EUnit
+</#if>
+
+.. _`SUT`: http://developer.symbian.org/wiki/index.php/Symbian_Test_Tools#SymbianUnitTest
+.. _`Description of test frameworks`: http://developer.symbian.org/wiki/index.php/Symbian_Test_Tools
+
+
+
+Prerequisites
+-------------
+
+* `Harmonized Test Interface (HTI)`_ needs to be compiled and into the image.
+* The reader is expected to already have a working ATS setup in which test cases can be executed.  ATS server names, 
+  access rights and authentication etc. is supposed to be already taken care of.
+
+<#if !(ant?keys?seq_contains("sf"))>
+.. _`Harmonized Test Interface (HTI)`: http://s60wiki.nokia.com/S60Wiki/HTI
+<#else>
+.. _`Harmonized Test Interface (HTI)`: http://developer.symbian.org/wiki/index.php/HTI_Tool
+</#if>
+
+
+Setting up a Test Automation Environment with Helium
+====================================================
+
+Basic Test Automation step-by-step setup guide. 
+
+
+Step 0: Structuring Test-source/test-asset
+------------------------------------------
+Test source usually lives in a component's ``tsrc`` directory.  Test source components are created like any other Symbian SW component; 
+there is a ``group`` directory with a ``bld.inf`` file for building, ``.mmp`` files for defining the targets, and so on.
+
+The test generation code expects ``.pkg`` file in the ``group`` directory of test component to be compiled, to get the paths of the files 
+(can be data, configuration, initialization, etc) to be installed and where to install on the phone.
+
+**Please note** that not all components have ``tsrc`` and ``group`` directories. For instance, Qt, ASTE and TDriver do not have similar test asset structure as STIF, TEF and other test components. It is recommended to follow the test asset guidelines prior to setting up test automation with Helium. 
+
+
+Step 1: Setting up system definition file
+-----------------------------------------
+**System Definition Files supporting layers.sysdef.xml**
+ **layers** in ``layers.sysdef.xml`` file and **configuration** in ``build.sysdef.xml`` file (`Structure of System Definition files version 1.4`_).
+ 
+ <#if !(ant?keys?seq_contains("sf"))>
+.. _`new API test automation guidelines`: http://s60wiki.nokia.com/S60Wiki/Test_Asset_Guidelines
+.. _`Structure of System Definition files version 1.4`: http://delivery.nmp.nokia.com/trac/helium/wiki/SystemDefinitionFiles
+</#if>
+
+A template of layer in layers.sysdef.xml for system definition files
+
+.. code-block:: xml
+
+    <layer name="name_test_layer">
+        <module name="module_name_one">
+            <unit unitID="unit_id1" name="unit_name1" bldFile="path_of_tsrc_folder_to_be_built" mrp="" />
+        </module>
+        
+        <module name="module_name_two">
+            <unit unitID="unit_id2" name="unit_name2" bldFile="path_of_tsrc_folder_to_be_built" mrp="" />
+        </module>
+    </layer> 
+
+
+* Layer name should end with **_test_layer**
+* Two standard names for ATS test layers are being used; ``unit_test_layer`` and ``api_test_layer``. Test components (the``unit`` tags) 
+  should be specified under these layers and grouped by ``module`` tag(s).
+* In the above, two modules means two drop files will be created; ``module`` may have one or more ``unit``
+* By using property ``exclude.test.layers``, complete layers can be excluded and the components inside that layer will not be included in the AtsDrop. This property is a comma (,) separated list
+
+**System Definition Files version 3.0 (SysDefs3)** (new Helium v.10.79)
+ The `structure of System Definition files version 3.0`_ is different than previous versions of system definition files. In SysDefs3, package definition files are used for components specification. Instead of layers naming conventions, filters are used to identify test components and test types, for example: "test, unit_test, !api_test" etc.
+
+<#if !(ant?keys?seq_contains("sf"))>
+.. _`structure of System Definition files version 3.0`: http://wikis.in.nokia.com/view/SWManageabilityTeamWiki/PkgdefUse
+<#else>
+.. _`structure of System Definition files version 3.0`: sysdef3.html
+</#if>
+
+An example template for defining test components in a package definition file.
+
+.. code-block:: xml
+
+      <package id="dummytest" name="dummytest" levels="demo">
+        <collection id="test_nested" name="test_nested" level="demo">
+        
+          <component id="tc1" name="tc1" purpose="development" filter="test, unit_test">
+              <unit bldFile="test_nested/tc1/group" mrp="" />
+          </component>
+          
+          <component id="tc2" name="tc2" purpose="development" filter="test">
+            <meta rel="testbuild">
+              <group name="drop_tc2_and_tc3" /> 
+            </meta>
+            <unit bldFile="test_nested/tc2/group" mrp="" />
+          </component>
+          
+          <component id="tc3" name="tc3" purpose="development" filter="test">
+            <meta rel="testbuild">
+              <group name="drop_tc2_and_tc3" /> 
+            </meta>
+            <unit bldFile="test_nested/tc3/group" mrp="" />
+          </component>
+          
+        </collection>
+      </package>
+
+
+* Filter "test" must be specified for every test component. If it is not specified, the component will not be considered as a test component.
+* <meta>/<group> are now used to group test components, it work in the same way as <module>...<module> in sysdef v1.4 works. The components having same group name are grouped together. 
+  Separate drop files are created for different groups. In the above example, if only 'test' is selected, then two drop files will be created, one with tc1 and the other one with tc2 and tc3. 
+
+
+Step 2: Configure ATS Ant properties
+---------------------------------------
+The properties are categorized as 
+
+* **Common** - Valid for all test frameworks (Table-1).
+* **API/Module** - Valid for only API/Module tests like STIF, STF, EUNit etc., and hence, are shared among many test frameworks (Table-2).
+
+
+Also, the edit status of the properties can be described as
+
+* [must] - must be set by user
+* [recommended] - should be set by user but not mandatory
+* [allowed] - should **not** be set by user however, it is possible.   
+
+.. csv-table:: Table-1: ATS - Common Properties
+   :header: "Property name", "Edit status", "Description"
+
+    ":hlm-p:`ats.server`", "[must]", ":hlm-p:`ats.server[documentation]`"
+    ":hlm-p:`ats.drop.location`", "[allowed]", ":hlm-p:`ats.drop.location[documentation]`"
+    ":hlm-p:`ats.product.name`", "[must]", ":hlm-p:`ats.product.name[documentation]`"
+    ":hlm-p:`ats.email.list`", "[allowed]", ":hlm-p:`ats.email.list[documentation]`"
+    ":hlm-p:`ats.report.type`", "[allowed]", ":hlm-p:`ats.report.type[documentation]`"
+    ":hlm-p:`ats.flashfiles.minlimit`", "[allowed]", ":hlm-p:`ats.flashfiles.minlimit[documentation]`"
+    ":hlm-p:`ats.plan.name`", "[allowed]", ":hlm-p:`ats.plan.name[documentation]`"
+    ":hlm-p:`ats.product.hwid`", "[allowed]", ":hlm-p:`ats.product.hwid[documentation]`"
+    ":hlm-p:`ats.script.type`", "[allowed]", ":hlm-p:`ats.script.type[documentation]`"
+    ":hlm-p:`ats.test.timeout`", "[allowed]", ":hlm-p:`ats.test.timeout[documentation]`"
+    ":hlm-p:`ats.testrun.name`", "[allowed]", ":hlm-p:`ats.testrun.name[documentation]`"
+    ":hlm-p:`ats.report.location`", "[allowed]", ":hlm-p:`ats.report.location[documentation]`"
+    ":hlm-p:`ats.diamonds.signal`", "[allowed]", ":hlm-p:`ats.diamonds.signal[documentation]`"
+
+
+An example of setting up the common properties as in table-1:
+
+.. code-block:: xml
+
+    <property name="ats.server" value="4fio00105"  />
+    <property name="ats.drop.location" location="\\trwsimXX\ATS_TEST_SHARE\" />
+    <property name="ats.product.name" value="PRODUCT" />
+    <property name="ats.email.list" value="temp.user@company.com; another.email@company.com" />
+    <property name="ats.report.type" value="simplelogger" />
+    <property name="ats.flashfiles.minlimit" value="2" />
+    <property name="ats.plan.name" value="plan" />
+    <property name="ats.product.hwid" value="" />
+    <property name="ats.script.type" value="runx" />
+    <property name="ats.test.timeout" value="60" />
+    <property name="ats.testrun.name" value="${r'$'}{build.id}_${r'$'}{ats.product.name}_${r'$'}{major.version}.${r'$'}{minor.version}" />
+    <property name="ats.report.location" value="${r'$'}{publish.dir}/${r'$'}{publish.subdir}" />
+    <property name="ats.diamonds.signal" value="false" />
+    
+
+.. csv-table:: Table-2: ATS - API/Module properties
+   :header: "Property name", "Edit status", "Description"
+
+    ":hlm-p:`ats.target.platform`", "[allowed]", ":hlm-p:`ats.target.platform[documentation]`"
+    ":hlm-p:`ats.obey.pkgfiles.rule`", "[allowed]", ":hlm-p:`ats.obey.pkgfiles.rule[documentation]`"
+    ":hlm-p:`ats.specific.pkg`", "[allowed]", ":hlm-p:`ats.specific.pkg[documentation]`"
+    ":hlm-p:`ats.test.filterset`", "[allowed]", ":hlm-p:`ats.test.filterset[documentation]`"
+
+
+An example of setting up API/Module testing properties as in table-2:
+
+.. code-block:: xml
+
+    <property name="ats.target.platform" value="armv5 urel" />
+    <property name="ats.obey.pkgfiles.rule" value="false" />
+    <property name="ats.specific.pkg" value="sanity" />
+    <property name="ats.test.filterset" value="sysdef.filters.tests" />
+
+    <hlm:sysdefFilterSet id="sysdef.filters.tests">
+        <filter filter="test, " type="has" />
+        <config file="bldvariant.hrh" includes="" />
+    </hlm:sysdefFilterSet>
+
+
+Step 3: Configure or select ROM images (Optional)
+-------------------------------------------------
+Since helium 10 images are picked up using :hlm-p:`ats.product.name` and Imaker iconfig.xml files. Property ``release.images.dir`` is searched for iconfig.xml files, the ones where the product name is part of :hlm-p:`ats.product.name` is used.
+
+You should only build the images for each product you want to include in ats. See `Imaker`_ docs for more info. Eg.
+
+.. _`Imaker`: ../helium-antlib/imaker.html
+
+.. code-block:: xml
+
+    <hlm:imakerconfigurationset id="configname">
+        <imakerconfiguration>
+            <hlm:product list="${r'$'}{product.list}" ui="true"/>
+            <targetset>
+                <include name="^core${r'$'}"/>
+                <include name="^langpack_01${r'$'}"/>
+                <include name="^custvariant_01_tools${r'$'}"/>
+                <include name="^udaerase${r'$'}"/>
+            </targetset>
+            <variableset>
+                <variable name="TYPE" value="rnd"/>
+            </variableset>
+        </imakerconfiguration>
+    </hlm:imakerconfigurationset> 
+
+
+For older products where there are no iconfig.xml, ``reference.ats.flash.images`` is used:
+
+.. code-block:: xml
+
+    <fileset id="reference.ats.flash.images" dir="${r'$'}{release.images.dir}">
+        <include name="**/${r'$'}{build.id}*.core.fpsx"/>
+        <include name="**/${r'$'}{build.id}*.rofs2.fpsx"/>
+        <include name="**/${r'$'}{build.id}*.rofs3.fpsx"/>
+    </fileset>
+
+
+.. Note::
+   
+   Always declare *Properties* before and *filesets* after importing helium.ant.xml in order to overwrite the default values during the build.
+
+
+Step 4: Enabling or disabling test automation features
+------------------------------------------------------ 
+Helium supports a number of test automation features, which are discussed below. These features can be enabled or disabled by switching the values of the following properties to either *true* or *false*.  
+
+
+.. csv-table:: Table-3: ATS - Switches/enablers
+   :header: "Property name", "Edit status", "Description"
+
+    ":hlm-p:`ats.enabled`", "[allowed]", ":hlm-p:`ats.enabled[documentation]`"
+    ":hlm-p:`ats4.enabled`", "[allowed]", ":hlm-p:`ats4.enabled[documentation]`"
+    ":hlm-p:`ats.stf.enabled`", "[allowed]", ":hlm-p:`ats.stf..enabled[documentation]`"
+    ":hlm-p:`aste.enabled`", "[allowed]", ":hlm-p:`aste.enabled[documentation]`"
+    ":hlm-p:`ats.ctc.enabled`", "[allowed]", ":hlm-p:`ats.ctc.enabled[documentation]`"
+    ":hlm-p:`ats.trace.enabled`", "[allowed]", ":hlm-p:`ats.trace.enabled[documentation]`"
+    ":hlm-p:`ats.emulator.enable`", "[allowed]", ":hlm-p:`ats.emulator.enable[documentation]`"
+    ":hlm-p:`ats.singledrop.enabled`", "[allowed]", ":hlm-p:`ats.singledrop.enabled[documentation]`"
+    ":hlm-p:`ats.multiset.enabled`", "[allowed]", ":hlm-p:`ats.multiset.enabled[documentation]`"
+    ":hlm-p:`ats.delta.enabled`", "[allowed]", ":hlm-p:`ats.delta.enabled[documentation]`"
+    ":hlm-p:`ats.java.importer.enabled`", "[allowed]", ":hlm-p:`ats.java.importer.enabled[documentation]`"
+    ":hlm-p:`ats.tdriver.enabled`", "[allowed]", ":hlm-p:`ats.tdriver.enabled[documentation]`"
+
+
+For example:
+
+.. code-block:: xml
+
+    <property name="ats.enabled" value="true" />
+
+
+Supported Test Frameworks
+=========================
+In this section only Helium specific properties, targets or other related issues are discussed to configure the following test frameworks. However, as mentioned earlier, there are test asset guidelines to setup test components for different test frameworks.  
+
+ASTE
+----
+* ASTE tests can be enabled by setting :hlm-p:`aste.enabled` (see table-3).
+* `SW Test Asset`_ location and type of test should be known as a prerequisite.
+* To configure the ASTE tests, aste specific properties are required in addition to those in table-1 
+
+<#if !(ant?keys?seq_contains("sf"))>
+.. _`SW Test Asset`: http://s60wiki.nokia.com/S60Wiki/MC_SW_Test_Asset_documentation
+</#if>
+
+.. csv-table:: Table: ATS - ASTE properties
+   :header: "Property name", "Edit status", "Description"
+   
+    ":hlm-p:`ats.aste.testasset.location`", "[must]", ":hlm-p:`ats.aste.testasset.location[documentation]`"
+    ":hlm-p:`ats.aste.software.release`", "[must]", ":hlm-p:`ats.aste.software.release[documentation]`"
+    ":hlm-p:`ats.aste.software.version`", "[must]", ":hlm-p:`ats.aste.software.version[documentation]`"
+    ":hlm-p:`ats.aste.testasset.caseids`", "[recommended]", ":hlm-p:`ats.aste.testasset.caseids[documentation]`"
+    ":hlm-p:`ats.aste.language`", "[recommended]", ":hlm-p:`ats.aste.language[documentation]`"
+    ":hlm-p:`ats.aste.test.type`", "[recommended]", ":hlm-p:`ats.aste.test.type[documentation]`"
+    ":hlm-p:`ats.aste.plan.name`", "[recommended]", ":hlm-p:`ats.aste.plan.name[documentation]`"
+    ":hlm-p:`ats.aste.testrun.name`", "[recommended]", ":hlm-p:`ats.aste.testrun.name[documentation]`"
+    ":hlm-p:`ats.aste.email.list`", "[recommended]", ":hlm-p:`ats.aste.email.list[documentation]`"
+
+
+An example of setting up ASTE properties:
+    
+.. code-block:: xml
+    
+    <property name="ats.aste.testasset.location" value="" />
+    <property name="ats.aste.software.release" value="SPP 51.32" />
+    <property name="ats.aste.software.version" value="W810" />
+    <property name="ats.aste.testasset.caseids" value="100,101,102,104,106," />
+    <property name="ats.aste.language" value="English" />
+    <property name="ats.aste.test.type" value="smoke" />
+    <property name="ats.aste.plan.name" value="plan" />
+    <property name="ats.aste.testrun.name" value="${r'$'}{build.id}_${r'$'}{ats.product.name}_${r'$'}{major.version}.${r'$'}{minor.version}" />
+    <property name="ats.aste.email.list" value="temp.user@company.com; another.email@company.com" /> 
+
+
+EUnit
+-----
+* Test framework is selected if there is a library ``eunit.lib`` in the ``.mmp`` file of a test component
+* Following EUnit specific properties are required in addition to those in table-1 and table-2.
+
+.. csv-table:: Table: ATS - ASTE properties
+   :header: "Property name", "Edit status", "Description"
+   
+    ":hlm-p:`eunit.test.package`", "[allowed]", ":hlm-p:`eunit.test.package[documentation]`"
+    ":hlm-p:`eunitexerunner.flags`", "[allowed]", ":hlm-p:`eunitexerunner.flags[documentation]`"
+
+
+An example of setting up ASTE properties as in the above table:
+    
+.. code-block:: xml
+    
+    <property name="eunit.test.package" value="" />
+    <property name="eunitexerunner.flags" value="/E S60AppEnv /R Off" /> 
+
+
+MTF
+---
+* The test framework is selected if there is a library ``testframeworkclient.lib`` in the ``.mmp`` file of a test component
+* There is no MTF specific configuration for Helium in addition to those in table-1 and table-2.
+
+
+QtTest
+------
+* The test framework is selected if there is a library ``QtTest.lib`` in the ``.mmp`` file of a test component
+* There are several ``.PKG`` files created after executing ``qmake``, but only one is selected based on a set target platform. See (:hlm-p:`ats.target.platform`) description in table-2.
+* Properties in table-1 and table-2 should also be configured.
+
+
+RTest
+-----
+* The test framework is selected if there is a library ``euser.lib`` and a comment ``//RTEST``in the ``.mmp`` file of a test component.
+* There is no RTest specific configuration for Helium in addition to those in table-1 and table-2.
+  
+
+STF
+---
+* The test framework is selected if there is ``ModuleName=TEFTESTMODULE`` in ``.ini`` file of a component.
+* There is no STF specific configuration for Helium in addition to those in table-1 and table-2.
+* To enable STF for ATS set, :hlm-p:`ats.stf.enabled` (see table-3). By default this is not enabled.
+
+
+STIF
+----
+* The test framework is selected if there is a library ``stiftestinterface.lib`` in the ``.mmp`` file of a test component
+* There is no STIF specific configuration for Helium in addition to those in table-1 and table-2.
+
+
+SUT
+---
+* The test framework is selected if there is a library ``symbianunittestfw.lib`` in the ``.mmp`` file of a test component
+* There is no SUT specific configuration for Helium in addition to those in table-1 and table-2.
+
+
+TEF
+---
+* The test framework is selected if there is a library ``testframeworkclient.lib`` in the ``.mmp`` file of a test component
+* There is no TEF specific configuration for Helium in addition to those in table-1 and table-2.
+
+
+TDriver
+-------
+* TDriver tests can be enabled by setting :hlm-p:`ats.tdriver.enabled` (see table-3).
+* TDriver Test Asset location should be known as a prerequisite.
+* Following TDriver specific properties are required in addition to those in table-1.
+ 
+
+.. csv-table:: Table: ATS Ant properties
+   :header: "Property name", "Edit status", "Description"
+   
+    ":hlm-p:`ats.tdriver.enabled`", "[must]", ":hlm-p:`ats.tdriver.enabled[documentation]`"
+    ":hlm-p:`tdriver.asset.location`", "[must]", ":hlm-p:`tdriver.asset.location[documentation]`"
+    ":hlm-p:`tdriver.test.profiles`", "[must]", ":hlm-p:`tdriver.test.profiles[documentation]`"
+    ":hlm-p:`tdriver.tdrunner.enabled`", "[must]", ":hlm-p:`tdriver.tdrunner.enabled[documentation]`"
+    ":hlm-p:`tdriver.test.timeout`", "[must]", ":hlm-p:`tdriver.test.timeout[documentation]`"
+    ":hlm-p:`tdriver.parameters`", "[must]", ":hlm-p:`tdriver.parameters[documentation]`"
+    ":hlm-p:`tdriver.sis.files`", "[must]", ":hlm-p:`tdriver.sis.files[documentation]`"
+    ":hlm-p:`tdriver.tdrunner.parameters`", "[must]", ":hlm-p:`tdriver.tdrunner.parameters[documentation]`"
+    ":hlm-p:`tdriver.template.file`", "[allowed]", ":hlm-p:`tdriver.template.file[documentation]`"
+    
+
+An example of setting up TDriver properties:
+
+.. code-block:: xml
+
+    <property name="ats.tdriver.enabled" value="true" />
+    <property name="tdriver.asset.location" value="\\server\share\tdriver_testcases, x:\dir\tdriver_testcases," />
+    <property name="tdriver.test.profiles" value="bat, fute" />
+    <property name="tdriver.tdrunner.enabled" value="true" />
+    <property name="tdriver.test.timeout" value="1200" />
+    <property name="tdriver.parameters" value="x:\dir\tdriverparameters\tdriver_parameters.xml" />
+    <property name="tdriver.sis.files" value="x:\sisfiles\abc.sis#f:\data\abc.sis#C:\abc.sis, x:\sisfiles\xyz.sis#f:\data\xyz.sis#F:\xyz.sis" />
+    <property name="tdriver.tdrunner.parameters" value="--ordered" />
+    <property name="tdriver.template.file" value="x:\dir\templates\tdriver_template_2.xml" />
+
+
+* To execute the tests, :hlm-t:`tdriver-test` target should be called.
+* To create custom templates for TDriver, read `Instructions for creating TDriver custom template`_.
+
+
+.. _`Instructions for creating TDriver custom template`: tdriver_template_instructions.html
+
+
+
+Test Automation Features
+========================
+
+CTC (Code Coverage)
+-------------------
+
+* To enable ctc for ATS set, :hlm-p:`ats.ctc.enabled` (see table-3).
+* To compile components for CTC see `configure CTC for SBS`_ 
+
+.. _`configure CTC for SBS`: ../helium-antlib/sbsctc.html
+
+* Once ATS tests have finished results for CTC will be shown in Diamonds.
+* The following are optional CTC properties
+
+.. csv-table:: Table: ATS Ant properties
+   :header: "Property name", "Edit status", "Description"
+   
+    "``ctc.instrument.type``", "[allowed]", "Sets the instrument type"
+    "``ctc.build.options``", "[allowed]", "Enables optional extra arguments for CTC, after importing a parent ant file."
+
+
+For example,
+
+.. code-block:: xml
+    
+    <property name="ctc.instrument.type" value="m" />
+
+    <import file="../../build.xml" />
+    
+    <hlm:argSet id="ctc.build.options">
+        <arg line="-C OPT_ADD_COMPILE+-DCTC_NO_START_CTCMAN" />
+    </hlm:argSet>
+
+Or
+
+.. code-block:: xml
+
+    <hlm:argSet id="ctc.build.options">
+        <arg line='-C "EXCLUDE+*\sf\os\xyz\*,*\tools\xyz\*"'/>
+    </hlm:argSet>
+
+
+See `more information on code coverage`_.
+
+<#if !(ant?keys?seq_contains("sf"))>
+.. _`more information on code coverage`: http://s60wiki.nokia.com/S60Wiki/CTC
+<#else>
+.. _`more information on code coverage`: http://developer.symbian.org/wiki/index.php/Testing_Guidelines_for_Package_Releases#Code_coverage
+</#if>
+
+
+
+Customized test XML files
+-------------------------
+
+The user can customize the generated test.xml with files:
+
+* **preset_custom.xml** goes before first set
+* **postset_custom.xml** goes after last set
+* **precase_custom.xml** goes before first case 
+* **postcase_custom.xml** goes after last case
+* **prestep_custom.xml** goes before first step
+* **poststep_custom.xml** goes after last step
+* **prerun_custom.xml** goes before first run or execute step
+* **postrun_custom.xml** goes after last run or execute step
+* **prepostaction.xml** goes before first postaction
+* **postpostaction.xml** goes after last postaction
+
+The files must be in the directory 'custom' under the 'tsrc' or 'group' folder to be processed. 
+
+The files need to be proper XML snippets that fit to their place. In case of an error an error is logged and a comment inserted to the generated XML file.
+
+A postaction section customization file (prepostaction.xml or postpostaction.xml) could look like this
+
+.. code-block:: xml
+
+   <action>
+        <type>RunProcessAction</type>
+        <parameters>
+            <parameter value="java" name="command"/>
+            <parameter value="-version" name="parameters"/>
+        </parameters>
+   </action>
+
+The ``prestep_custom.xml`` can be used to flash and unstall something custom.
+
+.. code-block:: xml
+
+   <task>
+      <type>FileUploadTask</type>
+      <parameters>
+          <parameter name="src" value="Nokia_Energy_Profiler_1_1.sisx"/>
+          <parameter name="dst" value="c:\data\Nokia_Energy_Profiler_1_1.sisx"/>
+          <parameter name="reboot-retry-count" value="1"/>
+          <parameter name="retry-count" value="1"/>
+      </parameters>
+  </task>
+
+
+
+And then the  ``prerun_custom.xml`` can be used to execute a task.
+
+.. code-block:: xml
+
+   <task>
+        <type>NonTestExecuteTask</type>
+        <parameters>
+            <parameter value="true" name="local"/>
+            <parameter value="daemon.exe" name="file"/>
+            <parameter value="test.cfg" name="parameters"/>
+            <parameter value="true" name="async"/>
+            <parameter value="my_daemon" name="pid"/>
+        </parameters>
+   </task>
+
+**Note:** The users is expected to check the generated test.xml manually, as there is no validation. Invalid XML input files will be disregarded and a comment will be inserted to the generated XML file.
+
+
+Custom templates/drops
+----------------------
+* If you need to send a static drop to ATS then you can call the target :hlm-t:`ats-custom-drop`.
+* An example template is in helium/tools/testing/ats/templates/ats4_naviengine_template.xml
+* Then set a property to your own template, as follows.
+
+.. code-block:: xml
+
+    <property name="ats.custom.template" value="path/to/mytemplate.xml" />
+
+
+Overriding XML values
+---------------------
+* Set the property ``ats.config.file`` to the location of the config file.
+
+Example configuration:
+
+.. code-block:: xml
+
+    <ATSConfigData>  
+        <config name="common" abstract="true">
+         
+            <!-- Properties to add/ modify -->
+            <config type="properties">
+               <set name="HARNESS" value="STIF" />
+               <set name="2" value="3" />
+            </config>
+            
+            <!-- Settings to add/ modify -->
+            <config type="settings">
+               <set name="HARNESS" value="STIF" />
+               <set name="2" value="3" />
+            </config>
+            
+            <!-- Attributes to modify -->
+            <config type="attributes">
+               <set name="xyz" value="2" />
+               <set name="significant" value="true" />
+            </config>
+        </config>
+    </ATSConfigData>
+
+
+Delta testing
+-------------
+
+
+Multiset support
+----------------
+* Enable the feature by setting property :hlm-p:`ats.multiset.enabled` to ``true``.
+* If enabled, a 'set' in test.xml, is used for each pkg file in a component, this allows tests to run in parallel on several devices.
+
+ROM Bootup Tests
+----------------
+* ROM images can be tested on ATS by executing target ":hlm-t:`ats-bootup-test`". This feature is useful to test whther the created ROM images boot-up a device or not . 
+* To enable this feature, set a property ":hlm-p:`ats.bootuptest.enabled`" (see table-3) 
+* In addition to enable the feature, properties in the table-1 are also required.
+    
+
+Single/Multiple test drops creation
+-----------------------------------
+* It is mentioned earlier in Step 1, that components can be grouped together.
+* During automation, separate TestDrops are created based on these groups.
+* This grouping can be neglected and a single test drop can be created by setting a property :hlm-p:`ats.singledrop.enabled` By default the value is 'false'. For example, 
+
+
+.. code-block:: xml
+    
+    <property name="ats.singledrop.enabled" value="true" />
+    
+
+
+Skip uploading test drops
+-------------------------
+* ``ats-test`` target can only create a drop file, and does not send the drop (or package) to ATS server.
+* To use the feature, set the following property to ``flase``.
+
+.. code-block:: xml
+
+    <property name="ats.upload.enabled" value="false" />
+
+
+<#if !(ant?keys?seq_contains("sf"))>
+
+Support for multiple products (ROM images)
+------------------------------------------
+
+See: `Instructions for setting up  multiple roms and executing specific tests`_.
+
+.. _`Instructions for setting up  multiple roms and executing specific tests`: http://helium.nmp.nokia.com/doc/ido/romandtest.html
+
+
+</#if>
+
+
+Testing with Winscw Emulator
+----------------------------
+* If enabled, ``ats-test`` target creates a zip of build area instead of images for use by emulator on ATS server.
+* Set a property as follows.
+
+.. code-block:: xml
+
+    <property name="ats.emulator.enable" value="true" />
+
+
+<#if !(ant?keys?seq_contains("sf"))>
+
+Tracing
+-------
+* Currently there isn't a single standard method of doing tracing in Symbian Platform. 
+* Application, middleware, driver and kernel developers have used different methods for instrumenting their code. Due to the different methods used, it is inherently difficult to get a coherent overview of the whole platform when debugging and testing sw.
+* Current implementation of Tracing in Helium is based on the instruction given `here`_.
+* Tracing can be enabled by setting :hlm-p:`ats.trace.enabled` to ``true`` (see table-3).
+
+.. _`here`: http://s60wiki.nokia.com/S60Wiki/Tracing
+
+</#if>
+
+
+Troubleshooting TA
+==================
+
+.. csv-table:: Table: Trouble shooting test automation
+   :header: "Type", "Description", "Possible solution"
+   
+    "Error", "'*<path>*' not found", "Either the PKG file does not exist or incorrect filename."
+    "Error", "No test modules found in '*<path>*'", "This error is raised when there is no test components available. Check that your components are in the SystemDefinition files, and that the filters are set accordingly to the test asset documentation and that the components actually exists in the asset." 
+    "Error", "'*<path>*' - test source not found", "Path in the bld.inf file is either incorrect or the component does not exist."
+    "Error", "Not enough flash files: # defined, # needed", "Check property :hlm-p:`ats.flashfiles.minlimit`. Selected ROM images files # is lesser than the required no. of files. This error can also be eliminated by reducing the value of the property."
+    "Error", "'CPP failed: '<command>' in: '*<path>*'", "Check the path and/or the file. There can be broken path in the file or mising directives and macros."
+    "Error", "*<path>* - test sets are empty", "missing/invalid deirectives and/or project macros. The .mmp file ca be missing."
+    
+    
--- a/buildframework/helium/doc/src/manual/stage_ats.rst.inc.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,506 +0,0 @@
-<#--
-============================================================================ 
-Name        : stage_ats.rst.inc.ftl
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
--->
-
-.. index::
-  single: ATS - STIF, TEF, RTEST, MTF and EUnit
-
-.. _`Stage-ATS-label`:
-
-Stage: ATS - STIF, TEF, RTEST, MTF and EUnit (also Qt)
-=======================================================
-
-ATS testing is the automatic testing of the phone code once it has been compiled and linked to create a ROM image.
-
-Explanation of the process for getting ATS (`STIF`_ and `EUnit`_) tests compiled and executed by Helium, through the use of the :hlm-t:`ats-test` target.
-
-http://developer.symbian.org/wiki/index.php/Symbian_Test_Tools
-
-<#if !(ant?keys?seq_contains("sf"))>
-.. _`STIF`: http://s60wiki.nokia.com/S60Wiki/STIF
-.. _`EUnit`: http://s60wiki.nokia.com/S60Wiki/EUnit
-</#if>
-
-.. image:: ats.dot.png
-
-Prerequisites
-----------------
-
-* `Harmonized Test Interface (HTI)`_ needs to be compiled and into the image.
-* The reader is expected to already have a working ATS setup in which test cases can be executed.  ATS server names, 
-  access rights and authentication etc. is supposed to be already taken care of.
-
-<#if !(ant?keys?seq_contains("sf"))>
-.. _`Harmonized Test Interface (HTI)`: http://s60wiki.nokia.com/S60Wiki/HTI
-<#else>
-.. _`Harmonized Test Interface (HTI)`: http://developer.symbian.org/wiki/index.php/HTI_Tool
-</#if>
-
-Test source components
--------------------------
-
-Test source usually lives in a component's ``tsrc`` directory.  Test source components are created like any other Symbian SW component; 
-there is a ``group`` directory with a ``bld.inf`` file for building, ``.mmp`` files for defining the targets, and so on.
-
-The test generation code expects ``.pkg`` file in the ``group`` directory of test component to be compiled, to get the paths of the files 
-(can be data, configuration, initialization, etc files) to be installed and where to install on the phone. 
-
-
-Three STEPS to setup ATS with Helium
---------------------------------------
-
-**Step 1: Configure System Definition Files**
- If the tsrc directory structure meets the criteria defined in the `new API test automation guidelines`_, then test components 
- should be included in the System Definition files.
-
-**System Definition Files supporting layers.sysdef.xml**
- **layers** in ``layers.sysdef.xml`` file and **configuration** in ``build.sysdef.xml`` file (`Structure of System Definition files version 1.4`_).
- 
- <#if !(ant?keys?seq_contains("sf"))>
-.. _`new API test automation guidelines`: http://s60wiki.nokia.com/S60Wiki/Test_Asset_Guidelines
-.. _`Structure of System Definition files version 1.4`: http://delivery.nmp.nokia.com/trac/helium/wiki/SystemDefinitionFiles
-</#if>
-
-A template of layer in layers.sysdef.xml for system definition files
-
-.. code-block:: xml
-
-    <layer name="name_test_layer">
-        <module name="module_name_one">
-            <unit unitID="unit_id1" name="unit_name1" bldFile="path_of_tsrc_folder_to_be_built" mrp="" />
-        </module>
-        
-        <module name="module_name_two">
-            <unit unitID="unit_id2" name="unit_name2" bldFile="path_of_tsrc_folder_to_be_built" mrp="" />
-        </module>
-    </layer> 
-
-* Layer name should end with **_test_layer**
-* Two standard names for ATS test layers are being used; ``unit_test_layer`` and ``api_test_layer``. Test components (the``unit`` tags) 
-  should be specified under these layers and grouped by ``module`` tag(s).
-* In the above, two modules means two drop files will be created; ``module`` may have one or more ``unit``
-* By using property ``exclude.test.layers``, complete layers can be excluded and the components inside that layer will not be included in the AtsDrop. This property is a comma (,) separated list
-
-**System Definition Files version 3.0 (SysDefs3)** (new Helium v.10.79)
- The `structure of System Definition files version 3.0`_ is different than previous versions of system definition files. In SysDefs3, package definition files are used for components specification. Instead of layers naming conventions, filters are used to identify test components and test types, for example: "test, unit_test, !api_test" etc.
-
-<#if !(ant?keys?seq_contains("sf"))>
-.. _`structure of System Definition files version 3.0`: http://wikis.in.nokia.com/view/SWManageabilityTeamWiki/PkgdefUse
-<#else>
-.. _`structure of System Definition files version 3.0`: sysdef3.rst
-</#if>
-
-An example template for defining test components in a package definition file.
-
-.. code-block:: xml
-
-      <package id="dummytest" name="dummytest" levels="demo">
-        <collection id="test_nested" name="test_nested" level="demo">
-        
-          <component id="tc1" name="tc1" purpose="development" filter="test, unit_test">
-              <unit bldFile="test_nested/tc1/group" mrp="" />
-          </component>
-          
-          <component id="tc2" name="tc2" purpose="development" filter="test">
-            <meta rel="testbuild">
-              <group name="drop_tc2_and_tc3" /> 
-            </meta>
-            <unit bldFile="test_nested/tc2/group" mrp="" />
-          </component>
-          
-          <component id="tc3" name="tc3" purpose="development" filter="test">
-            <meta rel="testbuild">
-              <group name="drop_tc2_and_tc3" /> 
-            </meta>
-            <unit bldFile="test_nested/tc3/group" mrp="" />
-          </component>
-          
-        </collection>
-      </package>
-
-* Filter "test" must be specified for every test component. If it is not specified, the component will not be considered as a test component.
-* <meta>/<group> are now used to group test components, it work in the same way as <module>...<module> in sysdef v1.4 works. The components having same group name are grouped together. 
-  Separate drop files are created for different groups. In the above example, if only 'test' is selected, then two drop files will be created, one with tc1 and the other one with tc2 and tc3. 
-
-
-**Step 2: Configure ATS properties in build.xml**
-
-**(A)** Username and Password for the ATS should be set in the `.netrc file`_::
-
-    machine ats login ats_user_name password ats_password
-
-Add the above line in the ``.netrc`` file and replace ``ats_user_name`` with your real ATS username and ``ats_password`` with ATS password.
-    
-**(B)** The following properties are ATS dependent with their edit status
-
-* [must] - must be set by user
-* [recommended] - should be set by user but not mandatory
-* [allowed] - should **not** be set by user however, it is possible.
-
-.. csv-table:: ATS Ant properties
-   :header: "Property name", "Edit status", "Description"
-   
-    ":hlm-p:`ats.server`", "[must]", "For example: ``4fix012345`` or ``catstresrv001.company.net:80``. Default server port is ``8080``, but it is not allowed between intra and Noklab. Because of this we need to define server port as 80. The host can be different depending on site and/or product."
-    ":hlm-p:`ats.drop.location`", "[allowed]", "Server location (UNC path) to save the ATSDrop file, before sending to the ATS Server. For example: ``\\\\trwsem00\\some_folder\\``. In case, :hlm-p:`ats.script.type` is set to ``import``, ATS doesn't need to have access to :hlm-p:`ats.drop.location`,  its value can be any local folder on build machine, for example ``c:/temp`` (no network share needed)."
-    ":hlm-p:`ats.product.name`", "[must]", "Name of the product to be tested."
-    ":hlm-p:`eunit.test.package`", "[allowed]", "The EUnit package name to be unzipped on the environment, for executing EUnit tests."
-    ":hlm-p:`eunitexerunner.flags`", "[allowed]", "Flags for EUnit exerunner can be set by setting the value of this variable. The default flags are set to ``/E S60AppEnv /R Off``."
-    ":hlm-p:`ats.email.list`", "[allowed]", "The property is needed if you want to get an email from ATS server after the tests are executed. There can be one to many semicolon-separated email addresses."
-    ":hlm-p:`ats.report.type`", "[allowed]", "Value of the ats email report, for ATS4 set to 'no_attachment' so email size is reduced"
-    ":hlm-p:`ats.flashfiles.minlimit`", "[allowed]", "Limit of minimum number of flash files to execute :hlm-t:`ats-test` target, otherwise ``ATSDrop.zip`` will not be generated. Default value is 2 files."
-    ":hlm-p:`ats.plan.name`", "[allowed]", "Modify the plan name if you have understanding of ``test.xml`` file or leave it as it is. Default value is ``plan``."
-    ":hlm-p:`ats.product.hwid`", "[allowed]", "Product HardWare ID (HWID) attached to ATS. By default the value of HWID is not set."
-    ":hlm-p:`ats.script.type`", "[allowed]", "There are two types of ats script files to send drop to ATS server, ``runx`` and ``import``; only difference is that with ``import`` ATS doesn't have to have access rights to ``testdrop.zip`` file, as it is sent to the system over http and import doesn't need network shares. If that is not needed ``import`` should not be used. Default value is ``runx`` as ``import`` involves heavy processing on ATS server."
-    ":hlm-p:`ats.target.platform`", "[allowed]", "Sets target platform for compiling test components. Default value is ``armv5 urel``."
-    ":hlm-p:`ats.test.timeout`", "[allowed]", "To set test commands execution time limit on ATS server, in seconds. Default value is ``60``."
-    ":hlm-p:`ats.testrun.name`", "[allowed]", "Modify the test-run name if you have understanding of ``test.xml`` file or leave it as it is. Default value is a string consist of build id, product name, major and minor versions."
-    ":hlm-p:`ats.trace.enabled`", "[allowed]", "Should be ``true`` if tracing is needed during the tests running on ATS. Default value is ``false``, the values are case-sensitive. See http://s60wiki.nokia.com/S60Wiki/CATS/TraceTools."
-    ":hlm-p:`ats.ctc.enabled`", "[allowed]", "Should be ``true`` if coverage measurement and dynamic analysis (CTC) tool support is to be used by ATS. Default value is ``false``. The values are case-sensitive."
-    ":hlm-p:`ats.ctc.host`", "[allowed]", "CTC host, provided by CATS used to create coverage measurement reports. MON.sym files are copied to this location, for example ``10.0.0.1``. If not given, code coverage reports are not created"
-    ":hlm-p:`ats.obey.pkgfiles.rule`", "[allowed]", "If the property is set to ``true``, then the only test components which will have PKG files, will be included into the ``test.xml`` as a test-set. Which means, even if there's a test component (executable) but there's no PKG file, it should not be considered as a test component and hence not included into the test.xml as a separate test. By default the property value is ``false``."
-    "``reference.ats.flash.images``", "[allowed]", "Fileset for list of flash images (can be .fpsx, .C00, .V01 etc) It is recommended to set the fileset, default filset is given below which can be overwritten. set *dir=""* attribute of the filset to ``${r'$'}{build.output.dir}/variant_images`` if hlm-t:`variant-image-creation` target is being used."
-    ":hlm-p:`tsrc.data.dir`", "[allowed]", "The default value is ``data`` and refers to the 'data' directory under 'tsrc' directory."
-    ":hlm-p:`tsrc.path.list`", "[allowed]", "Contains list of the tsrc directories. Gets the list from system definition layer files. Assuming that the test components are defined already in te ``layers.sysdef.xml`` files to get compiled. Not recommended, but the property value can be set if there are no System Definition file(s), and tsrc directories paths to set manually."
-    ":hlm-p:`ats.report.location`", "[allowed]", "Sets ATS reports store location. Default location is ``${r'$'}{publish.dir}/${r'$'}{publish.subdir}``."
-    ":hlm-p:`ats.multiset.enabled`", "[allowed]", "Should be ``true`` so a set is used for each pkg file in a component, this allows tests to run in parallel on several devices."
-    ":hlm-p:`ats.diamonds.signal`", "[allowed]", "Should be ``true`` so at end of the build diamonds is checked for test results and Helium fails if tests failed."
-    ":hlm-p:`ats.delta.enabled`", "[allowed]", "Should be ``true`` so only ADOs changed during :hlm-t:`do-prep-work-area` are tested by ATS."
-    ":hlm-p:`ats4.enabled`", "[allowed]", "Should be ``true`` if ATS4 is to be used."
-    ":hlm-p:`ats.emulator.enable`", "[allowed]", "Should be ``true`` if ``WINSCW`` emulator is to be used."
-    ":hlm-p:`ats.specific.pkg`", "[allowed]", "Text in name of PKG files to use eg. 'sanity' would only use xxxsanity.pkg files from components."
-    ":hlm-p:`ats.singledrop.enabled`", "[allowed]", "If present and set to 'true', it will create one drop file, if set to any other value or not present it will create multiple drop files (defined by the sysdef file). This is to save traffic to the server."
-    ":hlm-p:`ats.java.importer.enabled`", "[allowed]", "If set to 'true', for older uploader is used for ats3 which shows improved error message."
-    ":hlm-p:`ats.test.filterset`", "[allowed]", "(new Helium v.10.79)Contains a name of test filterset (see example below). A filterset is used to select/unselect test components. The filter(s) is/are effective when the same filters are defined in the package definition file for component(s)."
-
-An example of setting up properties:
-
-.. code-block:: xml
-
-    <property name="ats.server" value="4fio00105"  />
-    <property name="ats.drop.location" location="\\trwsimXX\ATS_TEST_SHARE\" />
-    <property name="ats.email.list" value="temp.user@company.com; another.email@company.com" />
-    <property name="ats.flashfiles.minlimit" value="2" />
-    <property name="ats.product.name" value="PRODUCT" />
-    <property name="ats.plan.name" value="plan" />
-    <property name="ats.product.hwid" value="" />
-    <property name="ats.script.type" value="runx" />
-    <property name="ats.target.platform" value="armv5 urel" />
-    <property name="ats.test.timeout" value="60" />
-    <property name="ats.testrun.name" value="${r'$'}{build.id}_${r'$'}{ats.product.name}_${r'$'}{major.version}.${r'$'}{minor.version}" />
-    <property name="ats.trace.enabled" value="false" />
-    <property name="ats.ctc.enabled" value="false" />
-    <property name="ats.obey.pkgfiles.rule" value="false" />
-    <property name="ats.report.location" value="${r'$'}{publish.dir}/${r'$'}{publish.subdir}" />
-    <property name="eunit.test.package" value="" />
-    <property name="eunitexerunner.flags" value="/E S60AppEnv /R Off" />
-    <property name="ats.test.filterset" value="sysdef.filters.tests" />
-
-    <hlm:sysdefFilterSet id="sysdef.filters.tests">
-        <filter filter="test, " type="has" />
-        <config file="bldvariant.hrh" includes="" />
-    </hlm:sysdefFilterSet>
-    
-        
-        ...
-        <import file="${r'$'}{helium.dir}/helium.ant.xml" />
-        ...
-    
-    <fileset id="reference.ats.flash.images" dir="${r'$'}{release.images.dir}">
-        <include name="**/${r'$'}{build.id}*.core.fpsx"/>
-        <include name="**/${r'$'}{build.id}*.rofs2.fpsx"/>
-        <include name="**/${r'$'}{build.id}*.rofs3.fpsx"/>
-    </fileset>
-    
-
-.. Note::
-   
-   Always declare *Properties* before and *filesets* after importing helium.ant.xml.
-
-**STEP 3: Call target ats-test**
-
-To execute the target, a property should be set(``<property name="ats.enabled" value="true" />``).
-
-Then call :hlm-t:`ats-test`, which will create the ATSDrop.zip (test package).
-
-If property *ats.email.list* is set, an email (test report) will be sent when the tests are ready on ATS.
-
-CTC:
-----
-
-CTC code coverage measurements reports can be created as part of Test Automation process.
-
-1. Build the src using ``build_ctc`` configuration, which is in ``build.sysdef.xml`` file, to create ``MON.sym`` files. It means that a property ``sysdef.configurations.list`` should be modified either add or replace current build configuration with ``build_ctc``
-
-2. Set the property, ``ats.ctc.host``, as described above, for sending the ``MON.sym`` files to the network drive. *(Please contact ATS server administrator and ask for the value to set this property)*
-
-3. Enable CTC process by setting up property ``ats.ctc.enabled`` to "true"
-
-4. Test drops are sent to the ATS server, where, after executing tests ``ctcdata.txt`` files are created. ``ctcdata.txt`` and ``MON.sym`` files are then further processed to create code coverage reports.
-
-5. View or download the Code coverage reports by following the link provided in the ATS report email (sent after the tests are executed on ATS)
-
-*NOTE: After receiving the email notification, it may take a few minutes before the code coverage reports are available.*
-
-
-Qt Tests:
----------
-
-QtTest.lib is supported and the default harness is set to EUnit. If ``QtTest.lib`` is there in ``.mmp`` file, Helium sets the Harness to Eunit and ATS supported Qt steps are added to test.xml file
-
-In ``layers.sysdef.xml`` file, the layer name should end with "_test_layer" e.g. "qt_unit_test_layer".
-
-There are several ``.PKG`` files created after executing ``qmake``, but only one is selected based on which target platform is set. Please read the property (``ats.target.platform``) description above.
-
-.. _`Skip-Sending-AtsDrop-label`:
-
-Skip Sending AtsDrop to ATS
-----------------------------
-
-By setting property of ``ats.upload.enabled`` to ``false``, ``ats-test`` target only creates a drop file, and does not send the drop (or package) to ATS server.
-
-Customizing the test.xml in ATS
---------------------------------
-
-The user can customize the generated test.xml with files:
-
-* **preset_custom.xml** goes before first set
-* **postset_custom.xml** goes after last set
-* **precase_custom.xml** goes before first case 
-* **postcase_custom.xml** goes after last case
-* **prestep_custom.xml** goes before first step
-* **poststep_custom.xml** goes after last step
-* **prerun_custom.xml** goes before first run or execute step
-* **postrun_custom.xml** goes after last run or execute step
-* **prepostaction.xml** goes before first postaction
-* **postpostaction.xml** goes after last postaction
-
-The files must be in the directory 'custom' under the 'tsrc' or 'group' folder to be processed. 
-
-The files need to be proper XML snippets that fit to their place. In case of an error an error is logged and a comment inserted to the generated XML file.
-
-A postaction section customization file (prepostaction.xml or postpostaction.xml) could look like this
-
-.. code-block:: xml
-
-  <postAction>
-    <type>Pre PostAction from custom file</type> 
-    <params>
-       <param name="foo2" value="bar2" /> 
-    </params>
-  </postAction>
-  
-
-
-The ``prestep_custom.xml`` can be used to flash and unstall something custom.
-
-.. code-block:: xml
-
-  <step name="Install measurement tools" harness="STIF" significant="false">
-    <!-- Copy SIS-packages to DUT -->
-    <command>install</command>
-    <params>
-        <param src="Nokia_Energy_Profiler_1_1.sisx"/>
-        <param dst="c:\data\Nokia_Energy_Profiler_1_1.sisx"/>
-    </params>
-    ...
-  </step>
-
-
-And then the  ``prerun_custom.xml`` can be used to start measuring.
-
-.. code-block:: xml
-
-  <step name="Start measurement" harness="STIF" significant="false">
-      <!-- Start measurement -->
-      <command>execute</command>
-      <params>
-          <param file="neplauncher.exe"/>
-          <param parameters="start c:\data\nep.csv"/>
-          <param timeout="30"/>
-      </params>
-  </step>
-
-
-
-**Note:** The users is expected to check the generated test.xml manually, as there is no validation. Invalid XML input files will be disregarded and a comment will be inserted to the generated XML file.
-
-Overriding Test xml values
---------------------------
-
-Set the property ``ats.config.file`` to the location of the config file.
-
-Example configuration:
-
-.. code-block:: xml
-
-    <ATSConfigData>  
-        <config name="common" abstract="true">
-         
-            <!-- Properties to add/ modify -->
-            <config type="properties">
-               <set name="HARNESS" value="STIF" />
-               <set name="2" value="3" />
-            </config>
-            
-            <!-- Settings to add/ modify -->
-            <config type="settings">
-               <set name="HARNESS" value="STIF" />
-               <set name="2" value="3" />
-            </config>
-            
-            <!-- Attributes to modify -->
-            <config type="attributes">
-               <set name="xyz" value="2" />
-               <set name="significant" value="true" />
-            </config>
-        </config>
-    </ATSConfigData>
-
-
-.. index::
-  single: ATS - ASTE
-
-Stage: ATS - ASTE
-===================
-
-Explanation of the process for getting ATS `ASTE`_ tests compiled and executed by Helium, through the use of the :hlm-t:`ats-aste` target.
-
-<#if !(ant?keys?seq_contains("sf"))>
-.. _`ASTE`: http://s60wiki.nokia.com/S60Wiki/ASTE
-</#if>
-
-Prerequisites
---------------
-
-* `Harmonized Test Interface (HTI)`_ needs to be compiled and into the image.
-* The reader is expected to already have a working ATS setup in which test cases can be executed.  ATS server names, access rights and authentication etc. is supposed to be already taken care of.
-* `SW Test Asset`_ location and type of test should be known.
-
-<#if !(ant?keys?seq_contains("sf"))>
-.. _`Harmonized Test Interface (HTI)`: http://s60wiki.nokia.com/S60Wiki/HTI
-.. _`SW Test Asset`: http://s60wiki.nokia.com/S60Wiki/MC_SW_Test_Asset_documentation
-</#if>
-
-Test source components
---------------------------
-
-Unlike STIF, EUnit etc tests, test source components (or ``tsrc`` structure) is not needed for `ASTE`_ tests.
-
-Two STEPS to setup ASTE with Helium
-------------------------------------
-
-**STEP 1: Configure ASTE properties in build.xml**
-
-**(A)** Username and Password for the ATS should be set in the `.netrc file`_
-
-.. code-block:: text
-
-    machine ats login ats_user_name password ats_password
-
-Add the above line in the .netrc file and replace *ats_user_name* with your real ats username and "ats_password" with ats password.
-    
-.. _`.netrc file`: configuring.html?highlight=netrc#passwords
-
-
-**(B)** The following properties are ASTE dependent with their edit status
-
-* [must] - must be set by user
-* [recommended] - should be set by user but not mandatory
-* [allowed] - should **not** be set by user however, it is possible.
-
-.. csv-table:: ATS Ant properties
-   :header: "Property name", "Edit status", "Description"
-   
-    ":hlm-p:`ats.server`", "[must]", "For example: ``4fio00105`` or ``catstresrv001.company.net:80``. Default server port is ``8080``, but it is not allowed between intra and Noklab. Because of this we need to define server port as ``80``. The host can be different depending on site and/or product."
-    ":hlm-p:`ats.drop.location`", "[must]", "Server location (UNC path) to save the ATSDrop file, before sending to the ATS. For example: ``\\\\trwsem00\\some_folder\\``. In case, ``ats.script.type`` is set to ``import``, ATS doesn't need to have access to :hlm-p:`ats.drop.location`,  its value can be any local folder on build machine, for example ``c:/temp`` (no network share needed)."
-    ":hlm-p:`ats.product.name`", "[must]", "Name of the product to be tested."
-    ":hlm-p:`ats.aste.testasset.location`", "[must]", "Location of SW Test Assets, if the TestAsset is not packaged then it is first compressed to a ``.zip`` file. It should be a UNC path."
-    ":hlm-p:`ats.aste.software.release`", "[must]", "Flash images releases, for example 'SPP 51.32'."
-    ":hlm-p:`ats.aste.software.version`", "[must]", "Version of the software to be tested. For example: 'W810'"
-    ":hlm-p:`ats.aste.email.list`", "[recommended]", "The property is needed if you want to get an email from ATS server after the tests are executed. There can be one to many semicolon(s) ";" separated email addresses."
-    ":hlm-p:`ats.flashfiles.minlimit`", "[recommended]", "Limit of minimum number of flash files to execute ats-test target, otherwise ATSDrop.zip will not be generated. Default value is "2" files."
-    ":hlm-p:`ats.aste.plan.name`", "[recommended]", "Modify the plan name if you have understanding of test.xml file or leave it as it is. Default value is "plan"."
-    ":hlm-p:`ats.product.hwid`", "[recommended]", "Product HardWare ID (HWID) attached to ATS. By default the value of HWID is not set."
-    ":hlm-p:`ats.test.timeout`", "[recommended]", "To set test commands execution time limit on ATS server, in seconds. Default value is '60'."
-    ":hlm-p:`ats.aste.testrun.name`", "[recommended]", "Modify the test-run name if you have understanding of ``test.xml`` file or leave it as it is. Default value is a string consists of build id, product name, major and minor versions."
-    ":hlm-p:`ats.aste.test.type`", "[recommended]", "Type of test to run. Default is 'smoke'."
-    ":hlm-p:`ats.aste.testasset.caseids`", "[recommended]", "These are the cases that which tests should be run from the TestAsset. For example, value can be set as ``100,101,102,103,105,106,``. A comma is needed to separate case IDs"
-    ":hlm-p:`ats.aste.language`", "[recommended]", "Variant Language to be tested. Default is 'English'"
-    "``reference.ats.flash.images``", "[recommended]", "Fileset for list of flash images (can be .fpsx, .C00, .V01 etc) It is recommended to set the fileset, default filset is given below which can be overwritten. set *dir=\"\"* attribute of the filset to ``${r'$'}{build.output.dir}/variant_images`` if :hlm-t:`variant-image-creation` target is being used."
-    
-    
-An example of setting up properties:
-    
-.. code-block:: xml
-    
-    <property name="ats.server" value="4fio00105"  />
-    <property name="ats.drop.location" value="\\trwsimXX\ATS_TEST_SHARE\" />
-    <property name="ats.aste.email.list" value="temp.user@company.com; another.email@company.com" />
-    <property name="ats.flashfiles.minlimit" value="2" />
-    <property name="ats.product.name" value="PRODUCT" />
-    <property name="ats.aste.plan.name" value="plan" />
-    <property name="ats.product.hwid" value="" />
-    <property name="ats.test.timeout" value="60" />
-    <property name="ats.aste.testrun.name" value="${r'$'}{build.id}_${r'$'}{ats.product.name}_${r'$'}{major.version}.${r'$'}{minor.version}" />
-    <property name="ats.aste.testasset.location" value="" />
-    <property name="ats.aste.software.release" value="SPP 51.32" />
-    <property name="ats.aste.test.type" value="smoke" />
-    <property name="ats.aste.testasset.caseids" value="100,101,102,104,106," />
-    <property name="ats.aste.software.version" value="W810" />
-    <property name="ats.aste.language" value="English" />
-         
-    ...
-    <import file="${r'$'}{helium.dir}/helium.ant.xml" />
-    ...
-    
-    <fileset id="reference.ats.flash.images" dir="${r'$'}{release.images.dir}">
-        <include name="**/${r'$'}{build.id}*.core.fpsx"/>
-        <include name="**/${r'$'}{build.id}*.rofs2.fpsx"/>
-        <include name="**/${r'$'}{build.id}*.rofs3.fpsx"/>
-    </fileset>
-    
-
-*PLEASE NOTE:* Always declare *Properties* before and *filesets* after importing helium.ant.xml.
-
-**STEP 2: Call target ats-aste**
-
-To execute the target, a property should be set(``<property name="enabled.aste" value="true" />``).
-
-Then call :hlm-t:`ats-aste`, which will create the ATSDrop.zip (test package).
-
-If property ``ats.aste.email.list`` is set, an email (test report) will be sent when the tests are ready on ATS/ASTE.
-
-
-Skip Sending AtsDrop to ATS
-------------------------------
-
-click :ref:`Skip-Sending-AtsDrop-label`:
-
-Stage: ATS - Custom Drop
-========================
-
-If you need to send a static drop to ATS then you can call the target :hlm-t:`ats-custom-drop` and set a property to your own template.
-
-A example template is in helium/tools/testing/ats/templates/ats4_naviengine_template.xml
-
-.. code-block:: xml
-
-    <property name="ats.custom.template" value="path/to/mytemplate.xml" />
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/doc/src/manual/stage_ats_old.rst.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,563 @@
+..  ============================================================================ 
+    Name        : stage_ats_old.rst.ftl
+    Part of     : Helium 
+    
+    Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+    All rights reserved.
+    This component and the accompanying materials are made available
+    under the terms of the License "Eclipse Public License v1.0"
+    which accompanies this distribution, and is available
+    at the URL "http://www.eclipse.org/legal/epl-v10.html".
+    
+    Initial Contributors:
+    Nokia Corporation - initial contribution.
+    
+    Contributors:
+    
+    Description:
+    
+    ============================================================================
+
+.. index::
+  module: TestingOld
+
+
+===========================
+Testing (ATS3/Old Document)
+===========================
+
+This is an old version of document for test automation for the **Helium users using ATS3**. 
+
+**ATS4 users** should read `Helium Test Automation User Guide`_ (revised).
+
+.. _`Helium Test Automation User Guide`: stage_ats.html  
+
+.. contents::
+
+  
+Stage: ATS - STIF, TEF, RTEST, MTF, SUT and EUnit (also Qt)
+===========================================================
+
+ATS testing is the automatic testing of the phone code once it has been compiled and linked to create a ROM image.
+
+Explanation of the process for getting ATS (`STIF`_ and `EUnit`_) tests compiled and executed by Helium, through the use of the :hlm-t:`ats-test` target.
+
+http://developer.symbian.org/wiki/index.php/Symbian_Test_Tools
+
+<#if !(ant?keys?seq_contains("sf"))>
+.. _`STIF`: http://s60wiki.nokia.com/S60Wiki/STIF
+.. _`EUnit`: http://s60wiki.nokia.com/S60Wiki/EUnit
+</#if>
+
+.. image:: ats.dot.png
+
+Prerequisites
+-------------
+
+* `Harmonized Test Interface (HTI)`_ needs to be compiled and into the image.
+* The reader is expected to already have a working ATS setup in which test cases can be executed.  ATS server names, 
+  access rights and authentication etc. is supposed to be already taken care of.
+
+<#if !(ant?keys?seq_contains("sf"))>
+.. _`Harmonized Test Interface (HTI)`: http://s60wiki.nokia.com/S60Wiki/HTI
+<#else>
+.. _`Harmonized Test Interface (HTI)`: http://developer.symbian.org/wiki/index.php/HTI_Tool
+</#if>
+
+Test source components
+----------------------
+
+Test source usually lives in a component's ``tsrc`` directory.  Test source components are created like any other Symbian SW component; 
+there is a ``group`` directory with a ``bld.inf`` file for building, ``.mmp`` files for defining the targets, and so on.
+
+The test generation code expects ``.pkg`` file in the ``group`` directory of test component to be compiled, to get the paths of the files 
+(can be data, configuration, initialization, etc files) to be installed and where to install on the phone. 
+
+
+Three STEPS to setup ATS with Helium
+------------------------------------
+
+**Step 1: Configure System Definition Files**
+ If the tsrc directory structure meets the criteria defined in the `new API test automation guidelines`_, then test components 
+ should be included in the System Definition files.
+
+**System Definition Files supporting layers.sysdef.xml**
+ **layers** in ``layers.sysdef.xml`` file and **configuration** in ``build.sysdef.xml`` file (`Structure of System Definition files version 1.4`_).
+ 
+ <#if !(ant?keys?seq_contains("sf"))>
+.. _`new API test automation guidelines`: http://s60wiki.nokia.com/S60Wiki/Test_Asset_Guidelines
+.. _`Structure of System Definition files version 1.4`: http://delivery.nmp.nokia.com/trac/helium/wiki/SystemDefinitionFiles
+</#if>
+
+A template of layer in layers.sysdef.xml for system definition files
+
+.. code-block:: xml
+
+    <layer name="name_test_layer">
+        <module name="module_name_one">
+            <unit unitID="unit_id1" name="unit_name1" bldFile="path_of_tsrc_folder_to_be_built" mrp="" />
+        </module>
+        
+        <module name="module_name_two">
+            <unit unitID="unit_id2" name="unit_name2" bldFile="path_of_tsrc_folder_to_be_built" mrp="" />
+        </module>
+    </layer> 
+
+* Layer name should end with **_test_layer**
+* Two standard names for ATS test layers are being used; ``unit_test_layer`` and ``api_test_layer``. Test components (the``unit`` tags) 
+  should be specified under these layers and grouped by ``module`` tag(s).
+* In the above, two modules means two drop files will be created; ``module`` may have one or more ``unit``
+* By using property ``exclude.test.layers``, complete layers can be excluded and the components inside that layer will not be included in the AtsDrop. This property is a comma (,) separated list
+
+**System Definition Files version 3.0 (SysDefs3)** (new Helium v.10.79)
+ The `structure of System Definition files version 3.0`_ is different than previous versions of system definition files. In SysDefs3, package definition files are used for components specification. Instead of layers naming conventions, filters are used to identify test components and test types, for example: "test, unit_test, !api_test" etc.
+
+<#if !(ant?keys?seq_contains("sf"))>
+.. _`structure of System Definition files version 3.0`: http://wikis.in.nokia.com/view/SWManageabilityTeamWiki/PkgdefUse
+<#else>
+.. _`structure of System Definition files version 3.0`: sysdef3.html
+</#if>
+
+An example template for defining test components in a package definition file.
+
+.. code-block:: xml
+
+      <package id="dummytest" name="dummytest" levels="demo">
+        <collection id="test_nested" name="test_nested" level="demo">
+        
+          <component id="tc1" name="tc1" purpose="development" filter="test, unit_test">
+              <unit bldFile="test_nested/tc1/group" mrp="" />
+          </component>
+          
+          <component id="tc2" name="tc2" purpose="development" filter="test">
+            <meta rel="testbuild">
+              <group name="drop_tc2_and_tc3" /> 
+            </meta>
+            <unit bldFile="test_nested/tc2/group" mrp="" />
+          </component>
+          
+          <component id="tc3" name="tc3" purpose="development" filter="test">
+            <meta rel="testbuild">
+              <group name="drop_tc2_and_tc3" /> 
+            </meta>
+            <unit bldFile="test_nested/tc3/group" mrp="" />
+          </component>
+          
+        </collection>
+      </package>
+
+* Filter "test" must be specified for every test component. If it is not specified, the component will not be considered as a test component.
+* <meta>/<group> are now used to group test components, it work in the same way as <module>...<module> in sysdef v1.4 works. The components having same group name are grouped together. 
+  Separate drop files are created for different groups. In the above example, if only 'test' is selected, then two drop files will be created, one with tc1 and the other one with tc2 and tc3. 
+
+
+**Step 2: Configure ATS properties in build.xml**
+
+**(A)** Username and Password for the ATS should be set in the `.netrc file`_::
+
+    machine ats login ats_user_name password ats_password
+
+Add the above line in the ``.netrc`` file and replace ``ats_user_name`` with your real ATS username and ``ats_password`` with ATS password.
+    
+**(B)** The following properties are ATS dependent with their edit status
+
+* [must] - must be set by user
+* [recommended] - should be set by user but not mandatory
+* [allowed] - should **not** be set by user however, it is possible.
+
+.. csv-table:: ATS Ant properties
+   :header: "Property name", "Edit status", "Description"
+   
+    ":hlm-p:`ats.server`", "[must]", "For example: ``4fix012345`` or ``catstresrv001.company.net:80``. Default server port is ``8080``, but it is not allowed between intra and Noklab. Because of this we need to define server port as 80. The host can be different depending on site and/or product."
+    ":hlm-p:`ats.drop.location`", "[allowed]", "Server location (UNC path) to save the ATSDrop file, before sending to the ATS Server. For example: ``\\\\trwsem00\\some_folder\\``. In case, :hlm-p:`ats.script.type` is set to ``import``, ATS doesn't need to have access to :hlm-p:`ats.drop.location`,  its value can be any local folder on build machine, for example ``c:/temp`` (no network share needed)."
+    ":hlm-p:`ats.product.name`", "[must]", "Name of the product to be tested."
+    ":hlm-p:`eunit.test.package`", "[allowed]", "The EUnit package name to be unzipped on the environment, for executing EUnit tests."
+    ":hlm-p:`eunitexerunner.flags`", "[allowed]", "Flags for EUnit exerunner can be set by setting the value of this variable. The default flags are set to ``/E S60AppEnv /R Off``."
+    ":hlm-p:`ats.email.list`", "[allowed]", "The property is needed if you want to get an email from ATS server after the tests are executed. There can be one to many semicolon-separated email addresses."
+    ":hlm-p:`ats.report.type`", "[allowed]", "Value of the ats email report, for ATS4 set to 'no_attachment' so email size is reduced"
+    ":hlm-p:`ats.flashfiles.minlimit`", "[allowed]", "Limit of minimum number of flash files to execute :hlm-t:`ats-test` target, otherwise ``ATSDrop.zip`` will not be generated. Default value is 2 files."
+    ":hlm-p:`ats.plan.name`", "[allowed]", "Modify the plan name if you have understanding of ``test.xml`` file or leave it as it is. Default value is ``plan``."
+    ":hlm-p:`ats.product.hwid`", "[allowed]", "Product HardWare ID (HWID) attached to ATS. By default the value of HWID is not set."
+    ":hlm-p:`ats.script.type`", "[allowed]", "There are two types of ats script files to send drop to ATS server, ``runx`` and ``import``; only difference is that with ``import`` ATS doesn't have to have access rights to ``testdrop.zip`` file, as it is sent to the system over http and import doesn't need network shares. If that is not needed ``import`` should not be used. Default value is ``runx`` as ``import`` involves heavy processing on ATS server."
+    ":hlm-p:`ats.target.platform`", "[allowed]", "Sets target platform for compiling test components. Default value is ``armv5 urel``."
+    ":hlm-p:`ats.test.timeout`", "[allowed]", "To set test commands execution time limit on ATS server, in seconds. Default value is ``60``."
+    ":hlm-p:`ats.testrun.name`", "[allowed]", "Modify the test-run name if you have understanding of ``test.xml`` file or leave it as it is. Default value is a string consist of build id, product name, major and minor versions."
+    ":hlm-p:`ats.trace.enabled`", "[allowed]", "Should be ``true`` if tracing is needed during the tests running on ATS. Default value is ``false``, the values are case-sensitive. See http://s60wiki.nokia.com/S60Wiki/CATS/TraceTools."
+    ":hlm-p:`ats.ctc.enabled`", "[allowed]", "Should be ``true`` if coverage measurement and dynamic analysis (CTC) tool support is to be used by ATS. Default value is ``false``. The values are case-sensitive."
+    ":hlm-p:`ats.ctc.host`", "[allowed]", "ATS3 only CTC host, provided by CATS used to create coverage measurement reports. MON.sym files are copied to this location, for example ``10.0.0.1``. If not given, code coverage reports are not created"
+    ":hlm-p:`ats.obey.pkgfiles.rule`", "[allowed]", "If the property is set to ``true``, then the only test components which will have PKG files, will be included into the ``test.xml`` as a test-set. Which means, even if there's a test component (executable) but there's no PKG file, it should not be considered as a test component and hence not included into the test.xml as a separate test. By default the property value is ``false``."
+    ":hlm-p:`tsrc.data.dir`", "[allowed]", "The default value is ``data`` and refers to the 'data' directory under 'tsrc' directory."
+    ":hlm-p:`tsrc.path.list`", "[allowed]", "Contains list of the tsrc directories. Gets the list from system definition layer files. Assuming that the test components are defined already in te ``layers.sysdef.xml`` files to get compiled. Not recommended, but the property value can be set if there are no System Definition file(s), and tsrc directories paths to set manually."
+    ":hlm-p:`ats.report.location`", "[allowed]", "Sets ATS reports store location. Default location is ``${r'$'}{publish.dir}/${r'$'}{publish.subdir}``."
+    ":hlm-p:`ats.multiset.enabled`", "[allowed]", "Should be ``true`` so a set is used for each pkg file in a component, this allows tests to run in parallel on several devices."
+    ":hlm-p:`ats.diamonds.signal`", "[allowed]", "Should be ``true`` so at end of the build diamonds is checked for test results and Helium fails if tests failed."
+    ":hlm-p:`ats.delta.enabled`", "[allowed]", "Should be ``true`` so only ADOs changed during :hlm-t:`do-prep-work-area` are tested by ATS."
+    ":hlm-p:`ats4.enabled`", "[allowed]", "Should be ``true`` if ATS4 is to be used."
+    ":hlm-p:`ats.emulator.enable`", "[allowed]", "Should be ``true`` if ``WINSCW`` emulator is to be used."
+    ":hlm-p:`ats.specific.pkg`", "[allowed]", "Text in name of PKG files to use eg. 'sanity' would only use xxxsanity.pkg files from components."
+    ":hlm-p:`ats.singledrop.enabled`", "[allowed]", "If present and set to 'true', it will create one drop file, if set to any other value or not present it will create multiple drop files (defined by the sysdef file). This is to save traffic to the server."
+    ":hlm-p:`ats.java.importer.enabled`", "[allowed]", "If set to 'true', for older uploader is used for ats3 which shows improved error message."
+    ":hlm-p:`ats.test.filterset`", "[allowed]", "(new Helium v.10.79)Contains a name of test filterset (see example below). A filterset is used to select/unselect test components. The filter(s) is/are effective when the same filters are defined in the package definition file for component(s)."
+
+An example of setting up properties:
+
+.. code-block:: xml
+
+    <property name="ats.server" value="4fio00105"  />
+    <property name="ats.drop.location" location="\\trwsimXX\ATS_TEST_SHARE\" />
+    <property name="ats.email.list" value="temp.user@company.com; another.email@company.com" />
+    <property name="ats.flashfiles.minlimit" value="2" />
+    <property name="ats.product.name" value="PRODUCT" />
+    <property name="ats.plan.name" value="plan" />
+    <property name="ats.product.hwid" value="" />
+    <property name="ats.script.type" value="runx" />
+    <property name="ats.target.platform" value="armv5 urel" />
+    <property name="ats.test.timeout" value="60" />
+    <property name="ats.testrun.name" value="${r'$'}{build.id}_${r'$'}{ats.product.name}_${r'$'}{major.version}.${r'$'}{minor.version}" />
+    <property name="ats.trace.enabled" value="false" />
+    <property name="ats.ctc.enabled" value="false" />
+    <property name="ats.obey.pkgfiles.rule" value="false" />
+    <property name="ats.report.location" value="${r'$'}{publish.dir}/${r'$'}{publish.subdir}" />
+    <property name="eunit.test.package" value="" />
+    <property name="eunitexerunner.flags" value="/E S60AppEnv /R Off" />
+    <property name="ats.test.filterset" value="sysdef.filters.tests" />
+
+    <hlm:sysdefFilterSet id="sysdef.filters.tests">
+        <filter filter="test, " type="has" />
+        <config file="bldvariant.hrh" includes="" />
+    </hlm:sysdefFilterSet>
+
+.. Note::
+   
+   Always declare *Properties* before and *filesets* after importing helium.ant.xml.
+
+**STEP 3: Call target ats-test**
+
+To execute the target, a property should be set(``<property name="ats.enabled" value="true" />``).
+
+Then call :hlm-t:`ats-test`, which will create the ATSDrop.zip (test package).
+
+If property *ats.email.list* is set, an email (test report) will be sent when the tests are ready on ATS.
+
+CTC
+---
+
+* To enable ctc for ATS set, :hlm-p:`ats.ctc.enabled`.
+
+For ATS3 only, set the ftp hostname for the ATS server:
+
+.. code-block:: xml
+    
+    <property name="ats.ctc.host" value="1.2.3"/>
+    
+    
+* To compile components for CTC see `configure CTC for SBS`_ 
+
+.. _`configure CTC for SBS`: ../helium-antlib/sbsctc.html
+
+
+* Once ATS tests have finished results for CTC will be shown in Diamonds.
+* The following are optional CTC properties
+
+.. csv-table:: Table: ATS Ant properties
+   :header: "Property name", "Edit status", "Description"
+   
+    "``ctc.instrument.type``", "[allowed]", "Sets the instrument type"
+    "``ctc.build.options``", "[allowed]", "Enables optional extra arguments for CTC, after importing a parent ant file."
+
+
+For example,
+
+.. code-block:: xml
+    
+    <property name="ctc.instrument.type" value="m" />
+
+    <import file="../../build.xml" />
+    
+    <hlm:argSet id="ctc.build.options">
+        <arg line="-C OPT_ADD_COMPILE+-DCTC_NO_START_CTCMAN" />
+    </hlm:argSet>
+
+Or
+
+.. code-block:: xml
+
+    <hlm:argSet id="ctc.build.options">
+        <arg line='-C "EXCLUDE+*\sf\os\xyz\*,*\tools\xyz\*"'/>
+    </hlm:argSet>
+
+
+See `more information on code coverage`_
+
+<#if !(ant?keys?seq_contains("sf"))>
+.. _`more information on code coverage`: http://s60wiki.nokia.com/S60Wiki/CTC
+<#else>
+.. _`more information on code coverage`: http://developer.symbian.org/wiki/index.php/Testing_Guidelines_for_Package_Releases#Code_coverage
+</#if>
+
+
+
+
+
+
+
+Qt Tests
+--------
+
+QtTest.lib is supported and the default harness is set to EUnit. If ``QtTest.lib`` is there in ``.mmp`` file, Helium sets the Harness to Eunit and ATS supported Qt steps are added to test.xml file
+
+In ``layers.sysdef.xml`` file, the layer name should end with "_test_layer" e.g. "qt_unit_test_layer".
+
+There are several ``.PKG`` files created after executing ``qmake``, but only one is selected based on which target platform is set. Please read the property (:hlm-p:`ats.target.platform`) description above.
+
+.. _`Skip-Sending-AtsDrop-label`:
+
+Skip Sending AtsDrop to ATS
+---------------------------
+
+By setting property of :hlm-p:`ats.upload.enabled` to ``false``, ``ats-test`` target only creates a drop file, and does not send the drop (or package) to ATS server.
+
+Choosing images to send to ATS
+------------------------------
+
+Since helium 10 images are picked up using :hlm-p:`ats.product.name` and Imaker iconfig.xml files. ``release.images.dir`` is searched for iconfig.xml files, the ones where the product name is part of :hlm-p:`ats.product.name` is used.
+
+You should only build the images for each product you want to include in ats. Eg.
+
+.. code-block:: xml
+
+    <hlm:imakerconfigurationset id="configname">
+        <imakerconfiguration>
+            <hlm:product list="${r'$'}{product.list}" ui="true"/>
+            <targetset>
+                <include name="^core${r'$'}"/>
+                <include name="^langpack_01${r'$'}"/>
+                <include name="^custvariant_01_tools${r'$'}"/>
+                <include name="^udaerase${r'$'}"/>
+            </targetset>
+            <variableset>
+                <variable name="TYPE" value="rnd"/>
+            </variableset>
+        </imakerconfiguration>
+    </hlm:imakerconfigurationset> 
+
+For older products where there are no iconfig.xml, ``reference.ats.flash.images`` is used:
+
+.. code-block:: xml
+
+    <fileset id="reference.ats.flash.images" dir="${r'$'}{release.images.dir}">
+        <include name="**/${r'$'}{build.id}*.core.fpsx"/>
+        <include name="**/${r'$'}{build.id}*.rofs2.fpsx"/>
+        <include name="**/${r'$'}{build.id}*.rofs3.fpsx"/>
+    </fileset>
+
+Customizing the test.xml in ATS
+-------------------------------
+
+The user can customize the generated test.xml with files:
+
+* **preset_custom.xml** goes before first set
+* **postset_custom.xml** goes after last set
+* **precase_custom.xml** goes before first case 
+* **postcase_custom.xml** goes after last case
+* **prestep_custom.xml** goes before first step
+* **poststep_custom.xml** goes after last step
+* **prerun_custom.xml** goes before first run or execute step
+* **postrun_custom.xml** goes after last run or execute step
+* **prepostaction.xml** goes before first postaction
+* **postpostaction.xml** goes after last postaction
+
+The files must be in the directory 'custom' under the 'tsrc' or 'group' folder to be processed. 
+
+The files need to be proper XML snippets that fit to their place. In case of an error an error is logged and a comment inserted to the generated XML file.
+
+A postaction section customization file (prepostaction.xml or postpostaction.xml) could look like this
+
+.. code-block:: xml
+
+  <postAction>
+    <type>Pre PostAction from custom file</type> 
+    <params>
+       <param name="foo2" value="bar2" /> 
+    </params>
+  </postAction>
+  
+
+
+The ``prestep_custom.xml`` can be used to flash and unstall something custom.
+
+.. code-block:: xml
+
+  <step name="Install measurement tools" harness="STIF" significant="false">
+    <!-- Copy SIS-packages to DUT -->
+    <command>install</command>
+    <params>
+        <param src="Nokia_Energy_Profiler_1_1.sisx"/>
+        <param dst="c:\data\Nokia_Energy_Profiler_1_1.sisx"/>
+    </params>
+    ...
+  </step>
+
+
+And then the  ``prerun_custom.xml`` can be used to start measuring.
+
+.. code-block:: xml
+
+  <step name="Start measurement" harness="STIF" significant="false">
+      <!-- Start measurement -->
+      <command>execute</command>
+      <params>
+          <param file="neplauncher.exe"/>
+          <param parameters="start c:\data\nep.csv"/>
+          <param timeout="30"/>
+      </params>
+  </step>
+
+
+
+**Note:** The users is expected to check the generated test.xml manually, as there is no validation. Invalid XML input files will be disregarded and a comment will be inserted to the generated XML file.
+
+Overriding Test xml values
+--------------------------
+
+Set the property ``ats.config.file`` to the location of the config file.
+
+Example configuration:
+
+.. code-block:: xml
+
+    <ATSConfigData>  
+        <config name="common" abstract="true">
+         
+            <!-- Properties to add/ modify -->
+            <config type="properties">
+               <set name="HARNESS" value="STIF" />
+               <set name="2" value="3" />
+            </config>
+            
+            <!-- Settings to add/ modify -->
+            <config type="settings">
+               <set name="HARNESS" value="STIF" />
+               <set name="2" value="3" />
+            </config>
+            
+            <!-- Attributes to modify -->
+            <config type="attributes">
+               <set name="xyz" value="2" />
+               <set name="significant" value="true" />
+            </config>
+        </config>
+    </ATSConfigData>
+
+
+.. index::
+  single: ATS - ASTE
+
+Stage: ATS - ASTE
+=================
+
+Explanation of the process for getting ATS `ASTE`_ tests compiled and executed by Helium, through the use of the :hlm-t:`ats-aste` target.
+
+<#if !(ant?keys?seq_contains("sf"))>
+.. _`ASTE`: http://s60wiki.nokia.com/S60Wiki/ASTE
+</#if>
+
+Prerequisites
+-------------
+
+* `Harmonized Test Interface (HTI)`_ needs to be compiled and into the image.
+* The reader is expected to already have a working ATS setup in which test cases can be executed.  ATS server names, access rights and authentication etc. is supposed to be already taken care of.
+* `SW Test Asset`_ location and type of test should be known.
+
+<#if !(ant?keys?seq_contains("sf"))>
+.. _`Harmonized Test Interface (HTI)`: http://s60wiki.nokia.com/S60Wiki/HTI
+.. _`SW Test Asset`: http://s60wiki.nokia.com/S60Wiki/MC_SW_Test_Asset_documentation
+</#if>
+
+Test source components
+----------------------
+
+Unlike STIF, EUnit etc tests, test source components (or ``tsrc`` structure) is not needed for `ASTE`_ tests.
+
+Two STEPS to setup ASTE with Helium
+-----------------------------------
+
+**STEP 1: Configure ASTE properties in build.xml**
+
+**(A)** Username and Password for the ATS should be set in the `.netrc file`_
+
+.. code-block:: text
+
+    machine ats login ats_user_name password ats_password
+
+Add the above line in the .netrc file and replace *ats_user_name* with your real ats username and "ats_password" with ats password.
+    
+.. _`.netrc file`: configuring.html?highlight=netrc#passwords
+
+
+**(B)** The following properties are ASTE dependent with their edit status
+
+* [must] - must be set by user
+* [recommended] - should be set by user but not mandatory
+* [allowed] - should **not** be set by user however, it is possible.
+
+.. csv-table:: ATS Ant properties
+   :header: "Property name", "Edit status", "Description"
+   
+    ":hlm-p:`ats.server`", "[must]", "For example: ``4fio00105`` or ``catstresrv001.company.net:80``. Default server port is ``8080``, but it is not allowed between intra and Noklab. Because of this we need to define server port as ``80``. The host can be different depending on site and/or product."
+    ":hlm-p:`ats.drop.location`", "[must]", "Server location (UNC path) to save the ATSDrop file, before sending to the ATS. For example: ``\\\\trwsem00\\some_folder\\``. In case, ``ats.script.type`` is set to ``import``, ATS doesn't need to have access to :hlm-p:`ats.drop.location`,  its value can be any local folder on build machine, for example ``c:/temp`` (no network share needed)."
+    ":hlm-p:`ats.product.name`", "[must]", "Name of the product to be tested."
+    ":hlm-p:`ats.aste.testasset.location`", "[must]", "Location of SW Test Assets, if the TestAsset is not packaged then it is first compressed to a ``.zip`` file. It should be a UNC path."
+    ":hlm-p:`ats.aste.software.release`", "[must]", "Flash images releases, for example 'SPP 51.32'."
+    ":hlm-p:`ats.aste.software.version`", "[must]", "Version of the software to be tested. For example: 'W810'"
+    ":hlm-p:`ats.aste.email.list`", "[recommended]", "The property is needed if you want to get an email from ATS server after the tests are executed. There can be one to many semicolon(s) ";" separated email addresses."
+    ":hlm-p:`ats.flashfiles.minlimit`", "[recommended]", "Limit of minimum number of flash files to execute ats-test target, otherwise ATSDrop.zip will not be generated. Default value is "2" files."
+    ":hlm-p:`ats.aste.plan.name`", "[recommended]", "Modify the plan name if you have understanding of test.xml file or leave it as it is. Default value is "plan"."
+    ":hlm-p:`ats.product.hwid`", "[recommended]", "Product HardWare ID (HWID) attached to ATS. By default the value of HWID is not set."
+    ":hlm-p:`ats.test.timeout`", "[recommended]", "To set test commands execution time limit on ATS server, in seconds. Default value is '60'."
+    ":hlm-p:`ats.aste.testrun.name`", "[recommended]", "Modify the test-run name if you have understanding of ``test.xml`` file or leave it as it is. Default value is a string consists of build id, product name, major and minor versions."
+    ":hlm-p:`ats.aste.test.type`", "[recommended]", "Type of test to run. Default is 'smoke'."
+    ":hlm-p:`ats.aste.testasset.caseids`", "[recommended]", "These are the cases that which tests should be run from the TestAsset. For example, value can be set as ``100,101,102,103,105,106,``. A comma is needed to separate case IDs"
+    ":hlm-p:`ats.aste.language`", "[recommended]", "Variant Language to be tested. Default is 'English'"
+    
+    
+An example of setting up properties:
+    
+.. code-block:: xml
+    
+    <property name="ats.server" value="4fio00105"  />
+    <property name="ats.drop.location" value="\\trwsimXX\ATS_TEST_SHARE\" />
+    <property name="ats.aste.email.list" value="temp.user@company.com; another.email@company.com" />
+    <property name="ats.flashfiles.minlimit" value="2" />
+    <property name="ats.product.name" value="PRODUCT" />
+    <property name="ats.aste.plan.name" value="plan" />
+    <property name="ats.product.hwid" value="" />
+    <property name="ats.test.timeout" value="60" />
+    <property name="ats.aste.testrun.name" value="${r'$'}{build.id}_${r'$'}{ats.product.name}_${r'$'}{major.version}.${r'$'}{minor.version}" />
+    <property name="ats.aste.testasset.location" value="" />
+    <property name="ats.aste.software.release" value="SPP 51.32" />
+    <property name="ats.aste.test.type" value="smoke" />
+    <property name="ats.aste.testasset.caseids" value="100,101,102,104,106," />
+    <property name="ats.aste.software.version" value="W810" />
+    <property name="ats.aste.language" value="English" />
+    
+
+*PLEASE NOTE:* Always declare *Properties* before and *filesets* after importing helium.ant.xml.
+
+**STEP 2: Call target ats-aste**
+
+To execute the target, a property should be set(``<property name="enabled.aste" value="true" />``).
+
+Then call :hlm-t:`ats-aste`, which will create the ATSDrop.zip (test package).
+
+If property ``ats.aste.email.list`` is set, an email (test report) will be sent when the tests are ready on ATS/ASTE.
+
+
+Skip Sending AtsDrop to ATS
+---------------------------
+
+click :ref:`Skip-Sending-AtsDrop-label`:
+
+
+    
+    
\ No newline at end of file
--- a/buildframework/helium/doc/src/manual/stage_final.rst.inc.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-<#--
-============================================================================ 
-Name        : stage_final.rst.inc.ftl
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
--->
-
-.. index::
-  single: Stage - Final operations
-
-Stage: Final operations
-=======================
-
-Final operation are steps which could happen at the workflow completion.
-
-
-Running a target at build completion
-------------------------------------
-
-Helium offers the possibility to run a final target despite any error which could occur during the build.
-The configuration of the target is done using the **hlm.final.target** property.
-
-e.g:
-::
-   
-   <property name="hlm.final.target" value="my-final-target" />
-   
-
-Running action on failure
--------------------------
-
-The signaling framework will automatically run all signalExceptionConfig in case of Ant failure at the
-end of the build. 
-
-This example shows how simple task can be run in case of failure: 
-::
-   
-       <hlm:signalExceptionConfig id="signal.exception.config">
-           <hlm:notifierList>
-               <hlm:executeTaskNotifier>
-                   <echo>Signal: ${r'$'}{signal.name}</echo>
-                   <echo>Message: ${r'$'}{signal.message}</echo>
-                   <runtarget target="build-log-summary" />
-               </hlm:executeTaskNotifier>
-           </hlm:notifierList>
-       </hlm:signalExceptionConfig>
-   
-
-
--- a/buildframework/helium/doc/src/manual/stage_matti.rst.inc.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-<#--
-============================================================================ 
-Name        : stage_matti.rst.inc.ftl
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
--->
-
-.. index::
-  single: MATTI
-  
-Stage: MATTI
-=============
-
-MATTI testing is very similar to ATS testing, so for details of how it all links together see :ref:`Stage-ATS-label`: `and the matti website`_.
-
-<#if !(ant?keys?seq_contains("sf"))>
-.. _`and the matti website`:  http://trmatti1.nmp.nokia.com/help/
-</#if>  
-
-The set up of parameters is very similar (a few less parameters and it mostly uses ATS values). The main difference is that once the drop file has been uploaded to the ATS server it uses MATTI to perform the tests (the drop file contains the flash files, the ruby tests/sip profiles, data files, sis files and/or parameters file in xml format).
-
-The following parameters are the ones that are not listed in the ATS parameters, all other parameters required are as listed in the ATS section above, which include :hlm-p:`ats.server`, :hlm-p:`ats.email.list`, :hlm-p:`ats.email.format`, :hlm-p:`ats.email.subject`, :hlm-p:`ats.testrun.name`, :hlm-p:`ats.product.name`, :hlm-p:`ats.flashfiles.minlimit`, :hlm-p:`ats.flash.images` and :hlm-p:`ats.upload.enabled`. 
-
-* [must] - must be set by user
-* [recommended] - should be set by user but not mandatory
-* [allowed] - should **not** be set by user however, it is possible.
-
-.. csv-table:: ATS Ant properties
-   :header: "Property name", "Edit status", "Description"
-   
-    ":hlm-p:`matti.enabled`", "[must]", "Enable MATTI testing to occur, if not present the target :hlm-t:`matti-test` will not run."
-    ":hlm-p:`matti.asset.location`", "[must]", "The location of the test asset where  ruby test files, sip profiles, hardware data etc are located."
-    ":hlm-p:`matti.test.profiles`", "[must]", "Test profiles to be executed should be mentioned in this comma separated list e.g., 'bat, fute'."
-    ":hlm-p:`matti.sierra.enabled`", "[must]", "Mustbe set to 'true' if sierra is engine is to be used. If true .sip files are used otherwise .rb (ruby) files are used to execute tests-"
-    ":hlm-p:`matti.test.timeout`", "[must]", "Separate but similar property to ats.test.timeout for matti tests."
-    ":hlm-p:`matti.parameters`", "[must]", "Matti test parameters can be given through Matti parameters xml file."
-    ":hlm-p:`matti.sis.files`", "[must]", "There are special sis files required to execute with test execution. This is a comma separated list in which several sis files can be deifned in a certain format like '<src file on build area>#<destination to save the file on memory card>#<destination to install the file>' e.g. <x:\dir1\abc.sis#f:\memory1\abc.sis#c:\phonememory\private\abc.sis>"
-    ":hlm-p:`matti.sierra.parameters`", "[must]", "Sierra parameters are set using this property. e.g. '--teardown --ordered'"
-    ":hlm-p:`matti.template.file`", "[allowed]", "Location of the matti template file."
-    
-
-All you need to do is setup the following parameters:
-
-.. code-block:: xml
-
-    <property name="matti.enabled" value="true" />
-    <property name="matti.asset.location" value="\\server\share\matti_testcases, x:\dir\matti_testcases," />
-    <property name="matti.test.profiles" value="bat, fute" />
-    <property name="matti.sierra.enabled" value="true" />
-    <property name="matti.test.timeout" value="1200" />
-    <property name="matti.parameters" value="x:\dir\mattiparameters\matti_parameters.xml" />
-    <property name="matti.sis.files" value="x:\sisfiles\abc.sis#f:\data\abc.sis#C:\abc.sis, x:\sisfiles\xyz.sis#f:\data\xyz.sis#F:\xyz.sis" />
-    <property name="matti.sierra.parameters" value="--ordered" />
-    <property name="matti.template.file" value="x:\dir\templates\matti_template_2.xml" />
-    
-
-
-In order to upload and view the test run you need to have a valid user ID and password that matches that in your ``.netrc`` file. To create the account open a web browser window and enter the name of the ats.server with /ATS at the end e.g. http://123456:80/ATS. Click on the link in the top right hand corner to create the account. To view the test run once your account is active you need to click on the 'test runs' tab.
-
-To run the tests call the target :hlm-t:`matti-test` (you will need to define the :hlm-p:`build.drive`, :hlm-p:`build.number` and it is best to create the :hlm-p:`core.build.version` on the command line as well if you do not add it to the list of targets run that create the ROM image). e.g.
-::
-
-    hlm -Dbuild.number=001 -Dbuild.drive=z: -Dcore.build.version=001 matti-test
-
-If it displays the message 'Matti testdrop created successfully!', script has done what it needs to do. The next thing to check is that the drop file has been uploaded to the ATS server OK. If that is performed successfully then the rest of the testing needs to be performed by the ATS server. There is also a ``test.xml`` file created that contains details needed for debugging any problems that might occur. To determine if the tests have run correctly you need to read the test run details from the server.
--- a/buildframework/helium/doc/src/manual/stage_preparation.rst.inc.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/manual/stage_preparation.rst.inc.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -36,24 +36,37 @@
 
 Helium supports the creation of an environment based on a release store in a network drive. The main requirement from that release is to publish release metadata with the content.
 
-.. csv-table:: Ant properties to modify
+.. csv-table:: Ant properties to modify for Helium 11 and older
+   :header: "Property", "Description", "Values"
+
+   ":hlm-p:`s60.grace.server`", ":hlm-p:`s60.grace.server[summary]`", ":hlm-p:`s60.grace.server[defaultValue]`"
+   ":hlm-p:`s60.grace.service`", ":hlm-p:`s60.grace.service[summary]`", ":hlm-p:`s60.grace.service[defaultValue]`"
+   ":hlm-p:`s60.grace.product`", ":hlm-p:`s60.grace.product[summary]`", ":hlm-p:`s60.grace.product[defaultValue]`"
+   ":hlm-p:`s60.grace.release`", ":hlm-p:`s60.grace.release[summary]`", ":hlm-p:`s60.grace.product[defaultValue]`"
+   ":hlm-p:`s60.grace.revision`", ":hlm-p:`s60.grace.revision[summary]`", ":hlm-p:`s60.grace.revision[defaultValue]`"
+   ":hlm-p:`s60.grace.cache`", ":hlm-p:`s60.grace.cache[summary]`", ":hlm-p:`s60.grace.cache[defaultValue]`"
+   ":hlm-p:`s60.grace.checkmd5.enabled`", ":hlm-p:`s60.grace.checkmd5.enabled[summary]`", ":hlm-p:`s60.grace.checkmd5.enabled[defaultValue]`"
+   ":hlm-p:`s60.grace.usetickler`", ":hlm-p:`s60.grace.usetickler[summary]`", ":hlm-p:`s60.grace.usetickler[defaultValue]`"
+
+
+.. csv-table:: Ant properties to modify for Helium 12
    :header: "Property", "Description", "Values"
 
-   ":hlm-p:`s60.grace.server`", "UNC path to network drive.", ""
-   ":hlm-p:`s60.grace.service`", "Service name.", ""
-   ":hlm-p:`s60.grace.product`", "Product name.", ""
-   ":hlm-p:`s60.grace.release`", "Regular expression to match release under the product directory.", ""
-   ":hlm-p:`s60.grace.revision`", "Regular expresion to match a new build revision", "e.g: (_\d+)?"
-   ":hlm-p:`s60.grace.cache`",
-   ":hlm-p:`s60.grace.checkmd5.enabled`",
-   ":hlm-p:`s60.grace.usetickler`", "Validate the release based on the tickler.", "true, false(default)"
+   ":hlm-p:`download.release.server`", ":hlm-p:`download.release.server[summary]`", ":hlm-p:`download.release.server[defaultValue]`"
+   ":hlm-p:`download.release.service`", ":hlm-p:`download.release.service[summary]`", ":hlm-p:`download.release.service[defaultValue]`"
+   ":hlm-p:`download.release.product`", ":hlm-p:`download.release.product[summary]`", ":hlm-p:`download.release.product[defaultValue]`"
+   ":hlm-p:`download.release.regex`", ":hlm-p:`download.release.regex[summary]`", ":hlm-p:`download.release.regex[defaultValue]`"
+   ":hlm-p:`download.release.revision`", ":hlm-p:`download.release.revision[summary]`", ":hlm-p:`download.release.revision[defaultValue]`"
+   ":hlm-p:`download.release.cache`", ":hlm-p:`download.release.cache[summary]`", ":hlm-p:`download.release.cache[defaultValue]`"
+   ":hlm-p:`download.release.checkmd5.enabled`", ":hlm-p:`download.release.checkmd5.enabled[summary]`", ":hlm-p:`download.release.checkmd5.enabled[defaultValue]`"
+   ":hlm-p:`download.release.usetickler`", ":hlm-p:`download.release.usetickler[summary]`", ":hlm-p:`download.release.usetickler[defaultValue]`"
 
-Once configured you can invoke Helium:
+Once configured you can invoke Helium::
 
-    > hlm -Dbuild.number=1 -Dbuild.drive=X: ido-update-build-area-grace
+    hlm -Dbuild.number=1 -Dbuild.drive=X: ido-update-build-area
 
-    > dir X:
-    ...
-    ...
+You should then have the latest release extracted to the X: drive.
 
-You should then have the latest/mentioned release un-archived under the X: drive.
\ No newline at end of file
+<#if !ant?keys?seq_contains("sf")>
+.. include:: stage_nokia_preparation.rst.inc
+</#if>
\ No newline at end of file
--- a/buildframework/helium/doc/src/manual/stage_publishing.rst.inc.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/manual/stage_publishing.rst.inc.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -34,7 +34,7 @@
 
 Diamonds is a utility tool that keeps track of build and release information. See the **Metrics** manual under section `Helium Configuration`_ for more info.
 
-.. _Helium Configuration: ../metrics.html#helium-configuration
+.. _Helium Configuration: metrics.html#helium-configuration
 
 
 .. index::
@@ -103,6 +103,7 @@
                 <set name="mapper" value="policy"/>
                 <set name="policy.internal.name" value="really_confidential_stuff"/>
                 <set name="policy.filenames" value="Distribution.Policy.S60"/>
+                <set name="split.on.uncompressed.size.enabled" value="true"/>
             </config>
         </config>
 
@@ -114,6 +115,7 @@
                 <set name="policy.internal.name" value="really_confidential_stuff"/>
                 <set name="policy.filenames" value="Distribution.Policy.S60"/>
                 <set name="policy.root.dir" value="${r'$'}{root.dir}/s60"/>
+                <set name="split.on.uncompressed.size.enabled" value="true"/>
             </config>
         </config>
       
@@ -179,6 +181,8 @@
    "``archives.dir``", "The directory where the zip files are saved to.", ""
    "``policy.csv``", "This property defines the location of the policy definition file.", ""
    "``policy.default.value``", "This property defines the policy value when policy file is missing or invalid (e.g. wrong format).", "9999"
+   "``split.on.uncompressed.size.enabled``", "To enable/disable splitting the zip files depending on source file size.", "true/false"
+   
 
 The policy mapper enables the sorting of the content compare to its policy value. The mapper is looking for a policy file in the file to archive directory.
 If the distribution policy file is missing then the file will go to the ``policy.default.value`` archive. Else it tries to open the file which
@@ -226,6 +230,9 @@
 
 They support the same set of configuration properties as the default ``policy.remover``.
 
+<#if !ant?keys?seq_contains("sf")>
+.. include:: stage_metadata.rst.inc
+</#if>
  
 .. index::
   single: Zipping SUBCON
@@ -233,5 +240,12 @@
 Subcon zipping
 --------------
 
-Subcon zipping is also configured using the same XML format as :hlm-t:`zip-ee` and implemented in the :hlm-t:`zip-subcon` target. A :hlm-p:`zips.subcon.spec.name` property must be defined but currently it is still a separate configuration file.
+Subcon zipping is also configured using the same XML format as :hlm-t:`zip-ee` and implemented in the :hlm-t:`zip-subcon` target. A ``zips.subcon.spec.name`` property must be defined but currently it is still a separate configuration file.
+
 
+Stage: Blocks packaging
+=======================
+
+Refer to the `Blocks integration manual`_
+
+.. _`Blocks intergration manual`: blocks.html
--- a/buildframework/helium/doc/src/manual/stage_source_preparation.rst.inc.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/manual/stage_source_preparation.rst.inc.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -136,6 +136,10 @@
     The following properties are required:
         - database: the name of the synergy database you want to use.
 
+<#if !ant?keys?seq_contains("sf")>
+.. include:: stage_nokia_ccm.rst.inc
+</#if>
+
 Mercurial
 ---------
 
@@ -150,6 +154,8 @@
         </hlm:scm>
     </target>
 
+<#if !ant?keys?seq_contains("sf")>
 For more information see API_
 
-.. _API: ../helium-antlib/api/doclet/index.SCM.html
+.. _API: ../api/doclet/index.SCM.html
+</#if>
\ No newline at end of file
--- a/buildframework/helium/doc/src/manual/stages.rst.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/manual/stages.rst.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -23,6 +23,7 @@
 .. index::
   module: Stages
 
+   
 =============
 Helium stages
 =============
@@ -47,7 +48,7 @@
 .. include:: stage_releasing.rst.inc
 
 Stage: Cenrep creation (S60 3.2.3 - 5.x)
-=================================
+========================================
 <#if !(ant?keys?seq_contains("sf"))>
 See: http://configurationtools.nmp.nokia.com/builds/cone/docs/cli/generate.html?highlight=generate
 </#if>
@@ -57,7 +58,7 @@
 * IDO can use the ido-gen-cenrep to generate the cenreps which are IDO specific.
 * We should pass the sysdef.configurations.list as parameter to ido-gen-cenrep target. Else it will use the defualt one of helium.
 
-Example:
+Example
 -------
 
 Below example will generate the cenrep only for IDO specific confml files.
@@ -105,17 +106,35 @@
 
 .. include:: stage_integration.rst.inc
 
-.. include:: stage_ats.rst.inc
+
+Stage: Testing
+==============
+
+The test sources or test asset is mantained by test developers, who follow certain rules and standards to create the directory/file structure and writing the tests.
 
-.. include:: stage_matti.rst.inc
+Testing is performed automatically by ATS server which receives a zipped testdrop, containing test.xml file (required by ATS), ROM images, test cases, dlls, executbales and other supporting files. This testdrop is created by Helium Test Automation system. 
+ 
+Read more: `Helium Test Automation User Guide`_
+
+.. _`Helium Test Automation User Guide`: stage_ats.html
 
-Stage: Check EPL License header.
-=================================
+
+    
+
+Stage: Check EPL License header
+===============================
 
 The target ``check-sf-source-header`` could be used to run to validate the source files for EPL license header.
 
 * Include the target ``check-sf-source-header`` in the target sequence.
-* This will validate source files present on the build area to contain EPL license. 
+* This will validate source files present on the build area not to contain SFL license.
+* Target could be enabled by setting ``sfvalidate.enabled`` to ``true``.
+
+The target ``ido-check-sf-source-header`` could be used to run to validate the source files for EPL license header for IDO/Package level.
+
+* Include the target ``ido-check-sf-source-header`` in the IDO target sequence.
+* This will validate source files present on the build area to contain EPL license by extracting values from ``distribution.policy.S60`` files.
+* Target could be enabled by setting ``sfvalidate.enabled`` to ``true``.
 
 .. index::
   single: Compatibility Analyser (CA)
@@ -123,32 +142,40 @@
 Stage: Compatibility Analyser
 =============================
 
-The Compatibility Analyser is a tool used to compare **binary** header and library files to ensure that the version being checked has not made any changes to the interfaces which may cause the code to not work correctly. Helium supplies a target that calls this Compatibility Analyser. Users who wish to use this tool first need to read the CA user guide found under SW DOcMan at: http://bhlns002.apac.nokia.com/symbian/symbiandevdm.nsf/WebAllByID2/DSX05526-EN/s60_compatibility_analyser_users_guide.doc. 
+The Compatibility Analyser is a tool used to compare **binary** header and library files to ensure that the version being checked has not made any changes to the interfaces which may cause the code to not work correctly. Helium supplies a target that calls this Compatibility Analyser. 
+Users who wish to use this tool first need to read the CA user guide found under: /epoc32/tools/s60rndtools/bctools/doc/S60_Compatibility_Analyser_Users_Guide.doc. 
 
-The Compatibility Analyser is supplied as part of SymSEE, there is a wiki page for the tool found at http://s60wiki.nokia.com/S60Wiki/Compatibility_Analyser. As part of the configuration a default BC template file has been provided at Helium\tools\quality\CompatibilityAnalyser\config_template.txt make the necessary changes to this file (as described in the user guide). The supplied example file works with CA versions 2.0.0 and above which is available in SymSEE version 12.1.0 and above. The configurations that will need changing are:
+<#if !(ant?keys?seq_contains("sf"))>
+The Compatibility Analyser is supplied as part of SymSEE, there is a wiki page for the tool found at: http://s60wiki.nokia.com/S60Wiki/Compatibility_Analyser. 
+</#if>
+As part of the configuration a default BC template file has been provided at helium/tools/quality/compatibility_analyser/ca.cfg.xml make the necessary changes to this file (as described in the user guide). The supplied example file works with CA versions 2.0.0 and above. 
+
+The minimum configurations that will need changing are:
  * BASELINE_SDK_DIR
  * BASELINE_SDK_S60_VERSION
  * CURRENT_SDK_DIR
  * REPORT_FILE_HEADERS
  * REPORT_FILE_LIBRARIES
 
-The default configuration is supplied as part of tools\quality\CompatibilityAnalyser\compatibilty.ant.xml where there are a few properties that need to be set (overriding of these is recommended in your own config file):
+The default configuration is supplied as part of tools/quality/compatibility_analyser/compatibilty.ant.xml where there are a few properties that need to be set (overriding of these is recommended in your own config file):
 
 
 .. csv-table:: Compatibility Analyser Ant properties
    :header: "Property name", "Edit status", "Description"
    
     ":hlm-p:`ca.enabled`", "[must]", "Enables the bc-check and ca-generate-diamond-summary targets to be executed, when set to true."
-    ":hlm-p:`bctools.root`", "[must]", "Place where the CheckBC and FilterBC tools are e.g. C:/APPS/carbide/plugins/com.nokia.s60tools.compatibilityanalyser.corecomponents_2.0.0/BCTools"
-    ":hlm-p:`default.bc.config`", "[must]", "Place where the CheckBC default configuration file is, it is copied from this location to the output folder for use by checkBC.py e.g. helium/tools/quality/compatibility_analyser/ca_config_template.txt"
-    ":hlm-p:`bc.config.dir`", "[must]", "The bc_config_template.txt file (default configuration file) will be copied from the folder it is saved in within helium to the location named in this property where it will be used ( in conjunction with the bc.config.file property). e.g. build.log.dir/bc"
-    ":hlm-p:`bc.config.file`", "[must]", "The bc_config_template.txt file (default configuration file) will be copied from the folder it is saved in within helium to the location named and named as defined in this property where it will be used. You need to make sure this is not the same name as any other IDO or person using the build area. e.g. bc.config.dir/bc.config"
-    ":hlm-p:`bc.check.libraries.enabled`", "[must]", "Enables the Binary Comparison for libraries when set to 'true'."
-    ":hlm-p:`lib.param.val`", "[must]", "Defines the parameter that checkBC.py is called with  -la (all libraries checked)  or -ls lib (single library checked) (lib = the name of library to check) or -lm file.name (multiple libraries checked) the file.name is a file that contains the names of the library(ies) to be checked."
-    ":hlm-p:`bc.check.headers.enabled`", "[must]", "Enables the Binary Comparison for headers when set to 'true'."
-    ":hlm-p:`head.param.val`", "[must]", "Defines the parameter that checkBC.py is called with -ha (all headers checked) or -hs file (single header checked) (file= name of header file to check) or -hm file.name (multiple headers checked) the file.name is a file that contains the names of the header(s) to be checked"
+    ":hlm-p:`bc.prep.ca.file`", "[must]", "The name and location of the file that contains all the CA configuration values like, 'BASELINE_SDK_DIR=C:\Symbian\9.2\S60_3rd_FP1_2': an example file can be found at helium/tools/quality/compatibility_analyser/test/ca.cfg.xml "
+    ":hlm-p:`bc.tools.root`", "[must]", "Place where the CheckBC and FilterBC tools are e.g. /epoc32/tools/s60rndtools/bctools"
+    ":hlm-p:`bc.build.dir`", "[must]", "The place that all the files created during the running of the CA tool will be placed."
+    ":hlm-p:`bc.config.file`", "[must]", "The 'ca.ant.config.file' file (configuration file) will be copied from the folder it is saved in within helium to the location named as defined in this property where it will be used. You need to make sure this is not the same name as any other IDO or person using the build area. e.g. bc.config.dir/bc.config"
+    ":hlm-p:`bc.check.libraries.enabled`", "[must]", "Enables the compatibility analyser for libraries when set to 'true' (default value is 'false')."
+    ":hlm-p:`bc.lib.param.val`", "[optional]", "Defines the parameter that checkBC.py is called with  -la (all libraries checked) (default value) or -ls lib (single library checked) (lib = the name of library to check) or -lm file.name (multiple libraries checked) the file.name is a file that contains the names of the library(ies) to be checked. If the 'bc.what.log.entry.enabled' property is set this variable must not be set."
+    ":hlm-p:`bc.check.headers.enabled`", "[must]", "Enables the compatibility analyser for headers when set to 'true' (default value is 'false')."
+    ":hlm-p:`bc.head.param.val`", "[optional]", "Defines the parameter that checkBC.py is called with -ha (all headers checked) (default value) or -hs file (single header checked) (file= name of header file to check) or -hm file.name (multiple headers checked) the file.name is a file that contains the names of the header(s) to be checked. If the 'bc.what.log.entry.enabled' property is set this variable must not be set."
     ":hlm-p:`bc.check.report.id`", "[must]", "Adds this to the CA output file name to give it a unique name."
-    ":hlm-p:`ido.ca.html.output.dir`", "[must]", "Defines the location of CA output and the input for the diamonds creation target. e.g. build.log.dir/build.id_ca"
+    ":hlm-p:`bc.log.file.to.scan`", "[must]", "This must be set if the 'bc.what.log.entry.enabled' property is set otherwise it is not required. It is the name of the log file that was created during the build that will be scanned in order to determine which headers or library files will be compared."
+    ":hlm-p:`bc.what.log.entry.enabled`", "[optional]", "If set to true the 'whatlog' will be scanned for the list of header and/or library files that will be compared. The default is 'false'"
+    ":hlm-p:`bc.fail.on.error`", "[optional]", "If set to true the build will fail if there is an error with the binary compatibility analyser (including the conversion to diamonds XML files). If set to false it will not fail the build if there is a problem with CA."
 
 and then run the target:
 
@@ -158,8 +185,6 @@
 
 where nnn is the build number and n: is the substed drive letter.
 
-The results of the output from the analysis are placed in the \output\logs\BC folder under the substed build drive and are called libraries_report_?.xml and headers_report_?.xml, the reports can be viewed in Web-formatted layout, based on the BBCResults.xsl stylesheet which is copied to the \output\logs\BC folder on the build drive.
-
+The results of the output from the analysis are placed in the /output/logs/bc folder under the substed build drive and are called 'libraries_report_{bc.check.report.id}' and 'headers_report_{bc.check.report.id}', the reports can be viewed in Web-formatted layout, based on the BBCResults.xsl stylesheet which is copied to the /output/logs/bc folder on the build drive.
 
-.. include:: stage_final.rst.inc
-
+By running the target 'ca-generate-diamond-summary' the output is summarised and passed to diamonds where is is displayed in the 'Quality Aspects' section.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/doc/src/manual/tdriver_template_instructions.rst.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,302 @@
+<#--
+============================================================================ 
+Name        : tdriver_template_instructions.rst.ftl
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+
+.. index::
+  single: TDriver
+
+
+=======================
+TDriver Custom Template
+=======================
+
+
+.. contents::
+
+
+Instructions for creating custom templates for TDriver
+======================================================
+
+Creating custom template for TDriver is very simple and easy. It requires a bit of knowledge of `Python`_, `Python dictionary`_ and `Jinja templates`_, however, it is not mandatory. There will be an example template below, which may help to understand how to create new/modify TDriver template. 
+
+.. _`Python`:  http://wiki.python.org/moin/BeginnersGuide
+.. _`Python dictionary`:  http://docs.python.org/tutorial/datastructures.html#dictionaries
+.. _`Jinja templates`:  http://jinja.pocoo.org/2/documentation/templates
+
+
+The test.xml template consists of two parts 
+ - Explicit (hardcoded part of the test.xml) and 
+ - Implicit (logical/processed data from the TDriver scripts)
+
+
+Explicit template data
+----------------------
+
+This consists of normal template structure, obvious properties, attributes and their values.
+
+For example:
+
+.. code-block:: xml
+
+    <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
+    <testrun>
+        <metadata>
+        </metadata>
+    </testrun>
+    <!-- it also includes several other keywords (true, flase, yes, no, name, value, alias, defaultAgent) 
+    and xml tags (execution, initialization, task, type, property, parameters, parameter) -->
+
+
+It does not make any sense without parameters and values. However, explicit data does not require any logic or it is not the data coming from any script either.
+
+
+Implicit template data
+----------------------
+
+- This is complete processed data from several sources. 
+- In case of TDriver template, this is a dictionary, ``xml_dict``, which has hierarchical data structure.
+- The contents of the dictionary can be categorized into:
+
+**Pre-Data** (non-itterative data and comes before the execution block in the beginning of the test.xml) 
+
+
+.. csv-table:: Pre-Data (Data structure)
+    :header: "Variable name", "Description", "Usage example"
+ 
+    "diamonds_build_url", "Non-iterative - string", "xml_dict['diamonds_build_url']" 
+    "testrun_name", "Non-iterative - string", "xml_dict['testrun_name']"
+    "device_type", "Non-iterative - string", "xml_dict['device_type']"
+    "alias_name", "Non-iterative - string", "xml_dict['alias_name']"
+
+
+
+**Execution-Block** (itterative, which is dependet on number of execution blocks. Please see the template example for exact usage)
+
+
+.. csv-table:: Pre-Data (Data structure)
+    :header: "Variable name", "Description", "Usage example"
+ 
+    "execution_blocks", "Iterative - dictionary. It has the following members", "for exe_block in xml_dict['execution_blocks']"
+    "image_files", "Iterative - list of ROM images.", "for image_file in exe_block['image_files']"
+    "install_files", "Iterative - list of files to be installed", "for file in exe_block['install_files']"
+    "tdriver_sis_files", "Iterative - list of sisfiles to be installed. This unpacks three values of sisfiles (src, dst_on_ats_server, dst_on_phone).", "for sisfile in exe_block['tdriver_sis_files']"
+    "tdriver_task_files", "Iterative - list of task files, .pro or .rb files, depending on the value of :hlm-p:`tdriver.tdrunner.enabled`.", "for task_file in exe_block['tdriver_task_files']"   
+    "asset_path", "Non-iterative - string", "exe_block['asset_path']" 
+    "test_timeout", "Non-iterative - string", "exe_block['test_timeout']"
+    "tdriver_parameters", "Non-iterative - string", "exe_block['tdriver_parameters']"
+    "tdrunner_enabled", "Non-iterative - boolean", "exe_block['tdrunner_enabled']"
+    "tdrunner_parameters", "Non-iterative - string", "exe_block['tdrunner_parameters']"
+    "ctc_enabled", "Non-iterative - boolean", "exe_block['ctc_enabled']"
+
+
+
+**Post-Data** (non-itterative data and comes after the execution block in the end of the test.xml)
+
+
+.. csv-table:: Pre-Data (Data structure)
+    :header: "Variable name", "Description", "Usage example"
+ 
+    "report_email", "Non-iterative - string", "xml_dict['report_email']" 
+    "email_format", "Non-iterative - string", "xml_dict['email_format']"
+    "email_subject", "Non-iterative - string", "xml_dict['email_subject']"
+    "report_location", "Non-iterative - string", "xml_dict['report_location']"
+
+
+
+Example template
+================
+
+
+.. code-block:: xml
+
+    {% import 'ats4_macros.xml' as macros with context %}
+    
+    <testrun>
+        <metadata>
+            {% if xml_dict['diamonds_build_url'] -%}
+            <meta name="diamonds-buildid">{{ xml_dict['diamonds_build_url'] }}</meta> 
+            <meta name="diamonds-testtype">Smoke</meta>
+            {% endif %}
+            <meta name="name">{{ xml_dict['testrun_name'] }}</meta> 
+        </metadata>
+        
+        <agents>
+            <agent alias="{{ xml_dict['alias_name'] }}">
+                <property name="hardware" value="{{ xml_dict["device_type"] }}"/>
+            </agent>
+        </agents>
+        
+        
+        {% for exe_block in xml_dict['execution_blocks'] -%}
+        <execution defaultAgent="{{ xml_dict['alias_name'] }}">        
+            <initialization>
+            
+                {% if exe_block['image_files'] -%}
+                <task agents="{{ xml_dict['alias_name'] }}">
+                    <type>FlashTask</type>
+                    <parameters>
+                    {% set i = 1 %}
+                    {% for img in exe_block['image_files'] -%}
+                        <parameter name="image-{{ i }}" value="images\{{ os.path.basename(img) }}" />
+                        {% set i = i + 1 %}
+                    {% endfor -%}
+                    </parameters>
+                </task>
+                {% endif %}
+    
+                {% if exe_block['install_files'] != [] -%}
+                  {% for file in exe_block['install_files'] -%}            
+                <task agents="{{ xml_dict['alias_name'] }}">
+                    <type>FileUploadTask</type>
+                    <parameters>
+                        <parameter name="src" value="{{exe_block['name']}}{{ atspath.normpath(atspath.normpath(file[0]).replace(atspath.normpath(exe_block['asset_path']).rsplit("\\", 1)[0], "")) }}"/>
+                        <parameter name="dst" value="{{ atspath.normpath(file[1]) }}"/>
+                    </parameters>
+                </task>
+                  {% endfor -%}
+                {% endif %}
+                
+                {% if exe_block['tdriver_sis_files'] != [] -%}
+                  {% for sisfile in exe_block['tdriver_sis_files'] -%}            
+                <task agents="{{ xml_dict['alias_name'] }}">
+                    <type>FileUploadTask</type>
+                    <parameters>
+                        <parameter name="src" value="sisfiles\{{ os.path.basename(sisfile[0]) }}"/>
+                        <parameter name="dst" value="{{ sisfile[2] }}"/>
+                    </parameters>
+                </task>
+                  {% endfor -%}
+                {% endif %}
+    
+              {% for sis_file in exe_block["tdriver_sis_files"] -%}
+                <task agents="{{ xml_dict['alias_name'] }}">
+                   <type>InstallSisTask</type>
+                   <parameters>
+                        <parameter name="software-package" value="{{ sis_file[2] }}"/>
+                        <parameter name="timeout" value="{{ exe_block["test_timeout"] }}"/>
+                        <parameter name="upgrade-data" value="true"/>
+                        <parameter name="ignore-ocsp-warnings" value="true"/>
+                        <parameter name="ocsp-done" value="true"/>
+                        <parameter name="install-drive" value="{{ sis_file[2].split(":")[0] }}"/>
+                        <parameter name="overwrite-allowed" value="true"/>
+                        <parameter name="download-allowed" value="false"/>
+                        <parameter name="download-username" value="user"/>
+                        <parameter name="download-password" value="passwd"/>
+                        <parameter name="upgrade-allowed" value="true"/>
+                        <parameter name="optional-items-allowed" value="true"/>
+                        <parameter name="untrusted-allowed" value="true"/>
+                        <parameter name="package-info-allowed" value="true"/>
+                        <parameter name="user-capabilities-granted" value="true"/>
+                        <parameter name="kill-app" value="true"/>
+                   </parameters>
+                </task>
+              {%- endfor -%}
+    
+                <task agents="{{ xml_dict['alias_name'] }}">
+                    <type>RebootTask</type>
+                    <parameters/>                
+                </task>
+                <task agents="{{ xml_dict['alias_name'] }}">
+                    <type>CreateDirTask</type>
+                    <parameters>                
+                        <parameter value="c:\logs\testability" name="dir"/>
+                    </parameters>
+                </task>
+                
+                {% if exe_block["ctc_enabled"] == "True" -%}
+                {{ macros.ctc_initialization(exe_block) }}
+                {%- endif %}
+            </initialization>
+    
+            {% if exe_block["tdriver_task_files"] -%}
+                {% for task_file in exe_block["tdriver_task_files"] -%}
+            <task agents="{{ xml_dict['alias_name'] }}">
+               <type>TestabilityTask</type>
+               <parameters>
+                  <parameter value="{{ exe_block["name"] }}\tdriver_testcases\" name="script"/>
+                  <parameter value="{{ exe_block["name"] }}\tdriver_testcases\tdriverparameters\{{ os.path.basename(exe_block["tdriver_parameters"][0]) }}" name="xml"/>
+                  <parameter value="{{ exe_block['test_timeout'] }}" name="timeout"/>
+                  <parameter value="{{ exe_block["tdrunner_enabled"] }}" name="tdrunner"/>
+                  <parameter value="{{ exe_block["tdrunner_parameters"] }} -e %TEST_RUN_SANDBOX%/{{ exe_block["name"] }}/{{ task_file }} test_unit" name="executable-parameters"/>
+               </parameters>
+            </task>
+                {% endfor -%}
+            {% endif %}
+            
+            <finalization>
+            {% if exe_block["ctc_enabled"] == "True" -%}
+            {{ macros.ctc_finalization(exe_block) }}
+            {%- endif %}
+              
+              <task agents="{{ xml_dict['alias_name'] }}">
+                <type>CleanupTask</type>
+                <parameters>
+                  <parameter value="true" name="upload-files"/>
+                </parameters>
+              </task>
+            </finalization>
+        </execution>    
+        {% endfor -%}
+        
+        <postActions>
+            <action>
+              <type>EmailAction</type>
+              <parameters>
+                <parameter value="{{ xml_dict['email_subject'] }}" name="subject"/>
+                <parameter value="{{ xml_dict['report_email'] }}" name="to"/>
+                <parameter value="{{ xml_dict['email_format'] }}" name="format"/>
+              </parameters>
+            </action>
+            {% if xml_dict['report_location'] -%}
+            <action>
+              <type>FileStoreAction</type>
+              <parameters>
+                <parameter value="{{ xml_dict['report_location'] }}\%START_DATE%_%START_TIME%_%SERVER_TOKEN%" name="dst"/>
+                <parameter value="true" name="overwrite"/>
+              </parameters>
+            </action>
+            {% endif %}
+            {% if xml_dict['diamonds_build_url'] -%}
+            <action>
+                <type>DiamondsAction</type>
+                {% if xml_dict['execution_blocks'] != [] and xml_dict['execution_blocks'][0]["ctc_enabled"] == "True" -%}
+                <parameters>
+                    <parameter value="true" name="send-ctc-data" /> 
+                </parameters>
+                {%- endif %}
+            </action>
+            {%- endif %}
+        </postActions>
+        
+    </testrun>
+
+
+
+Setting Custom Template for execution
+=====================================
+
+To execute custom template, set property :hlm-p:`tdriver.template.file`, for example:
+
+.. code-block:: xml
+
+    <property name="tdriver.template.file" value="x:\dir\templates\tdriver_template_2.xml" />
+    
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/doc/src/new_user_tutorial.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,280 @@
+..  ============================================================================ 
+    Name        : new_user_tutorial.rst
+    Part of     : Helium 
+    
+    Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+    All rights reserved.
+    This component and the accompanying materials are made available
+    under the terms of the License "Eclipse Public License v1.0"
+    which accompanies this distribution, and is available
+    at the URL "http://www.eclipse.org/legal/epl-v10.html".
+    
+    Initial Contributors:
+    Nokia Corporation - initial contribution.
+    
+    Contributors:
+    
+    Description:
+    
+    ============================================================================
+    
+########################
+Helium New User Tutorial
+########################
+
+.. index::
+  module: Helium New User Tutorial
+
+.. contents::
+
+Introduction
+============
+
+This tutorial covers the basic information to get up and running using the Helium build framework. Check the `Helium manual`_ for more detailed information.
+
+.. _`Helium manual`: manual/index.html
+
+
+Setting up a simple build file
+===============================
+
+Helium is based on `Apache Ant`_, a build tool written in Java that uses XML configuration files. A Helium build configuration must start with a ``build.xml`` file in the directory where Helium commands are run from::
+
+    <?xml version="1.0" encoding="UTF-8"?>
+    <project name="full-build">
+        <!-- Import environment variables as Ant properties. -->
+        <property environment="env"/>
+
+        <!-- A basic property definition -->
+        <property name="build.family" value="10.1"/>
+        
+        <!-- helium.dir will always refer to the directory of the Helium instance being used.
+        
+        All build configurations must import helium.ant.xml to use Helium. -->
+        <import file="${helium.dir}/helium.ant.xml"/>
+    </project>
+
+.. _`Apache Ant`: http://ant.apache.org/
+.. _`Ant manual`: http://ant.apache.org/manual
+
+Helium looks for a ``build.xml`` project file in the current directory. It will parse this and additional imported Ant files to create the project configuration.
+
+
+Basic structure
+===============
+
+The main components of Ant project files are targets, types and tasks. 
+
+Targets define a set of tasks to be run as a build step. A target can depend on other targets, so a complete build process can be built up using a chain of targets. A simple target to echo some text to the console might look like this::
+
+    <target name="print-hello">
+        <echo>Hello!</echo>
+    </target>
+
+Types are information elements for configuring the build. The most common are properties that define a single value or location::
+
+    <property name="build.family" value="10.1"/>
+    
+Properties representing locations are normalised to full paths when the ``location`` attribute is used::
+
+    <property name="helium.build.dir" location="${helium.dir}/build"/>
+    
+.. note:: Once a property is defined it is immutable. The value of a property is defined by the first definition that is found.
+
+Another common type is a fileset that represents a collection of files, typically using wildcard selection::
+
+    <fileset id="foo.bar" dir="${helium.build.dir}">
+        <include name="**/*.xml"/>
+    </fileset>
+    
+This will select all XML files under the ``helium.build.dir`` directory. Note the use of ``${}`` to insert the value of a property.
+
+There are a number of other types such as dirset, filelist, patternset which may be used for some configuration. See the "Concepts and Types" section of the `Ant manual`_ for more details.
+
+
+Import statements
+-----------------
+
+Import statements are used to pull additional Ant project file content into the main project::
+
+    <import file="${helium.dir}/helium.ant.xml"/>
+
+Here the order of elements is significant:
+    
+Properties
+  Must be defined before the import to override a property value in an imported file. See the `properties list <api/helium/properties_list.html>`_ for default values.
+  
+Types
+  Other types such as filesets, dirsets that are referenced by ``ID`` must be defined after the import.
+  
+Targets
+  Can be defined anywhere in the file.
+  
+``helium.ant.xml`` is the root file to import from Helium, which will pull in all the Helium content.
+
+
+Run a command
+=============
+
+Make sure Helium is on the ``PATH``. Then the ``hlm`` command can be run from the project directory containing the ``build.xml`` file. Try a quick test::
+
+    hlm hello
+    
+This should echo "Hi!" to the console, which shows that Helium can be imported successfully.
+
+A target can be run using its name as a command::
+
+    hlm [target]
+    
+Often it can be useful to define or override property values on the command line, like this::
+
+    hlm [target] -Dname=value
+    
+
+Setting up a build
+==================
+
+An actual build process is defined by chaining together a number of major build stages, e.g. preparation, compilation, ROM building, etc. So a top-level build process target called from the command line might look like this::
+
+    <target name="run-custom-tool">
+        <exec executable="foo.exe">
+            <arg name="bar"/>
+        </exec>
+    </target>
+    
+    <target name="full-build" depends="prep,run-custom-tool,compile-main,rombuild,final"/>
+    
+In this case an additional target is defined and run after prep but before compilation. The full build is then run by calling::
+
+    hlm full-build -Dbuild.number=1
+    
+Configuring build stages
+------------------------
+
+Configuring each build stage typically involves defining or overriding properties and other types that are needed for that stage. In some cases special XML file formats are used. Please refer to the `appropriate sections <manual/stages.html>`_ of the manual for information on configuring each stage.
+
+There are a number of individual features that can be enabled or disabled using flag properties. See `this list <manual/configuring_features.html>`_.
+
+
+Overriding and extending targets
+================================
+
+If the build sequence needs customizing or extending, it is useful to be able to define new targets and potentially override existing Helium targets. Targets can be defined anywhere within the XML file. If multiple targets have the same name the first one to be parsed in the order of importing Ant files will be executed when called by name. Any target can be called explicitly by using its fully-qualified name which is constructed by prepending the name of the enclosing project, e.g.::
+
+    hlm common.hello
+    
+This calls the ``hello`` target which is located in the common project file. It can be seen in the `API documentation`_.
+
+.. _`API documentation`: api/helium/project-common.html#hello
+
+Any existing target can be extended by overriding it and adding custom steps at the start or the end. To add steps to the start of a target, override it defining a new custom target and the original one as dependencies, e.g. to run a step before preparation::
+
+    <target name="custom-step">
+        <echo>Run before original target.</echo>
+    </target>
+    
+    <target name="prep" depends"custom-step,preparation.prep">
+    
+Additional steps could be added to the end of a target using a similar method, or just include them in the overriding target thus::
+
+    <target name="prep" depends="preparation.prep">
+        <echo>Run after original target.</echo>
+    </target>
+    
+
+Basic operations
+================
+
+Simple file-based tasks
+-----------------------
+
+Ant has core support for wide range of file-based tasks. Here are a few simple examples:
+
+Copying all HTML log files by wildcard::
+
+    <copy todir="${build.drive}/html_logs">
+        <fileset dir="${build.drive}/output/logs">
+            <includes name="**/*.html"/>
+        </fileset>
+    </copy>
+
+Zip all the log files::
+
+    <fileset id="html.logs.id" dir="${build.drive}/output/logs">
+        <includes name="**/*"/>
+    </fileset>
+    
+    <zip destfile="${build.drive}/html_logs.zip">
+        <fileset refid="html.logs.id"/>
+    </zip>
+    
+Deleting text log files::
+
+    <delete verbose="true">
+        <fileset id="html.logs.id" dir="${build.drive}/output/logs">
+            <includes name="**/*.txt"/>
+        </fileset>
+    </delete>
+    
+See the Ant Tasks section of the `Ant manual`_ for a full list of available tasks.
+
+
+Running an external tool
+------------------------
+
+The ``<exec>`` task can be used to run an external tool::
+
+    <target name="run-custom-tool">
+        <exec executable="custom.exe">
+            <arg name="bar"/>
+        </exec>
+    </target>
+
+See the `Ant manual entry <http://ant.apache.org/manual/Tasks/exec.html>`_ for more details on how to use the ``<exec>`` task. Use ``<exec>`` along with the customisation methods above to call additional tools at suitable places during the build. The `Setting up a build`_ section shows how a custom tool target could be called during a full build process.
+
+External scripts can be run by calling the appropriate runtime executable and providing the script as an argument::
+
+    <exec executable="python.exe">
+        <arg name="custom-script.py"/>
+    </exec>
+        
+        
+Simple macros
+-------------
+
+Defining a macro is a useful method of combining a set of task steps to avoid repetition. This example defines a macro called ``testing`` and calls it::
+
+    <macrodef name="testing">
+       <attribute name="v" default="NOT SET"/>
+       <element name="some-tasks" optional="yes"/>
+       <sequential>
+          <echo>v is @{v}</echo>
+          <some-tasks/>
+       </sequential>
+    </macrodef>
+    
+    <testing v="This is v">
+       <some-tasks>
+          <echo>this is a test</echo>
+       </some-tasks>
+    </testing>
+
+
+Getting help
+============
+
+There are several sources of further information:
+
+ * The `Helium manual`_.
+ * The `Helium API`_ of `targets`_, `properties`_ and `macros`_.
+ * Command line help. Try running::
+ 
+    hlm help [name]
+    
+   to get help on a specific target or property.
+
+.. _`Helium API`: api/helium/index.html
+.. _`targets`: api/helium/targets_list.html
+.. _`properties`: api/helium/properties_list.html
+.. _`macros`: api/helium/macros_list.html
+
--- a/buildframework/helium/doc/src/quick_start_guide.rst.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/quick_start_guide.rst.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -70,8 +70,7 @@
 
   - `Using Ant <http://ant.apache.org/manual/using.html>`_: specifically the Projects and Properties sections.
   - `Configure Helium  <manual/configuring.html>`_: `common configuration format <manual/configuring.html#common-configuration-format>`_ and `Helium stages <manual/stages.html>`_.
-  - `Helium glossary <api/helium/properties-table.html>`_: lists the specific properties used in Helium.
-  
+  - `Helium glossary <api/helium/properties_list.html>`_: lists the specific properties used in Helium.
   
 .. index::
   single: Running builds with Helium
--- a/buildframework/helium/doc/src/tutorials/imaker/buildinfo_creation.rst	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/tutorials/imaker/buildinfo_creation.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -34,7 +34,6 @@
    <property name="rombuild.buildinfo.template" location="./image_conf_buildinfo.mk.ftl"/>
 
 
-
 FTL template
 ~~~~~~~~~~~~
 
@@ -51,31 +50,6 @@
 ::
    
    > hlm.bat -Dbuild.drive=Z: rombuild-imaker-create-buildinfo
-   *** WARNING: Can't find vcvars32.bat - MS Visual Studio not present.
-   Buildfile: build.xml
-   
-   create-data-model-db:
-   
-   validate-at-startup:
-      [python] ERROR: Description has no content for 'read.build.int'
-      [python] WARNING: Required property not defined: sysdef.configurations.list
-      [python] WARNING: Required property not defined: tsrc.data.dir
-      [python] WARNING: Required property not defined: ats3.pathToDrop
-      [python] WARNING: Required property not defined: ats3.host
-      [python] WARNING: Required property not defined: ats.flash.images
-      [python] WARNING: Required property not defined: ats.image.type
-      [python] WARNING: Required property not defined: ats.drop.file
-      [python] WARNING: Required property not defined: ats3.username
-      [python] WARNING: Required property not defined: cache.drive
-      [python] WARNING: Required property not defined: ats.product.name
-      [python] WARNING: Required property not defined: ats3.password
-
-   rombuild-imaker-create-buildinfo:
-        [fmpp] File processed.
-   
-   BUILD SUCCESSFUL
-   Total time: 3 seconds
-
 
 The output
 ~~~~~~~~~~
@@ -89,25 +63,24 @@
    ##########################################################################
 
    BUILD_LOGGING_KEY_STAGES = prep,build-ebs-main,postbuild,flashfiles,java-certification-rom,zip-main,publish-generic,variants-core,variants-elaf,variants-china,variants-thai,variants-japan,variants,mobilecrash-prep,localise-tutorial-content,hdd-images,zip-flashfiles,zip-localisation,data-packaging-prep
-   BUILD_SUMMARY_FILE_2 = Z:\output\logs\summary\pf_5250_16_wk2008_summary.log2.xml
-   BUILD_LOG = Z:\output\logs\pf_5250_16_wk2008_ant_build.log
-   BUILD_NAME = pf_5250
-   BUILD_CACHE_LOG_DIR = C:\DOCUME~1\wbernard\LOCALS~1\Temp\helium\pf_5250_16_wk2008\logs
+   BUILD_SUMMARY_FILE_2 = Z:\output\logs\summary\x_16_wk2008_summary.log2.xml
+   BUILD_LOG = Z:\output\logs\x_16_wk2008_ant_build.log
+   BUILD_NAME = x
+   BUILD_CACHE_LOG_DIR = C:\DOCUME~1\x\LOCALS~1\Temp\helium\x_16_wk2008\logs
    BUILD_SYSTEM = ebs
    BUILD_LOG_DIR = Z:\output\logs
-   BUILD_CACHE_DIR = C:\DOCUME~1\wbernard\LOCALS~1\Temp\helium\pf_5250_16_wk2008
+   BUILD_CACHE_DIR = C:\DOCUME~1\x\LOCALS~1\Temp\helium\x_16_wk2008
    BUILD_OUTPUT_DIR = Z:\output
-   BUILD_SUMMARY_FILE = Z:\output\logs\pf_5250_16_wk2008_build_summary.xml
+   BUILD_SUMMARY_FILE = Z:\output\logs\x_16_wk2008_build_summary.xml
    BUILD_VERSION = 0.0.1
    BUILD_SYSTEM_EBS = Not used
    BUILD_SISFILES_DIR = Z:\output\sisfiles
    BUILD_ERRORS_LIMIT = 0
    BUILD_DRIVE = Z:
    BUILD_NUMBER = 1
-   BUILD_DUPLICATES_LOG = Z:\output\logs\pf_5250_16_wk2008_build_duplicates.xml
+   BUILD_DUPLICATES_LOG = Z:\output\logs\x_16_wk2008_build_duplicates.xml
    BUILD_LOGGING_START_STAGE = check-env-prep
-   BUILD_ID = pf_5250_16_wk2008
-
+   BUILD_ID = x_16_wk2008
 
 
 Download the example: `buildinfo_creation.zip <buildinfo_creation.zip>`_
\ No newline at end of file
--- a/buildframework/helium/doc/src/user_graph.dot.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/doc/src/user_graph.dot.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -107,7 +107,7 @@
     "DOS Scripting" -> NOSE[dir=none, lhead=cluster_4_1, ltail=cluster_4];
    
     
-    Start [fontcolor=navyblue,fontsize=12,style=filled,href="introduction.html"];
+    Start [fontcolor=navyblue,fontsize=12,style=filled,href="manual/introduction.html"];
     
     Ant [fontcolor=navyblue,fontsize=12,shape=box,href="http://ant.apache.org/manual/"];
     "Running Helium" [fontcolor=navyblue,fontsize=12,shape=box,href="manual/running.html"];
@@ -123,7 +123,7 @@
     "ROM Image" [fontcolor=navyblue,fontsize=12,shape=box,href="tutorials/rom_image.html"];
     
     <#if !(ant?keys?seq_contains("sf"))>
-        "Setting up Helium at Nokia" [fontcolor=navyblue,fontsize=12,shape=box,href="nokia/nokia.html"];
+        "Setting up Helium at Nokia" [fontcolor=navyblue,fontsize=12,shape=box,href="manual/retrieving.html"];
         "Helium Nokia Stages" [fontcolor=navyblue,fontsize=12,shape=box,href="manual/nokiastages.html"];
         Diamonds [fontcolor=navyblue,fontsize=12,shape=box,href="http://diamonds.nmp.nokia.com/diamonds/"];
         "Helium Wiki" [fontcolor=navyblue,fontsize=12,shape=box,href="http://delivery.nmp.nokia.com/trac/helium/wiki"];
@@ -131,7 +131,7 @@
         MCL [fontcolor=navyblue,fontsize=12,shape=box,href="http://s60wiki.nokia.com/S60Wiki/S60_Software_Asset_Management/Organization/Delivery_Services/Howto_build_DFS70.91.91_/_S60.MCL_with_Helium"];
         IDO [fontcolor=navyblue,fontsize=12,shape=box,href="http://helium.nmp.nokia.com/doc/ido"];
         TeamCI [fontcolor=navyblue,fontsize=12,shape=box,href="http://helium.nmp.nokia.com/doc/teamci"];
-        "Helium Test Plan" [fontcolor=navyblue,fontsize=12,shape=box,href="manual/testing.html"];
+        "Helium Test Plan" [fontcolor=navyblue,fontsize=12,shape=box,href="development/testing.html"];
     </#if>
       
     "Helium Developer Guide" [fontcolor=navyblue,fontsize=12,shape=box,href="development/developer_guide.html"];
@@ -139,7 +139,7 @@
     Python [fontcolor=navyblue,fontsize=12,shape=box,href="http://www.python.org/"];
     Java [fontcolor=navyblue,fontsize=12,shape=box,href="http://java.sun.com/j2se/"];
     FMPP [fontcolor=navyblue,fontsize=12,shape=box,href="http://fmpp.sourceforge.net/"];
-    "DOS Scripting" [fontcolor=navyblue,fontsize=12,shape=box,href="http://en.wikipedia.org/wiki/Batch_script"];
+    "DOS Scripting" [fontcolor=navyblue,fontsize=12,shape=box,href="http://en.wikipedia.org/wiki/Batch_file"];
     ANTUnit [fontcolor=navyblue,fontsize=12,shape=box,href="http://ant.apache.org/antlibs/antunit/"];
     NOSE [fontcolor=navyblue,fontsize=12,shape=box,href="http://ivory.idyll.org/articles/nose-intro.html"];
 }
--- a/buildframework/helium/helium.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/helium.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -22,11 +22,11 @@
 -->
 <project name="helium" xmlns:hlm="http://www.nokia.com/helium">
     <description>
-    Main full build targets and properties
+    Main starting point to import Helium. Imports the other main Ant files.
     </description>
     
     <property environment="env" />
-	
+    
     <!-- Load the current Helium version. -->
     <!--* @property helium.version
     @type string
@@ -68,6 +68,7 @@
     <import file="tools/testing/testing.ant.xml" />
     <import file="tools/startup/bootstrap/bootstrap.ant.xml"/>
     <import file="tools/iad/iad.ant.xml"/>
+    <import file="tools/blocks/blocks.ant.xml"/>
     <import file="config/signaling_config_default.ant.xml"/>
     <import file="config/stages_config_default.ant.xml"/>
     <import file="config/metadata_filter_config_default.ant.xml"/>
--- a/buildframework/helium/hlm	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/hlm	Wed Oct 13 16:31:27 2010 +0800
@@ -20,7 +20,7 @@
 fi
 
 export LANG="en_US.UTF-8"
-export ANT_ARGS="-lib $HELIUM_HOME/external/antlibs2 -logger com.nokia.ant.HeliumLogger -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener -listener com.nokia.helium.core.ant.listener.TargetTimesLogGeneratorListener"
+export ANT_ARGS="-lib $HELIUM_HOME/external/antlibs2 -logger com.nokia.helium.core.ant.HeliumLogger -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor -listener com.nokia.helium.logger.ant.listener.CommonListener -listener com.nokia.helium.core.ant.listener.TargetTimesLogGeneratorListener"
 
 TEMP_PYTHONPATH="$HELIUM_HOME/external/python/lib/common:$HELIUM_HOME/external/python/lib/auto:$HELIUM_HOME/extensions/nokia/external/python/lib/2.5:$HELIUM_HOME/extensions/nokia/tools/common/python/lib"
 
@@ -64,7 +64,7 @@
 else
     export HELIUM_CACHE_DIR="$TEMP/helium/$USER"
 fi
-export ANT_OPTS="-Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir=$HELIUM_CACHE_DIR"
+export ANT_OPTS="$HLM_OPTS -Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir=$HELIUM_CACHE_DIR -Dpython.verbose=warning"
 export PYTHON_CACHEDIR="$HELIUM_CACHE_DIR/python"
 
 mkdir -p $HELIUM_CACHE_DIR
--- a/buildframework/helium/hlm.bat	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/hlm.bat	Wed Oct 13 16:31:27 2010 +0800
@@ -1,11 +1,65 @@
 @echo off
 
-rem if not defined HELIUM_HOME set HELIUM_HOME=%~dp0..\..\..\helium
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of the License "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description: 
+rem
+
+setlocal
+
+REM Set the Helium location
+REM Make sure the path is not ending with a backslash!
+if not defined HELIUM_HOME (
+	set HELIUM_HOME_TEMP=%~dp0
+)
+if not defined HELIUM_HOME (
+	set HELIUM_HOME=%HELIUM_HOME_TEMP:~0,-1%
+)
 
-helium\hlm.bat %*
+rem Loading runtime environment tools
+if exist "%HELIUM_HOME%\runtime\runtime_env.bat" (
+call %HELIUM_HOME%\runtime\runtime_env.bat
+) 
+
+if not exist "%HELIUM_HOME%\extensions\nokia\build.xml" ( 
+set HLM_SUBCON=1
+set HLM_DISABLE_INTERNAL_DATA=1
+)
+
 
-perl "%HELIUM_HOME%\tools\common\bin\getppid.pl" > %TEMP%\%USERNAME%pid.txt
-set /p PID=< %TEMP%\%USERNAME%pid.txt
+REM Configure Java
+if not defined JAVA_6_HOME (
+set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02
+) ELSE  set TESTED_JAVA=%JAVA_6_HOME%
+if exist "%TESTED_JAVA%" (set JAVA_HOME=%TESTED_JAVA%)
+if not exist "%JAVA_HOME%" ( echo *** Java cannot be found & goto :errorstop )
+set PATH=%JAVA_HOME%\bin;%PATH%
+
+REM Needed by python logging
+set PID=1
+perl "%HELIUM_HOME%\tools\common\bin\getppid.pl" > "%TEMP%\%USERNAME%pid.txt"
+set /p PID=< "%TEMP%\%USERNAME%pid.txt"
+
+REM Configure Apache Ant
+if not defined TESTED_ANT (
+  set TESTED_ANT=C:\APPS\ant_1.7
+)
+if exist "%TESTED_ANT%" (set ANT_HOME=%TESTED_ANT%)
+if not exist "%ANT_HOME%" ( echo *** Ant cannot be found & goto :errorstop )
+
+set SIGNALING_ANT_ARGS= -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor
+set LOGGING_ANT_ARGS= -listener com.nokia.helium.logger.ant.listener.CommonListener
 
 if not defined HLM_DISABLE_INTERNAL_DATA (
 set INTERNAL_DATA_ANT_ARGS= -listener com.nokia.helium.internaldata.ant.listener.Listener
@@ -18,7 +72,7 @@
 
 
 if not defined ANT_ARGS (
-set ANT_ARGS=-lib "%HELIUM_HOME%\external\antlibs2" -logger com.nokia.ant.HeliumLogger  %INTERNAL_DATA_ANT_ARGS% %SIGNALING_ANT_ARGS% %LOGGING_ANT_ARGS% %TARGET_TIMES_GENERATOR% -listener com.nokia.helium.environment.ant.listener.ExecListener
+set ANT_ARGS=-lib "%HELIUM_HOME%\external\antlibs2" -logger com.nokia.helium.core.ant.HeliumLogger  %INTERNAL_DATA_ANT_ARGS% %SIGNALING_ANT_ARGS% %LOGGING_ANT_ARGS% %TARGET_TIMES_GENERATOR% -listener com.nokia.helium.environment.ant.listener.ExecListener
 )
 
 REM Shall we impose the EPOCROOT?
@@ -79,12 +133,14 @@
 
 REM pass cache dir to a property for log4j log file
 if not defined ANT_OPTS (
-    set ANT_OPTS=-Xmx896M -Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir=%HELIUM_CACHE_DIR% -Dpython.verbose=warning
+    set ANT_OPTS=%HLM_OPTS% -Xmx896M -Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir=%HELIUM_CACHE_DIR% -Dpython.verbose=warning -Dpython.cachedir=%HELIUM_CACHE_DIR%\cachedir
     call "%HELIUM_HOME%\external\python\configure_jython.bat"
 )
 
 call ant -Dhelium.dir="%HELIUM_HOME%" -Dcache.dir=%HELIUM_CACHE_DIR% %*
 
+
+
 endlocal
 goto :eof
 
--- a/buildframework/helium/sf/deps/com.nokia.helium.config/helium-sf-config/1.0/ivy.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/deps/com.nokia.helium.config/helium-sf-config/1.0/ivy.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -54,9 +54,11 @@
         <dependency org="com.nokia.helium" name="helium-synergy" rev="latest.integration" conf="default"/>
         <dependency org="com.nokia.helium" name="helium-ccmtask" rev="latest.integration" conf="default"/>
         <dependency org="com.nokia.helium" name="java-analyser-config" rev="latest.integration" conf="default"/>
+        <dependency org="com.nokia.helium" name="helium-blocks" rev="latest.integration" conf="default"/>
         
         <!-- Helium Python deps -->
         <dependency org="com.nokia.helium" name="pythoncore" rev="latest.integration" conf="default"/>
+        <dependency org="com.nokia.helium" name="blockspackager" rev="latest.integration" conf="default"/>
 
         <!-- Ant specific dependencies -->
         <dependency org="de.jeckle" name="xia" rev="1.0" conf="default"/>
Binary file buildframework/helium/sf/deps/net.sourceforge.docutils/docutils/0.5/docutils-0.5.py2.5.egg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/deps/net.sourceforge.docutils/docutils/0.5/ivy.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+============================================================================ 
+Name        : ivy.xml 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================  
+-->
+<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
+    <info
+        organisation="net.sourceforge.docutils"
+        module="docutils"
+        status="release"
+        revision="0.5" />
+    <publications>
+        <artifact type="egg" ext="py2.5.egg" conf="default" />
+    </publications>
+</ivy-module>
--- a/buildframework/helium/sf/doc/src/index.rst	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-=============
-Helium Antlib
-=============
-.. _Helium Antlib Java API: api/javadoc/index.html
-.. _Helium Antlib AntDoclet: api/doclet/index.html
-
-Developer Documentation
-=======================
-.. toctree::
-   :maxdepth: 1
-   :glob:
-
-   *
-   
-API Documentation
-=================
-   * `Helium Antlib AntDoclet`_
-   * `Helium Antlib Java API`_
-   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/doc/src/index.rst.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,43 @@
+<#--
+============================================================================ 
+Name        : .ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+=============
+Helium Antlib
+=============
+
+Developer Documentation
+=======================
+.. toctree::
+   :maxdepth: 1
+   :glob:
+
+   *
+   
+<#if !(ant?keys?seq_contains("sf"))>
+   
+API Documentation
+=================
+   * `Helium Antlib AntDoclet`_
+   * `Helium Antlib Java API`_
+   
+.. _Helium Antlib Java API: ../api/javadoc/index.html
+.. _Helium Antlib AntDoclet: ../api/doclet/index.html
+</#if>
\ No newline at end of file
--- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntFile.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntFile.java	Wed Oct 13 16:31:27 2010 +0800
@@ -76,10 +76,14 @@
             doc = contentHandler.getDocument();
         }
         catch (SAXException e) {
-            throw new IOException(e.getMessage());
+            throw new IOException("Error parsing: " + path + " at " + e.getMessage(), e);
         }
     }
 
+    public String getName() {
+        return getFile().getName();
+    }
+    
     public Project getProject() {
         return rootProject;
     }
@@ -129,4 +133,6 @@
         }
         return antlibFiles;
     }
+    
+    
 }
--- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntObjectMeta.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntObjectMeta.java	Wed Oct 13 16:31:27 2010 +0800
@@ -17,6 +17,7 @@
 
 package com.nokia.helium.ant.data;
 
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
@@ -34,7 +35,7 @@
 public class AntObjectMeta {
 
     public static final Map<String, Integer> SCOPES;
-    
+
     static {
         Map<String, Integer> tempMap = new HashMap<String, Integer>();
         tempMap.put("public", new Integer(1));
@@ -42,7 +43,7 @@
         tempMap.put("private", new Integer(3));
         SCOPES = Collections.unmodifiableMap(tempMap);
     }
-    
+
     /** The default scope if an element does not have a defined scope. */
     public static final String DEFAULT_SCOPE = "public";
 
@@ -88,7 +89,7 @@
      * @param name Attribute name.
      * @return Attribute value.
      */
-    protected String getAttr(String name) {
+    public String getAttr(String name) {
         if (node.getNodeType() == Node.ELEMENT_NODE) {
             String value = ((Element) node).attributeValue(name);
             if (value != null) {
@@ -116,6 +117,10 @@
         return parent.getRootMeta();
     }
 
+    public AntObjectMeta getParent() {
+        return parent;
+    }
+
     /**
      * Returns the Ant file this Ant object is contained in.
      */
@@ -150,11 +155,15 @@
      */
     public String getLocation() {
         RootAntObjectMeta rootMeta = getRootMeta();
-        String location = rootMeta.getFilePath();
-        if (node instanceof ElementWithLocation) {
-            location += ":" + ((ElementWithLocation)node).getLineNumber();
+        return rootMeta.getFilePath() + ":" + getLineNumber();
+    }
+
+    public Integer getLineNumber() {
+        int lineNum = 0;
+        if (node != null && node instanceof ElementWithLocation) {
+            lineNum = ((ElementWithLocation) node).getLineNumber();
         }
-        return location;
+        return lineNum;
     }
 
     /**
@@ -210,10 +219,10 @@
     public String getDeprecated() {
         return comment.getTagValue("deprecated");
     }
-    
+
     /**
-     * Returns the content of the "since" tag that should indicate which release this feature
-     * was first added.
+     * Returns the content of the "since" tag that should indicate which release
+     * this feature was first added.
      * 
      * @return Since release number.
      */
@@ -247,7 +256,7 @@
         this.comment = comment;
     }
 
-    private void processComment()  {
+    private void processComment() {
         Comment commentNode = getCommentNode();
         if (commentNode != null) {
             comment = new AntComment(commentNode);
@@ -259,8 +268,7 @@
         Node commentNode = null;
         if (node.getNodeType() == Node.COMMENT_NODE) {
             commentNode = node;
-        }
-        else {
+        } else {
             List<Node> children = node.selectNodes("preceding-sibling::node()");
             if (children.size() > 0) {
                 // Scan past the text nodess, which are most likely whitespace
@@ -275,13 +283,12 @@
                 if (child.getNodeType() == Node.COMMENT_NODE) {
                     commentNode = child;
                     log("Node has comment: " + node.getStringValue(), Project.MSG_DEBUG);
-                }
-                else {
+                } else {
                     log("Node has no comment: " + node.toString(), Project.MSG_WARN);
                 }
             }
         }
-        return (Comment)commentNode;
+        return (Comment) commentNode;
     }
 
     public void log(String text, int level) {
@@ -290,8 +297,36 @@
             project.log(text, level);
         }
     }
-    
+
     public String toString() {
         return getName();
     }
+
+    public List<TaskMeta> getTasks(String taskType) {
+        return getTaskDefinitions(".//" + taskType);
+    }
+
+    @SuppressWarnings("unchecked")
+    public List<MacroMeta> getScriptDefinitions(String xpathExpression) {
+        List<Element> nodes = getNode().selectNodes(xpathExpression);
+        List<MacroMeta> scripts = new ArrayList<MacroMeta>();
+        for (Element node : nodes) {
+            MacroMeta macroMeta = new MacroMeta(this, node);
+            macroMeta.setRuntimeProject(getRuntimeProject());
+            scripts.add(macroMeta);
+        }
+        return scripts;
+    }
+
+    @SuppressWarnings("unchecked")
+    public List<TaskMeta> getTaskDefinitions(String xpathExpression) {
+        List<Element> nodes = getNode().selectNodes(xpathExpression);
+        List<TaskMeta> tasks = new ArrayList<TaskMeta>();
+        for (Element node : nodes) {
+            TaskMeta taskMeta = new TaskMeta(this, node);
+            taskMeta.setRuntimeProject(getRuntimeProject());
+            tasks.add(taskMeta);
+        }
+        return tasks;
+    }
 }
--- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/Database.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/Database.java	Wed Oct 13 16:31:27 2010 +0800
@@ -23,13 +23,10 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-
 import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Target;
-
+import org.apache.tools.ant.ProjectHelper;
 import com.nokia.helium.freemarker.WikiMethod;
 
 import freemarker.cache.ClassTemplateLoader;
@@ -50,6 +47,8 @@
     public static final String DEFAULT_SCOPE = "public";
     public static final Map<String, String> NAMESPACE_MAP;
 
+    private List<PropertyMeta> propertiesList;
+    private List<PropertyCommentMeta> commentPropertiesList;
     private Project rootProject;
     private Map<String, AntFile> antfilesMap;
     private Map<String, PackageMeta> packagesMap;
@@ -65,23 +64,17 @@
         this(project, DEFAULT_SCOPE);
     }
 
-    @SuppressWarnings("unchecked")
-    public Database(Project project, String scopeFilter) throws IOException {
-        this.rootProject = project;
+    public Database(Project rootProject, String scopeFilter) throws IOException {
+        this.rootProject = rootProject;
         this.scopeFilter = scopeFilter;
         antfilesMap = new HashMap<String, AntFile>();
         packagesMap = new HashMap<String, PackageMeta>();
 
-        if (project != null) {
-            Map<String, Target> targets = project.getTargets();
-            Iterator<Target> targetsIter = targets.values().iterator();
-
-            while (targetsIter.hasNext()) {
-                Target target = targetsIter.next();
-                String antFilePath = new File(target.getLocation().getFileName()).getCanonicalPath();
-
-                if (!antfilesMap.containsKey(antFilePath)) {
-                    addAntFile(antFilePath);
+        if (rootProject != null) {
+            ProjectHelper helper = (ProjectHelper) rootProject.getReference(ProjectHelper.PROJECTHELPER_REFERENCE);
+            for (Object antFilename : helper.getImportStack()) {
+                if (antFilename instanceof File) {
+                    addAntFile(((File) antFilename).getCanonicalPath());
                 }
             }
         }
@@ -101,7 +94,7 @@
 
     private void addAntFile(String antFilePath) throws IOException {
         if (!antfilesMap.containsKey(antFilePath)) {
-            log("Adding project to database: " + antFilePath, Project.MSG_DEBUG);
+            log("Adding project to database: " + antFilePath, Project.MSG_VERBOSE);
             AntFile antfile = new AntFile(this, antFilePath, scopeFilter);
             antfile.setProject(rootProject);
             antfilesMap.put(antFilePath, antfile);
@@ -193,25 +186,29 @@
     }
 
     public List<PropertyMeta> getProperties() {
-        List<PropertyMeta> propertiesList = new ArrayList<PropertyMeta>();
-        for (AntFile antfile : antfilesMap.values()) {
-            RootAntObjectMeta rootMeta = antfile.getRootObjectMeta();
-            if (rootMeta instanceof ProjectMeta) {
-                propertiesList.addAll(((ProjectMeta) rootMeta).getProperties());
+        if ( propertiesList == null) {
+            propertiesList = new ArrayList<PropertyMeta>();
+            for (AntFile antfile : antfilesMap.values()) {
+                RootAntObjectMeta rootMeta = antfile.getRootObjectMeta();
+                if (rootMeta instanceof ProjectMeta) {
+                    propertiesList.addAll(((ProjectMeta) rootMeta).getProperties());
+                }
             }
         }
         return propertiesList;
     }
-    
+
     public List<PropertyCommentMeta> getCommentProperties() {
-        List<PropertyCommentMeta> propertiesList = new ArrayList<PropertyCommentMeta>();
-        for (AntFile antfile : antfilesMap.values()) {
-            RootAntObjectMeta rootMeta = antfile.getRootObjectMeta();
-            if (rootMeta instanceof ProjectMeta) {
-                propertiesList.addAll(((ProjectMeta) rootMeta).getPropertyCommentBlocks());
+        if (commentPropertiesList == null) {
+            commentPropertiesList = new ArrayList<PropertyCommentMeta>();
+            for (AntFile antfile : antfilesMap.values()) {
+                RootAntObjectMeta rootMeta = antfile.getRootObjectMeta();
+                if (rootMeta instanceof ProjectMeta) {
+                    commentPropertiesList.addAll(((ProjectMeta) rootMeta).getPropertyCommentBlocks());
+                }
             }
         }
-        return propertiesList;
+        return commentPropertiesList;
     }
 
     public List<PackageMeta> getPackages() throws IOException {
@@ -221,4 +218,15 @@
         }
         return packages;
     }
+    
+    public List<TargetMeta> getTargets() {
+        List<TargetMeta> targets = new ArrayList<TargetMeta>();
+        for (AntFile antFile : antfilesMap.values()) {
+            RootAntObjectMeta rootMeta = antFile.getRootObjectMeta();
+            if (rootMeta instanceof ProjectMeta) {
+                targets.addAll(((ProjectMeta)rootMeta).getTargets());
+            }
+        }
+        return targets;
+    }
 }
--- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/MacroMeta.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/MacroMeta.java	Wed Oct 13 16:31:27 2010 +0800
@@ -17,6 +17,7 @@
 
 package com.nokia.helium.ant.data;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import org.dom4j.Element;
@@ -34,6 +35,10 @@
     public String getDescription() {
         return getAttr("description");
     }
+    
+    public String getText() {
+        return getNode().getText();
+    }
 
     @SuppressWarnings("unchecked")
     public String getUsage() {
@@ -66,4 +71,17 @@
             return "<hlm:" + macroName + " " + usage + ">\n" + macroElements + "    </hlm:" + macroName + ">";
         }
     }
+    
+    @SuppressWarnings("unchecked")
+    public List<String> getAttributes() {
+        List<String> attributes = new ArrayList<String>();
+        if (getNode().getNodeType() == Node.ELEMENT_NODE) {
+            Element element = (Element)getNode();
+            List<Element> attributeNodes = element.elements("attribute");
+            for (Element attributeNode : attributeNodes) {
+                attributes.add(attributeNode.attributeValue("name"));
+            }
+        }
+        return attributes; 
+    }
 }
--- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/ProjectMeta.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/ProjectMeta.java	Wed Oct 13 16:31:27 2010 +0800
@@ -111,19 +111,6 @@
         return properties;
     }
 
-    @SuppressWarnings("unchecked")
-    public List<MacroMeta> getMacros() {
-        ArrayList<MacroMeta> objects = new ArrayList<MacroMeta>();
-        List<Element> nodes = getNode().selectNodes("//macrodef | //scriptdef");
-        for (Element node : nodes) {
-            MacroMeta macroMeta = new MacroMeta(this, node);
-            macroMeta.setRuntimeProject(getRuntimeProject());
-            if (macroMeta.matchesScope(getScopeFilter())) {
-                objects.add(macroMeta);
-            }
-        }
-        return objects;
-    }
 
     @SuppressWarnings("unchecked")
     public List<String> getProjectDependencies() {
@@ -181,13 +168,12 @@
         }
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("rawtypes")
     private String findSignalFailMode(String signalid, Document antDoc) {
         XPath xpath2 = DocumentHelper.createXPath("//hlm:signalListenerConfig[@id='" + signalid
             + "']/signalNotifierInput/signalInput");
         xpath2.setNamespaceURIs(Database.NAMESPACE_MAP);
         List signalNodes3 = xpath2.selectNodes(antDoc);
-
         for (Iterator iterator3 = signalNodes3.iterator(); iterator3.hasNext();) {
             Element propertyNode3 = (Element) iterator3.next();
             String signalinputid = propertyNode3.attributeValue("refid");
--- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/PropertyMeta.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/PropertyMeta.java	Wed Oct 13 16:31:27 2010 +0800
@@ -29,6 +29,7 @@
     public static final String STRING_TYPE = "string";
     public static final String INTEGER_TYPE = "integer";
     public static final String BOOLEAN_TYPE = "boolean";
+    public static final String FLOAT_TYPE = "float";
     public static final String DEFAULT_TYPE = STRING_TYPE;
 
     public PropertyMeta(AntObjectMeta parent, Node propNode) {
--- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/RootAntObjectMeta.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/RootAntObjectMeta.java	Wed Oct 13 16:31:27 2010 +0800
@@ -51,7 +51,7 @@
     public AntFile getAntFile() {
         return antFile;
     }
-    
+
     /**
      * Returns the location path of the object.
      * 
@@ -73,19 +73,15 @@
         return this;
     }
 
-    @SuppressWarnings("unchecked")
-    public List<MacroMeta> getMacros() throws IOException {
-        ArrayList<MacroMeta> objects = new ArrayList<MacroMeta>();
-        List<Element> nodes = getNode().selectNodes("//macrodef | //scriptdef");
-        for (Element node : nodes) {
-            MacroMeta macroMeta = new MacroMeta(this, node);
-            macroMeta.setRuntimeProject(getRuntimeProject());
-            if (macroMeta.matchesScope(scopeFilter)) {
-                objects.add(macroMeta);
+    public List<MacroMeta> getMacros() {
+        List<MacroMeta> objects = getScriptDefinitions("//macrodef | //scriptdef");
+        List<MacroMeta> filteredList = new ArrayList<MacroMeta>();
+        for (MacroMeta macroMeta : objects) {
+            if (macroMeta.matchesScope(getScopeFilter())) {
+                filteredList.add(macroMeta);
             }
         }
-        return objects;
+        return filteredList;
     }
+
 }
-
-
--- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/TargetMeta.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/TargetMeta.java	Wed Oct 13 16:31:27 2010 +0800
@@ -43,12 +43,36 @@
         super(parent, node);
     }
 
+    private String getPropertyFromDb(String prop) {
+        for (PropertyMeta property : getDatabase().getProperties()) {
+            if (property.getName().equals(prop)
+                    && property.matchesScope(getRootMeta().getScopeFilter())) {
+                return prop;
+            }
+        }
+        for (PropertyCommentMeta property : getDatabase().getCommentProperties()) {
+            if (property.getName().equals(prop)
+                    && property.matchesScope(getRootMeta().getScopeFilter())) {
+                return prop;
+            }
+        }
+        return null;
+    }
+
     public String getIf() {
-        return getAttr("if");
+        String propertyIf = getAttr("if");
+        if (!propertyIf.isEmpty() && getPropertyFromDb(propertyIf) != null) {
+            return propertyIf;
+        }
+        return "";
     }
 
     public String getUnless() {
-        return getAttr("unless");
+        String propertyUnless = getAttr("unless");
+        if (!propertyUnless.isEmpty() && getPropertyFromDb(propertyUnless) != null) {
+            return propertyUnless;
+        }
+        return "";
     }
 
     public String getDescription() {
@@ -84,7 +108,7 @@
             AntFile antFile = (AntFile) iterator.next();
             RootAntObjectMeta rootObjectMeta = antFile.getRootObjectMeta();
             if (rootObjectMeta instanceof ProjectMeta) {
-                ProjectMeta projectMeta = (ProjectMeta)rootObjectMeta;
+                ProjectMeta projectMeta = (ProjectMeta) rootObjectMeta;
                 projectMeta.getConfigSignals(getName(), signals);
             }
         }
@@ -95,7 +119,17 @@
         ArrayList<String> properties = new ArrayList<String>();
         Visitor visitor = new AntPropertyVisitor(properties);
         getNode().accept(visitor);
-        return properties;
+        return filterPropertyDependencies(properties);
+    }
+
+    private List<String> filterPropertyDependencies(ArrayList<String> properties) {
+        List<String> propertiesFiltered = new ArrayList<String>();
+        for (String string : properties) {
+            if (getPropertyFromDb(string) != null) {
+                propertiesFiltered.add(string);
+            }
+        }
+        return propertiesFiltered;
     }
 
     private class AntPropertyVisitor extends VisitorSupport {
--- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/TaskContainerMeta.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/TaskContainerMeta.java	Wed Oct 13 16:31:27 2010 +0800
@@ -106,7 +106,7 @@
             if (name.endsWith("signal") || name.endsWith("execSignal")) {
                 String signalid = node.attributeValue("name");
 
-                if (signalList != null) {
+                if (signalid != null && signalid.length() > 0) {
                     signalList.add(signalid);
                 }
             }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/TaskMeta.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *
+ */
+package com.nokia.helium.ant.data;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.dom4j.Element;
+import org.dom4j.Node;
+
+/**
+ * Meta object representing an Ant task.
+ *
+ */
+public class TaskMeta extends AntObjectMeta {
+
+    public TaskMeta(AntObjectMeta parent, Node node) {
+        super(parent, node);
+    }
+    
+    @SuppressWarnings("unchecked")
+    public Map<String, String> getParams() {
+        Map<String, String> params = new HashMap<String, String>();
+        
+        if (getNode().getNodeType() == Node.ELEMENT_NODE) {
+            Element element = (Element)getNode();
+            List<Element> paramNodes = element.elements("param");
+            for (Element paramNode : paramNodes) {
+                params.put(paramNode.attributeValue("name"), paramNode.attributeValue("value"));
+            }
+        }
+        return params; 
+    }
+}
--- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/antlib.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/antlib.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -23,6 +23,5 @@
 <antlib>
     <!-- Task definition -->
     <taskdef name="database" classname="com.nokia.helium.ant.data.taskdefs.DatabaseTask" />
-    <taskdef name="antconfiglint" classname="com.nokia.helium.ant.data.taskdefs.AntConfigLintTask" />
 
 </antlib>
--- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/taskdefs/AntConfigLintTask.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *
- */
-
-package com.nokia.helium.ant.data.taskdefs;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.DynamicElement;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-
-import com.nokia.helium.ant.data.Database;
-import com.nokia.helium.ant.data.types.AntLintCheck;
-import com.nokia.helium.ant.data.types.LintIssue;
-
-/**
- * Another version of AntLint that fits with the antdata API more closely.
- */
-@SuppressWarnings("serial")
-public class AntConfigLintTask extends Task implements DynamicElement {
-
-    // Temporary solution, should change to scanning jar
-    public static final Map<String, String> CHECKS = new HashMap<String, String>() {
-        {
-            put("wrongtypepropertycheck", "WrongTypePropertyCheck");
-            // put("protected", new Integer(2));
-            // put("private", new Integer(3));
-        }
-    };
-    private List<AntLintCheck> checks = new ArrayList<AntLintCheck>();
-    private List<LintIssue> issues = new ArrayList<LintIssue>();
-    private Database db;
-    private int errorsTotal;
-
-    public AntConfigLintTask() throws IOException {
-        setTaskName("antconfiglint");
-    }
-
-    @SuppressWarnings("unchecked")
-    public Object createDynamicElement(String name) {
-        AntLintCheck check = null;
-        String className = "com.nokia.helium.ant.data.types." + CHECKS.get(name);
-        log("Creating check: " + className, Project.MSG_DEBUG);
-        try {
-            Class<AntLintCheck> clazz = (Class<AntLintCheck>) Class.forName(className);
-            if (clazz != null) {
-                check = (AntLintCheck) clazz.newInstance();
-                checks.add(check);
-            }
-        }
-        catch (ClassNotFoundException th) {
-            th.printStackTrace();
-            throw new BuildException("Error in Antlint configuration: " + th.getMessage());
-        } catch (InstantiationException th) {
-            th.printStackTrace();
-            throw new BuildException("Error in Antlint configuration: " + th.getMessage());
-        } catch (IllegalAccessException th) {
-            th.printStackTrace();
-            throw new BuildException("Error in Antlint configuration: " + th.getMessage());
-        }
-        return check;
-    }
-
-    public void execute() {
-        errorsTotal = 0;
-        try {
-            db = new Database(getProject());
-            if (checks.size() == 0) {
-                throw new BuildException("No checks defined.");
-            }
-            for (AntLintCheck check : checks) {
-                check.setTask(this);
-
-                log("Running check: " + check, Project.MSG_DEBUG);
-                check.run();
-
-            }
-            for (LintIssue issue : issues) {
-                log(issue.toString());
-            }
-            if (errorsTotal > 0) {
-                throw new BuildException("AntLint errors found: " + errorsTotal);
-            }
-        }
-        catch (IOException e) {
-            throw new BuildException(e.getMessage());
-        }
-    }
-
-    public void addLintIssue(LintIssue issue) {
-        issues.add(issue);
-        if (issue.getSeverity() == AntLintCheck.SEVERITY_ERROR) {
-            errorsTotal++;
-        }
-    }
-
-    public Database getDatabase() {
-        return db;
-    }
-}
--- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/types/AntLintCheck.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *
- */
-
-package com.nokia.helium.ant.data.types;
-
-import java.io.IOException;
-
-import org.apache.tools.ant.types.DataType;
-
-import com.nokia.helium.ant.data.Database;
-import com.nokia.helium.ant.data.taskdefs.AntConfigLintTask;
-
-/**
- * An Ant Lint coding conventions check.
- */
-public abstract class AntLintCheck extends DataType {
-    public static final int SEVERITY_ERROR = 0;
-    public static final int DEFAULT_SEVERITY = SEVERITY_ERROR;
-
-    private AntConfigLintTask task;
-    private String name;
-    private String text;
-    private int severity = DEFAULT_SEVERITY;
-
-    /**
-     * Set the pattern text.
-     * 
-     * @param text is the pattern text to set.
-     */
-    public void addText(String text) {
-        this.text = text;
-    }
-
-    /**
-     * Get the name of the Checker.
-     * 
-     * @return name of the checker.
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Set the name of the Checker.
-     * 
-     * @param name is the name of the checker to set.
-     * @ant.required
-     */
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    /**
-     * Get the pattern set for this Checker.
-     * 
-     * @return the pattern.
-     */
-    public String getPattern() {
-        return text;
-    }
-
-    /**
-     * Get the severity.
-     * 
-     * @return the severity
-     */
-    public int getSeverity() {
-        return severity;
-    }
-
-    /**
-     * Set the severity. (Valid values : error|warning)
-     * 
-     * @param severity is the severity to set.
-     * @ant.required
-     */
-    public void setSeverity(int severity) {
-        this.severity = severity;
-    }
-
-    public AntConfigLintTask getTask() {
-        return task;
-    }
-
-    public void setTask(AntConfigLintTask task) {
-        this.task = task;
-    }
-
-    protected Database getDb() {
-        return task.getDatabase();
-    }
-
-    public abstract void run() throws IOException;
-}
--- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/types/LintIssue.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *
- */
-
-package com.nokia.helium.ant.data.types;
-
-import com.nokia.helium.ant.data.AntFile;
-
-/**
- * An Ant lint issue.
- */
-public class LintIssue {
-    private String description;
-    private int level;
-    private AntFile antfile;
-    private String location;
-    
-    public LintIssue(String description, int level, String location) {
-        super();
-        this.description = description;
-        this.level = level;
-        this.location = location;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public int getSeverity() {
-        return level;
-    }
-
-    public void setLevel(int level) {
-        this.level = level;
-    }
-
-    public AntFile getAntfile() {
-        return antfile;
-    }
-
-    public void setAntfile(AntFile antfile) {
-        this.antfile = antfile;
-    }
-
-    public String getLocation() {
-        return location;
-    }
-
-    public void setLocation(String location) {
-        this.location = location;
-    }
-}
--- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/types/PropertyNameCheck.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *
- */
-
-package com.nokia.helium.ant.data.types;
-
-/**
- * A check for the name of a property.
- */
-public class PropertyNameCheck {
-
-}
--- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/types/WrongTypePropertyCheck.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *
- */
-
-package com.nokia.helium.ant.data.types;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.apache.tools.ant.Project;
-
-import com.nokia.helium.ant.data.PropertyMeta;
-
-/**
- * An AntLint check of the type of a property.
- */
-public class WrongTypePropertyCheck extends AntLintCheck {
-    public static final String DESCRIPTION = "Property value does not match type";
-
-    @Override
-    public void run() throws IOException {
-        List<PropertyMeta> properties = getDb().getProperties();
-        log("Properties total: " + properties.size(), Project.MSG_DEBUG);
-        for (PropertyMeta propertyMeta : properties) {
-            String type = propertyMeta.getType();
-            String value = propertyMeta.getValue();
-            if (value != null) {
-                log("Testing for wrong type: " + propertyMeta.getName() + ", type: " + type, Project.MSG_DEBUG);
-                if (type.equals("integer")) {
-                    try {
-                        Integer.decode(value);
-                    }
-                    catch (NumberFormatException e) {
-                        getTask().addLintIssue(new LintIssue(DESCRIPTION, getSeverity(), propertyMeta.getLocation()));
-                    }
-                }
-            }
-            else {
-                log("Testing for wrong type: " + propertyMeta.getName() + ": value cannot be found", Project.MSG_DEBUG);
-            }
-        }
-    }
-}
-
-
-
--- a/buildframework/helium/sf/java/antdata/tests/data/test_project.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antdata/tests/data/test_project.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -50,8 +50,18 @@
     <path id="helium.antdata.classpath">
         <fileset dir="${helium.antlib.root.dir}/bin" includes="*.jar"/>
         <fileset dir="${helium.antlib.root.dir}/antdata/lib" includes="*.jar"/>
-    </path>
+    </path> 
     
+    <!--* @property foo
+    test 
+    @type string
+    @scope public
+    -->
+    <!--* @property bar
+    test 
+    @type string
+    @scope public
+    -->
     <!-- This target is for testing the generation of documentation.
         
     So this comment is also for testing if the comments can be extracted.
@@ -62,6 +72,8 @@
     
     @deprecated Lets pretend this target is deprecated.
     -->
+    
+
     <target name="check-target" if="foo" unless="bar" depends="dep1, dep2" description="A test target">
         <antcall target="sub_test_target"/>
         <echo>${property1}</echo>
--- a/buildframework/helium/sf/java/antlint/ivy.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/ivy.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -30,6 +30,6 @@
     <dependencies>
         <dependency org="dom4j" name="dom4j" rev="latest.integration" conf="default" />
         <dependency org="log4j" name="log4j" rev="1.2.9" conf="default" />
-        <dependency name="helium-core" rev="latest.integration" conf="default" />
+        <dependency name="helium-antdata" rev="latest.integration" conf="default" />
     </dependencies>
 </ivy-module>
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/AntLintHandler.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *
- */
-package com.nokia.helium.antlint;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.Locator;
-import org.xml.sax.helpers.DefaultHandler;
-
-import com.nokia.helium.antlint.ant.types.AbstractCheck;
-import com.nokia.helium.antlint.ant.types.Check;
-
-/**
- * <code>AntLintHandler</code> is an SAX2 event handler class used to check for
- * tab characters and indents inside the xml elements.
- * 
- */
-public class AntLintHandler extends DefaultHandler {
-    private int indentLevel;
-    private int indentSpace;
-    private Locator locator;
-    private boolean textElement;
-    private int currentLine;
-    private StringBuffer strBuff = new StringBuffer();
-
-    private boolean indentationCheck;
-    private boolean tabCharacterCheck;
-
-    private Check check;
-
-    /**
-     * Create an instance of {@link AntLintHandler}.
-     * 
-     * @param check
-     *            is the check to be performed.
-     */
-    public AntLintHandler(AbstractCheck check) {
-        super();
-        this.check = check;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setDocumentLocator(Locator locator) {
-        this.locator = locator;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void startDocument() {
-        indentLevel -= 4;
-    }
-
-    /**
-     * Set whether the handler should check for indentation or not.
-     * 
-     * @param indentationCheck
-     *            a boolean value to set.
-     */
-    public void setIndentationCheck(boolean indentationCheck) {
-        this.indentationCheck = indentationCheck;
-    }
-
-    /**
-     * Set whether the handler should check for tab characters or not.
-     * 
-     * @param tabCharacterCheck
-     *            is a boolean value to set.
-     */
-    public void setTabCharacterCheck(boolean tabCharacterCheck) {
-        this.tabCharacterCheck = tabCharacterCheck;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void startElement(String uri, String name, String qName,
-            Attributes atts) {
-        countSpaces();
-        indentLevel += 4; // When an element start tag is encountered,
-        // indentLevel is increased 4 spaces.
-        checkIndent();
-        currentLine = locator.getLineNumber();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void endElement(String uri, String name, String qName) {
-        countSpaces();
-        // Ignore end tags in the same line
-        if (currentLine != locator.getLineNumber()) {
-            checkIndent();
-        }
-        indentLevel -= 4; // When an element end tag is encountered,
-        // indentLevel is decreased 4 spaces.
-        textElement = false;
-    }
-
-    /**
-     * Check for indentation.
-     * 
-     */
-    private void checkIndent() {
-        if (indentationCheck) {
-            if ((indentSpace != indentLevel) && !textElement) {
-                check.getReporter().report(check.getSeverity(),
-                        "Bad indentation", check.getAntFile(),
-                        locator.getLineNumber());
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void characters(char[] ch, int start, int length) {
-        for (int i = start; i < start + length; i++) {
-            strBuff.append(ch[i]);
-        }
-    }
-
-    /**
-     * Method counts the number of spaces.
-     */
-    public void countSpaces() {
-        // Counts spaces and tabs in every newline.
-        int numSpaces = 0;
-        for (int i = 0; i < strBuff.length(); i++) {
-            switch (strBuff.charAt(i)) {
-                case '\t':
-                    numSpaces += 4;
-                    if (tabCharacterCheck) {
-                        check.getReporter().report(check.getSeverity(),
-                                "Tabs should not be used!", check.getAntFile(),
-                                locator.getLineNumber());
-                    }
-                    break;
-                case '\n':
-                    numSpaces = 0;
-                    break;
-                case '\r':
-                    break;
-                case ' ':
-                    numSpaces++;
-                    break;
-                default:
-                    textElement = true;
-                    break;
-            }
-        }
-        indentSpace = numSpaces;
-        strBuff.delete(0, strBuff.length());
-    }
-
-}
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/antlib.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/antlib.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -27,8 +27,8 @@
     <!-- TypeDef definition -->
     <typedef name="checkTabCharacter" classname="com.nokia.helium.antlint.ant.types.CheckTabCharacter"/>
     <typedef name="checkProjectName" classname="com.nokia.helium.antlint.ant.types.CheckProjectName"/>
-    <typedef name="checkScriptDefNameAttributes" classname="com.nokia.helium.antlint.ant.types.CheckScriptDefNameAttributes"/>
     <typedef name="checkPropertyName" classname="com.nokia.helium.antlint.ant.types.CheckPropertyName"/>
+    <typedef name="checkScriptDefAttributes" classname="com.nokia.helium.antlint.ant.types.CheckScriptDefAttributes"/>
     <typedef name="checkTargetName" classname="com.nokia.helium.antlint.ant.types.CheckTargetName"/>
     <typedef name="checkIndentation" classname="com.nokia.helium.antlint.ant.types.CheckIndentation"/>
     <typedef name="checkPresetDefMacroDefName" classname="com.nokia.helium.antlint.ant.types.CheckPresetDefMacroDefName"/>
@@ -39,16 +39,19 @@
     <typedef name="checkJythonScript" classname="com.nokia.helium.antlint.ant.types.CheckJythonScript"/>
     <typedef name="checkUseOfEqualsTask" classname="com.nokia.helium.antlint.ant.types.CheckUseOfEqualsTask"/>
     <typedef name="checkScriptCondition" classname="com.nokia.helium.antlint.ant.types.CheckScriptCondition"/>
-    <typedef name="checkPythonTasks" classname="com.nokia.helium.antlint.ant.types.CheckPythonTasks"/>
     <typedef name="checkScriptDefStyle" classname="com.nokia.helium.antlint.ant.types.CheckScriptDefStyle"/>
-    <typedef name="checkScriptDef" classname="com.nokia.helium.antlint.ant.types.CheckScriptDef"/>
     <typedef name="checkDuplicateNames" classname="com.nokia.helium.antlint.ant.types.CheckDuplicateNames"/>
     <typedef name="checkFileName" classname="com.nokia.helium.antlint.ant.types.CheckFileName"/>
     <typedef name="checkAntCall" classname="com.nokia.helium.antlint.ant.types.CheckAntCall"/>
     <typedef name="checkTryCatchBlock" classname="com.nokia.helium.antlint.ant.types.CheckTryCatchBlock"/>
+    <typedef name="checkVariableTask" classname="com.nokia.helium.antlint.ant.types.CheckVariableTask"/>
+    <typedef name="checkPropertyTypeAndValueMismatch" classname="com.nokia.helium.antlint.ant.types.CheckPropertyTypeAndValueMismatch"/>
+    <typedef name="checkScriptDefName" classname="com.nokia.helium.antlint.ant.types.CheckScriptDefName"/>
     
     <!-- Reporters -->
     <typedef name="antlintConsoleReporter" classname="com.nokia.helium.antlint.ant.types.ConsoleReporter"/>
     <typedef name="antlintCheckstyleReporter" classname="com.nokia.helium.antlint.ant.types.CheckstyleXmlReporter"/>
 
+    <typedef name="pylintExecutor" classname="com.nokia.helium.antlint.ant.types.PylintExecutor"/>
+    <typedef name="checkstyleExecutor" classname="com.nokia.helium.antlint.ant.types.CheckstyleExecutor"/>
 </antlib>
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/taskdefs/AntLintTask.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/taskdefs/AntLintTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -18,7 +18,9 @@
 package com.nokia.helium.antlint.ant.taskdefs;
 
 import java.io.File;
+import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 import java.util.Vector;
 
@@ -27,11 +29,14 @@
 import org.apache.tools.ant.Task;
 import org.apache.tools.ant.types.FileSet;
 
+import com.nokia.helium.ant.data.AntFile;
+import com.nokia.helium.ant.data.Database;
 import com.nokia.helium.antlint.ant.AntlintException;
 import com.nokia.helium.antlint.ant.Reporter;
 import com.nokia.helium.antlint.ant.Severity;
 import com.nokia.helium.antlint.ant.types.Check;
 import com.nokia.helium.antlint.ant.types.ConsoleReporter;
+import com.nokia.helium.antlint.ant.types.Executor;
 
 /**
  * AntLint Task. This task checks for common coding conventions and errors in
@@ -42,30 +47,32 @@
  * <ul>
  * <li>CheckAntCall : checks whether antcall is used with no param elements and
  * calls target with no dependencies</li>
- * <li>CheckDescription : checks for project description</li>
- * <li>CheckDuplicateNames : checks for duplicate macros</li>
- * <li>CheckFileName : checks the naming convention of ant xml files</li>
- * <li>CheckIndentation : checks indentation</li>
- * <li>CheckJepJythonScript : checks the coding convention in Jep and Jython
- * scripts</li>
- * <li>CheckPresetDefMacroDefName : checks the naming convention of presetdef
+ * <li>checkDescription : checks for project description</li>
+ * <li>checkDuplicateNames : checks for duplicate macros and task names</li>
+ * <li>checkFileName : checks the naming convention of ant xml files</li>
+ * <li>checkIndentation : checks indentation</li>
+ * <li>checkJythonScript : checks the coding convention Jython scripts</li>
+ * <li>checkPresetDefMacroDefName : checks the naming convention of presetdef
  * and macrodef</li>
- * <li>CheckProjectName : checks the naming convention of project</li>
- * <li>CheckPropertyName : checks the naming convention of properties</li>
- * </li>
+ * <li>checkProjectName : checks the naming convention of project</li>
+ * <li>checkPropertyName : checks the naming convention of properties</li>
+ * <li>checkPropertyTypeAndValueMismatch : checks for property type and value
+ * mismatch</li>
  * <li>CheckPythonTasks : checks the coding convention of python tasks</li>
- * <li>CheckRunTarget : checks whether runtarget calls a target that has
+ * <li>checkRunTarget : checks whether runtarget calls a target that has
  * dependencies</li>
- * <li>CheckScriptCondition : checks the coding convention in script condition</li>
- * <li>CheckScriptDef : checks the coding convention in scriptdef</li>
- * <li>CheckScriptDefNameAttributes - checks the naming convention of scriptdef
- * name attributes</li></li>
- * <li>CheckScriptDefStyle : checks the coding style of scriptdef</li>
- * <li>CheckScriptSize : checks the size of scripts</li>
- * <li>CheckTabCharacter : checks for tab characters</li>
- * <li>CheckTargetName : checks the naming convention of targets</li>
- * <li>CheckUseOfEqualsTask : checks the usage of equals task</li>
- * <li>CheckUseOfIfInTargets : checks the usage of if task inside targets</li>
+ * <li>checkScriptCondition : checks the coding convention in script condition</li>
+ * <li>CheckScriptDef : checks the coding convention in scriptdef and attributes
+ * used any</li>
+ * <li>checkScriptSize : checks the size of scripts</li>
+ * <li>checkTabCharacter : checks for tab characters</li>
+ * <li>checkTargetName : checks the naming convention of targets</li>
+ * <li>checkTryCatchBlock : checks for empty or more than one catch element in a
+ * try-catch block</li>
+ * <li>checkUseOfEqualsTask : checks the usage of equals task</li>
+ * <li>checkUseOfIfInTargets : checks the usage of if task inside targets</li>
+ * <li>checkVariableTask : checks whether value attribute for ant-contrib
+ * variable task is set or not when unset is set to true</li>
  * </ul>
  * </pre>
  * 
@@ -79,7 +86,7 @@
  * </p>
  * 
  * <pre>
- * Usage:
+ * Usage: By default, a check will be enabled. To disable a check set enabled=false.
  * 
  *  &lt;antlint&gt;
  *       &lt;fileset id=&quot;antlint.files&quot; dir=&quot;${antlint.test.dir}/data&quot;&gt;
@@ -87,9 +94,9 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckTabCharacter&quot; severity=&quot;error&quot; enabled=&quot;true&quot;/&gt;
- *       &lt;CheckTargetName&quot; severity=&quot;warning&amp;quot enabled=&quot;true&quot; regexp=&quot;([a-z0-9[\\d\\-]]*)&quot;/&gt;
- *       &lt;CheckScriptDef&quot; severity=&quot;error&quot; enabled=&quot;true&quot; outputDir=&quot;${antlint.test.dir}/output&quot;/&gt;
+ *       &lt;CheckTabCharacter&quot; severity=&quot;error&quot; /&gt;
+ *       &lt;CheckTargetName&quot; severity=&quot;warning&amp;quot regexp=&quot;([a-z0-9[\\d\\-]]*)&quot;/&gt;
+ *       &lt;CheckScriptDef&quot; severity=&quot;error&quot; enabled=&quot;false&quot; outputDir=&quot;${antlint.test.dir}/output&quot;/&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
@@ -104,12 +111,16 @@
     private int errorCount;
     private boolean failOnError = true;
     private ConsoleReporter consoleReporter = new ConsoleReporter();
+    private List<Executor> executors = new Vector<Executor>();
+
+    public void add(Executor executor) {
+        executors.add(executor);
+    }
 
     /**
      * Add a set of files to copy.
      * 
-     * @param set
-     *            a set of files to AntLintTask.
+     * @param set a set of files to AntLintTask.
      * @ant.required
      */
     public void addFileset(FileSet set) {
@@ -120,24 +131,40 @@
      * Execute the antlint task.
      */
     public final void execute() {
-        if (checkerList.size() == 0) {
-            throw new BuildException("No antlint checks are defined.");
+        if (checkerList.size() == 0 && executors.size() == 0) {
+            throw new BuildException("No antlint checks/executors are defined.");
         }
+
         try {
             // Adding console reported by default if no
-            // other reporter are mentioned.
+            // other reporters are mentioned.
             if (reporters.size() == 0) {
                 reporters.add(consoleReporter);
             }
             setTask(this);
             open();
-            doAntLintCheck();
+            List<String> antFilePaths = new ArrayList<String>();
+            for (FileSet fs : antFileSetList) {
+                DirectoryScanner ds = fs.getDirectoryScanner(getProject());
+                String[] srcFiles = ds.getIncludedFiles();
+                String basedir = ds.getBasedir().getPath();
+                for (int i = 0; i < srcFiles.length; i++) {
+                    String antFilename = basedir + File.separator + srcFiles[i];
+                    antFilePaths.add(antFilename);
+                }
+            }
+            Database db = new Database(getProject(), "private");
+            db.addAntFilePaths(antFilePaths);
+            doAntLintCheck(db);
+            triggerExternalCommands(db);
         } catch (AntlintException e) {
-            throw new BuildException(
-                    "Exception occured while running AntLint task "
-                            + e.getMessage());
+            throw new BuildException("Exception occured while running AntLint task "
+                    + e.getMessage());
+        } catch (IOException ex) {
+            throw new BuildException("Exception occured while creating Ant database"
+                    + ex.getMessage());
         } finally {
-            // Closing all reporter session.
+            // Closing all reporter sessions.
             close();
         }
 
@@ -147,58 +174,47 @@
 
     }
 
+    private void triggerExternalCommands(Database database) throws AntlintException {
+        for (Executor executor : executors) {
+            log("\n" + executor.getClass().getSimpleName() + " output:" + "\n");
+            executor.setDatabase(database);
+            executor.validateAttributes();
+            executor.run();
+        }
+    }
+
     /**
      * Triggers the antlint checking.
      * 
-     * @throws AntlintException
-     * 
-     * @throws Exception
-     *             if the checking fails.
+     * @throws AntlintException if the checking fails.
      */
-    private void doAntLintCheck() throws AntlintException {
-
-        for (FileSet fs : antFileSetList) {
-            DirectoryScanner ds = fs.getDirectoryScanner(getProject());
-            String[] srcFiles = ds.getIncludedFiles();
-            String basedir = ds.getBasedir().getPath();
-            for (int i = 0; i < srcFiles.length; i++) {
-                String antFilename = basedir + File.separator + srcFiles[i];
-                runChecks(new File(antFilename));
+    private void doAntLintCheck(Database database) throws AntlintException {
+        Collection<AntFile> antFiles = database.getAntFiles();
+        for (AntFile antFile : antFiles) {
+            for (Check check : checkerList) {
+                if (check.isEnabled()) {
+                    check.validateAttributes();
+                    check.setReporter(this);
+                    check.setAntFile(antFile);
+                    check.run();
+                }
             }
         }
     }
 
     /**
-     * Runs antlint checks for the given ant file.
+     * Method to add Antlint checkers.
      * 
-     * @param antFileName
-     *            is the name of the ant file to be checked.
-     * @throws AntlintException
+     * @param check an antlint check to be added.
      */
-    private void runChecks(File antFilename) throws AntlintException {
-        for (Check check : checkerList) {
-            if (check.isEnabled()) {
-                check.validateAttributes();
-                check.setReporter(this);
-                check.run(antFilename);
-            }
-        }
-
+    public void add(Check check) {
+        checkerList.add(check);
     }
 
     /**
-     * To add Antlint checkers.
+     * Method to add Antlint reporters.
      * 
-     * @param c
-     */
-    public void add(Check c) {
-        checkerList.add(c);
-    }
-
-    /**
-     * To add reporters.
-     * 
-     * @param reporter
+     * @param reporter a antlint reporter to be added.
      */
     public void add(Reporter reporter) {
         reporter.setTask(this);
@@ -206,8 +222,9 @@
     }
 
     /**
-     * @param failOnError
-     *            the failOnError to set
+     * Boolean flag to set whether fail on error or not.
+     * 
+     * @param failOnError the failOnError to set
      */
     public void setFailOnError(boolean failOnError) {
         this.failOnError = failOnError;
@@ -215,13 +232,11 @@
 
     /*
      * (non-Javadoc)
-     * 
      * @see
      * com.nokia.helium.antlint.ant.Reporter#report(com.nokia.helium.antlint
      * .ant.Severity, java.lang.String, java.io.File, int)
      */
-    public void report(Severity severity, String message, File filename,
-            int lineNo) {
+    public void report(Severity severity, String message, File filename, int lineNo) {
         if (severity.getValue().toUpperCase().equals("ERROR")) {
             errorCount++;
         }
@@ -233,7 +248,6 @@
 
     /*
      * (non-Javadoc)
-     * 
      * @see
      * com.nokia.helium.antlint.ant.Reporter#setTask(org.apache.tools.ant.Task)
      */
@@ -244,14 +258,20 @@
         }
     }
 
-    @Override
+    /*
+     * (non-Javadoc)
+     * @see com.nokia.helium.antlint.ant.Reporter#close()
+     */
     public void close() {
         for (Reporter reporter : reporters) {
             reporter.close();
         }
     }
 
-    @Override
+    /*
+     * (non-Javadoc)
+     * @see com.nokia.helium.antlint.ant.Reporter#open()
+     */
     public void open() {
         for (Reporter reporter : reporters) {
             reporter.open();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/AbstractAntFileStyleCheck.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *
+ */
+package com.nokia.helium.antlint.ant.types;
+
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import com.nokia.helium.antlint.ant.AntlintException;
+
+/**
+ * <code>AbstractAntFileStyleCheck</code> is an abstract check class used to
+ * parse an Ant file. The class uses an internal handler to receive
+ * notifications of XML parsing.
+ * 
+ */
+public abstract class AbstractAntFileStyleCheck extends AbstractCheck {
+
+    private Locator locator;
+    private StringBuffer buffer = new StringBuffer();
+    
+    /**
+     * {@inheritDoc}
+     */
+    public void run() throws AntlintException {
+        try {
+            SAXParserFactory saxFactory = SAXParserFactory.newInstance();
+            saxFactory.setNamespaceAware(true);
+            saxFactory.setValidating(true);
+            SAXParser parser = saxFactory.newSAXParser();
+            AntlintHandler handler = new AntlintHandler();
+            parser.parse(getAntFile().getFile(), handler);
+        } catch (ParserConfigurationException e) {
+            throw new AntlintException("Not able to parse XML file " + e.getMessage());
+        } catch (SAXException e) {
+            throw new AntlintException("Not able to parse XML file " + e.getMessage());
+        } catch (IOException e) {
+            throw new AntlintException("Not able to find XML file " + e.getMessage());
+        }
+    }
+
+    /**
+     * Set the locator.
+     * 
+     * @param locator is the locator to set
+     */
+    private void setLocator(Locator locator) {
+        this.locator = locator;
+    }
+
+    /**
+     * Return the locator.
+     * 
+     * @return the locator
+     */
+    public Locator getLocator() {
+        return locator;
+    }
+
+    protected void clearBuffer() {
+        buffer.delete(0, buffer.length());
+    }
+    
+    /**
+     * Method to handle the element start notification.
+     * 
+     * @param text is the text read at element start notification.
+     * @param lineNum is the current line number where the parser is reading.
+     */
+    protected abstract void handleStartElement(String text);
+
+    /**
+     * Method to handle the element end notification.
+     * 
+     * @param text is the text read at element end notification.
+     * @param lineNum is the current line number where the parser is reading.
+     */
+    protected abstract void handleEndElement(String text);
+
+    /**
+     * Method to handle the document start notification.
+     */
+    protected abstract void handleStartDocument();
+
+    /**
+     * Method to handle the document end notification.
+     */
+    protected abstract void handleEndDocument();
+
+    /**
+     * A private class used to receive xml parsing notifications.
+     * 
+     */
+    private class AntlintHandler extends DefaultHandler {
+        
+        /**
+         * {@inheritDoc}
+         */
+        public void setDocumentLocator(Locator locator) {
+            setLocator(locator);
+        }
+
+        public void startDocument() throws SAXException {
+            handleStartDocument();
+        }
+        
+        @Override
+        public void endDocument() throws SAXException {
+            handleEndDocument();
+        }
+        
+        /**
+         * {@inheritDoc}
+         */
+        public void startElement(String uri, String name, String qName, Attributes atts) {
+            handleStartElement(buffer.toString());
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        public void endElement(String uri, String name, String qName) {
+            handleEndElement(buffer.toString());
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        public void characters(char[] ch, int start, int length) {
+            for (int i = start; i < start + length; i++) {
+                buffer.append(ch[i]);
+            }
+        }
+    }
+
+}
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/AbstractCheck.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/AbstractCheck.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,13 +16,13 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.types.DataType;
-import org.dom4j.Element;
-import org.dom4j.Node;
 
+import com.nokia.helium.ant.data.AntFile;
 import com.nokia.helium.antlint.ant.Reporter;
 import com.nokia.helium.antlint.ant.Severity;
 
@@ -35,10 +35,26 @@
     private boolean enabled = true;
     private Severity severity;
     private Reporter reporter;
+    private AntFile antFile;
 
     /**
-     * @param enabled
-     *            the enabled to set
+     * Return the ant file.
+     * 
+     * @return the ant file.
+     */
+    protected AntFile getAntFile() {
+        return antFile;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setAntFile(AntFile antFile) {
+        this.antFile = antFile;
+    }
+
+    /**
+     * {@inheritDoc}
      */
     public void setEnabled(boolean enabled) {
         this.enabled = enabled;
@@ -53,7 +69,6 @@
 
     /*
      * (non-Javadoc)
-     * 
      * @see
      * com.nokia.helium.antlint.ant.types.Check#setReporter(com.nokia.helium
      * .antlint.ant.Reporter)
@@ -64,7 +79,6 @@
 
     /*
      * (non-Javadoc)
-     * 
      * @see com.nokia.helium.antlint.ant.types.Check#getReporter()
      */
     public Reporter getReporter() {
@@ -73,7 +87,6 @@
 
     /*
      * (non-Javadoc)
-     * 
      * @see
      * com.nokia.helium.antlint.ant.types.Check#setSeverity(com.nokia.helium
      * .antlint.ant.Severity)
@@ -85,7 +98,6 @@
 
     /*
      * (non-Javadoc)
-     * 
      * @see com.nokia.helium.antlint.ant.types.Check#getSeverity()
      */
     public Severity getSeverity() {
@@ -93,43 +105,64 @@
     }
 
     /**
-     * {@inheritDoc}
-     */
-    public void run(Element node) {
-        // ignore
-    }
-
-    /**
-     * Return the nodes matching search element.
+     * Method to validate checker attributes.
      * 
-     * @param element
-     * @param elementName
-     * @param returnNodes
      */
-    public void elementTreeWalk(Element element, String elementName,
-            List<Element> returnNodes) {
-        for (int i = 0, size = element.nodeCount(); i < size; i++) {
-            Node node = element.node(i);
-            if (node instanceof Element) {
-                if (node.getName().equals(elementName)) {
-                    returnNodes.add((Element) node);
-                }
-                elementTreeWalk((Element) node, elementName, returnNodes);
-            }
+    public void validateAttributes() {
+        if (severity == null) {
+            throw new BuildException("'severity' attribute should be specified for checker '"
+                    + this.toString() + "'");
         }
     }
 
     /**
-     * To validate checker attributes.
+     * Sends the given message to the configured reporter.
      * 
-     * @return
+     * @param message is the message to be sent.
      */
-    public void validateAttributes() {
-        if (severity == null) {
-            throw new BuildException(
-                    "'severity' attribute should be specified for checker '"
-                            + this.toString() + "'");
-        }
+    protected void report(String message) {
+        report(message, 0);
+    }
+
+    /**
+     * Sends the given message with exact line number to the configured
+     * reporter.
+     * 
+     * @param message is the message to be sent.
+     * @param lineNum is the line number.
+     */
+    protected void report(String message, int lineNum) {
+        getReporter().report(getSeverity(), message, getAntFile().getFile(), lineNum);
     }
 
+    /**
+     * Method validates the given input string against the input regex pattern.
+     * 
+     * @param input is the string to be validated.
+     * @param regex is the regex pattern
+     * @return true, if matches; otherwise false.
+     */
+    protected boolean matches(String input, String regex) {
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(input);
+        return matcher.matches();
+    }
+
+    protected boolean matchFound(String input, String regex) {
+        boolean found = false;
+        Pattern p1 = Pattern.compile(regex);
+        Matcher m1 = p1.matcher(input);
+        while (m1.find()) {
+            found = true;
+        }
+        return found;
+    }
+    
+    
+    /* (non-Javadoc)
+     * @see org.apache.tools.ant.types.DataType#toString()
+     */
+    public String toString() {
+        return getClass().getSimpleName();
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/AbstractProjectCheck.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *
+ */
+package com.nokia.helium.antlint.ant.types;
+
+import com.nokia.helium.ant.data.RootAntObjectMeta;
+import com.nokia.helium.antlint.ant.AntlintException;
+
+/**
+ * <code>AbstractProjectCheck</code> is an abstract check class used to run
+ * against a {@link ProjectMeta} or an {@link AntlibMeta}.
+ * 
+ */
+public abstract class AbstractProjectCheck extends AbstractCheck {
+
+    /**
+     * {@inheritDoc}
+     */
+    public void run() throws AntlintException {
+        RootAntObjectMeta rootObjectMeta = getAntFile().getRootObjectMeta();
+        run(rootObjectMeta);
+        
+    }
+
+    /**
+     * Method runs the check against the given {@link RootAntObjectMeta}.
+     * 
+     * @param root is the {@link RootAntObjectMeta} against which the check is
+     *            run.
+     */
+    protected abstract void run(RootAntObjectMeta root);
+
+}
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/AbstractScriptCheck.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/AbstractScriptCheck.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,97 +16,113 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
 import java.util.ArrayList;
+import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.apache.tools.ant.BuildException;
+import com.nokia.helium.ant.data.AntlibMeta;
+import com.nokia.helium.ant.data.MacroMeta;
+import com.nokia.helium.ant.data.ProjectMeta;
+import com.nokia.helium.ant.data.RootAntObjectMeta;
+import com.nokia.helium.ant.data.TargetMeta;
 
 /**
  * <code>AbstractScriptCheck</code> is an abstract implementation of
  * {@link Check} and contains some concrete methods related to script.
  * 
  */
-public abstract class AbstractScriptCheck extends AbstractCheck {
+public abstract class AbstractScriptCheck extends AbstractTargetCheck {
 
     /**
-     * Write a script with the given name and the text.
-     * 
-     * @param name
-     *            is the name of the script
-     * @param text
-     *            is the script text.
+     * {@inheritDoc}
      */
-    protected void writeJythonFile(String name, String text, File outputDir) {
-        if (outputDir == null) {
-            throw new BuildException("'output' attribute for the checker '"
-                    + this.toString() + "' should be specified.");
-        }
-        if (text.contains("${")) {
-            this.getReporter().report(this.getSeverity(),
-                    "${ found in " + name, this.getAntFile(), 0);
+    protected void run(RootAntObjectMeta root) {
+        super.run(root);
+        if (getMacroXPathExpression() != null) {
+            if (root instanceof ProjectMeta) {
+                ProjectMeta projectMeta = (ProjectMeta) root;
+                List<MacroMeta> macros = projectMeta
+                        .getScriptDefinitions(getMacroXPathExpression());
+                for (MacroMeta macroMeta : macros) {
+                    run(macroMeta);
+                }
+            }
+            if (root instanceof AntlibMeta) {
+                AntlibMeta antlibMeta = (AntlibMeta) root;
+                List<MacroMeta> macros = antlibMeta.getScriptDefinitions(getMacroXPathExpression());
+                for (MacroMeta macroMeta : macros) {
+                    run(macroMeta);
+                }
+            }
         }
-        try {
-            String heliumpath = outputDir.getCanonicalPath();
-            new File(heliumpath + File.separator + "jep").mkdirs();
-            File file = new File(heliumpath + File.separator + "jep"
-                    + File.separator + name + "_jep.py");
-            PrintWriter output = new PrintWriter(new FileOutputStream(file));
-            output.write("def abc():\n");
-            output.write("    attributes = {} # pylint: disable-msg=C0103\n");
-            output.write("    elements = {} # pylint: disable-msg=C0103\n");
-            output.write("    project = None # pylint: disable-msg=C0103\n");
-            output.write("    self = None # pylint: disable-msg=C0103\n");
-            text = text.replace(" File(", " self.File(");
-            for (String line : text.split("\n")) {
-                output.write("    " + line + "\n");
-            }
-            output.close();
+    }
 
-            if (text.contains("import ")) {
-                File file2 = new File(heliumpath + File.separator
-                        + "test_jython.xml");
-                PrintWriter output2 = new PrintWriter(new FileOutputStream(
-                        file2, true));
-                output2.write("try:\n");
-                for (String line : text.split("\n")) {
-                    if (line.trim().startsWith("import ")
-                            || line.trim().startsWith("from ")) {
-                        output2.write("    " + line + "\n");
-                    }
-                }
-
-                output2.write("except ImportError, e:\n");
-                output2.write("    print '" + name + " failed: ' + str(e)\n");
-                output2.close();
+    /**
+     * {@inheritDoc}
+     */
+    protected void run(TargetMeta targetMeta) {
+        String xpath = getScriptXPathExpression(targetMeta.getName());
+        if (xpath != null) {
+            List<MacroMeta> macros = targetMeta.getScriptDefinitions(xpath);
+            for (MacroMeta macroMeta : macros) {
+                run(macroMeta);
             }
-        } catch (IOException e) {
-            throw new BuildException("Not able to write JEP File " + name
-                    + "_jep.py");
         }
     }
 
     /**
-     * Check for the properties in the given script text.
+     * Method returns the name of the macro or a constructed name for the given
+     * script using its parent name.
      * 
-     * @param text
-     *            is the script text to lookup.
+     * @param macroMeta is an instance of Macrometa.
+     * @return name of the script
+     */
+    protected String getScriptName(MacroMeta macroMeta) {
+        String name = macroMeta.getName();
+        if (name.isEmpty()) {
+            name = "target_" + macroMeta.getParent().getName();
+        }
+        return name;
+    }
+
+    /**
+     * Method runs the check against the input {@link MacroMeta}.
+     * 
+     * @param macroMeta is the {@link MacroMeta} against whom the check is run.
+     */
+    protected abstract void run(MacroMeta macroMeta);
+
+    /**
+     * Get the xpath expression of the macro.
+     * 
+     * @return the xpath expression of the macro.
      */
-    protected void checkJepPropertiesInText(String text) {
-        Pattern p1 = Pattern
-                .compile("getProperty\\([\"']([a-zA-Z0-9\\.]*)[\"']\\)");
-        Matcher m1 = p1.matcher(text);
-        ArrayList<String> props = new ArrayList<String>();
-        while (m1.find()) {
-            props.add(m1.group(1));
+    protected abstract String getMacroXPathExpression();
+
+    /**
+     * Get the xpath expression for the input target.
+     * 
+     * @param targetName is the name of the target.
+     * @return the xpath expression for the input target.
+     */
+    protected abstract String getScriptXPathExpression(String targetName);
+
+    /**
+     * Method returns a list of property names used in the given script
+     * definition.
+     * 
+     * @param macroMeta the macrometa instance to lookup.
+     * @return a list of used property names
+     */
+    protected List<String> getUsedProperties(MacroMeta macroMeta) {
+        Pattern pattern = Pattern.compile("attributes.get\\([\"']([^\"']*)[\"']\\)");
+        Matcher matcher = pattern.matcher(macroMeta.getText());
+        List<String> usedPropertyList = new ArrayList<String>();
+        while (matcher.find()) {
+            usedPropertyList.add(matcher.group(1));
         }
-        /*
-         * for (String group : props) { checkPropertyInModel(group); }
-         */
+        return usedPropertyList;
     }
 
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/AbstractTargetCheck.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *
+ */
+package com.nokia.helium.antlint.ant.types;
+
+import java.util.List;
+
+import org.apache.tools.ant.Target;
+
+import com.nokia.helium.ant.data.ProjectMeta;
+import com.nokia.helium.ant.data.RootAntObjectMeta;
+import com.nokia.helium.ant.data.TargetMeta;
+
+/**
+ * <code>AbstractTargetCheck</code> is an abstract check class used to run
+ * against target level.
+ * 
+ */
+public abstract class AbstractTargetCheck extends AbstractProjectCheck {
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void run(RootAntObjectMeta root) {
+        if (root instanceof ProjectMeta) {
+            ProjectMeta projectMeta = (ProjectMeta) root;
+            List<TargetMeta> targets = projectMeta.getTargets();
+            for (TargetMeta targetMeta : targets) {
+                run(targetMeta);
+            }
+        }
+    }
+
+    /**
+     * Check the availability of dependent targets for the given target.
+     * 
+     * @param targetName is the target for which dependent targets to be looked
+     *            up.
+     * @return true, if the dependant targets are available; otherwise false
+     */
+    protected boolean checkTargetDependency(String targetName) {
+        Target targetDependency = (Target) getProject().getTargets().get(targetName);
+        return targetDependency != null && targetDependency.getDependencies().hasMoreElements();
+    }
+
+    /**
+     * Method to run the check against the input {@link TargetMeta}.
+     * 
+     * @param targetMeta is the {@link TargetMeta} against whom the check is
+     *            run.
+     */
+    protected abstract void run(TargetMeta targetMeta);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/BeanshellScriptDump.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+package com.nokia.helium.antlint.ant.types;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import org.apache.tools.ant.BuildException;
+
+import com.nokia.helium.ant.data.MacroMeta;
+
+/**
+ * <code>BeanshellScriptDumper</code> is used to extract and dump beanshell
+ * scripts from the Ant files.
+ */
+public class BeanshellScriptDump extends ScriptDump {
+
+    /**
+     * {@inheritDoc}
+     */
+    protected String getMacroXPathExpression() {
+        return "//scriptdef";
+    }
+
+    protected String getScriptXPathExpression(String targetName) {
+        return null;
+    }
+
+    protected void run(MacroMeta macroMeta) {
+        String language = macroMeta.getAttr("language");
+        if (language.equals("beanshell")) {
+            writeBeanshellFile(macroMeta.getName(), macroMeta.getText());
+        }
+    }
+
+    /**
+     * Write a bean shell file with the given text.
+     * 
+     * @param scriptdefname is the name of the file to be written.
+     * @param text is the text to be written inside the file.
+     */
+    private void writeBeanshellFile(String scriptdefname, String text) {
+        PrintWriter output = null;
+        scriptdefname = "Beanshell" + scriptdefname;
+
+        try {
+            String outputPath = getOutputDir().getCanonicalPath();
+            new File(outputPath).mkdirs();
+            File file = new File(outputPath + File.separator + scriptdefname + ".java");
+            output = new PrintWriter(new FileOutputStream(file));
+
+            for (String line : text.split("\n")) {
+                if (line.trim().startsWith("import")) {
+                    output.write(line + "\n");
+                }
+            }
+            output.write("/**\n * x\n */\npublic final class " + scriptdefname + " {\n");
+            output.write("    private " + scriptdefname + "() { }\n");
+            output.write("    public static void main(String[] args) {\n");
+            for (String line : text.split("\n")) {
+                if (!line.trim().startsWith("import")) {
+                    output.write("        " + line + "\n");
+                }
+            }
+            output.write("    }\n");
+            output.write("}\n");
+        } catch (IOException e) {
+            throw new BuildException("Not able to write Beanshell File " + scriptdefname + ".java");
+        } finally {
+            if (output != null) {
+                output.close();
+            }
+        }
+    }
+}
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/Check.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/Check.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,38 +16,24 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-
-import org.dom4j.Element;
-
+import com.nokia.helium.ant.data.AntFile;
 import com.nokia.helium.antlint.ant.AntlintException;
 import com.nokia.helium.antlint.ant.Reporter;
 import com.nokia.helium.antlint.ant.Severity;
 
 /**
- * <code>Check</code> represents a basic antlint component responsible for
- * running the user configured checks.
+ * <code>Check</code> represents a basic antlint validation component
+ * responsible for running the user configured checks.
  * 
  */
 public interface Check {
 
     /**
-     * Method runs the configured checks against the given node.
+     * Method runs the configured check against a ant file.
      * 
-     * @param node
-     *            is the node of the xml to be checked.
+     * @throws AntlintException if check fails
      */
-    void run(Element node);
-
-    /**
-     * Method runs the configured checks against the given ant file.
-     * 
-     * @param fileName
-     *            is the name of the ant file.
-     * @param reporter
-     * @throws AntlintException
-     */
-    void run(File fileName) throws AntlintException;
+    void run() throws AntlintException;
 
     /**
      * Return whether this is check is enabled or not.
@@ -97,17 +83,16 @@
     Reporter getReporter();
 
     /**
-     * Return ant file.
-     * 
-     * @return
-     */
-    File getAntFile();
-
-    /**
      * To return current checker name.
      * 
      * @return
      */
     String toString();
 
+    /**
+     * Set the ant file.
+     * 
+     * @param antFile the ant file to set.
+     */
+    void setAntFile(AntFile antFile);
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckAntCall.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckAntCall.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,21 +16,14 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.tools.ant.Target;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.antlint.ant.AntlintException;
+import com.nokia.helium.ant.data.TargetMeta;
+import com.nokia.helium.ant.data.TaskMeta;
 
 /**
- * <code>CheckAntCall</code> is used to check whether antcall is used with no param elements and
- * calls the target with no dependencies
+ * <code>CheckAntCall</code> is used to check whether antcall is used with no
+ * param elements and calls the target with no dependencies
  * 
  * <pre>
  * Usage:
@@ -45,97 +38,25 @@
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckAntCall" category="AntLint"
+ * @ant.task name="checkAntCall" category="AntLint"
  */
-public class CheckAntCall extends AbstractCheck {
-
-    private File antFile;
+public class CheckAntCall extends AbstractTargetCheck {
 
     /**
      * {@inheritDoc}
      */
-    public void run(Element node) {
-        if (node.getName().equals("target")) {
-            checkAntCalls(node);
-        }
-    }
-
-    /**
-     * Check against the given node.
-     * 
-     * @param node is the node to check.
-     */
-    @SuppressWarnings("unchecked")
-    private void checkAntCalls(Element node) {
-        if (node.elements("antcall") != null) {
-            List<Element> antcallList = node.elements("antcall");
-            for (Element antcallElement : antcallList) {
-                String antcallName = antcallElement.attributeValue("target");
-                if (((node.elements("param") == null) || (node.elements("param") != null && node.elements("param").isEmpty()))
-                    && !checkTargetDependency(antcallName)) {
-                    this.getReporter().report(this.getSeverity(), "<antcall> is used with no param elements and calls the target "
-                        + antcallName
-                        + " that has no dependencies! (<runtarget> could be used instead.)", this.getAntFile(), 0);
-                }
+    public void run(TargetMeta targetMeta) {
+        List<TaskMeta> antCalls = targetMeta.getTasks("antcall");
+        int count = 0;
+        count++;
+        for (TaskMeta antCallMeta : antCalls) {
+            if (antCallMeta.getParams().isEmpty()
+                    && !checkTargetDependency(antCallMeta.getAttr("target"))) {
+                report("<antcall> is used with no param " + "elements and calls the target '"
+                        + antCallMeta.getAttr("target")
+                        + "' that has no dependencies! (<runtarget> could be used instead.)",
+                        antCallMeta.getLineNumber());
             }
         }
     }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
-     */
-    public void run(File antFilename) throws AntlintException {
-
-        this.antFile = antFilename;
-        SAXReader saxReader = new SAXReader();
-        Document doc;
-        List<Element> targetNodes = new ArrayList<Element>();
-
-        try {
-            doc = saxReader.read(antFilename);
-            elementTreeWalk(doc.getRootElement(), "target", targetNodes);
-        }
-        catch (DocumentException e) {
-            throw new AntlintException("Invalid XML file " + e.getMessage());
-        }
-
-        for (Element targetNode : targetNodes) {
-            run(targetNode);
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckAntCall";
-    }
-
-    /**
-     * Check the availability dependent targets of the given target.
-     * 
-     * @param targetName is the target for which dependent targets to be loked up.
-     * @return true, if the dependant targets are available; otherwise false
-     */
-    private boolean checkTargetDependency(String targetName) {
-        boolean dependencyCheck = false;
-        Target targetDependency = (Target) getProject().getTargets().get(targetName);
-        dependencyCheck = targetDependency != null
-            && targetDependency.getDependencies().hasMoreElements();
-        return dependencyCheck;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
-    }
-
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckDescription.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckDescription.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,14 +16,8 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.antlint.ant.AntlintException;
+import com.nokia.helium.ant.data.ProjectMeta;
+import com.nokia.helium.ant.data.RootAntObjectMeta;
 
 /**
  * <code>CheckDescription</code> is used to check whether project description is
@@ -38,60 +32,20 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckDescription&quot; severity=&quot;error&quot; enabled=&quot;true&quot;/&gt;
+ *       &lt;checkDescription severity=&quot;error&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckDescription" category="AntLint"
+ * @ant.task name="checkDescription" category="AntLint"
  */
-public class CheckDescription extends AbstractCheck {
-
-    private File antFile;
+public class CheckDescription extends AbstractProjectCheck {
 
     /**
      * {@inheritDoc}
      */
-    public void run(Element node) {
-        if (node.getName().equals("project")
-                && node.element("description") == null) {
-            this.getReporter().report(this.getSeverity(),
-                    "Description not specified!", this.getAntFile(), 0);
+    protected void run(RootAntObjectMeta root) {
+        if (root instanceof ProjectMeta && ((ProjectMeta) root).getDescription().isEmpty()) {
+            report("Description not specified!", root.getLineNumber());
         }
     }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
-     */
-    public void run(File antFilename) throws AntlintException {
-        this.antFile = antFilename;
-        SAXReader saxReader = new SAXReader();
-        Document doc;
-        try {
-            doc = saxReader.read(antFilename);
-            run(doc.getRootElement());
-        } catch (DocumentException e) {
-            throw new AntlintException("Invalid XML file " + e.getMessage());
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckDescription";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
-    }
-
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckDuplicateNames.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckDuplicateNames.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,12 +16,19 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
 import java.util.ArrayList;
 import java.util.Hashtable;
+import java.util.List;
+
+import org.apache.tools.ant.taskdefs.MacroInstance;
+import org.apache.tools.ant.taskdefs.optional.script.ScriptDefBase;
+
+import com.nokia.helium.ant.data.MacroMeta;
+import com.nokia.helium.ant.data.RootAntObjectMeta;
 
 /**
- * <code>CheckDuplicateNames</code> is used to check for duplicate macro names.
+ * <code>CheckDuplicateNames</code> is used to check for duplicate macro and
+ * task names.
  * 
  * <pre>
  * Usage:
@@ -32,57 +39,53 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckDuplicateNames&quot; severity=&quot;error&quot; enabled=&quot;true&quot;/&gt;
+ *       &lt;checkDuplicateNames severity=&quot;error&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckDuplicateNames" category="AntLint"
+ * @ant.task name="checkDuplicateNames" category="AntLint"
  */
-public class CheckDuplicateNames extends AbstractCheck {
+public class CheckDuplicateNames extends AbstractProjectCheck {
 
-    private File antFile;
+    private static final String HELIUM_URI = "http://www.nokia.com/helium";
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
+    private List<String> heliumTaskList;
+
+    /**
+     * {@inheritDoc}
      */
-    @SuppressWarnings("unchecked")
-    public void run(File antFilename) {
-        this.antFile = antFilename;
-        Hashtable<String, Class<Object>> taskdefs = getProject()
-                .getTaskDefinitions();
-        ArrayList<String> macros = new ArrayList<String>(taskdefs.keySet());
-
-        for (String macroName : macros) {
-            if (macros.contains(macroName + "Macro")
-                    || macros.contains(macroName + "macro")) {
-                this.getReporter()
-                        .report(
-                                this.getSeverity(),
-                                macroName + " and " + macroName + "Macro"
-                                        + " found duplicate name",
-                                this.getAntFile(), 0);
+    protected void run(RootAntObjectMeta root) {
+        if (heliumTaskList == null) {
+            setHeliumTaskList(root);
+        }
+        List<MacroMeta> macros = root.getMacros();
+        if (heliumTaskList != null ) {
+            for (MacroMeta macroMeta : macros) {
+                if (heliumTaskList.contains(macroMeta.getName())) {
+                    report("Task '" + macroMeta.getName() + "' and macro '" + macroMeta.getName()
+                            + "' has duplicate name.", macroMeta.getLineNumber());
+                }
             }
         }
     }
 
-    /*
-     * (non-Javadoc)
+    /**
+     * Method sets a list of helium tasks.
      * 
-     * @see org.apache.tools.ant.types.DataType#toString()
+     * @param root is the {@link RootAntObjectMeta} used to lookup for tasks.
      */
-    public String toString() {
-        return "CheckDuplicateNames";
+    @SuppressWarnings({ "unchecked", "rawtypes" })
+    private void setHeliumTaskList(RootAntObjectMeta root) {
+        heliumTaskList = new ArrayList<String>();
+        Hashtable<String, Class<Object>> taskdefs = root.getRuntimeProject().getTaskDefinitions();
+        List<String> list = new ArrayList<String>(taskdefs.keySet());
+        for (String taskName : list) {
+            Class clazz = taskdefs.get(taskName);
+            int index = taskName.lastIndexOf(":");
+            if (taskName.startsWith(HELIUM_URI)
+                    && !(clazz.equals(MacroInstance.class) || clazz.equals(ScriptDefBase.class))) {
+                heliumTaskList.add(taskName.substring(index + 1));
+            }
+        }
     }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
-    }
-
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckFileName.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckFileName.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,10 +16,6 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
 /**
  * <code>CheckFileName</code> is used to check the naming convention of the ant
  * files.
@@ -33,71 +29,42 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckFileName&quot; severity=&quot;error&quot; enabled=&quot;true&quot; regexp=&quot;([a-z0-9[\\d\\-]]*)&quot;/&gt;
+ *       &lt;checkFileName severity=&quot;error&quot; regexp=&quot;([a-z0-9[\\d\\-]]*)&quot;/&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckFileName" category="AntLint"
+ * @ant.task name="checkFileName" category="AntLint"
  * 
  */
 public class CheckFileName extends AbstractCheck {
 
     private String regExp;
-    private File antFile;
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
+    /**
+     * {@inheritDoc}
      */
-    public void run(File antFilename) {
-        if (antFilename != null) {
-            this.antFile = antFilename;
-            boolean found = false;
-            Pattern p1 = Pattern.compile(getRegExp());
-            Matcher m1 = p1.matcher(antFilename.getName());
-            while (m1.find()) {
-                found = true;
-            }
-            if (!found) {
-                this.getReporter().report(this.getSeverity(),
-                        "INVALID File Name: " + antFilename.getName(),
-                        this.getAntFile(), 0);
-            }
+    public void run() {
+        String fileName = getAntFile().getFile().getName();
+        if (!matchFound(fileName, getRegExp())) {
+            report("Invalid file Name: " + fileName);
         }
     }
 
     /**
-     * @param regExp
-     *            the regExp to set
+     * Method to set the regular expression.
+     * 
+     * @param regExp the regExp to set
      */
     public void setRegExp(String regExp) {
         this.regExp = regExp;
     }
 
     /**
-     * @return the regExp
+     * Method returns the regular expression.
+     * 
+     * @return the regular expression
      */
     public String getRegExp() {
         return regExp;
     }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckFileName";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
-    }
-
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckIndentation.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckIndentation.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,18 +16,6 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.io.IOException;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.xml.sax.SAXException;
-
-import com.nokia.helium.antlint.AntLintHandler;
-import com.nokia.helium.antlint.ant.AntlintException;
-
 /**
  * <code>CheckIndentation</code> is used to check the indentations in the ant
  * files.
@@ -41,58 +29,96 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckIndentation&quot; severity=&quot;error&quot; enabled=&quot;true&quot; /&gt;
+ *       &lt;checkIndentation severity=&quot;error&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckIndentation" category="AntLint"
+ * @ant.task name="checkIndentation" category="AntLint"
  * 
  */
-public class CheckIndentation extends AbstractCheck {
-    private File antFile;
+public class CheckIndentation extends AbstractAntFileStyleCheck {
+    private static final int INDENT_SPACES = 4;
+    private int indentLevel;
+    private int totalNoOfSpaces;
+    private boolean textElement;
+    private int currentLine;
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
+    /**
+     * {@inheritDoc}
+     */
+    public void handleStartDocument() {
+        indentLevel -= INDENT_SPACES;
+    }
+
+    @Override
+    protected void handleEndDocument() {
+        indentLevel = 0;
+    }
+
+    /**
+     * {@inheritDoc}
      */
-    public void run(File antFilename) throws AntlintException {
-        try {
-            this.antFile = antFilename;
-            SAXParserFactory saxFactory = SAXParserFactory.newInstance();
-            saxFactory.setNamespaceAware(true);
-            saxFactory.setValidating(true);
-            SAXParser parser = saxFactory.newSAXParser();
-            AntLintHandler handler = new AntLintHandler(this);
-            handler.setIndentationCheck(true);
-            parser.parse(antFilename, handler);
-        } catch (ParserConfigurationException e) {
-            throw new AntlintException("Not able to parse XML file "
-                    + e.getMessage());
-        } catch (SAXException e) {
-            throw new AntlintException("Not able to parse XML file "
-                    + e.getMessage());
-        } catch (IOException e) {
-            throw new AntlintException("Not able to find XML file "
-                    + e.getMessage());
+    public void handleStartElement(String text) {
+        countSpaces(text);
+
+        // When an element start tag is encountered,
+        // indentLevel is increased 4 spaces.
+        indentLevel += INDENT_SPACES;
+
+        checkIndent(text);
+        currentLine = getLocator().getLineNumber();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void handleEndElement(String text) {
+        countSpaces(text);
+        // Ignore end tags in the same line
+        if (currentLine != getLocator().getLineNumber()) {
+            checkIndent(text);
+        }
+        // When an element end tag is encountered,
+        // indentLevel is decreased 4 spaces.
+        indentLevel -= INDENT_SPACES;
+        textElement = false;
+    }
+
+    /**
+     * Check for indentation.
+     * 
+     */
+    private void checkIndent(String text) {
+        if ((totalNoOfSpaces != indentLevel) && !textElement) {
+            report("Bad indentation : ", getLocator().getLineNumber());
         }
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
+    /**
+     * Method counts the number of spaces.
      */
-    public String toString() {
-        return "CheckIndentation";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
+    public void countSpaces(String text) {
+        // Counts spaces and tabs in every newline.
+        int numSpaces = 0;
+        for (int i = 0; i < text.length(); i++) {
+            switch (text.charAt(i)) {
+                case '\t':
+                    numSpaces += 4;
+                    break;
+                case '\n':
+                    numSpaces = 0;
+                    break;
+                case ' ':
+                    numSpaces++;
+                    break;
+                default:
+                    // An alphanumeric character encountered
+                    // set the text element flag
+                    textElement = true;
+                    break;
+            }
+        }
+        totalNoOfSpaces = numSpaces;
+        clearBuffer();
     }
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckJythonScript.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckJythonScript.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,20 +16,11 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.antlint.ant.AntlintException;
+import com.nokia.helium.ant.data.MacroMeta;
 
 /**
- * <code>CheckJepJythonScript</code> is used to check the coding convention in
- * Jep and Jython scripts
+ * <code>CheckJythonScript</code> is used to check the coding convention of
+ * Jython scripts
  * 
  * <pre>
  * Usage:
@@ -40,110 +31,36 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckJepJythonScript&quot; severity=&quot;error&quot; enabled=&quot;true&quot; /&gt;
+ *       &lt;checkJythonScript severity=&quot;error&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckJepJythonScript" category="AntLint"
+ * @ant.task name="checkJythonScript" category="AntLint"
  * 
  */
 public class CheckJythonScript extends AbstractScriptCheck {
 
-    private File outputDir;
-    private File antFile;
-
     /**
      * {@inheritDoc}
      */
-    public void run(Element node) {
-        if (node.getName().equals("target")) {
-            checkScripts(node);
-        }
-
-        if (node.getName().equals("scriptdef")) {
-            String scriptdefname = node.attributeValue("name");
-            String language = node.attributeValue("language");
-            if (language.equals("jython")) {
-                writeJythonFile(scriptdefname, node.getText(), outputDir);
-            }
-        }
+    protected String getMacroXPathExpression() {
+        return "//scriptdef";
     }
 
     /**
-     * Check against the given node.
-     * 
-     * @param node
-     *            is the node to check.
+     * {@inheritDoc}
      */
-    @SuppressWarnings("unchecked")
-    private void checkScripts(Element node) {
-        String target = node.attributeValue("name");
-        List<Element> scriptList = node.selectNodes("//target[@name='" + target
-                + "']/descendant::script");
-        for (Element scriptElement : scriptList) {
-            String language = scriptElement.attributeValue("language");
-            if (language.equals("jython")) {
-                writeJythonFile("target_" + target, scriptElement.getText(),
-                        outputDir);
-            }
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
-     */
-    public void run(File antFilename) throws AntlintException {
-        List<Element> scriptNodes = new ArrayList<Element>();
-
-        this.antFile = antFilename;
-        SAXReader saxReader = new SAXReader();
-        Document doc;
-        try {
-            doc = saxReader.read(antFilename);
-            elementTreeWalk(doc.getRootElement(), "target", scriptNodes);
-            elementTreeWalk(doc.getRootElement(), "scriptdef", scriptNodes);
-        } catch (DocumentException e) {
-            throw new AntlintException("Invalid XML file " + e.getMessage());
-        }
-        for (Element targetNode : scriptNodes) {
-            run(targetNode);
-        }
-
+    protected String getScriptXPathExpression(String targetName) {
+        return ".//script";
     }
 
     /**
-     * @param outputDir
-     *            the outputDir to set
+     * {@inheritDoc}
      */
-    public void setOutputDir(File outputDir) {
-        this.outputDir = outputDir;
-    }
-
-    /**
-     * @return the outputDir
-     */
-    public File getOutputDir() {
-        return outputDir;
+    protected void run(MacroMeta macroMeta) {
+        String language = macroMeta.getAttr("language");
+        if (language != null && language.equals("jython") && macroMeta.getText().contains("${")) {
+            report("${ found in " + getScriptName(macroMeta));
+        }
     }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckJepJythonScript";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
-    }
-
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckPresetDefMacroDefName.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckPresetDefMacroDefName.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,18 +16,10 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.util.ArrayList;
 import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.antlint.ant.AntlintException;
+import com.nokia.helium.ant.data.AntObjectMeta;
+import com.nokia.helium.ant.data.MacroMeta;
 
 /**
  * <code>CheckPresetDefMacroDefName</code> is used to check the naming
@@ -42,108 +34,63 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckPresetDefMacroDefName&quot; severity=&quot;error&quot; enabled=&quot;true&quot; /&gt;
+ *       &lt;checkPresetDefMacroDefName severity=&quot;error&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckPresetDefMacroDefName" category="AntLint"
+ * @ant.task name="checkPresetDefMacroDefName" category="AntLint"
  * 
  */
-public class CheckPresetDefMacroDefName extends AbstractCheck {
+public class CheckPresetDefMacroDefName extends AbstractScriptCheck {
 
     private String regExp;
-    private File antFile;
 
     /**
      * {@inheritDoc}
      */
-    @SuppressWarnings("unchecked")
-    public void run(Element node) {
-        if (node.getName().equals("presetdef")
-                || node.getName().equals("macrodef")) {
-            String text = node.attributeValue("name");
-            if (text != null && !text.isEmpty()) {
-                checkDefName(text);
+    protected String getMacroXPathExpression() {
+        return "//macrodef | //presetdef";
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected String getScriptXPathExpression(String targetName) {
+        return ".//script";
+    }
 
-            }
+    /**
+     * {@inheritDoc}
+     */
+    protected void run(MacroMeta macroMeta) {
+        validateName(macroMeta.getName(), macroMeta);
+        List<String> attributes = macroMeta.getAttributes();
+        for (String attrName : attributes) {
+            validateName(attrName, macroMeta);
+        }
+    }
 
-            List<Element> attributeList = node.elements("attribute");
-            for (Element attributeElement : attributeList) {
-                String attributeName = attributeElement.attributeValue("name");
-                checkDefName(attributeName);
-            }
+    private void validateName(String name, AntObjectMeta object) {
+        if (name != null && !name.isEmpty() && !matches(name, getRegExp())) {
+            report("Invalid presetdef/macrodef name: " + name, object.getLineNumber());
         }
     }
 
     /**
-     * Check the given text.
-     * 
-     * @param text
-     *            is the text to check.
-     */
-    private void checkDefName(String text) {
-        Pattern p1 = Pattern.compile(getRegExp());
-        Matcher m1 = p1.matcher(text);
-        if (!m1.matches()) {
-            this.getReporter().report(this.getSeverity(),
-                    "INVALID PRESETDEF/MACRODEF Name: " + text,
-                    this.getAntFile(), 0);
-        }
-    }
-
-    /*
-     * (non-Javadoc)
+     * Set the regular expression.
      * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
-     */
-    public void run(File antFilename) throws AntlintException {
-        this.antFile = antFilename;
-        SAXReader saxReader = new SAXReader();
-        Document doc;
-        List<Element> presetDefNodes = new ArrayList<Element>();
-        try {
-            doc = saxReader.read(antFilename);
-            elementTreeWalk(doc.getRootElement(), "presetdef", presetDefNodes);
-            elementTreeWalk(doc.getRootElement(), "macrodef", presetDefNodes);
-        } catch (DocumentException e) {
-            throw new AntlintException("Invalid XML file " + e.getMessage());
-        }
-        for (Element presetDefNode : presetDefNodes) {
-            run(presetDefNode);
-        }
-    }
-
-    /**
-     * @param regExp
-     *            the regExp to set
+     * @param regExp the regExp to set
      */
     public void setRegExp(String regExp) {
         this.regExp = regExp;
     }
 
     /**
+     * Get the regular expression.
+     * 
      * @return the regExp
      */
     public String getRegExp() {
         return regExp;
     }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckPresetDefMacroDefName";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
-    }
-
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckProjectName.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckProjectName.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,16 +16,7 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.antlint.ant.AntlintException;
+import com.nokia.helium.ant.data.RootAntObjectMeta;
 
 /**
  * <code>CheckProjectName</code> is used to check the naming convention of
@@ -40,98 +31,44 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckProjectName&quot; severity=&quot;error&quot; enabled=&quot;true&quot; regexp=&quot;([a-z0-9[\\d\\-]]*)&quot; /&gt;
+ *       &lt;checkProjectName severity=&quot;error&quot; regexp=&quot;([a-z0-9[\\d\\-]]*)&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckProjectName" category="AntLint"
+ * @ant.task name="checkProjectName" category="AntLint"
  * 
  */
-public class CheckProjectName extends AbstractCheck {
+public class CheckProjectName extends AbstractProjectCheck {
     private String regExp;
-    private File antFile;
 
     /**
      * {@inheritDoc}
      */
-    public void run(Element node) {
-        if (node.getName().equals("project")) {
-            String text = node.attributeValue("name");
-            if (text != null && !text.isEmpty()) {
-                checkProjectName(text);
-            } else {
-                this.getReporter().report(this.getSeverity(),
-                        "Project name not specified!", this.getAntFile(), 0);
-            }
+    protected void run(RootAntObjectMeta root) {
+        if (root != null && !root.getName().isEmpty() && !matches(root.getName(), getRegExp())) {
+            report("Invalid project name: " + root.getName(), root.getLineNumber());
+        }
 
+        if (root != null && root.getName().isEmpty()) {
+            report("Project name not specified!", root.getLineNumber());
         }
     }
 
     /**
-     * Check the given the project name.
-     * 
-     * @param text
-     *            is the text to check.
-     */
-    private void checkProjectName(String text) {
-        Pattern p1 = Pattern.compile(getRegExp());
-        Matcher m1 = p1.matcher(text);
-        if (!m1.matches()) {
-            this.getReporter().report(this.getSeverity(),
-                    "INVALID Project Name: " + text, this.getAntFile(), 0);
-        }
-    }
-
-    /*
-     * (non-Javadoc)
+     * Set the regular expresssion.
      * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
-     */
-    public void run(File antFilename) throws AntlintException {
-        this.antFile = antFilename;
-        SAXReader saxReader = new SAXReader();
-        Document doc;
-        try {
-            doc = saxReader.read(antFilename);
-            run(doc.getRootElement());
-
-        } catch (DocumentException e) {
-            throw new AntlintException("Invalid XML file " + e.getMessage());
-        }
-
-    }
-
-    /**
-     * @param regExp
-     *            the regExp to set
+     * @param regExp the regExp to set
      */
     public void setRegExp(String regExp) {
         this.regExp = regExp;
     }
 
     /**
+     * Get the regular expression.
+     * 
      * @return the regExp
      */
     public String getRegExp() {
         return regExp;
     }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckProjectName";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
-    }
-
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckPropertyName.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckPropertyName.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,18 +16,11 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.util.ArrayList;
 import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.antlint.ant.AntlintException;
+import com.nokia.helium.ant.data.ProjectMeta;
+import com.nokia.helium.ant.data.PropertyMeta;
+import com.nokia.helium.ant.data.RootAntObjectMeta;
 
 /**
  * <code>CheckPropertyName</code> is used to check the naming convention of
@@ -42,121 +35,48 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckPropertyName&quot; severity=&quot;error&quot; enabled=&quot;true&quot; regexp=&quot;([a-z0-9[\\d\\-]]*)&quot; /&gt;
+ *       &lt;checkPropertyName severity=&quot;error&quot; regexp=&quot;([a-z0-9[\\d\\-]]*)&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckPropertyName" category="AntLint"
+ * @ant.task name="checkPropertyName" category="AntLint"
  * 
  */
-public class CheckPropertyName extends AbstractCheck {
+public class CheckPropertyName extends AbstractProjectCheck {
 
-    private ArrayList<String> propertiesVisited = new ArrayList<String>();
     private String regExp;
-    private File antFile;
 
     /**
      * {@inheritDoc}
      */
-    public void run(Element node) {
-        if (node.getName().equals("property")) {
-            String text = node.attributeValue("name");
-            if (text != null && !text.isEmpty()) {
-                checkPropertyName(text);
+    protected void run(RootAntObjectMeta root) {
+        if (root instanceof ProjectMeta) {
+            ProjectMeta projectMeta = (ProjectMeta) root;
+            List<PropertyMeta> properties = projectMeta.getProperties();
+            for (PropertyMeta propertyMeta : properties) {
+                if (!matches(propertyMeta.getName(), getRegExp())) {
+                    report("Invalid property name: " + propertyMeta.getName(),
+                            propertyMeta.getLineNumber());
+                }
             }
         }
     }
 
     /**
-     * Check the given property name.
-     * 
-     * @param propertyName
-     *            is the property name to check.
-     */
-    private void checkPropertyName(String propertyName) {
-        Pattern p1 = Pattern.compile(getRegExp());
-        Matcher m1 = p1.matcher(propertyName);
-        if (!m1.matches() && !isPropertyAlreadyVisited(propertyName)) {
-            this.getReporter().report(this.getSeverity(),
-                    "INVALID Property Name: " + propertyName,
-                    this.getAntFile(), 0);
-            markPropertyAsVisited(propertyName);
-        }
-    }
-
-    /*
-     * (non-Javadoc)
+     * Set the regular expression.
      * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
-     */
-    public void run(File antFilename) throws AntlintException {
-        List<Element> propertyNodes = new ArrayList<Element>();
-
-        this.antFile = antFilename;
-        SAXReader saxReader = new SAXReader();
-        Document doc;
-        try {
-            doc = saxReader.read(antFilename);
-            elementTreeWalk(doc.getRootElement(), "property", propertyNodes);
-        } catch (DocumentException e) {
-            throw new AntlintException("Invalid XML file " + e.getMessage());
-        }
-        for (Element propertyNode : propertyNodes) {
-            run(propertyNode);
-        }
-    }
-
-    /**
-     * Check whether the property is already visited or not.
-     * 
-     * @param propertyName
-     *            is the property to be checked.
-     * @return true, if already been visited; otherwise false
-     */
-    private boolean isPropertyAlreadyVisited(String propertyName) {
-        return propertiesVisited.contains(propertyName);
-    }
-
-    /**
-     * Mark the given property as visited.
-     * 
-     * @param propertyName
-     *            is the property to be marked.
-     */
-    private void markPropertyAsVisited(String propertyName) {
-        propertiesVisited.add(propertyName);
-    }
-
-    /**
-     * @param regExp
-     *            the regExp to set
+     * @param regExp the regExp to set
      */
     public void setRegExp(String regExp) {
         this.regExp = regExp;
     }
 
     /**
+     * Get the regular expression.
+     * 
      * @return the regExp
      */
     public String getRegExp() {
         return regExp;
     }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckPropertyName";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
-    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckPropertyTypeAndValueMismatch.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *
+ */
+package com.nokia.helium.antlint.ant.types;
+
+import com.nokia.helium.ant.data.ProjectMeta;
+import com.nokia.helium.ant.data.PropertyCommentMeta;
+import com.nokia.helium.ant.data.PropertyMeta;
+import com.nokia.helium.ant.data.RootAntObjectMeta;
+
+/**
+ * <code>CheckPropertyTypeAndValueMismatch</code> is used to check the property
+ * type and value mismatch.
+ * 
+ * <pre>
+ * Usage:
+ * 
+ *  &lt;antlint&gt;
+ *       &lt;fileset id=&quot;antlint.files&quot; dir=&quot;${antlint.test.dir}/data&quot;&gt;
+ *               &lt;include name=&quot;*.ant.xml&quot;/&gt;
+ *               &lt;include name=&quot;*build.xml&quot;/&gt;
+ *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
+ *       &lt;/fileset&gt;
+ *       &lt;checkPropertyTypeAndValueMismatch severity=&quot;error&quot; /&gt;
+ *  &lt;/antlint&gt;
+ * </pre>
+ * 
+ * @ant.task name="checkPropertyTypeAndValueMismatch" category="AntLint"
+ * 
+ */
+public class CheckPropertyTypeAndValueMismatch extends AbstractProjectCheck {
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void run(RootAntObjectMeta root) {
+        if (root instanceof ProjectMeta) {
+            ProjectMeta projectMeta = (ProjectMeta) root;
+            for (PropertyMeta propertyMeta : projectMeta.getProperties()) {
+                validateType(propertyMeta.getName(), propertyMeta.getType(),
+                        propertyMeta.getLineNumber());
+                validateValue(propertyMeta);
+            }
+            for (PropertyCommentMeta propertyMeta : projectMeta.getPropertyCommentBlocks()) {
+                validateType(propertyMeta.getName(), propertyMeta.getType(),
+                        propertyMeta.getLineNumber());
+                validateValue(propertyMeta);
+            }
+
+        }
+    }
+
+    /**
+     * Method validates the type of the given property.
+     *  
+     * @param propetyName is the name of the property to be validated.
+     * @param propertyType is the type of property to be validated.
+     * @param lineNumber indicates the location of property.
+     */
+    private void validateType(String propetyName, String propertyType, int lineNumber) {
+        if (!(propertyType.equalsIgnoreCase(PropertyMeta.BOOLEAN_TYPE)
+                || propertyType.equalsIgnoreCase(PropertyMeta.FLOAT_TYPE)
+                || propertyType.equalsIgnoreCase(PropertyMeta.INTEGER_TYPE) || propertyType
+                .equalsIgnoreCase(PropertyMeta.STRING_TYPE))) {
+            report("Property '" + propetyName + "' has invalid type as '" + propertyType
+                    + "'. (Valid types: boolean|float|integer|string)", lineNumber);
+        }
+    }
+
+    /**
+     * Method validates the given property.
+     * 
+     * @param propertyMeta is the property to be validated.
+     */
+    private void validateValue(PropertyMeta propertyMeta) {
+        String type = propertyMeta.getType();
+        String value = propertyMeta.getRuntimeProject().getProperty(propertyMeta.getName());
+        if (PropertyMeta.BOOLEAN_TYPE.equalsIgnoreCase(type)) {
+            validateBooleanValue(propertyMeta.getName(), value, propertyMeta.getLineNumber());
+        }
+
+        if (PropertyMeta.INTEGER_TYPE.equalsIgnoreCase(type)) {
+            validateIntegerValue(propertyMeta.getName(), value, propertyMeta.getLineNumber());
+        }
+
+        if (PropertyMeta.FLOAT_TYPE.equalsIgnoreCase(type)) {
+            validateFloatValue(propertyMeta.getName(), value, propertyMeta.getLineNumber());
+        }
+    }
+
+    /**
+     * Method validates the given comment property.
+     * 
+     * @param propertyMeta is the comment property to be validated.
+     */
+    private void validateValue(PropertyCommentMeta propertyMeta) {
+        String type = propertyMeta.getType();
+        String value = propertyMeta.getRuntimeProject().getProperty(propertyMeta.getName());
+        if (PropertyMeta.BOOLEAN_TYPE.equalsIgnoreCase(type)) {
+            validateBooleanValue(propertyMeta.getName(), value, propertyMeta.getLineNumber());
+        }
+
+        if (PropertyMeta.INTEGER_TYPE.equalsIgnoreCase(type)) {
+            validateIntegerValue(propertyMeta.getName(), value, propertyMeta.getLineNumber());
+        }
+
+        if (PropertyMeta.FLOAT_TYPE.equalsIgnoreCase(type)) {
+            validateFloatValue(propertyMeta.getName(), value, propertyMeta.getLineNumber());
+        }
+    }
+
+    /**
+     * Method validates the given boolean property.
+     * 
+     * @param propertyName is the name of the property to be validated.
+     * @param value is the property value to be validated.
+     * @param lineNumber indicates the location of the property.
+     */
+    private void validateBooleanValue(String propertyName, String value, int lineNumber) {
+        if (value != null && !value.equalsIgnoreCase("true") && !value.equalsIgnoreCase("false")) {
+            report("Property '" + propertyName + "' has invalid boolean value set as '" + value
+                    + "'. (Valid values: true|false)", lineNumber);
+        }
+    }
+
+    /**
+     * Method validates the given integer property.
+     * 
+     * @param propertyName is the name of the property to be validated.
+     * @param value is the property value to be validated.
+     * @param lineNumber indicates the location of the property.
+     */
+    private void validateIntegerValue(String propertyName, String value, int lineNumber) {
+        try {
+            if (value != null) {
+                Integer.parseInt(value);
+            }
+        } catch (NumberFormatException nfe) {
+            report("Property '" + propertyName + "' has invalid integer value set as '" + value
+                    + "'.", lineNumber);
+        }
+    }
+
+    /**
+     * Method validates the given float property.
+     * 
+     * @param propertyName is the name of the property to be validated.
+     * @param value is the property value to be validated.
+     * @param lineNumber indicates the location of the property.
+     */
+    private void validateFloatValue(String propertyName, String value, int lineNumber) {
+        try {
+            if (value != null) {
+                Double.parseDouble(value);
+            }
+        } catch (NumberFormatException nfe) {
+            report("Property '" + propertyName + "' has invalid float value set as '" + value
+                    + "'.", lineNumber);
+        }
+    }
+}
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckPythonTasks.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,162 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *
- */
-package com.nokia.helium.antlint.ant.types;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.tools.ant.BuildException;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.antlint.ant.AntlintException;
-
-/**
- * <code>CheckPythonTasks</code> is used to the check the coding convention of
- * python tasks.
- * 
- * <pre>
- * Usage:
- * 
- *  &lt;antlint&gt;
- *       &lt;fileset id=&quot;antlint.files&quot; dir=&quot;${antlint.test.dir}/data&quot;&gt;
- *               &lt;include name=&quot;*.ant.xml&quot;/&gt;
- *               &lt;include name=&quot;*build.xml&quot;/&gt;
- *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
- *       &lt;/fileset&gt;
- *       &lt;CheckPythonTasks&quot; severity=&quot;error&quot; enabled=&quot;true&quot; outputDir=&quot;${antlint.test.dir}/output&quot;/&gt;
- *  &lt;/antlint&gt;
- * </pre>
- * 
- * @ant.task name="CheckPythonTasks" category="AntLint"
- */
-public class CheckPythonTasks extends AbstractCheck {
-
-    private File outputDir;
-    private File antFile;
-
-    /**
-     * {@inheritDoc}
-     */
-    @SuppressWarnings("unchecked")
-    public void run(Element node) {
-        if (node.getName().equals("target")) {
-            String target = node.attributeValue("name");
-            List<Element> pythonList = node.selectNodes("//target[@name='"
-                    + target + "']/descendant::*[name()=\"hlm:python\"]");
-            int i = 0;
-            for (Element pythonElement : pythonList) {
-                writePythonFile(i + "_" + target, pythonElement.getText());
-                i++;
-            }
-        }
-    }
-
-    /**
-     * Writes the given text to a python file.
-     * 
-     * @param name
-     *            is the name of the file to be written.
-     * @param text
-     *            is the text to be written inside the file.
-     */
-    private void writePythonFile(String name, String text) {
-        if (getOutputDir() == null) {
-            throw new BuildException("'output' attribute for the checker '"
-                    + this.toString() + "' should be specified.");
-        }
-        try {
-            String heliumpath = getOutputDir().getCanonicalPath();
-            new File(heliumpath + File.separator + "python").mkdirs();
-            File file = new File(heliumpath + File.separator + "python"
-                    + File.separator + "target" + name + ".py");
-            PrintWriter output = new PrintWriter(new FileOutputStream(file));
-            if (!text.equals("")) {
-                output.write("def abc():");
-                for (String line : text.split("\n")) {
-                    output.write("    " + line + "\n");
-                }
-            }
-            output.close();
-        } catch (IOException e) {
-            throw new BuildException(
-                    "IOException:Not able to write python file " + name + ".py");
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
-     */
-    public void run(File antFilename) throws AntlintException {
-        List<Element> targetNodes = new ArrayList<Element>();
-
-        this.antFile = antFilename;
-        SAXReader saxReader = new SAXReader();
-        Document doc;
-        try {
-            doc = saxReader.read(antFilename);
-            elementTreeWalk(doc.getRootElement(), "target", targetNodes);
-        } catch (DocumentException e) {
-            throw new AntlintException("Invalid XML file " + e.getMessage());
-        }
-        for (Element targetNode : targetNodes) {
-            run(targetNode);
-        }
-
-    }
-
-    /**
-     * @param outputDir
-     *            the outputDir to set
-     */
-    public void setOutputDir(File outputDir) {
-        this.outputDir = outputDir;
-    }
-
-    /**
-     * @return the outputDir
-     */
-    public File getOutputDir() {
-        return outputDir;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckPythonTasks";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
-    }
-}
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckRunTarget.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckRunTarget.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,17 +16,10 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.tools.ant.Target;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.antlint.ant.AntlintException;
+import com.nokia.helium.ant.data.TargetMeta;
+import com.nokia.helium.ant.data.TaskMeta;
 
 /**
  * <code>CheckRunTarget</code> is used to check whether runtarget calls a target
@@ -41,105 +34,25 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckRunTarget&quot; severity=&quot;error&quot; enabled=&quot;true&quot; /&gt;
+ *       &lt;checkRunTarget severity=&quot;error&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckRunTarget" category="AntLint"
+ * @ant.task name="checkRunTarget" category="AntLint"
  * 
  */
-public class CheckRunTarget extends AbstractCheck {
-
-    private File antFile;
+public class CheckRunTarget extends AbstractTargetCheck {
 
     /**
      * {@inheritDoc}
      */
-    public void run(Element node) {
-        if (node.getName().equals("target")) {
-            checkRunTargets(node);
-        }
-    }
-
-    /**
-     * Check against the given node.
-     * 
-     * @param node
-     *            is the node to check.
-     */
-    @SuppressWarnings("unchecked")
-    private void checkRunTargets(Element node) {
-        if (node.elements("runtarget") != null) {
-            List<Element> runTargetList = node.elements("runtarget");
-            for (Element runTargetElement : runTargetList) {
-                String runTargetName = runTargetElement
-                        .attributeValue("target");
-                if (checkTargetDependency(runTargetName)) {
-                    this.getReporter().report(
-                            this.getSeverity(),
-                            "<runtarget> calls the target " + runTargetName
-                                    + " that has dependencies!",
-                            this.getAntFile(), 0);
-                }
+    protected void run(TargetMeta targetMeta) {
+        List<TaskMeta> runTargets = targetMeta.getTasks("runtarget");
+        for (TaskMeta runTargetMeta : runTargets) {
+            if (checkTargetDependency(runTargetMeta.getAttr("target"))) {
+                report("<runtarget> calls the target " + runTargetMeta.getAttr("target")
+                        + " that has dependencies!", runTargetMeta.getLineNumber());
             }
         }
     }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
-     */
-    public void run(File antFilename) throws AntlintException {
-        List<Element> targetNodes = new ArrayList<Element>();
-
-        this.antFile = antFilename;
-        SAXReader saxReader = new SAXReader();
-        Document doc;
-        try {
-            doc = saxReader.read(antFilename);
-            elementTreeWalk(doc.getRootElement(), "target", targetNodes);
-        } catch (DocumentException e) {
-            throw new AntlintException("Invalid XML file " + e.getMessage());
-        }
-        for (Element targetNode : targetNodes) {
-            run(targetNode);
-        }
-
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckRunTarget";
-    }
-
-    /**
-     * Check the availability dependent targets of the given target.
-     * 
-     * @param targetName
-     *            is the target for which dependent targets to be loked up.
-     * @return true, if the dependant targets are available; otherwise false
-     */
-    private boolean checkTargetDependency(String targetName) {
-        boolean dependencyCheck = false;
-        Target targetDependency = (Target) getProject().getTargets().get(
-                targetName);
-        dependencyCheck = targetDependency != null
-                && targetDependency.getDependencies().hasMoreElements();
-        return dependencyCheck;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
-    }
-
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptCondition.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptCondition.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,16 +16,7 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.antlint.ant.AntlintException;
+import com.nokia.helium.ant.data.MacroMeta;
 
 /**
  * <code>CheckScriptCondition</code> is used to check the coding convention in
@@ -40,100 +31,36 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckScriptCondition&quot; severity=&quot;error&quot; enabled=&quot;true&quot; /&gt;
+ *       &lt;checkScriptCondition&quot; severity=&quot;error&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckScriptCondition" category="AntLint"
+ * @ant.task name="checkScriptCondition" category="AntLint"
  * 
  */
 public class CheckScriptCondition extends AbstractScriptCheck {
 
-    private File outputDir;
-    private File antFile;
-
     /**
      * {@inheritDoc}
      */
-    public void run(Element node) {
-        if (node.getName().equals("target")) {
-            checkScriptConditions(node);
-        }
+    protected String getScriptXPathExpression(String targetName) {
+        return ".//scriptcondition";
     }
 
     /**
-     * Check against the given node.
-     * 
-     * @param node
-     *            is the node to check.
+     * {@inheritDoc}
      */
-    @SuppressWarnings("unchecked")
-    private void checkScriptConditions(Element node) {
-        String target = node.attributeValue("name");
-        List<Element> scriptList = node.selectNodes("//target[@name='" + target
-                + "']/descendant::scriptcondition");
-        for (Element scriptElement : scriptList) {
-            String language = scriptElement.attributeValue("language");
-            if (language.equals("jython")) {
-                writeJythonFile("scriptcondition_" + target, scriptElement
-                        .getText(), outputDir);
-            }
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
-     */
-    public void run(File antFilename) throws AntlintException {
-        List<Element> targetNodes = new ArrayList<Element>();
-
-        this.antFile = antFilename;
-        SAXReader saxReader = new SAXReader();
-        Document doc;
-        try {
-            doc = saxReader.read(antFilename);
-            elementTreeWalk(doc.getRootElement(), "target", targetNodes);
-        } catch (DocumentException e) {
-            throw new AntlintException("Invalid XML file " + e.getMessage());
-        }
-        for (Element targetNode : targetNodes) {
-            run(targetNode);
-        }
-
+    protected String getMacroXPathExpression() {
+        return null;
     }
 
     /**
-     * @param outputDir
-     *            the outputDir to set
-     */
-    public void setOutputDir(File outputDir) {
-        this.outputDir = outputDir;
-    }
-
-    /**
-     * @return the outputDir
+     * {@inheritDoc}
      */
-    public File getOutputDir() {
-        return outputDir;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckScriptCondition";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
+    protected void run(MacroMeta macroMeta) {
+        String language = macroMeta.getAttr("language");
+        if (language != null && language.equals("jython") && macroMeta.getText().contains("${")) {
+            report("${ found in " + getScriptName(macroMeta));
+        }
     }
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptDef.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *
- */
-package com.nokia.helium.antlint.ant.types;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.tools.ant.BuildException;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.Node;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.antlint.ant.AntlintException;
-
-/**
- * <code>CheckScriptDef</code> is used to check the coding convention in
- * scriptdef.
- * 
- * <pre>
- * Usage:
- * 
- *  &lt;antlint&gt;
- *       &lt;fileset id=&quot;antlint.files&quot; dir=&quot;${antlint.test.dir}/data&quot;&gt;
- *               &lt;include name=&quot;*.ant.xml&quot;/&gt;
- *               &lt;include name=&quot;*build.xml&quot;/&gt;
- *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
- *       &lt;/fileset&gt;
- *       &lt;CheckScriptDef&quot; severity=&quot;error&quot; enabled=&quot;true&quot; outputDir=&quot;${antlint.test.dir}/output&quot;/&gt;
- *  &lt;/antlint&gt;
- * </pre>
- * 
- * @ant.task name="CheckScriptDef" category="AntLint"
- * 
- */
-public class CheckScriptDef extends AbstractScriptCheck {
-
-    private File outputDir;
-    private File antFile;
-
-    /**
-     * {@inheritDoc}
-     */
-    public void run(Element node) {
-        if (node.getName().equals("scriptdef")) {
-            String scriptdefname = node.attributeValue("name");
-            String language = node.attributeValue("language");
-
-            checkScriptDef(scriptdefname, node);
-
-            if (language.equals("beanshell")) {
-                writeBeanshellFile(scriptdefname, node.getText());
-            }
-        }
-    }
-
-    /**
-     * Check against the given node.
-     * 
-     * @param node
-     *            is the node to check.
-     */
-    @SuppressWarnings("unchecked")
-    public void checkScriptDef(String name, Node node) {
-        List<Node> statements = node.selectNodes("//scriptdef[@name='" + name
-                + "']/attribute");
-        Pattern p1 = Pattern.compile("attributes.get\\([\"']([^\"']*)[\"']\\)");
-        Matcher m1 = p1.matcher(node.getText());
-        ArrayList<String> props = new ArrayList<String>();
-        while (m1.find()) {
-            props.add(m1.group(1));
-        }
-
-        if (!statements.isEmpty() && !props.isEmpty()) {
-            for (Node statement : statements) {
-                if (!props.contains(statement.valueOf("@name"))) {
-                    this.getReporter().report(
-                            this.getSeverity(),
-                            "Scriptdef " + name + " does not use "
-                                    + statement.valueOf("@name"),
-                            this.getAntFile(), 0);
-                }
-            }
-        }
-    }
-
-    /**
-     * Write a bean shell file with the given text.
-     * 
-     * @param scriptdefname
-     *            is the name of the file to be written.
-     * @param text
-     *            is the text to be written inside the file.
-     */
-    private void writeBeanshellFile(String scriptdefname, String text) {
-        if (getOutputDir() == null) {
-            throw new BuildException("'output' attribute for the checker '"
-                    + this.toString() + "' should be specified.");
-        }
-        scriptdefname = "Beanshell" + scriptdefname;
-        try {
-            String heliumpath = getOutputDir().getCanonicalPath();
-            new File(heliumpath + File.separator + "beanshell").mkdirs();
-            File file = new File(heliumpath + File.separator + "beanshell"
-                    + File.separator + scriptdefname + ".java");
-            PrintWriter output = new PrintWriter(new FileOutputStream(file));
-
-            for (String line : text.split("\n")) {
-                if (line.trim().startsWith("import")) {
-                    output.write(line + "\n");
-                }
-            }
-
-            output.write("/**\n * x\n */\npublic final class " + scriptdefname
-                    + " {\n");
-            output.write("    private " + scriptdefname + "() { }\n");
-            output.write("    public static void main(String[] args) {\n");
-            for (String line : text.split("\n")) {
-                if (!line.trim().startsWith("import")) {
-                    output.write("        " + line + "\n");
-                }
-            }
-            output.write("    }\n");
-            output.write("}\n");
-            output.close();
-        } catch (IOException e) {
-            throw new BuildException("Not able to write Beanshell File "
-                    + scriptdefname + ".java");
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
-     */
-    public void run(File antFilename) throws AntlintException {
-
-        List<Element> scriptDefNodes = new ArrayList<Element>();
-
-        this.antFile = antFilename;
-        SAXReader saxReader = new SAXReader();
-        Document doc;
-        try {
-            doc = saxReader.read(antFilename);
-            elementTreeWalk(doc.getRootElement(), "scriptdef", scriptDefNodes);
-        } catch (DocumentException e) {
-            throw new AntlintException("Invalid XML file " + e.getMessage());
-        }
-        for (Element scriptDefNode : scriptDefNodes) {
-            run(scriptDefNode);
-        }
-    }
-
-    /**
-     * @param outputDir
-     *            the outputDir to set
-     */
-    public void setOutputDir(File outputDir) {
-        this.outputDir = outputDir;
-    }
-
-    /**
-     * @return the outputDir
-     */
-    public File getOutputDir() {
-        return outputDir;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckScriptDef";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptDefAttributes.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *
+ */
+package com.nokia.helium.antlint.ant.types;
+
+import java.util.List;
+
+import com.nokia.helium.ant.data.MacroMeta;
+
+/**
+ * <code>CheckScriptDefAttributes</code> is used to check for unused scriptdef attributes
+ * 
+ * <pre>
+ * Usage:
+ * 
+ *  &lt;antlint&gt;
+ *       &lt;fileset id=&quot;antlint.files&quot; dir=&quot;${antlint.test.dir}/data&quot;&gt;
+ *               &lt;include name=&quot;*.ant.xml&quot;/&gt;
+ *               &lt;include name=&quot;*build.xml&quot;/&gt;
+ *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
+ *       &lt;/fileset&gt;
+ *       &lt;checkScriptDefAttributes severity=&quot;warning&quot; /&gt;
+ *  &lt;/antlint&gt;
+ * </pre>
+ * 
+ * @ant.task name="checkScriptDefAttributes" category="AntLint"
+ */
+public class CheckScriptDefAttributes extends AbstractScriptCheck {
+
+    /**
+     * {@inheritDoc}
+     */
+    protected String getMacroXPathExpression() {
+        return "//scriptdef";
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected String getScriptXPathExpression(String targetName) {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void run(MacroMeta macroMeta) {
+        checkUnusedAttributes(macroMeta);
+    }
+    
+    /**
+     * Method to check for unused attributes.
+     */
+    private void checkUnusedAttributes(MacroMeta macroMeta) {
+        List<String> usedPropertyList = getUsedProperties(macroMeta);
+        List<String> attributes = macroMeta.getAttributes();
+
+        if (!usedPropertyList.isEmpty()) {
+            for (String attrName : attributes) {
+                if (!usedPropertyList.contains(attrName)) {
+                    report("Scriptdef " + macroMeta.getName() + " does not use " + attrName,
+                            macroMeta.getLineNumber());
+                }
+            }
+
+            for (String attrName : usedPropertyList) {
+                if (!attributes.contains(attrName)) {
+                    report("Scriptdef " + macroMeta.getName() + " does not have attribute "
+                            + attrName, macroMeta.getLineNumber());
+                }
+            }
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptDefName.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+package com.nokia.helium.antlint.ant.types;
+
+import java.util.List;
+
+import com.nokia.helium.ant.data.AntObjectMeta;
+import com.nokia.helium.ant.data.MacroMeta;
+
+/**
+ * 
+ */
+public class CheckScriptDefName extends AbstractScriptCheck {
+
+    private String regExp;
+    
+    /**
+     * Set the regular expression.
+     * 
+     * @param regExp the regExp to set
+     */
+    public void setRegExp(String regExp) {
+        this.regExp = regExp;
+    }
+
+    /**
+     * Get the regular expression.
+     * 
+     * @return the regExp
+     */
+    public String getRegExp() {
+        return regExp;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected String getMacroXPathExpression() {
+        return "//scriptdef";
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected String getScriptXPathExpression(String targetName) {
+        return null;
+    }
+    
+    /**
+     * {@inheritDoc}
+     */
+    protected void run(MacroMeta macroMeta) {
+        validateName(macroMeta.getName(), macroMeta);
+        List<String> attributes = macroMeta.getAttributes();
+        for (String attrName : attributes) {
+            validateName(attrName, macroMeta);
+        }
+    }
+
+    private void validateName(String name, AntObjectMeta object) {
+        if (name != null && !name.isEmpty() && getRegExp() != null && !matches(name, getRegExp())) {
+            report("Invalid scriptdef name: " + name, object.getLineNumber());
+        }
+    }
+
+}
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptDefNameAttributes.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *
- */
-package com.nokia.helium.antlint.ant.types;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.Node;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.antlint.ant.AntlintException;
-
-/**
- * <code>CheckScriptDefNameAttributes</code> is used to check the naming
- * convention of scriptdef name attributes
- * 
- * <pre>
- * Usage:
- * 
- *  &lt;antlint&gt;
- *       &lt;fileset id=&quot;antlint.files&quot; dir=&quot;${antlint.test.dir}/data&quot;&gt;
- *               &lt;include name=&quot;*.ant.xml&quot;/&gt;
- *               &lt;include name=&quot;*build.xml&quot;/&gt;
- *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
- *       &lt;/fileset&gt;
- *       &lt;CheckScriptDefNameAttributes&quot; severity=&quot;error&quot; enabled=&quot;true&quot; /&gt;
- *  &lt;/antlint&gt;
- * </pre>
- * 
- * @ant.task name="CheckScriptDefNameAttributes" category="AntLint"
- */
-public class CheckScriptDefNameAttributes extends AbstractCheck {
-
-    private File antFile;
-
-    /**
-     * {@inheritDoc}
-     */
-    public void run(Element node) {
-        if (node.getName().equals("scriptdef")) {
-            String scriptdefname = node.attributeValue("name");
-            checkScriptDefNameAttributes(scriptdefname, node);
-        }
-    }
-
-    /**
-     * Check against the given node.
-     * 
-     * @param node
-     *            is the node to check.
-     */
-    @SuppressWarnings("unchecked")
-    public void checkScriptDefNameAttributes(String name, Node node) {
-        List<Node> statements = node.selectNodes("//scriptdef[@name='" + name
-                + "']/attribute");
-        Pattern p1 = Pattern.compile("attributes.get\\([\"']([^\"']*)[\"']\\)");
-        Matcher m1 = p1.matcher(node.getText());
-        ArrayList<String> props = new ArrayList<String>();
-        while (m1.find()) {
-            props.add(m1.group(1));
-        }
-
-        ArrayList<String> attributes = new ArrayList<String>();
-        for (Node statement : statements) {
-            attributes.add(statement.valueOf("@name"));
-        }
-        for (String attribute : props) {
-            if (!attributes.contains(attribute)) {
-                this.getReporter().report(this.getSeverity(),
-                        "Scriptdef " + name + " does not have attribute " + attribute,
-                        this.getAntFile(), 0);
-            }
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
-     */
-    public void run(File antFilename) throws AntlintException {
-
-        List<Element> scriptDefNodes = new ArrayList<Element>();
-
-        this.antFile = antFilename;
-        SAXReader saxReader = new SAXReader();
-        Document doc;
-        try {
-            doc = saxReader.read(antFilename);
-            elementTreeWalk(doc.getRootElement(), "scriptdef", scriptDefNodes);
-        } catch (DocumentException e) {
-            throw new AntlintException("Invalid XML file " + e.getMessage());
-        }
-        for (Element scriptDefNode : scriptDefNodes) {
-            run(scriptDefNode);
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckScriptDefNameAttributes";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
-    }
-}
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptDefStyle.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptDefStyle.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,19 +16,9 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.util.ArrayList;
 import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.Node;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.antlint.ant.AntlintException;
+import com.nokia.helium.ant.data.MacroMeta;
 
 /**
  * <code>CheckScriptDefStyle</code> is used to check the coding style of
@@ -43,99 +33,41 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckScriptDefStyle&quot; severity=&quot;error&quot; enabled=&quot;true&quot; /&gt;
+ *       &lt;checkScriptDefStyle severity=&quot;error&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckScriptDefStyle" category="AntLint"
+ * @ant.task name="checkScriptDefStyle" category="AntLint"
  * 
  */
-public class CheckScriptDefStyle extends AbstractCheck {
+public class CheckScriptDefStyle extends AbstractScriptCheck {
 
-    private File antFile;
+    /**
+     * {@inheritDoc}
+     */
+    protected String getMacroXPathExpression() {
+        return "//scriptdef";
+    }
 
     /**
      * {@inheritDoc}
      */
-    public void run(Element node) {
-        if (node.getName().equals("scriptdef")) {
-            String scriptdefname = node.attributeValue("name");
-            checkScriptDefStyle(scriptdefname, node);
-        }
+    protected String getScriptXPathExpression(String targetName) {
+        return null;
     }
 
     /**
-     * Check against the given node.
-     * 
-     * @param node
-     *            is the node to check.
+     * {@inheritDoc}
      */
-    @SuppressWarnings("unchecked")
-    public void checkScriptDefStyle(String name, Node node) {
-        List<Node> statements = node.selectNodes("//scriptdef[@name='" + name
-                + "']/attribute");
-        Pattern p1 = Pattern.compile("attributes.get\\([\"']([^\"']*)[\"']\\)");
-        Matcher m1 = p1.matcher(node.getText());
-        ArrayList<String> props = new ArrayList<String>();
-        while (m1.find()) {
-            props.add(m1.group(1));
-        }
+    protected void run(MacroMeta macroMeta) {
+        List<String> usedPropertyList = getUsedProperties(macroMeta);
+        List<String> attributes = macroMeta.getAttributes();
 
-        ArrayList<String> attributes = new ArrayList<String>();
-        for (Node statement : statements) {
-            attributes.add(statement.valueOf("@name"));
+        if (usedPropertyList.isEmpty() && !attributes.isEmpty()) {
+            report("Scriptdef " + macroMeta.getName()
+                    + " doesn't reference attributes directly, poor style",
+                    macroMeta.getLineNumber());
         }
 
-        if (!statements.isEmpty() && props.isEmpty()) {
-            this
-                    .getReporter()
-                    .report(
-                            this.getSeverity(),
-                            "Scriptdef "
-                                    + name
-                                    + " doesn't reference attributes directly, poor style",
-                            this.getAntFile(), 0);
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
-     */
-    public void run(File antFilename) throws AntlintException {
-
-        List<Element> scriptDefNodes = new ArrayList<Element>();
-
-        this.antFile = antFilename;
-        SAXReader saxReader = new SAXReader();
-        Document doc;
-        try {
-            doc = saxReader.read(antFilename);
-            elementTreeWalk(doc.getRootElement(), "scriptdef", scriptDefNodes);
-        } catch (DocumentException e) {
-            throw new AntlintException("Invalid XML file " + e.getMessage());
-        }
-        for (Element scriptDefNode : scriptDefNodes) {
-            run(scriptDefNode);
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckScriptDefStyle";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
     }
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptSize.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptSize.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,17 +16,7 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.Node;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.antlint.ant.AntlintException;
+import com.nokia.helium.ant.data.MacroMeta;
 
 /**
  * <code>CheckScriptSize</code> is used to check the size of script. By default,
@@ -41,91 +31,37 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckScriptSize&quot; severity=&quot;error&quot; enabled=&quot;true&quot; /&gt;
+ *       &lt;checkScriptSize severity=&quot;error&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckScriptSize" category="AntLint"
+ * @ant.task name="checkScriptSize" category="AntLint"
  * 
  */
-public class CheckScriptSize extends AbstractCheck {
-
-    private File antFile;
+public class CheckScriptSize extends AbstractScriptCheck {
 
     /**
      * {@inheritDoc}
      */
-    public void run(Element node) {
-        if (node.getName().equals("target")) {
-            checkSizeOfScript(node);
-        }
+    protected String getMacroXPathExpression() {
+        return null;
     }
 
     /**
-     * Check against the given node.
-     * 
-     * @param node
-     *            is the node to check.
+     * {@inheritDoc}
      */
-    @SuppressWarnings("unchecked")
-    private void checkSizeOfScript(Element node) {
-        String target = node.attributeValue("name");
-
-        List<Node> statements = node.selectNodes("//target[@name='" + target
-                + "']/script | //target[@name='" + target
-                + "']/*[name()=\"hlm:python\"]");
-
-        for (Node statement : statements) {
-            int size = statement.getText().length();
-            if (size > 1000) {
-                this
-                        .getReporter()
-                        .report(
-                                this.getSeverity(),
-                                "Target "
-                                        + target
-                                        + " has a script with "
-                                        + size
-                                        + " characters, code should be inside a python file",
-                                this.getAntFile(), 0);
-            }
-        }
+    protected String getScriptXPathExpression(String targetName) {
+        return ".//script | " + "//target[@name='" + targetName + "']/*[name()=\"hlm:python\"]";
     }
 
-    public void run(File antFilename) throws AntlintException {
-
-        List<Element> targetNodes = new ArrayList<Element>();
-
-        this.antFile = antFilename;
-        SAXReader saxReader = new SAXReader();
-        Document doc;
-        try {
-            doc = saxReader.read(antFilename);
-            elementTreeWalk(doc.getRootElement(), "target", targetNodes);
-        } catch (DocumentException e) {
-            throw new AntlintException("Invalid XML file " + e.getMessage());
-        }
-        for (Element targetNode : targetNodes) {
-            run(targetNode);
+    /**
+     * {@inheritDoc}
+     */
+    protected void run(MacroMeta macroMeta) {
+        int size = macroMeta.getText().length();
+        if (size > 1000) {
+            report("Target " + macroMeta.getParent().getName() + " has a script with " + size
+                    + " characters, code should be inside a python file", macroMeta.getLineNumber());
         }
-
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckScriptSize";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
     }
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckTabCharacter.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckTabCharacter.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,19 +16,12 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.io.IOException;
 import java.util.List;
 
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.dom4j.Element;
-import org.dom4j.Node;
-import org.xml.sax.SAXException;
-
-import com.nokia.helium.antlint.AntLintHandler;
+import com.nokia.helium.ant.data.MacroMeta;
+import com.nokia.helium.ant.data.ProjectMeta;
+import com.nokia.helium.ant.data.RootAntObjectMeta;
+import com.nokia.helium.ant.data.TargetMeta;
 import com.nokia.helium.antlint.ant.AntlintException;
 
 /**
@@ -44,92 +37,94 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckTabCharacter&quot; severity=&quot;error&quot; enabled=&quot;true&quot; /&gt;
+ *       &lt;checkTabCharacter&quot; severity=&quot;error&quot; enabled=&quot;true&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckTabCharacter" category="AntLint"
+ * @ant.task name="checkTabCharacter" category="AntLint"
  * 
  */
-public class CheckTabCharacter extends AbstractCheck {
+public class CheckTabCharacter extends AbstractAntFileStyleCheck {
 
-    private File antFile;
+    private static final String TAB_CHAR = "\t";
 
     /**
      * {@inheritDoc}
      */
-    public void run(Element node) {
-        checkTabsInScript(node);
+    public void run() throws AntlintException {
+        super.run();
+        RootAntObjectMeta rootObjectMeta = getAntFile().getRootObjectMeta();
+        run(rootObjectMeta);
     }
 
     /**
-     * Check against the given node.
+     * Method runs the check against the given {@link RootAntObjectMeta}.
      * 
-     * @param node
-     *            is the node to check.
+     * @param root is the {@link RootAntObjectMeta} against which the check is
+     *            run.
      */
-    @SuppressWarnings("unchecked")
-    private void checkTabsInScript(Element node) {
-        if (node.getName().equals("target")) {
-            String target = node.attributeValue("name");
-
-            List<Node> statements = node.selectNodes("//target[@name='"
-                    + target + "']/script | //target[@name='" + target
-                    + "']/*[name()=\"hlm:python\"]");
-
-            for (Node statement : statements) {
-                if (statement.getText().contains("\t")) {
-                    this.getReporter().report(getSeverity(),
-                            "Target " + target + " has a script with tabs",
-                            getAntFile(), 0);
-                }
+    private void run(RootAntObjectMeta root) {
+        if (root instanceof ProjectMeta) {
+            ProjectMeta projectMeta = (ProjectMeta) root;
+            List<TargetMeta> targets = projectMeta.getTargets();
+            for (TargetMeta targetMeta : targets) {
+                run(targetMeta);
             }
         }
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
+    /**
+     * {@inheritDoc}
+     */
+    protected void handleStartDocument() {
+        // Do nothing
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void handleEndDocument() {
+        // Do nothing
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void handleEndElement(String text) {
+        checkTabChars(text, getLocator().getLineNumber());
+    }
+
+    /**
+     * {@inheritDoc}
      */
-    public void run(File antFilename) throws AntlintException {
-        try {
-            this.antFile = antFilename;
-            SAXParserFactory saxFactory = SAXParserFactory.newInstance();
-            saxFactory.setNamespaceAware(true);
-            saxFactory.setValidating(true);
-            SAXParser parser = saxFactory.newSAXParser();
-            AntLintHandler handler = new AntLintHandler(this);
-            handler.setTabCharacterCheck(true);
-            parser.parse(antFilename, handler);
-        } catch (ParserConfigurationException e) {
-            throw new AntlintException("Not able to parse XML file "
-                    + e.getMessage());
-        } catch (SAXException e) {
-            throw new AntlintException("Not able to parse XML file "
-                    + e.getMessage());
-        } catch (IOException e) {
-            throw new AntlintException("Not able to find XML file "
-                    + e.getMessage());
+    protected void handleStartElement(String text) {
+        checkTabChars(text, getLocator().getLineNumber());
+    }
+
+    private void checkTabChars(String text, int lineNum) {
+        if (text.contains(TAB_CHAR)) {
+            report("Tabs should not be used!", lineNum);
+        }
+        clearBuffer();
+    }
+
+    /**
+     * Method to run the check against the input {@link TargetMeta}.
+     * 
+     * @param targetMeta is the {@link TargetMeta} against whom the check is
+     *            run.
+     */
+    private void run(TargetMeta targetMeta) {
+        List<MacroMeta> macros = targetMeta.getScriptDefinitions("//target[@name='"
+                + targetMeta.getName() + "']/descendant::script | //target[@name='"
+                + targetMeta.getName() + "']/descendant::*[name()=\"hlm:python\"]");
+        if (macros != null) {
+            for (MacroMeta macroMeta : macros) {
+                if (macroMeta.getText().contains(TAB_CHAR)) {
+                    report("Target " + targetMeta.getName() + " has a script with tabs",
+                            macroMeta.getLineNumber());
+                }
+            }
         }
     }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckTabCharacter";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
-    }
-
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckTargetName.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckTargetName.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,18 +16,7 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.antlint.ant.AntlintException;
+import com.nokia.helium.ant.data.TargetMeta;
 
 /**
  * <code>CheckTargetName</code> is used to check the naming convention of the
@@ -42,73 +31,30 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckTargetName&quot; severity=&quot;error&quot; enabled=&quot;true&quot; regexp=&quot;([a-z0-9[\\d\\-]]*)&quot; /&gt;
+ *       &lt;checkTargetName&quot; severity=&quot;error&quot; regexp=&quot;([a-z0-9[\\d\\-]]*)&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckTargetName" category="AntLint"
+ * @ant.task name="checkTargetName" category="AntLint"
  * 
  */
-public class CheckTargetName extends AbstractCheck {
+public class CheckTargetName extends AbstractTargetCheck {
 
     private String regExp;
-    private File antFile;
 
     /**
      * {@inheritDoc}
      */
-    public void run(Element node) {
-        if (node.getName().equals("target")) {
-            String target = node.attributeValue("name");
+    protected void run(TargetMeta targetMeta) {
+        String target = targetMeta.getName();
+        if (target != null && !target.isEmpty()) {
             if (!target.equals("tearDown") && !target.equals("setUp")
-                    && !target.equals("suiteTearDown")
-                    && !target.equals("suiteSetUp")) {
-                checkTargetName(target);
-            }
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
-     */
-    public void run(File antFilename) throws AntlintException {
-
-        List<Element> targetNodes = new ArrayList<Element>();
-
-        this.antFile = antFilename;
-        SAXReader saxReader = new SAXReader();
-        Document doc;
-        try {
-            doc = saxReader.read(antFilename);
-            elementTreeWalk(doc.getRootElement(), "target", targetNodes);
-        } catch (DocumentException e) {
-            throw new AntlintException("Invalid XML file " + e.getMessage());
-        }
-        for (Element targetNode : targetNodes) {
-            run(targetNode);
-        }
-
-    }
-
-    /**
-     * Check the given target name.
-     * 
-     * @param targetName
-     *            is the target name to check.
-     */
-    private void checkTargetName(String targetName) {
-        if (targetName != null && !targetName.isEmpty()) {
-            Pattern p1 = Pattern.compile(getRegExp());
-            Matcher m1 = p1.matcher(targetName);
-            if (!m1.matches()) {
-                this.getReporter().report(this.getSeverity(),
-                        "INVALID Target Name: " + targetName,
-                        this.getAntFile(), 0);
+                    && !target.equals("suiteTearDown") && !target.equals("suiteSetUp")
+                    && !matches(target, getRegExp())) {
+                report("INVALID Target Name: " + target, targetMeta.getLineNumber());
             }
         } else {
-            log("Target name not specified!");
+            report("Target name not specified!", targetMeta.getLineNumber());
         }
     }
 
@@ -120,28 +66,9 @@
     }
 
     /**
-     * @param regExp
-     *            the regExp to set
+     * @param regExp the regExp to set
      */
     public void setRegExp(String regExp) {
         this.regExp = regExp;
     }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckTargetName";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
-    }
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckTryCatchBlock.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckTryCatchBlock.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,19 +16,10 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.io.IOException;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
+import java.util.List;
 
-import org.xml.sax.Attributes;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-import com.nokia.helium.antlint.ant.AntlintException;
+import com.nokia.helium.ant.data.TargetMeta;
+import com.nokia.helium.ant.data.TaskMeta;
 
 /**
  * <code>CheckTryCatchBlock</code> is used to check for empty and more than one
@@ -43,92 +34,28 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;checkTryCatchBlock&quot; severity=&quot;error&quot; enabled=&quot;true&quot; /&gt;
+ *       &lt;checkTryCatchBlock&quot; severity=&quot;error&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
  * @ant.task name="checkTryCatchBlock" category="AntLint"
  * 
  */
-public class CheckTryCatchBlock extends AbstractCheck {
-
-    private File antFile;
-
-    /**
-     * {@inheritDoc}
-     */
-    public File getAntFile() {
-        return antFile;
-    }
+public class CheckTryCatchBlock extends AbstractTargetCheck {
 
     /**
      * {@inheritDoc}
      */
-    public void run(File antFilename) throws AntlintException {
-        try {
-            this.antFile = antFilename;
-            SAXParserFactory saxFactory = SAXParserFactory.newInstance();
-            saxFactory.setNamespaceAware(true);
-            saxFactory.setValidating(true);
-            SAXParser parser = saxFactory.newSAXParser();
-            TryCatchBlockHandler handler = new TryCatchBlockHandler();
-            parser.parse(antFilename, handler);
-        } catch (ParserConfigurationException e) {
-            throw new AntlintException("Not able to parse XML file "
-                    + e.getMessage());
-        } catch (SAXException e) {
-            throw new AntlintException("Not able to parse XML file "
-                    + e.getMessage());
-        } catch (IOException e) {
-            throw new AntlintException("Not able to find XML file "
-                    + e.getMessage());
-        }
-    }
-
-    public String toString() {
-        return "CheckTryCatchBlock";
-    }
-
-    private class TryCatchBlockHandler extends DefaultHandler {
-
-        private Locator locator;
-        private int catchCounter;
+    protected void run(TargetMeta targetMeta) {
+        List<TaskMeta> trycatches = targetMeta.getTasks("trycatch");
+        List<TaskMeta> catches = targetMeta.getTasks("trycatch//catch");
 
-        /**
-         * {@inheritDoc}
-         */
-        public void setDocumentLocator(Locator locator) {
-            this.locator = locator;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void startElement(String uri, String localName, String qName,
-                Attributes attributes) throws SAXException {
-            if (localName.equals("trycatch")) {
-                catchCounter = 0;
-            } else if (localName.equals("catch")) {
-                catchCounter++;
-            }
+        if (!trycatches.isEmpty() && catches.isEmpty()) {
+            report("<trycatch> block found without <catch> element", targetMeta.getLineNumber());
         }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void endElement(String uri, String localName, String qName)
-            throws SAXException {
-            if (localName.equals("trycatch") && catchCounter == 0) {
-                getReporter().report(getSeverity(),
-                        "<trycatch> block found without <catch> element",
-                        getAntFile(), locator.getLineNumber());
-            } else if (localName.equals("trycatch") && catchCounter > 1) {
-                getReporter().report(
-                        getSeverity(),
-                        "<trycatch> block found with " + catchCounter
-                                + " <catch> elements.", getAntFile(),
-                        locator.getLineNumber());
-            }
+        if (!trycatches.isEmpty() && catches.size() > 1) {
+            report("<trycatch> block found with " + catches.size() + " <catch> elements.",
+                    targetMeta.getLineNumber());
         }
     }
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckUseOfEqualsTask.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckUseOfEqualsTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,16 +16,10 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.util.ArrayList;
 import java.util.List;
 
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.antlint.ant.AntlintException;
+import com.nokia.helium.ant.data.RootAntObjectMeta;
+import com.nokia.helium.ant.data.TaskMeta;
 
 /**
  * <code>CheckUseOfEqualsTask</code> is used to check the usage of equals task
@@ -40,72 +34,25 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckUseOfEqualsTask&quot; severity=&quot;error&quot; enabled=&quot;true&quot; /&gt;
+ *       &lt;checkUseOfEqualsTask&quot; severity=&quot;error&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckUseOfEqualsTask" category="AntLint"
+ * @ant.task name="checkUseOfEqualsTask" category="AntLint"
  */
-public class CheckUseOfEqualsTask extends AbstractCheck {
-
-    private File antFile;
+public class CheckUseOfEqualsTask extends AbstractProjectCheck {
 
     /**
      * {@inheritDoc}
      */
-    public void run(Element node) {
-        if (node.getName().equals("equals")) {
-            String text = node.attributeValue("arg2");
+    protected void run(RootAntObjectMeta root) {
+        List<TaskMeta> conditions = root.getTaskDefinitions("//equals");
+        for (TaskMeta taskMeta : conditions) {
+            String text = taskMeta.getAttr("arg2");
             if (text.equals("true") || text.equals("yes")) {
-                this.getReporter().report(
-                        this.getSeverity(),
-                        node.attributeValue("arg1")
-                                + " uses 'equals' should use 'istrue' task",
-                        this.getAntFile(), 0);
+                report(taskMeta.getAttr("arg1") + " uses 'equals', should use 'istrue' task",
+                        taskMeta.getLineNumber());
             }
         }
     }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
-     */
-    public void run(File antFilename) throws AntlintException {
-
-        List<Element> equalNodes = new ArrayList<Element>();
-
-        this.antFile = antFilename;
-        SAXReader saxReader = new SAXReader();
-        Document doc;
-        try {
-            doc = saxReader.read(antFilename);
-            elementTreeWalk(doc.getRootElement(), "equals", equalNodes);
-        } catch (DocumentException e) {
-            throw new AntlintException("Invalid XML file " + e.getMessage());
-        }
-        for (Element equalNode : equalNodes) {
-            run(equalNode);
-        }
-
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckUseOfEqualsTask";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
-    }
-
 }
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckUseOfIfInTargets.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckUseOfIfInTargets.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,17 +16,10 @@
  */
 package com.nokia.helium.antlint.ant.types;
 
-import java.io.File;
-import java.util.ArrayList;
 import java.util.List;
 
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.Node;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.antlint.ant.AntlintException;
+import com.nokia.helium.ant.data.TargetMeta;
+import com.nokia.helium.ant.data.TaskMeta;
 
 /**
  * <code>CheckUseOfIfInTargets</code> is used to check the usage of if task as
@@ -42,122 +35,49 @@
  *               &lt;include name=&quot;*build.xml&quot;/&gt;
  *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
  *       &lt;/fileset&gt;
- *       &lt;CheckUseOfIfInTargets&quot; severity=&quot;error&quot; enabled=&quot;true&quot; /&gt;
+ *       &lt;checkUseOfIfInTargets&quot; severity=&quot;error&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
  * 
- * @ant.task name="CheckUseOfIfInTargets" category="AntLint"
+ * @ant.task name="checkUseOfIfInTargets" category="AntLint"
  * 
  */
-public class CheckUseOfIfInTargets extends AbstractCheck {
-
-    private File antFile;
+public class CheckUseOfIfInTargets extends AbstractTargetCheck {
 
     /**
      * {@inheritDoc}
      */
-    public void run(Element node) {
-        if (node.getName().equals("target")) {
-            checkUseOfIf(node);
-        }
-    }
-
-    /**
-     * Check against the given node.
-     * 
-     * @param node
-     *            is the node to check.
-     */
-    @SuppressWarnings("unchecked")
-    private void checkUseOfIf(Element node) {
-        String target = node.attributeValue("name");
-        String targetxpath = "//target[@name='" + target + "']//if";
+    protected void run(TargetMeta targetMeta) {
+        String target = targetMeta.getName();
+        List<TaskMeta> conditions = targetMeta.getTasks("if");
+        for (TaskMeta taskMeta : conditions) {
+            List<TaskMeta> ifThenPropertyConditions = taskMeta.getTasks("./then/property");
+            List<TaskMeta> ifElsePropertyConditions = taskMeta.getTasks("./else/property");
+            if (ifThenPropertyConditions.size() == 1 && ifElsePropertyConditions.size() == 1) {
+                report("Target " + target
+                        + " poor use of if-else-property statement, use condition task",
+                        taskMeta.getLineNumber());
+            }
+            List<TaskMeta> elseConditions = taskMeta.getTasks("./else");
 
-        List<Node> statements2 = node.selectNodes(targetxpath);
-        for (Node statement : statements2) {
-            List<Node> conditiontest = statement.selectNodes("./then/property");
-            if (conditiontest != null && conditiontest.size() == 1) {
-                List<Node> conditiontest2 = statement
-                        .selectNodes("./else/property");
-                if (conditiontest2 != null && conditiontest2.size() == 1) {
-                    this
-                            .getReporter()
-                            .report(
-                                    this.getSeverity(),
-                                    "Target "
-                                            + target
-                                            + " poor use of if-else-property statement, use condition task",
-                                    this.getAntFile(), 0);
-                } else if (statement.selectNodes("./else").size() == 0) {
-                    this
-                            .getReporter()
-                            .report(
-                                    this.getSeverity(),
-                                    "Target "
-                                            + target
-                                            + " poor use of if-then-property statement, use condition task",
-                                    this.getAntFile(), 0);
-                }
+            if (ifThenPropertyConditions.size() == 1 && elseConditions.size() == 0) {
+                report("Target " + target
+                        + " poor use of if-then-property statement, use condition task",
+                        taskMeta.getLineNumber());
             }
         }
-        List<Node> statements = node.selectNodes("//target[@name='" + target
+
+        List<TaskMeta> conditions2 = targetMeta.getTaskDefinitions("//target[@name='" + target
                 + "']/*");
-        if (!(statements.size() > 1)) {
-            if (node.selectSingleNode(targetxpath + "/else") == null) {
-                if (node.selectSingleNode(targetxpath + "/isset") != null
-                        || node.selectSingleNode(targetxpath + "/not/isset") != null) {
-                    this
-                            .getReporter()
-                            .report(
-                                    this.getSeverity(),
-                                    "Target "
-                                            + target
-                                            + " poor use of if statement, use <target if|unless=\"prop\"",
-                                    this.getAntFile(), 0);
-                }
+        if (conditions2.size() == 1) {
+            List<TaskMeta> ifElseConditions = targetMeta.getTasks("./if/else");
+            List<TaskMeta> isSetConds = targetMeta.getTasks("./if/isset");
+            List<TaskMeta> notConds = targetMeta.getTaskDefinitions("./if/not/isset");
+            if (ifElseConditions.isEmpty() && (!isSetConds.isEmpty() || !notConds.isEmpty())) {
+                report("Target " + target
+                        + " poor use of if statement, use <target if|unless=\"prop\"",
+                        targetMeta.getLineNumber());
             }
         }
     }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#run(java.io.File)
-     */
-    public void run(File antFilename) throws AntlintException {
-
-        List<Element> targetNodes = new ArrayList<Element>();
-
-        this.antFile = antFilename;
-        SAXReader saxReader = new SAXReader();
-        Document doc;
-        try {
-            doc = saxReader.read(antFilename);
-            elementTreeWalk(doc.getRootElement(), "target", targetNodes);
-        } catch (DocumentException e) {
-            throw new AntlintException("Invalid XML file " + e.getMessage());
-        }
-        for (Element targetNode : targetNodes) {
-            run(targetNode);
-        }
-
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tools.ant.types.DataType#toString()
-     */
-    public String toString() {
-        return "CheckUseOfIfInTargets";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.nokia.helium.antlint.ant.types.Check#getAntFile()
-     */
-    public File getAntFile() {
-        return this.antFile;
-    }
-}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckVariableTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *
+ */
+package com.nokia.helium.antlint.ant.types;
+
+import java.util.List;
+
+import com.nokia.helium.ant.data.RootAntObjectMeta;
+import com.nokia.helium.ant.data.TaskMeta;
+
+/**
+ * <code>CheckVariableTask</code> is used to check whether the value attribute
+ * of the ant-contrib variable task is set when attribute unset is set to true.
+ * 
+ * <pre>
+ * Usage:
+ * 
+ *  &lt;antlint&gt;
+ *       &lt;fileset id=&quot;antlint.files&quot; dir=&quot;${antlint.test.dir}/data&quot;&gt;
+ *               &lt;include name=&quot;*.ant.xml&quot;/&gt;
+ *               &lt;include name=&quot;*build.xml&quot;/&gt;
+ *               &lt;include name=&quot;*.antlib.xml&quot;/&gt;
+ *       &lt;/fileset&gt;
+ *       &lt;checkVariableTask severity=&quot;error&quot; /&gt;
+ *  &lt;/antlint&gt;
+ * </pre>
+ * 
+ * @ant.task name="checkVariableTask" category="AntLint"
+ */
+public class CheckVariableTask extends AbstractProjectCheck {
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void run(RootAntObjectMeta root) {
+        List<TaskMeta> tasks = root.getTaskDefinitions("//var");
+        String name, value, unset = null;
+        for (TaskMeta taskMeta : tasks) {
+            name = taskMeta.getAttr("name");
+            value = taskMeta.getAttr("value");
+            unset = taskMeta.getAttr("unset");
+            if (!value.trim().isEmpty() && unset.equals("true")) {
+                report("Variable '" + name + "' should not have 'value' attribute set "
+                        + "when 'unset' is true.", taskMeta.getLineNumber());
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckstyleExecutor.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+package com.nokia.helium.antlint.ant.types;
+
+import java.io.File;
+
+import org.apache.tools.ant.types.FileSet;
+
+import com.puppycrawl.tools.checkstyle.CheckStyleTask;
+import com.puppycrawl.tools.checkstyle.CheckStyleTask.Formatter;
+
+/**
+ * <code>CheckstyleExecutor</code> extends {@link Executor} and is used to check
+ * the coding conventions of beanshell script.
+ */
+public class CheckstyleExecutor extends Executor {
+
+    private CheckStyleTask checkStyleTask;
+    private ScriptDump scriptDump;
+    
+    /**
+     * Default constructor
+     */
+    public CheckstyleExecutor() {
+        scriptDump = new BeanshellScriptDump();
+        checkStyleTask = new CheckStyleTask();
+    }
+
+    /**
+     * Set the checkstyle configuration file.
+     * 
+     * @param config is the checkstyle configuration file.
+     */
+    public void setConfig(File config) {
+        checkStyleTask.setConfig(config);
+    }
+
+    /**
+     * Add the checkstyle formatter.
+     * 
+     * @param aFormatter the checkstyle formatter to add.
+     */
+    public void addFormatter(Formatter aFormatter) {
+        checkStyleTask.addFormatter(aFormatter);
+    }
+
+    protected ScriptDump getScriptDump() {
+        return scriptDump;
+    }
+    
+    /**
+     * {@inheritDoc}
+     */
+    public void execute() {
+
+        FileSet fileset = new FileSet();
+        fileset.setDir(getOutputDir());
+        fileset.setIncludes("**/*.java");
+
+        checkStyleTask.setTaskName(getClass().getSimpleName());
+        checkStyleTask.addFileset(fileset);
+        checkStyleTask.setProject(getProject());
+        checkStyleTask.execute();
+    }
+
+}
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckstyleXmlReporter.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckstyleXmlReporter.java	Wed Oct 13 16:31:27 2010 +0800
@@ -41,8 +41,8 @@
 import com.nokia.helium.antlint.ant.Severity;
 
 /**
- * This reporter will generate a Checkstyle compatible XML to
- * report Antlint issues.
+ * This reporter will generate a Checkstyle compatible XML to report Antlint
+ * issues.
  * 
  * Usage:
  * 
@@ -59,7 +59,7 @@
  *       &lt;antlintCheckstyleReporter file=&quot;report.xml&quot; /&gt;
  *  &lt;/antlint&gt;
  * </pre>
- *    
+ * 
  * @ant.type name="antlintCheckstyleReporter" category="AntLint"
  */
 public class CheckstyleXmlReporter extends DataType implements Reporter {
@@ -74,8 +74,7 @@
      * {@inheritDoc}
      */
     @Override
-    public void report(Severity severity, String message, File filename,
-            int lineNo) {
+    public void report(Severity severity, String message, File filename, int lineNo) {
         if (doc != null) {
             if (currentFile == null || !currentFile.equals(filename)) {
                 currentFileNode = doc.createElement("file");
@@ -101,8 +100,7 @@
     }
 
     /**
-     * Closing the reporting session. It will generates
-     * the xml file.
+     * Closing the reporting session. It will generates the xml file.
      */
     @Override
     public void close() {
@@ -129,7 +127,7 @@
     }
 
     /**
-     * {@inheritDoc}    
+     * {@inheritDoc}
      */
     @Override
     public void open() {
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/ConsoleReporter.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/ConsoleReporter.java	Wed Oct 13 16:31:27 2010 +0800
@@ -25,9 +25,8 @@
 import com.nokia.helium.antlint.ant.Severity;
 
 /**
- * This reporter will produce Antlint reporting using ant logging
- * system.
- *    
+ * This reporter will produce Antlint reporting using ant logging system.
+ * 
  * Usage:
  * 
  * <pre>
@@ -43,7 +42,7 @@
  *       &lt;antlintCheckstyleReporter /&gt;
  *  &lt;/antlint&gt;
  * </pre>
- *
+ * 
  * @ant.type name="antlintConsoleReporter" category="AntLint"
  */
 public class ConsoleReporter extends DataType implements Reporter {
@@ -53,29 +52,24 @@
 
     /*
      * (non-Javadoc)
-     * 
      * @see
      * com.nokia.helium.antlint.ant.Reporter#report(com.nokia.helium.antlint
      * .ant.Severity, java.lang.String, java.io.File, int)
      */
     @Override
-    public void report(Severity severity, String message, File filename,
-            int lineNo) {
+    public void report(Severity severity, String message, File filename, int lineNo) {
         String errorMessage;
         if (this.antFilename == null) {
             this.antFilename = filename;
             task.log("\nError(s)/Warning(s) for: " + this.antFilename);
-            task
-                    .log("----------------------------------------------------------");
+            task.log("----------------------------------------------------------");
         } else if (!this.antFilename.equals(filename)) {
             this.antFilename = filename;
             task.log("\nError(s)/Warning(s) for: " + this.antFilename);
-            task
-                    .log("----------------------------------------------------------");
+            task.log("----------------------------------------------------------");
         }
         if (lineNo > 0) {
-            errorMessage = severity.getValue().toUpperCase() + ": " + lineNo
-                    + ": " + message;
+            errorMessage = severity.getValue().toUpperCase() + ": " + lineNo + ": " + message;
 
         } else {
             errorMessage = severity.getValue().toUpperCase() + ": " + message;
@@ -86,7 +80,6 @@
 
     /*
      * (non-Javadoc)
-     * 
      * @see
      * com.nokia.helium.antlint.ant.Reporter#setTask(org.apache.tools.ant.Task)
      */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/Executor.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+package com.nokia.helium.antlint.ant.types;
+
+import java.io.File;
+import java.util.Collection;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.DataType;
+
+import com.nokia.helium.ant.data.AntFile;
+import com.nokia.helium.ant.data.Database;
+
+/**
+ * <code>Executor</code> is used to run any external tool or command from within
+ * the antlint task.
+ */
+public abstract class Executor extends DataType {
+
+    private File outputDir;
+    private Database database;
+
+    /**
+     * Set the Database.
+     * @param database is the Database to set.
+     */
+    public void setDatabase(Database database) {
+        this.database = database;
+    }
+
+    /**
+     * Set the output directory.
+     * @param outputDir is the output directory.
+     */
+    public void setOutputDir(File outputDir) {
+        this.outputDir = outputDir;
+    }
+
+    public File getOutputDir() {
+        return outputDir;
+    }
+
+    /**
+     * Method to run the configured external tool or command.
+     */
+    public void run() {
+        extractScripts();
+        execute();
+    }
+    
+    /**
+     * Method to validate configured attributes.
+     * 
+     */
+    public void validateAttributes() {
+        if (outputDir == null) {
+            throw new BuildException("'outputDir' attribute should be specified for '" + toString()
+                    + "'");
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    public String toString() {
+        return getClass().getSimpleName();
+    }
+
+    private void extractScripts() {
+        Collection<AntFile> antFiles = database.getAntFiles();
+        for (AntFile antFile : antFiles) {
+            getScriptDump().setAntFile(antFile);
+            getScriptDump().setOutputDir(outputDir);
+            getScriptDump().dump();
+        }
+    }
+
+    /**
+     * Get the script dump.
+     * 
+     * @return the script dump task.
+     */
+    protected abstract ScriptDump getScriptDump();
+    
+    /**
+     * Method executes the configured tool or task.
+     */
+    protected abstract void execute();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/PylintExecutor.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+package com.nokia.helium.antlint.ant.types;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.ExecTask;
+import org.apache.tools.ant.taskdefs.PathConvert;
+import org.apache.tools.ant.types.Commandline;
+import org.apache.tools.ant.types.Environment;
+import org.apache.tools.ant.types.FileSet;
+
+/**
+ * <code>PylintExecutor</code> extends {@link Executor} and is used to check the
+ * lint issues of jython/python scripts.
+ */
+public class PylintExecutor extends Executor {
+
+    private ScriptDump scriptDump;
+    private ExecTask execTask;
+
+    public PylintExecutor() {
+        execTask = new ExecTask();
+        scriptDump = new PythonScriptDump();
+    }
+
+    /**
+     * Add an environment variable to the launched process.
+     * 
+     * @param var new environment variable.
+     */
+    public void addEnv(Environment.Variable var) {
+        execTask.addEnv(var);
+    }
+
+    /**
+     * Adds a command-line argument.
+     * 
+     * @return new command line argument created.
+     */
+    public Commandline.Argument createArg() {
+        return execTask.createArg();
+    }
+
+    @Override
+    protected ScriptDump getScriptDump() {
+        return scriptDump;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void execute() {
+        FileSet fileset = new FileSet();
+        fileset.setDir(getOutputDir());
+        fileset.setIncludes("**/*.py");
+        fileset.setProject(getProject());
+
+        PathConvert pathConvert = new PathConvert();
+        pathConvert.add(fileset);
+        pathConvert.setPathSep(" ");
+        pathConvert.setProperty("python.modules");
+        pathConvert.setProject(getProject());
+        pathConvert.execute();
+
+        execTask.createArg().setLine(getProject().getProperty("python.modules"));
+        execTask.setExecutable("python");
+        execTask.setTaskName(getClass().getSimpleName());
+        execTask.setProject(getProject());
+        execTask.setResultProperty("pylint.result");
+        execTask.execute();
+
+        int result = getResult();
+        if ((result & 2) == 2) {
+            throw new BuildException("Error: Pylint contains errors.");
+        }
+    }
+
+    private int getResult() {
+        String resultString = getProject().getProperty("pylint.result");
+        int result = -1;
+        try {
+            result = Integer.parseInt(resultString);
+        } catch (NumberFormatException e) {
+            log(e.getMessage(), Project.MSG_WARN);
+        }
+        return result;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/PythonScriptDump.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+package com.nokia.helium.antlint.ant.types;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.List;
+
+import org.apache.tools.ant.BuildException;
+
+import com.nokia.helium.ant.data.MacroMeta;
+import com.nokia.helium.ant.data.TargetMeta;
+
+/**
+ * <code>PythonScriptDumper</code> is used to extract and dump Python and Jython
+ * scripts from the Ant files.
+ */
+public class PythonScriptDump extends ScriptDump {
+
+    protected void run(TargetMeta targetMeta) {
+        String xpath = "//target[@name='" + targetMeta.getName()
+                + "']/descendant::*[name()=\"hlm:python\"]";
+        List<MacroMeta> macros = targetMeta.getScriptDefinitions(xpath);
+        int i = 0;
+        for (MacroMeta macroMeta : macros) {
+            writePythonFile(i + "_" + targetMeta.getName(), macroMeta.getText());
+            i++;
+        }
+        super.run(targetMeta);
+    }
+
+    protected void run(MacroMeta macroMeta) {
+        String language = macroMeta.getAttr("language");
+        if (language != null && language.equals("jython")) {
+            writeJythonFile(getScriptName(macroMeta), macroMeta.getText());
+        }
+    }
+
+    private String getScriptName(MacroMeta macroMeta) {
+        String name = macroMeta.getName();
+        if (name.isEmpty()) {
+            name = "target_" + macroMeta.getParent().getName();
+        }
+        return name;
+    }
+
+    protected String getMacroXPathExpression() {
+        return "//scriptdef";
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected String getScriptXPathExpression(String targetName) {
+        return ".//script | .//scriptcondition";
+    }
+
+    /**
+     * Writes the given text to a python file.
+     * 
+     * @param name is the name of the file to be written.
+     * @param text is the text to be written inside the file.
+     */
+    private void writePythonFile(String name, String text) {
+        PrintWriter output = null;
+        try {
+            String outputPath = getOutputDir().getCanonicalPath() + File.separator + "python";
+            new File(outputPath).mkdirs();
+            File file = new File(outputPath + File.separator + "target" + name + ".py");
+            output = new PrintWriter(new FileOutputStream(file));
+            if (!text.equals("")) {
+                output.write("def abc():");
+                for (String line : text.split("\n")) {
+                    output.write("    " + line + "\n");
+                }
+            }
+        } catch (IOException e) {
+            throw new BuildException("IOException:Not able to write python file " + name + ".py");
+        } finally {
+            if (output != null) {
+                output.close();
+            }
+        }
+    }
+
+    /**
+     * Write a script with the given name and the text.
+     * 
+     * @param name is the name of the script
+     * @param text is the script text.
+     */
+    private void writeJythonFile(String name, String text) {
+        PrintWriter output = null, output2 = null;
+        try {
+            String outputPath = getOutputDir().getCanonicalPath() + File.separator + "jep";
+            new File(outputPath).mkdirs();
+            File file = new File(outputPath + File.separator + name + "_jep.py");
+            output = new PrintWriter(new FileOutputStream(file));
+            output.write("def abc():\n");
+            output.write("    attributes = {} # pylint: disable=C0103\n");
+            output.write("    elements = {} # pylint: disable=C0103\n");
+            output.write("    project = None # pylint: disable=C0103\n");
+            output.write("    self = None # pylint: disable=C0103\n");
+            text = text.replace(" File(", " self.File(");
+
+            for (String line : text.split("\n")) {
+                output.write("    " + line + "\n");
+            }
+
+            if (text.contains("import ")) {
+                File file2 = new File(getOutputDir().getCanonicalPath() + File.separator
+                        + "test_jython.xml");
+                output2 = new PrintWriter(new FileOutputStream(file2, true));
+                output2.write("try:\n");
+                for (String line : text.split("\n")) {
+                    if (line.trim().startsWith("import ") || line.trim().startsWith("from ")) {
+                        output2.write("    " + line + "\n");
+                    }
+                }
+                output2.write("except ImportError, e:\n");
+                output2.write("    print '" + name + " failed: ' + str(e)\n");
+            }
+        } catch (IOException e) {
+            throw new BuildException("Not able to write JEP File " + name + "_jep.py");
+        } finally {
+            if (output != null) {
+                output.close();
+            }
+            if (output2 != null) {
+                output2.close();
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/ScriptDump.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+package com.nokia.helium.antlint.ant.types;
+
+import java.io.File;
+import java.util.List;
+
+import com.nokia.helium.ant.data.AntFile;
+import com.nokia.helium.ant.data.AntlibMeta;
+import com.nokia.helium.ant.data.MacroMeta;
+import com.nokia.helium.ant.data.ProjectMeta;
+import com.nokia.helium.ant.data.RootAntObjectMeta;
+import com.nokia.helium.ant.data.TargetMeta;
+
+/**
+ * <code>ScriptDump</code> is an abstract implementation for extracting and
+ * dumping of various scripts from within an Ant file.
+ */
+public abstract class ScriptDump {
+
+    private File outputDir;
+    private AntFile antFile;
+
+    /**
+     * Return the ant file.
+     * 
+     * @return the ant file.
+     */
+    protected AntFile getAntFile() {
+        return antFile;
+    }
+
+    /**
+     * Set the ant file.
+     * 
+     * @param the ant file to set.
+     */
+    public void setAntFile(AntFile antFile) {
+        this.antFile = antFile;
+    }
+
+    /**
+     * Method extracts and dumps the requested scripts.
+     */
+    public void dump() {
+        RootAntObjectMeta root = getAntFile().getRootObjectMeta();
+        if (root instanceof ProjectMeta) {
+            ProjectMeta projectMeta = (ProjectMeta) root;
+            List<TargetMeta> targets = projectMeta.getTargets();
+            for (TargetMeta targetMeta : targets) {
+                run(targetMeta);
+            }
+            List<MacroMeta> macros = projectMeta.getScriptDefinitions(getMacroXPathExpression());
+            for (MacroMeta macroMeta : macros) {
+                run(macroMeta);
+            }
+        } else {
+            AntlibMeta antlibMeta = (AntlibMeta) root;
+            List<MacroMeta> macros = antlibMeta.getScriptDefinitions(getMacroXPathExpression());
+            for (MacroMeta macroMeta : macros) {
+                run(macroMeta);
+            }
+        }
+    }
+
+    protected void run(TargetMeta targetMeta) {
+        String xpath = getScriptXPathExpression(targetMeta.getName());
+        if (xpath != null) {
+            List<MacroMeta> macros = targetMeta.getScriptDefinitions(xpath);
+            for (MacroMeta macroMeta : macros) {
+                run(macroMeta);
+            }
+        }
+    }
+
+    public void setOutputDir(File outputDir) {
+        this.outputDir = outputDir;
+    }
+
+    public File getOutputDir() {
+        return outputDir;
+    }
+
+    /**
+     * Get the xpath expression of the macro.
+     * 
+     * @return the xpath expression of the macro.
+     */
+    protected abstract String getMacroXPathExpression();
+
+    /**
+     * Get the xpath expression for the input target.
+     * 
+     * @param targetName is the name of the target.
+     * @return the xpath expression for the input target.
+     */
+    protected abstract String getScriptXPathExpression(String targetName);
+
+    /**
+     * Method runs the check against the input {@link MacroMeta}.
+     * 
+     * @param macroMeta is the {@link MacroMeta} against whom the check is run.
+     */
+    protected abstract void run(MacroMeta macroMeta);
+
+}
--- a/buildframework/helium/sf/java/antlint/tests/antunit/test_antlint.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/tests/antunit/test_antlint.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -20,7 +20,7 @@
 
 ============================================================================
 -->
-<project name="test-antlint" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+<project name="test-antlint" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium" xmlns:cs="antlib:com.puppycrawl.tools.checkstyle">
     <description>Helium Antlib AntLint unittests.</description>
 
     <dirname property="antlint.test.dir" file="${ant.file.test-antlint}/.."/>
@@ -42,6 +42,102 @@
         <delete dir="${antlint.test.dir}/data/output" failonerror="false" />
     </target>
 
+    <target name="test-check-antcall">
+        <hlm:antlint>
+            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                <include name="sample.ant.xml"/>
+            </fileset>
+            <hlm:checkAntCall severity="warning"/>
+        </hlm:antlint>
+        <au:assertLogContains text="antcall> is used with no param elements and calls the target 'hello' that has no dependencies!" level="info"/>
+    </target>
+
+    <target name="test-check-description">
+        <hlm:antlint>
+            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                <include name="build.xml"/>
+            </fileset>
+            <hlm:checkDescription severity="warning"/>
+        </hlm:antlint>
+        <au:assertLogContains text="WARNING: 23: Description not specified!" level="info"/>
+    </target>
+
+    <target name="test-check-duplicate-names">
+        <hlm:antlint>
+            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                <include name="*.xml"/>
+                <include name="*.ant.xml"/>
+                <include name="build.xml"/>
+                <include name="*.antlib.xml"/>
+            </fileset>
+            <hlm:checkDuplicateNames severity="warning"/>
+        </hlm:antlint>
+        <au:assertLogContains text="WARNING: 101: Task 'antlint' and macro 'antlint' has duplicate name." level="info"/>
+    </target>
+
+    <target name="test-check-filename">
+        <hlm:antlint>
+            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                <include name="invalid.build.xml"/>
+            </fileset>
+            <hlm:checkFileName severity="warning" regexp="^build.xml$|ant.xml$|antlib.xml$" />
+        </hlm:antlint>
+        <au:assertLogContains text="WARNING: Invalid file Name:" level="info"/>
+    </target>
+
+    <target name="test-check-script-size">
+        <hlm:antlint>
+            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                <include name="sample.ant.xml"/>
+            </fileset>
+            <hlm:checkScriptSize enabled="true" severity="warning"/>
+        </hlm:antlint>
+        <au:assertLogContains text="WARNING: 77: Target check-script-size has a script with 1188 characters, code should be inside a python file" level="info"/>
+    </target>
+    
+    <target name="test-check-presetdef-macrodef-name">
+        <hlm:antlint>
+            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                <include name="sample.antlib.xml"/>
+                <include name="sample.ant.xml"/>
+            </fileset>
+            <hlm:checkPresetDefMacroDefName severity="warning" regexp="([a-z0-9][a-zA-Z0-9]*)"/>       
+        </hlm:antlint>
+        <au:assertLogContains text="WARNING: 45: Invalid presetdef/macrodef name: check_PresetDef.Name" level="info"/>
+        <au:assertLogContains text="WARNING: 27: Invalid presetdef/macrodef name: foo_Macro" level="info"/>
+    </target>
+
+    <target name="test-check-runtarget">
+        <hlm:antlint>
+            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                <include name="sample.ant.xml"/>
+            </fileset>
+            <hlm:checkRunTarget enabled="true" severity="warning"/>
+        </hlm:antlint>
+        <au:assertLogContains text="runtarget> calls the target smile that has dependencies!" level="info"/>
+    </target>
+
+    <target name="test-check-scriptdef-style">
+        <hlm:antlint>
+            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                <include name="sample.antlib.xml"/>
+            </fileset>
+            <hlm:checkScriptDefStyle severity="warning" />
+        </hlm:antlint>
+        <au:assertLogContains text="WARNING: 65: Scriptdef check-scriptdef-style doesn't reference attributes directly, poor style" level="info"/>
+    </target>
+
+    <target name="test-check-script-condition">
+        <hlm:antlint>
+            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                <include name="sample.ant.xml"/>
+                <include name="sample.antlib.xml"/>
+            </fileset>
+            <hlm:checkScriptCondition severity="warning"/> 
+        </hlm:antlint>
+        <au:assertLogContains text=" found in target_check-scriptcondition" level="info"/>
+    </target>
+    
     <target name="test-check-tab-character">
         <hlm:antlint>
             <fileset id="antlint.files" dir="${antlint.test.dir}/data">
@@ -50,7 +146,7 @@
             <hlm:checkTabCharacter severity="warning" enabled="true"/>
         </hlm:antlint>
         <au:assertLogContains text="WARNING: 25: Tabs should not be used!" level="info"/>
-        <au:assertLogContains text="WARNING: 29: Tabs should not be used!" level="info"/>
+        <au:assertLogContains text="WARNING: 31: Target test2 has a script with tabs" level="info"/>
     </target>
     
     <target name="test-check-property-name">
@@ -60,7 +156,7 @@
             </fileset>
             <hlm:checkPropertyName severity="warning" enabled="true" regexp="([a-z0-9[\\d\\_\\.\\@\\{\\}\\$]]*)" />
         </hlm:antlint>
-        <au:assertLogContains text="WARNING: INVALID Property Name: check-property-name" level="info"/>
+        <au:assertLogContains text="WARNING: 42: Invalid property name: check-property-name" level="info"/>
     </target>
     
     <target name="test-check-target-name">
@@ -70,9 +166,50 @@
             </fileset>
             <hlm:checkTargetName severity="warning" enabled="true" regexp="([a-z0-9[\\d\\-]]*)" />
         </hlm:antlint>
-        <au:assertLogContains text="WARNING: INVALID Target Name: Check_target.Name" level="info"/>
+        <au:assertLogContains text="WARNING: 64: INVALID Target Name: Check_target.Name" level="info"/>
     </target>
     
+    <target name="test-check-use-of-equals-task">
+        <hlm:antlint>
+            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                <include name="sample.ant.xml"/>
+            </fileset>
+            <hlm:checkUseOfEqualsTask severity="warning" enabled="true"/>
+        </hlm:antlint>
+        <au:assertLogContains text="WARNING: 209: test.boolean1 uses 'equals', should use 'istrue' task" level="info"/>
+        <au:assertLogContains text="WARNING: 210: test.boolean2 uses 'equals', should use 'istrue' task" level="info"/>
+    </target>
+
+    <target name="test-check-use-of-if-in-targets">
+        <hlm:antlint>
+            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                <include name="sample.ant.xml"/>
+            </fileset>
+            <hlm:checkUseOfIfInTargets enabled="true" severity="warning"/>
+        </hlm:antlint>
+        <au:assertLogContains text="WARNING: 126: Target check-use-of-if-in-targets poor use of if statement, use" level="info"/>
+        <au:assertLogContains text="WARNING: 136: Target check-use-of-if-else-in-targets poor use of if-else-property statement, use condition task" level="info"/>
+        <au:assertLogContains text="WARNING: 151: Target check-use-of-if-then-in-targets poor use of if-then-property statement, use condition task" level="info"/>
+        <au:assertLogContains text="WARNING: 173: Target check-prop-in-scriptcondition poor use of if-else-property statement, use condition task" level="info"/>
+        <au:assertLogContains text="WARNING: 229: Target check-scriptcondition poor use of if-else-property statement, use condition task" level="info"/>
+    </target>
+    
+    <target name="test-check-try-catch-block-with-empty-catch-block">
+        <hlm:antlint>
+            <fileset file="${antlint.test.dir}/data/sample.ant.xml"/>
+            <hlm:checkTryCatchBlock severity="warning" />
+        </hlm:antlint>
+        <au:assertLogContains text="trycatch> block found without " level="info"/>
+    </target>
+
+    <target name="test-check-try-catch-block-with-multiple-catch-block">
+        <hlm:antlint>
+            <fileset file="${antlint.test.dir}/data/sample.ant.xml"/>
+            <hlm:checkTryCatchBlock severity="warning" />
+        </hlm:antlint>
+        <au:assertLogContains text="trycatch> block found with 2 " level="info"/>
+    </target>
+
     <target name="test-check-indentation">
         <hlm:antlint>
             <fileset id="antlint.files" dir="${antlint.test.dir}/data">
@@ -80,19 +217,7 @@
             </fileset>
             <hlm:checkIndentation severity="warning" enabled="true"/>
         </hlm:antlint>
-        <au:assertLogContains text="WARNING: 248: Bad indentation" level="info"/>
-    </target>
-    
-   <target name="test-check-presetdef-macrodef-name">
-        <hlm:antlint>
-            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
-                <include name="sample.antlib.xml"/>
-                <include name="sample.ant.xml"/>
-            </fileset>
-            <hlm:checkPresetDefMacroDefName enabled="true" severity="warning" regexp="([a-z0-9][a-zA-Z0-9]*)"/>       
-        </hlm:antlint>
-        <au:assertLogContains text="WARNING: INVALID PRESETDEF/MACRODEF Name: check_PresetDef.Name" level="info"/>
-        <au:assertLogContains text="WARNING: INVALID PRESETDEF/MACRODEF Name: foo_Macro" level="info"/>
+        <au:assertLogContains text="WARNING: 252: Bad indentation" level="info"/>
     </target>
     
     <target name="test-check-project-name">
@@ -103,164 +228,8 @@
             </fileset>
             <hlm:checkProjectName enabled="true" severity="warning" regexp="([a-z0-9[\\d\\.\\_\\-]]*)"/>
         </hlm:antlint>
-        <au:assertLogContains text="WARNING: INVALID Project Name: Sample" level="info"/>
-        <au:assertLogContains text="WARNING: Project name not specified!" level="info"/>
-    </target>
-    
-    <target name="test-check-description">
-        <hlm:antlint>
-            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
-                <include name="build.xml"/>
-            </fileset>
-            <hlm:checkDescription enabled="true" severity="warning"/>
-        </hlm:antlint>
-        <au:assertLogContains text="WARNING: Description not specified!" level="info"/>
-    </target>
-    
-    <target name="test-check-runtarget">
-        <hlm:antlint>
-            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
-                <include name="sample.ant.xml"/>
-            </fileset>
-            <hlm:checkRunTarget enabled="true" severity="warning"/>
-        </hlm:antlint>
-        <au:assertLogContains text="runtarget> calls the target smile that has dependencies!" level="info"/>
-    </target>
-    
-    <target name="test-check-antcall">
-        <hlm:antlint>
-            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
-                <include name="sample.ant.xml"/>
-            </fileset>
-            <hlm:checkAntCall enabled="true" severity="warning"/>
-        </hlm:antlint>
-        <au:assertLogContains text="antcall> is used with no param elements and calls the target hello that has no dependencies!" level="info"/>
-    </target>
-    
-    <target name="test-check-script-size">
-        <hlm:antlint>
-            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
-                <include name="sample.ant.xml"/>
-            </fileset>
-            <hlm:checkScriptSize enabled="true" severity="warning"/>
-        </hlm:antlint>
-        <au:assertLogContains text="WARNING: Target check-script-size has a script with 1098 characters, code should be inside a python file" level="info"/>
-    </target>
-    
-    <target name="test-check-use-of-if-in-targets">
-        <hlm:antlint>
-            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
-                <include name="sample.ant.xml"/>
-            </fileset>
-            <hlm:checkUseOfIfInTargets enabled="true" severity="warning"/>
-        </hlm:antlint>
-        <au:assertLogContains text="WARNING: Target check-use-of-if-in-targets poor use of if statement, use " level="info"/>
-        <au:assertLogContains text="WARNING: Target check-use-of-if-else-in-targets poor use of if-else-property statement, use condition task" level="info"/>
-        <au:assertLogContains text="WARNING: Target check-use-of-if-then-in-targets poor use of if-then-property statement, use condition task" level="info"/>
-        <au:assertLogContains text="WARNING: Target check-prop-in-scriptcondition poor use of if-else-property statement, use condition task" level="info"/>
-        <au:assertLogContains text="WARNING: Target check-scriptcondition poor use of if-else-property statement, use condition task" level="info"/>
-    </target>
-    
-    <target name="test-check-jython-script">
-        <hlm:antlint>
-            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
-                <include name="sample.ant.xml"/>
-                <include name="sample.antlib.xml"/>
-            </fileset>
-            <hlm:checkJythonScript enabled="true" severity="warning" outputDir="${antlint.test.dir}/data/output"/>
-        </hlm:antlint>
-        <au:assertLogContains text="found in target_check-jython-script" level="info"/>
-        <au:assertLogContains text="found in check-script" level="info"/>
-    </target>
-    
-    <target name="test-check-use-of-equals-task">
-        <hlm:antlint>
-            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
-                <include name="sample.ant.xml"/>
-            </fileset>
-            <hlm:checkUseOfEqualsTask severity="warning" enabled="true"/>
-        </hlm:antlint>
-        <au:assertLogContains text="WARNING: test.boolean1 uses 'equals' should use 'istrue' task" level="info"/>
-        <au:assertLogContains text="WARNING: test.boolean2 uses 'equals' should use 'istrue' task" level="info"/>
-    </target>
-    
-    <target name="test-check-script-condition">
-        <hlm:antlint>
-            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
-                <include name="sample.ant.xml"/>
-                <include name="sample.antlib.xml"/>
-            </fileset>
-            <hlm:checkScriptCondition enabled="true" severity="warning" outputDir="${antlint.test.dir}/data/output"/> 
-        </hlm:antlint>
-        <au:assertLogContains text="found in scriptcondition_check-scriptcondition" level="info"/>
-    </target>
-    
-    <target name="test-check-python-tasks">
-        <hlm:antlint>
-            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
-                <include name="*.xml"/>
-                <include name="*.ant.xml"/>
-                <include name="build.xml"/>
-                <include name="*.antlib.xml"/>
-            </fileset>
-            <hlm:checkPythonTasks severity="warning" enabled="true" outputDir="${antlint.test.dir}/data/output"/>
-        </hlm:antlint>
-        <au:assertFileExists file="${antlint.test.dir}/data/output/python/target0_check-prop-in-pythontask.py"/>
-        <au:assertFileExists file="${antlint.test.dir}/data/output/python/target0_check-script-size.py"/>
-    </target>
-    
-    <target name="test-check-scriptdef-name-attributes">
-        <hlm:antlint>
-            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
-                <include name="sample.antlib.xml"/>
-            </fileset>
-            <hlm:checkScriptDefNameAttributes severity="warning" enabled="true" />
-        </hlm:antlint>
-        <au:assertLogContains text="WARNING: Scriptdef check-scriptdef-attributes does not have attribute target" level="info"/>
-    </target>
-    
-    
-    <target name="test-check-scriptdef-style">
-        <hlm:antlint>
-            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
-                <include name="sample.antlib.xml"/>
-            </fileset>
-            <hlm:checkScriptDefStyle severity="warning" enabled="true" />
-        </hlm:antlint>
-        <au:assertLogContains text="WARNING: Scriptdef check-scriptdef-style doesn't reference attributes directly, poor style" level="info"/>
-    </target>
-    
-    <target name="test-check-scriptdef">
-        <hlm:antlint>
-            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
-                <include name="sample.antlib.xml"/>
-            </fileset>
-            <hlm:checkScriptDef severity="warning" enabled="true" outputDir="${antlint.test.dir}/data/output"/>
-        </hlm:antlint>
-        <au:assertLogContains text="WARNING: Scriptdef check-scriptdef does not use attr2" level="info"/>
-        <au:assertLogContains text="WARNING: Scriptdef check-scriptdef-beanshell does not use attr2" level="info"/>
-    </target>
-    
-    <target name="test-check-duplicate-names">
-        <hlm:antlint>
-            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
-                <include name="*.xml"/>
-                <include name="*.ant.xml"/>
-                <include name="build.xml"/>
-                <include name="*.antlib.xml"/>
-            </fileset>
-            <hlm:checkDuplicateNames enabled="true" severity="warning"/>
-        </hlm:antlint>
-    </target>
-    
-    <target name="test-check-filename">
-        <hlm:antlint>
-            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
-                <include name="invalid.build.xml"/>
-            </fileset>
-            <hlm:checkFileName severity="warning" enabled="true" regexp="^build.xml$|ant.xml$|antlib.xml$" />
-        </hlm:antlint>
-        <au:assertLogContains text="WARNING: INVALID File Name:" level="info"/>
+        <au:assertLogContains text="WARNING: 23: Invalid project name: Sample" level="info"/>
+        <au:assertLogContains text="WARNING: 23: Project name not specified!" level="info"/>
     </target>
     
     <target name="test-antlint-failonerror-false">
@@ -273,10 +242,10 @@
             </fileset>
             <hlm:checkTabCharacter severity="error" enabled="true"/>
             <hlm:checkProjectName enabled="true" severity="error" regexp="([a-z0-9[\\d\\.\\_\\-]]*)"/>
-            <hlm:checkScriptDefNameAttributes severity="error" enabled="true" />
+            <hlm:checkScriptDefAttributes severity="error" />
         </hlm:antlint>
-        <au:assertLogContains text="ERROR: Scriptdef check-scriptdef-attributes does not have attribute target" level="info"/>
-        <au:assertLogContains text="ERROR: Project name not specified!" level="info"/>
+        <au:assertLogContains text="ERROR: 80: Scriptdef check-scriptdef-attributes does not have attribute target" level="info"/>
+        <au:assertLogContains text="ERROR: 23: Project name not specified!" level="info"/>
     </target> 
     
     <target name="test-antlint-failonerror-true">
@@ -290,11 +259,11 @@
                 </fileset>
                 <hlm:checkTabCharacter severity="error" enabled="true"/>
                 <hlm:checkProjectName enabled="true" severity="error" regexp="([a-z0-9[\\d\\.\\_\\-]]*)"/>
-                <hlm:checkScriptDefNameAttributes severity="error" enabled="true" />
+                <hlm:checkScriptDefAttributes severity="error" />
             </hlm:antlint>
         </au:expectfailure>
-        <au:assertLogContains text="ERROR: Scriptdef check-scriptdef-attributes does not have attribute target" level="info"/>
-        <au:assertLogContains text="ERROR: Project name not specified!" level="info"/>
+        <au:assertLogContains text="ERROR: 80: Scriptdef check-scriptdef-attributes does not have attribute target" level="info"/>
+        <au:assertLogContains text="ERROR: 23: Project name not specified!" level="info"/>
     </target>
     
     <target name="test-antlint-console-and-xml-reporting">
@@ -308,15 +277,15 @@
                 </fileset>
                 <hlm:checkTabCharacter severity="error" enabled="true"/>
                 <hlm:checkProjectName enabled="true" severity="error" regexp="([a-z0-9[\\d\\.\\_\\-]]*)"/>
-                <hlm:checkScriptDefNameAttributes severity="error" enabled="true" />
-                
+                <hlm:checkScriptDefAttributes severity="error" />
+
                 <!-- reporters -->
                 <hlm:antlintCheckstyleReporter file="${antlint.test.dir}/data/output/report.xml" />
                 <hlm:antlintConsoleReporter />
             </hlm:antlint>
         </au:expectfailure>
-        <au:assertLogContains text="ERROR: Scriptdef check-scriptdef-attributes does not have attribute target" level="info"/>
-        <au:assertLogContains text="ERROR: Project name not specified!" level="info"/>
+        <au:assertLogContains text="ERROR: 80: Scriptdef check-scriptdef-attributes does not have attribute target" level="info"/>
+        <au:assertLogContains text="ERROR: 23: Project name not specified!" level="info"/>
         <au:assertFileExists file="${antlint.test.dir}/data/output/report.xml" />
         <loadfile property="report.xml" srcfile="${antlint.test.dir}/data/output/report.xml" />
         <echo>${report.xml}</echo>
@@ -328,24 +297,114 @@
             </and>
         </au:assertTrue>
     </target>
-    
-    <target name="test-check-try-catch-block-with-empty-catch-block">
+
+    <target name="test-antcontrib-var-type-value-unset-set-case">
+        <au:expectfailure>
+            <hlm:antlint>
+                <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                    <include name="sample.ant.xml"/>
+                </fileset>
+                <hlm:checkVariableTask severity="error" />
+            </hlm:antlint>
+        </au:expectfailure>
+        <au:assertLogContains text="ERROR: 30: Variable 'var1' should not have 'value' attribute set when 'unset' is true." level="info"/>
+    </target>
+
+    <target name="test-invalid-property-type-values">
         <au:expectfailure>
             <hlm:antlint>
-                <fileset file="${antlint.test.dir}/data/sample.ant.xml"/>
-                <hlm:checkTryCatchBlock severity="error" />
+                <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                    <include name="sample.ant.xml"/>
+                </fileset>
+                <hlm:checkPropertyTypeAndValueMismatch severity="error" />
             </hlm:antlint>
         </au:expectfailure>
-        <au:assertLogContains text="trycatch> block found without " level="info"/>
+        <au:assertLogContains text="ERROR: 324: Property 'test.prop.int.2' has invalid integer value set as '123abc'." level="info"/>
+        <au:assertLogContains text="ERROR: 342: Property 'test.prop.bool.3' has invalid boolean value set as 't'. (Valid values: true|false)" level="info"/>
+        <au:assertLogContains text="ERROR: 348: Property 'test.prop.bool.4' has invalid boolean value set as 'f'. (Valid values: true|false)" level="info"/>
+        <au:assertLogContains text="ERROR: 354: Property 'test.prop.bool.5' has invalid boolean value set as 'yes'. (Valid values: true|false)" level="info"/>
+        <au:assertLogContains text="ERROR: 360: Property 'test.prop.bool.6' has invalid boolean value set as 'no'. (Valid values: true|false)" level="info"/>
+        <au:assertLogContains text="ERROR: 366: Property 'test.prop.bool.7' has invalid boolean value set as 'poo'. (Valid values: true|false)" level="info"/>
+        <au:assertLogContains text="ERROR: 393: Property 'test.prop.number.1' has invalid type as 'number'. (Valid types: boolean|float|integer|string)" level="info"/>
+        <au:assertLogContains text="ERROR: 399: Property 'test.prop.flag' has invalid type as 'flag'. (Valid types: boolean|float|integer|string)" level="info"/>
+        <au:assertLogContains text="ERROR: 411: Property 'test.prop.float.2' has invalid float value set as '1.5a'." level="info"/>
+        <au:assertLogContains text="ERROR: 417: Property 'test.prop.int.3' has invalid integer value set as '1.8'." level="info"/>
+    </target>
+        
+
+    <target name="test-check-scriptdef-name">
+        <hlm:antlint>
+            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                <include name="sample.antlib.xml"/>
+            </fileset>
+            <hlm:checkScriptDefName severity="warning" regexp="([a-z0-9][a-zA-Z0-9]*)"/>
+        </hlm:antlint>
+        <au:assertLogContains text="WARNING: 34: Invalid scriptdef name: check-prop-in-scriptdef" level="info"/>
+        <au:assertLogContains text="WARNING: 65: Invalid scriptdef name: check-scriptdef-style" level="info"/>
     </target>
 
-    <target name="test-check-try-catch-block-with-multiple-catch-block">
+    <target name="test-check-scriptdef-attributes">
+        <hlm:antlint>
+            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                <include name="sample.antlib.xml"/>
+            </fileset>
+            <hlm:checkScriptDefAttributes severity="warning"/>
+        </hlm:antlint>
+        <au:assertLogContains text="WARNING: 40: Scriptdef check-scriptdef does not use attr2" level="info"/>
+        <au:assertLogContains text="WARNING: 46: Scriptdef checkScriptdefBeanshell does not use attr2" level="info"/>
+        <au:assertLogContains text="WARNING: 80: Scriptdef check-scriptdef-attributes does not have attribute target" level="info"/>
+        <au:assertLogContains text="WARNING: 84: Scriptdef checkScriptdefAttributes does not have attribute attr0" level="info"/>
+    </target>
+
+    <target name="test-beanshell-script-dump-task">
+        <hlm:antlint>
+            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                <include name="sample.antlib.xml"/>
+            </fileset>
+            <hlm:checkstyleExecutor outputDir="${antlint.test.dir}/data/output/beanshell" config="${antlint.test.dir}/data/config/java_checkstyle_config.xml">
+                <formatter type="plain"/>
+            </hlm:checkstyleExecutor>
+        </hlm:antlint>
+        <au:assertLogContains text="BeanshellcheckScriptdefAttributes.java:1: warning: Using the '.*' form of import should be avoided - java.io.*." level="info"/>
+        <au:assertLogContains text="BeanshellcheckScriptdefBeanshell.java:1: warning: Using the '.*' form of import should be avoided - java.io.*." level="info"/>
+    </target>
+
+    <target name="test-check-jython-script">
+        <hlm:antlint>
+            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                <include name="sample.ant.xml"/>
+                <include name="sample.antlib.xml"/>
+            </fileset>
+            <hlm:checkJythonScript severity="warning"/>
+        </hlm:antlint>
+        <au:assertLogContains text="found in target_check-jython-script" level="info"/>
+        <au:assertLogContains text="found in check-script" level="info"/>
+    </target>
+    
+    <target name="test-python-script-dump-task">
+        <pathconvert pathsep="${path.separator}" property="python.tools.path">
+            <fileset dir="./../../../../../nokia_builder" includes="tools/pylint/**/*.egg" />
+            <dirset dir="./../../../../../nokia_builder" includes="tools/pylint/**/*.egg" />
+        </pathconvert>
         <au:expectfailure>
             <hlm:antlint>
-                <fileset file="${antlint.test.dir}/data/sample.ant.xml"/>
-                <hlm:checkTryCatchBlock severity="error" />
+                <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+                    <include name="*.xml"/>
+                    <include name="*.ant.xml"/>
+                    <include name="build.xml"/>
+                    <include name="*.antlib.xml"/>
+                </fileset>
+                <hlm:pylintExecutor outputDir="${antlint.test.dir}/data/output/python" >
+                    <env key="PYTHONPATH" value="${python.tools.path}"/>
+                    <arg file="${antlint.test.dir}/data/config/pylint-script.py"/>
+                    <arg value="--output-format=parseable"/>
+                    <arg line="--rcfile=${antlint.test.dir}/data/config/pylintrc.txt"/>
+                </hlm:pylintExecutor>
             </hlm:antlint>
         </au:expectfailure>
-        <au:assertLogContains text="trycatch> block found with 2 " level="info"/>
+        <au:assertFileExists file="${antlint.test.dir}/data/output/python/python/target0_check-prop-in-pythontask.py"/>
+        <au:assertFileExists file="${antlint.test.dir}/data/output/python/python/target0_check-script-size.py"/>
+        <au:assertLogContains text="target0_check-prop-in-pythontask.py:3: [E0602, abc] Undefined variable 'abcd'" level="info"/>
     </target>
+
 </project>
--- a/buildframework/helium/sf/java/antlint/tests/build.bat	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/tests/build.bat	Wed Oct 13 16:31:27 2010 +0800
@@ -21,7 +21,7 @@
 set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02
 ) ELSE  set TESTED_JAVA=%JAVA_6_HOME%
 if exist %TESTED_JAVA% (set JAVA_HOME=%TESTED_JAVA%)
-call ant -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor %*
+call ant %*
 if "%ERRORLEVEL%" neq "0" (goto error)
 endlocal
 goto :eof
--- a/buildframework/helium/sf/java/antlint/tests/data/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/tests/data/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -25,5 +25,12 @@
 	<target name="test">
 		<echo> Test target </echo>
 	</target>
-		
-</project>
+
+  <target name="test2">
+    <echo>Test target test2</echo>
+    <script language="jython">
+if ${build.drive} is None:
+	print "Not found"        
+    </script>    
+  </target>		
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/tests/data/config/java_checkstyle_config.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : java_checkstyle_config.xml 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+
+<!--
+
+  Checkstyle configuration using Eclipse Helium profile
+
+-->
+
+<module name="Checker">
+
+
+    <!-- Allow exception in the code, but comment is needed -->
+    <module name="SuppressionCommentFilter" />
+    <module name="SuppressionCommentFilter">
+        <property name="offCommentFormat" value="CheckStyle\:([\w\|]+) OFF"/>
+        <property name="onCommentFormat" value="CheckStyle\:([\w\|]+) ON"/>
+        <property name="checkFormat" value="$1"/>
+    </module>
+    
+    <!-- Checks that a package.html file exists for each package.     -->
+    <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
+    <!-- module name="PackageHtml"/-->
+
+    <!-- Checks whether files end with a new line.                        -->
+    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+    <!--<module name="NewlineAtEndOfFile"/>-->
+
+    <!-- Checks that property files contain the same keys.         -->
+    <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
+    <module name="Translation"/>
+    <module name="FileLength"/>
+    <module name="FileTabCharacter"/>
+
+    <module name="TreeWalker">
+        <module name="FileContentsHolder"/>
+        
+        <!-- Checks for Javadoc comments.                     -->
+        <!-- See http://checkstyle.sf.net/config_javadoc.html -->
+        <!--<module name="JavadocMethod"/>
+        <module name="JavadocVariable"/>
+        <module name="JavadocStyle"/>-->
+        
+        <module name="JavadocType">
+           <property name="scope" value="public"/>
+        </module>
+
+        <!-- Checks for Naming Conventions.                  -->
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <module name="ConstantName"/>
+        <module name="LocalFinalVariableName"/>
+        <module name="LocalVariableName">
+            <property name="format" value="^[ij]$|^[a-z][a-zA-Z0-9]+$"/>
+            <property name="tokens" value="VARIABLE_DEF"/>
+        </module>
+        <module name="MemberName"/>
+        <module name="MethodName"/>
+        <module name="PackageName"/>
+        <module name="ParameterName"/>
+        <module name="StaticVariableName"/>
+        <module name="TypeName"/>
+
+
+        <!-- Checks for Headers                                -->
+        <!-- See http://checkstyle.sf.net/config_header.html   -->
+        <!-- <module name="Header">                            -->
+            <!-- The follow property value demonstrates the ability     -->
+            <!-- to have access to ANT properties. In this case it uses -->
+            <!-- the ${basedir} property to allow Checkstyle to be run  -->
+            <!-- from any directory within a project. See property      -->
+            <!-- expansion,                                             -->
+            <!-- http://checkstyle.sf.net/config.html#properties        -->
+            <!-- <property                                              -->
+            <!--     name="headerFile"                                  -->
+            <!--     value="${basedir}/java.header"/>                   -->
+        <!-- </module> -->
+
+        <!-- Following interprets the header file as regular expressions. -->
+        <!-- <module name="RegexpHeader"/>                                -->
+
+
+        <!-- Checks for imports                              -->
+        <!-- See http://checkstyle.sf.net/config_import.html -->
+        <module name="AvoidStarImport">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
+        <module name="RedundantImport"/>
+        <module name="UnusedImports"/>
+
+
+        <!-- Checks for Size Violations.                    -->
+        <!-- See http://checkstyle.sf.net/config_sizes.html -->
+        <module name="LineLength">
+            <property name="max" value="180"/>
+            <property name="ignorePattern" value="^ *\* *[^ ]+$"/>
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="MethodLength"/>
+        <module name="ParameterNumber"/>
+
+
+        <!-- Checks for whitespace                               -->
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <!--<module name="EmptyForIteratorPad"/>
+        <module name="MethodParamPad"/>
+        <module name="NoWhitespaceAfter"/>
+        <module name="NoWhitespaceBefore"/>
+        <module name="OperatorWrap"/>
+        <module name="TypecastParenPad"/>
+        <module name="WhitespaceAfter"/>
+        <module name="ParenPad">
+            <property name="severity" value="warning"/>
+        </module>
+        -->
+        <module name="WhitespaceAround"/>
+        <module name="GenericWhitespace"/>
+
+        <!-- Modifier Checks                                    -->
+        <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+        <module name="ModifierOrder"/>
+        <module name="RedundantModifier"/>
+
+
+        <!-- Checks for blocks. You know, those {}'s         -->
+        <!-- See http://checkstyle.sf.net/config_blocks.html -->
+        <module name="AvoidNestedBlocks"/>
+        <module name="EmptyBlock"/>
+        <!--<module name="LeftCurly">--> 
+        <module name="NeedBraces" />
+        <!--<module name="RightCurly">-->
+
+
+        <!-- Checks for common coding problems               -->
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <module name="DoubleCheckedLocking"/>    <!-- MY FAVOURITE -->
+        <module name="EmptyStatement"/>
+        <module name="EqualsHashCode"/>
+        <!--<module name="HiddenField"/>-->
+        <module name="IllegalInstantiation"/>
+        <module name="InnerAssignment"/>
+        <!--<module name="MagicNumber"/>-->
+        <module name="MissingSwitchDefault"/>
+        <module name="RedundantThrows"/>
+        <module name="SimplifyBooleanExpression"/>
+        <module name="SimplifyBooleanReturn"/>
+
+        <!-- Checks for class design                         -->
+        <!-- See http://checkstyle.sf.net/config_design.html -->
+        <!--<module name="DesignForExtension"/>-->
+        <module name="FinalClass"/>
+        <module name="HideUtilityClassConstructor"/>
+        <module name="InterfaceIsType"/>
+        <module name="VisibilityModifier"/>
+
+
+        <!-- Miscellaneous other checks.                   -->
+        <!-- See http://checkstyle.sf.net/config_misc.html -->
+        <module name="ArrayTypeStyle"/>
+        <!--<module name="FinalParameters"/>
+        <module name="GenericIllegalRegexp">
+            <property name="format" value="\s+$"/>
+            <property name="message" value="Line has trailing spaces."/>
+        </module>-->
+        <module name="TodoComment"/>
+        <module name="UpperEll"/>
+        
+        <module name="ExplicitInitialization"/>
+        <module name="UnnecessaryParentheses"/>
+        <module name="DeclarationOrder"/>
+        
+        <module name="StringLiteralEquality"/>
+        
+        <module name="CyclomaticComplexity">
+            <property name="max" value="26"/>
+        </module>
+        
+        <module name="SuperFinalize"/>
+        
+        <module name="IllegalCatch"/>
+        
+        <module name="MethodParamPad"/>
+        <module name="Indentation"/>
+    </module>
+
+</module>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/tests/data/config/pylint-script.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,22 @@
+#============================================================================ 
+#Name        : pylint-script.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+#!/usr/bin/env python
+import sys
+from pylint import lint
+lint.Run(sys.argv[1:])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/tests/data/config/pylintrc.txt	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,303 @@
+
+[MASTER]
+
+# Add <file or directory> to the black list. It should be a base name, not a
+# path. You may set this option multiple times.
+ignore=CVS
+
+# Pickle collected data for later comparisons.
+persistent=yes
+
+# Set the cache size for astng objects.
+cache-size=500
+
+# List of plugins (as comma separated values of python modules names) to load,
+# usually to register additional checkers.
+load-plugins=
+
+
+[MESSAGES CONTROL]
+
+# Enable only checker(s) with the given id(s). This option conflicts with the
+# disable-checker option
+#enable-checker=
+
+# Enable all checker(s) except those with the given id(s). This option
+# conflicts with the enable-checker option
+#disable-checker=
+
+# Enable all messages in the listed categories.
+#enable-msg-cat=
+
+# Disable all messages in the listed categories.
+#disable-msg-cat=
+
+# Enable the message(s) with the given id(s).
+#enable-msg=
+
+# Disable the message(s) with the given id(s).
+# R0912: Too many branches
+# F0401: Unable to import 'x'
+# C0111: Missing docstring
+# R0201: Method could be a function
+# R0915: Too many statements
+# R0902: Too many instance attributes
+# R0913: Too many arguments
+# R0904: Too many public methods
+# C0103: Invalid name
+# W0603: Using the global statement
+# W0142: Used * or ** magic
+# W0612: Unused variable
+# R0922: Abstract class is only referenced 1 times
+# W0232: Class has no __init__ method
+# I0011: Locally disabling *
+disable=C0301,W0401,W0611,W0614,R0801,W0402,R0914,C0302,R0903,R0912,F0401,C0111,R0201,R0915,R0902,R0913,R0904,C0103,W0603,W0142,W0612,R0922,W0232,I0011
+
+
+[REPORTS]
+
+# set the output format. Available formats are text, parseable, colorized, msvs
+# (visual studio) and html
+output-format=text
+
+# Include message's id in output
+include-ids=yes
+
+# Put messages in a separate file for each module / package specified on the
+# command line instead of printing them on stdout. Reports (if any) will be
+# written in a file name "pylint_global.[txt|html]".
+files-output=no
+
+# Tells wether to display a full report or only the messages
+reports=yes
+
+# Python expression which should return a note less than 10 (10 is the highest
+# note).You have access to the variables errors warning, statement which
+# respectivly contain the number of errors / warnings messages and the total
+# number of statements analyzed. This is used by the global evaluation report
+# (R0004).
+evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
+
+# Add a comment according to your evaluation note. This is used by the global
+# evaluation report (R0004).
+comment=no
+
+# Enable the report(s) with the given id(s).
+#enable-report=
+
+# Disable the report(s) with the given id(s).
+#disable-report=
+
+
+# checks for :
+# * doc strings
+# * modules / classes / functions / methods / arguments / variables name
+# * number of arguments, local variables, branchs, returns and statements in
+# functions, methods
+# * required module attributes
+# * dangerous default values as arguments
+# * redefinition of function / method / class
+# * uses of the global statement
+# 
+[BASIC]
+
+# Required attributes for module, separated by a comma
+required-attributes=
+
+# Regular expression which should only match functions or classes name which do
+# not require a docstring
+no-docstring-rgx=__.*__
+
+# Regular expression which should only match correct module names
+module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
+
+# Regular expression which should only match correct module level names
+const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__)|(_[a-zA-Z0-9_]{2,40}))$
+
+# Regular expression which should only match correct class names
+class-rgx=[A-Z_][a-zA-Z0-9]+$
+
+# Regular expression which should only match correct function names
+function-rgx=[a-z_][a-zA-Z0-9_]{2,40}$
+
+# Regular expression which should only match correct method names
+method-rgx=[a-z_][a-zA-Z0-9_]{2,40}$
+
+# Regular expression which should only match correct instance attribute names
+attr-rgx=[a-z_][a-zA-Z0-9_]{2,40}$
+
+# Regular expression which should only match correct argument names
+argument-rgx=[a-z_][a-zA-Z0-9_]{2,30}$
+
+# Regular expression which should only match correct variable names
+variable-rgx=[a-z_][a-zA-Z0-9_]{2,30}$
+
+# Regular expression which should only match correct list comprehension /
+# generator expression variable names
+inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
+
+# Good variable names which should always be accepted, separated by a comma
+good-names=i,j,k,ex,Run,_
+
+# Bad variable names which should always be refused, separated by a comma
+bad-names=foo,bar,baz,toto,tutu,tata
+
+# List of builtins function names that should not be used, separated by a comma
+bad-functions=map,filter,apply,input
+
+
+# try to find bugs in the code using type inference
+# 
+[TYPECHECK]
+
+# Tells wether missing members accessed in mixin class should be ignored. A
+# mixin class is detected if its name ends with "mixin" (case insensitive).
+ignore-mixin-members=yes
+
+# When zope mode is activated, consider the acquired-members option to ignore
+# access to some undefined attributes.
+zope=no
+
+# List of members which are usually get through zope's acquisition mecanism and
+# so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
+acquired-members=REQUEST,acl_users,aq_parent
+
+
+# checks for
+# * unused variables / imports
+# * undefined variables
+# * redefinition of variable from builtins or from an outer scope
+# * use of variable before assigment
+# 
+[VARIABLES]
+
+# Tells wether we should check for unused import in __init__ files.
+init-import=no
+
+# A regular expression matching names used for dummy variables (i.e. not used).
+dummy-variables-rgx=_|dummy
+
+# List of additional names supposed to be defined in builtins. Remember that
+# you should avoid to define new builtins when possible.
+additional-builtins=
+
+
+# checks for :
+# * methods without self as first argument
+# * overridden methods signature
+# * access only to existant members via self
+# * attributes not defined in the __init__ method
+# * supported interfaces implementation
+# * unreachable code
+# 
+[CLASSES]
+
+# List of interface methods to ignore, separated by a comma. This is used for
+# instance to not check methods defines in Zope's Interface base class.
+ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
+
+# List of method names used to declare (i.e. assign) instance attributes.
+defining-attr-methods=__init__,__new__,setUp
+
+
+# checks for sign of poor/misdesign:
+# * number of methods, attributes, local variables...
+# * size, complexity of functions, methods
+# 
+[DESIGN]
+
+# Maximum number of arguments for function / method
+max-args=5
+
+# Maximum number of locals for function / method body
+max-locals=15
+
+# Maximum number of return / yield for function / method body
+max-returns=6
+
+# Maximum number of branch for function / method body
+max-branchs=12
+
+# Maximum number of statements in function / method body
+max-statements=50
+
+# Maximum number of parents for a class (see R0901).
+max-parents=7
+
+# Maximum number of attributes for a class (see R0902).
+max-attributes=7
+
+# Minimum number of public methods for a class (see R0903).
+min-public-methods=2
+
+# Maximum number of public methods for a class (see R0904).
+max-public-methods=20
+
+
+# checks for
+# * external modules dependencies
+# * relative / wildcard imports
+# * cyclic imports
+# * uses of deprecated modules
+# 
+[IMPORTS]
+
+# Deprecated modules which should not be used, separated by a comma
+deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
+
+# Create a graph of every (i.e. internal and external) dependencies in the
+# given file (report R0402 must not be disabled)
+import-graph=
+
+# Create a graph of external dependencies in the given file (report R0402 must
+# not be disabled)
+ext-import-graph=
+
+# Create a graph of internal dependencies in the given file (report R0402 must
+# not be disabled)
+int-import-graph=
+
+
+# checks for :
+# * unauthorized constructions
+# * strict indentation
+# * line length
+# * use of <> instead of !=
+# 
+[FORMAT]
+
+# Maximum number of characters on a single line.
+max-line-length=80
+
+# Maximum number of lines in a module
+max-module-lines=1000
+
+# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
+# tab).
+indent-string='    '
+
+
+# checks for:
+# * warning notes in the code like FIXME, XXX
+# * PEP 263: source code with non ascii character but no encoding declaration
+# 
+[MISCELLANEOUS]
+
+# List of note tags to take in consideration, separated by a comma.
+notes=FIXME,XXX,TODO
+
+
+# checks for similarities and duplicated code. This computation may be
+# memory / CPU intensive, so you should disable it if you experiments some
+# problems.
+# 
+[SIMILARITIES]
+
+# Minimum lines number of a similarity.
+min-similarity-lines=4
+
+# Ignore comments when computing similarities.
+ignore-comments=yes
+
+# Ignore docstrings when computing similarities.
+ignore-docstrings=yes
--- a/buildframework/helium/sf/java/antlint/tests/data/sample.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/tests/data/sample.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -27,7 +27,10 @@
     
     <taskdef resource="net/sf/antcontrib/antlib.xml"/>
     
-        
+    <var name="var1" value="bar" unset="true"/>
+    <var name="var2" value="bar"  />
+    <var name="var3" unset="true" /> 
+    
     <macrodef name="pow" uri="http://www.nokia.com/helium">
         <sequential>
             <echo>pow</echo>
@@ -72,51 +75,51 @@
     
     <target name="check-script-size">
         <hlm:python>
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size
-print check-script-size         
-print check-script-size
-print check-script-size
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'
+print 'check-script-size'         
+print 'check-script-size'
+print 'check-script-size'
         </hlm:python>
     </target>
     
@@ -187,6 +190,7 @@
     <target name="check-prop-in-pythontask">    
         <hlm:python>
 from path import path
+print abcd
 print "Writing version file...."
 vfile = path(r'${build.drive}'+"/").joinpath('s60_version.txt')
 f = open(str(vfile), 'w')
@@ -294,5 +298,122 @@
             </catch>
         </trycatch>
     </target> 
+
+    <!-- Test property to check for invalid string property types.
+    @type string
+    @scope public
+    -->
+    <property name="test.prop.str.1" value="str.prop"/>
+    
+    <!-- Test property to check for invalid string property types.
+    @type string
+    @scope private
+    -->
+    <property name="test.prop.str.2" value="12345"/>
+
+    <!-- Test property to check for invalid integer property types.
+    @type integer
+    @scope public
+    -->
+    <property name="test.prop.int.1" value="123"/>
+
+    <!-- Test property to check for invalid integer property types.
+    @type integer
+    @scope public
+    -->
+    <property name="test.prop.int.2" value="123abc"/>
      
+    <!-- Test property to check for invalid boolean property types.
+    @type boolean
+    @scope public
+    -->
+    <property name="test.prop.bool.1" value="true"/>
+    
+    <!-- Test property to check for invalid boolean property types.
+    @type boolean
+    @scope public
+    -->
+    <property name="test.prop.bool.2" value="false"/>
+    
+    <!-- Test property to check for invalid boolean property types.
+    @type boolean
+    @scope public
+    -->
+    <property name="test.prop.bool.3" value="t"/>
+    
+    <!-- Test property to check for invalid boolean property types.
+    @type boolean
+    @scope public
+    -->
+    <property name="test.prop.bool.4" value="f"/>
+    
+    <!-- Test property to check for invalid boolean property types.
+    @type boolean
+    @scope public
+    -->
+    <property name="test.prop.bool.5" value="yes"/>
+
+    <!-- Test property to check for invalid boolean property types.
+    @type boolean
+    @scope public
+    -->
+    <property name="test.prop.bool.6" value="no"/>
+
+    <!-- Test property to check for invalid boolean property types.
+    @type boolean
+    @scope public
+    -->
+    <property name="test.prop.bool.7" value="poo"/>
+
+   <!--* @property test.comment.str.prop
+   Test comment property to check for invalid string values.   
+   @type string
+   @scope public
+   @since 10.0
+   -->
+
+   <!--* @property test.comment.int.prop
+   Test comment property to check for invalid integer values.   
+   @type integer
+   @scope public
+   @since 10.0
+   -->
+
+   <!--* @property test.comment.bool.prop
+   Test comment property to check for invalid string values.   
+   @type boolean
+   @scope public
+   @since 10.0
+   -->
+
+   <!-- Test property to check for invalid integer property types.
+   @type number
+   @scope public
+   -->
+   <property name="test.prop.number.1" value="1234"/>
+     
+   <!-- Test property to check for invalid boolean property types.
+   @type flag
+   @scope public
+   -->
+   <property name="test.prop.flag" value="true"/>
+
+   <!-- Test property to check for valid float property types.
+   @type float
+   @scope public
+   -->
+   <property name="test.prop.float.1" value="1.5"/>
+
+   <!-- Test property to check for invalid float property types.
+   @type float
+   @scope public
+   -->
+   <property name="test.prop.float.2" value="1.5a"/>
+
+   <!-- Test property to check for invalid integer property types.
+   @type integer
+   @scope public
+   -->
+   <property name="test.prop.int.3" value="1.8"/>
+
 </project>
\ No newline at end of file
--- a/buildframework/helium/sf/java/antlint/tests/data/sample.antlib.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antlint/tests/data/sample.antlib.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -31,8 +31,6 @@
         </sequential>
     </macrodef>
     
-    
-    
     <scriptdef  name="check-prop-in-scriptdef" language="jython">
 result = None
 if project.getProperty("test.scriptdef.property")is not None:
@@ -45,10 +43,23 @@
 target = str(attributes.get('attr0'))    
     </scriptdef>
     
-    <scriptdef name="check-scriptdef-beanshell" language="beanshell">
+    <scriptdef name="checkScriptdefBeanshell" language="beanshell">
         <attribute name="attr0"/>
         <attribute name="attr2"/>
-target = str(attributes.get('attr0'))    
+        <element name="path" type="path"/>
+        <![CDATA[
+import java.io.*;
+FileWriter out = new FileWriter(attributes.get("attr0"));
+
+paths = elements.get("path");
+for (int i = 0 ; i < paths.size() ; i++) {
+    String[] files = paths.get(i).list();
+    for (int j = 0; j < files.length ; j++) {
+        out.write(files[j] + "\n");
+    }
+}
+out.close();
+    ]]>   
     </scriptdef>    
     
     <scriptdef name="check-scriptdef-style" language="jython" uri="http://www.nokia.com/helium">
@@ -70,7 +81,28 @@
 target = str(attributes.get('target'))    
     </scriptdef>
     
-    <scriptdef name="check-scriptdef-attributes" language="beanshell">
-target = str(attributes.get('target'))    
+    <scriptdef name="checkScriptdefAttributes" language="beanshell">
+        <element name="path" type="path"/>
+        <![CDATA[
+import java.io.*;
+FileWriter out = new FileWriter(attributes.get("attr0"));
+
+paths = elements.get("path");
+for (int i = 0 ; i < paths.size() ; i++) {
+    String[] files = paths.get(i).list();
+    for (int j = 0; j < files.length ; j++) {
+        out.write(files[j] + "\n");
+    }
+}
+out.close();
+    ]]>   
     </scriptdef>
+    
+    <macrodef name="antlint" uri="http://www.nokia.com/helium">
+        <sequential>
+            <echo>antlintMacro</echo>
+            <runtarget target="hello"/>
+        </sequential>
+    </macrodef>
+
 </antlib>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/tests/hlm_debug.log	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,1 @@
+11:02:12,823  DEBUG - Calling final target : null  
--- a/buildframework/helium/sf/java/antunit/src/com/nokia/helium/antunit/ant/types/CustomListener.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/antunit/src/com/nokia/helium/antunit/ant/types/CustomListener.java	Wed Oct 13 16:31:27 2010 +0800
@@ -32,14 +32,14 @@
  * The customListener type allows you to defines additional custom
  * listener to be run while running test. Each test are considered
  * as single build.
- * 
+ * <pre>
  * &lt;au:antunit&lt;
  *     .......
  *     &lt;hlm:customListener&lt;
  *         &lt;hlm:listener classname="org.apache.tools.ant.listener.XmlLogger" /&lt;
  *     &lt;/hlm:customListener&lt;
  * &lt;/au:antunit&lt;
- * 
+ * </pre>
  * @ant.type name="customListener" category="antunit"
  */
 public class CustomListener extends DataType implements AntUnitListener {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : build.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="helium-blocks">
+    <description>Helium Antlib Blocks build file.</description>
+    
+    <dirname property="blocks.root.dir" file="${ant.file.helium-blocks}" />
+        
+    <import file="${builder.dir}/java/macros.ant.xml"/>
+    
+    <property name="name" value="blocks"/>
+
+</project>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/demo/build.bat	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,27 @@
+@echo off
+
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of the License "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description: 
+rem
+
+setlocal
+if not defined JAVA_6_HOME (
+set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02
+) ELSE  set TESTED_JAVA=%JAVA_6_HOME%
+if exist %TESTED_JAVA% (set JAVA_HOME=%TESTED_JAVA%)
+set OLDANT_ARGS=-lib %CD%\..\lib -lib %CD%\..\..\..\sf\lib -lib %CD%\..\..\bin\helium-blocks.jar -lib %CD%\..\..\..\sf\antlibs
+ant  %*
+endlocal
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/demo/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : build.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="helium-antlib-blocks-demo" xmlns:hlm="http://www.nokia.com/helium">
+    <description>Helium Antlib blocks demo.</description>
+    
+    <taskdef resource="com/nokia/helium/blocks/ant/antlib.xml" uri="http://www.nokia.com/helium" />
+    <import file="../../../companyproperties.ant.xml" />
+    
+    <target name="demo">
+        <mkdir dir="./workspace-demo" />
+        <hlm:blocksAddWorkspace name="unittest-addworkspace" dir="./workspace-demo" wsidproperty="wsid" verbose="true" />
+        <echo>wsid: ${wsid}</echo>
+        <condition property="name.exists" else="false">
+            <hlm:blocksWorkspaceExists name="unittest-addworkspace" />
+        </condition>
+        <echo>unittest-addworkspace exists: ${name.exists}</echo>
+        <condition property="dir.exists" else="false">
+            <hlm:blocksWorkspaceExists dir="workspace-demo" />
+        </condition>
+        <echo>workspace-demo dir exists: ${dir.exists}</echo>
+        <hlm:blocksRemoveWorkspace wsid="${wsid}" verbose="true" />
+    </target>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/ivy.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+============================================================================ 
+Name        : ivy.xml 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================  
+-->
+<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
+    <info
+        organisation="com.nokia.helium"
+        module="helium-blocks"
+        status="integration">
+  </info>
+  <dependencies>
+    <dependency name="helium-core" rev="latest.integration" conf="default" />
+  </dependencies>
+</ivy-module>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/AddWorkspaceStreamConsumer.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks;
+
+import org.codehaus.plexus.util.cli.StreamConsumer;
+
+/**
+ * Implements a parser of add workspace calls. 
+ *
+ */
+public class AddWorkspaceStreamConsumer implements StreamConsumer {
+
+    public static final String MARKER = "Workspace id: ";
+    private int wsid;
+    
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void consumeLine(String line) {
+        // Workspace id: 2
+        if (line.startsWith(MARKER)) {
+            wsid = Integer.valueOf(line.substring(MARKER.length()));
+        }
+    }
+    
+    /**
+     * Get the discovered workspace ID.
+     * @return the workspace ID. Zero value means an invalid ID.
+     */
+    public int getWsid() {
+        return wsid;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/Blocks.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,257 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks;
+
+import java.io.File;
+import java.util.List;
+
+import com.nokia.helium.core.plexus.CommandBase;
+
+/**
+ * This class is the base abstraction layer for invoking
+ * Blocks commands.
+ *
+ */
+public class Blocks extends CommandBase<BlocksException> {
+    public static final String SEARCH_ALL_BUNDLES_EXPRESSION = ".";
+    private String executable = "blocks";
+    
+    /**
+     * Default constructor.
+     */
+    public Blocks() {
+    }
+
+    /**
+     * New blocks instance with proper blocks script location. 
+     * @param executable
+     */
+    public Blocks(String executable) {
+        this.executable = executable;
+    }
+      
+    /**
+     * Add a new Blocks workspace.
+     * @param location the location of the workspace
+     * @param name the name of the workspace 
+     * @return a Workspace object
+     * @throws BlocksException
+     */
+    public Workspace addWorkspace(File location, String name) throws BlocksException {
+        String[] args = new String[3];
+        args[0] = "workspace-add";
+        args[1] = location.getAbsolutePath();
+        args[2] = "--name=" + name;
+        AddWorkspaceStreamConsumer consumer = new AddWorkspaceStreamConsumer();
+        execute(args, consumer);
+        
+        Workspace workspace = new Workspace();
+        workspace.setWsid(consumer.getWsid());
+        workspace.setLocation(location);
+        workspace.setName(name);
+        return workspace;
+    }
+
+    /**
+     * Remove a workspace.
+     * @param wsid the id of the workspace to remove.
+     * @throws BlocksException
+     */
+    public void removeWorkspace(int wsid) throws BlocksException {
+        String[] args = new String[3];
+        args[0] = "--force";
+        args[1] = "workspace-remove";
+        args[2] = "" + wsid;
+        execute(args);
+    }
+
+    /**
+     * List all existing workspaces.
+     * @return an array of Workspace objects.
+     * @throws BlocksException
+     */
+    public Workspace[] listWorkspaces() throws BlocksException {
+        String[] args = new String[1];
+        args[0] = "workspace-list";
+        WorkspaceListStreamConsumer consumer = new WorkspaceListStreamConsumer();
+        execute(args, consumer);
+        return consumer.getWorkspaces();
+    }
+
+    /**
+     * Search for a bundles matching the expression.
+     * @param expression the expression to match
+     * @return a list of string representing the list of bundles.
+     * @throws BlocksException in case of execution errors.
+     */
+    public List<String> search(int wsid, String expression) throws BlocksException {
+        String[] args = new String[3];
+        args[0] = "--wsid=" + wsid;
+        args[1] = "search";
+        args[2] = expression;
+        SearchStreamConsumer consumer = new SearchStreamConsumer();
+        execute(args, consumer);
+        return consumer.getSearchResults();        
+    }
+
+    /**
+     * Installing a bundles defines by a name.
+     * @param bundleName the name of the bundle to install
+     * @throws BlocksException
+     */
+    public void installBundle(int wsid, String bundleName) throws BlocksException {
+        String[] args = new String[4];
+        args[0] = "--wsid=" + wsid;
+        args[1] = "--force";
+        args[2] = "bundle-install";
+        args[3] = bundleName;
+        execute(args);
+    }
+    
+    /**
+     * Installing a bundles defines by a group name.
+     * @param groupName the group name to install
+     * @throws BlocksException
+     */
+    public void installGroup(int wsid, String groupName) throws BlocksException {
+        String[] args = new String[4];
+        args[0] = "--wsid=" + wsid;
+        args[1] = "--force";
+        args[2] = "group-install";
+        args[3] = groupName;
+        execute(args);
+    }
+    
+    /**
+     * Get the list of groups available.
+     * @return
+     * @throws BlocksException
+     */
+    public List<Group> listGroup(int wsid) throws BlocksException {
+        String[] args = new String[2];
+        args[0] = "--wsid=" + wsid;
+        args[1] = "group-list";
+        GroupListStreamConsumer consumer = new GroupListStreamConsumer();
+        execute(args, consumer);
+        return consumer.getGroups();        
+    }
+    
+    /**
+     * Add a repository to a workspace, using a generated name.
+     * @param wsid
+     * @param url
+     * @throws BlocksException
+     */
+    public void addRepository(int wsid, String url) throws BlocksException {
+        String[] args = new String[4];
+        args[0] = "--wsid=" + wsid;
+        args[1] = "--force";
+        args[2] = "repo-add";
+        args[3] = url;
+        execute(args);
+    }
+
+    /**
+     * Add a repository to a workspace, using a given name.
+     * @param wsid the workspace id
+     * @param name the repository name
+     * @param url the repository location.
+     * @throws BlocksException
+     */
+    public void addRepository(int wsid, String name, String url) throws BlocksException {
+        String[] args = new String[5];
+        args[0] = "--wsid=" + wsid;
+        args[1] = "--force";
+        args[2] = "repo-add";
+        args[3] = "--name=" + name;
+        args[4] = url;
+        execute(args);
+    }
+
+    /**
+     * Remove a repository base on its id.
+     * @param wsid the workspace id
+     * @param id the repository id to remove
+     * @throws BlocksException
+     */
+    public void removeRepository(int wsid, int id) throws BlocksException {
+        String[] args = new String[4];
+        args[0] = "--wsid=" + wsid;
+        args[1] = "--force";
+        args[2] = "repo-remove";
+        args[3] = "" + id;
+        execute(args);
+    }
+
+    /**
+     * Remove a repository base on its name.
+     * @param wsid the workspace id
+     * @param name the repository name to remove
+     * @throws BlocksException
+     */
+    public void removeRepository(int wsid, String name) throws BlocksException {
+        String[] args = new String[3];
+        args[0] = "--wsid=" + wsid;
+        args[1] = "repo-remove";
+        args[2] = name;
+        execute(args);
+    }
+
+    /**
+     * Get the repository list for current workspace.
+     * @param wsid the current workspace id.
+     * @return the repository list
+     * @throws BlocksException
+     */
+    public List<Repository> listRepository(int wsid) throws BlocksException {
+        String[] args = new String[2];
+        args[0] = "--wsid=" + wsid;
+        args[1] = "repo-list";        
+        RepositoryListStreamConsumer consumer = new RepositoryListStreamConsumer();
+        execute(args, consumer);
+        return consumer.getRepositories();
+    }
+
+    /**
+     * Updating the workspace pointed by wsid.
+     * @param wsid the workspace id to update
+     * @throws BlocksException 
+     */
+    public void update(int wsid) throws BlocksException {
+        String[] args = new String[3];
+        args[0] = "--wsid=" + wsid;
+        args[1] = "--force";
+        args[2] = "update";        
+        execute(args);
+    }
+    
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected String getExecutable() {
+        return executable;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void throwException(String message, Throwable t) throws BlocksException {
+        throw new BlocksException(message, t);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/BlocksException.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks;
+
+/**
+ * Exception thrown by the Blocks framework.
+ *
+ */
+public class BlocksException extends Exception {
+
+    private static final long serialVersionUID = 8563679708827021881L;
+
+    /**
+     * Default constructor
+     * @param error the error message.
+     */
+    public BlocksException(String error) {
+        super(error);
+    }
+
+    /**
+     * Constructor which accept a message and a cause.
+     * @param error the error message.
+     */
+    public BlocksException(String message, Throwable t) {
+        super(message, t);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/Bundle.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+package com.nokia.helium.blocks;
+
+import java.io.File;
+
+import com.nokia.helium.core.plexus.CommandBase;
+
+/**
+ * Wrapper class for the bundle application. The bundle application will help to do simple
+ * operations on bundles, like creating repository index or sign a bundle.
+ * 
+ */
+public class Bundle extends CommandBase<BundleException> {
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected String getExecutable() {
+        return "bundle";
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void throwException(String message, Throwable t) throws BundleException {
+        throw new BundleException(message, t);
+    }
+
+    /**
+     * Create a repository index base on a directory.
+     * 
+     * @param path the directory which contains the debs packages.
+     * @throws BundleException in case of error.
+     */
+    public void createRepositoryIndex(File path) throws BundleException {
+        createRepositoryIndex(path, false);
+    }
+
+    /**
+     * Create a signed repository index base on a directory.
+     * 
+     * @param path the directory which contains the debs packages.
+     * @param sign defines if the repository should be signed.
+     * @throws BundleException in case of error.
+     */
+    public void createRepositoryIndex(File path, boolean sign) throws BundleException {
+        if (path == null) {
+            throw new BundleException("Impossible to create the index, no directory specified.");
+        }
+        if (!path.isDirectory()) {
+            throw new BundleException("Invalid directory: " + path.getAbsolutePath());
+        }
+        String[] args = null;
+        if (sign) {
+            args = new String[3];
+            args[0] = "create-repo";
+            args[1] = "--sign";
+            args[2] = path.getAbsolutePath();
+        }
+        else {
+            args = new String[2];
+            args[0] = "create-repo";
+            args[1] = path.getAbsolutePath();
+        }
+        this.execute(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/BundleException.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks;
+
+/**
+ * Exception thrown by the Bundle manipulation framework.
+ *
+ */
+public class BundleException extends Exception {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Default constructor.
+     * @param error the error message.
+     */
+    public BundleException(String error) {
+        super(error);
+    }
+
+    /**
+     * Constructor which accept a message and a cause.
+     * @param error the error message.
+     */
+    public BundleException(String message, Throwable t) {
+        super(message, t);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/Group.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks;
+
+/**
+ * This class represents information related to
+ * a group. 
+ *
+ */
+public class Group {
+    private String name;
+
+    /**
+     * Create a new Group with a name.
+     * @param name
+     */
+    public Group(String name) {
+        this.name = name;
+    }
+
+    /**
+     * Get the group name.
+     * @return the group name as a string.
+     */
+    public String getName() {
+        return name;
+    }
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/GroupListStreamConsumer.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.codehaus.plexus.util.cli.StreamConsumer;
+
+/**
+ * Implements group-list results parsing.
+ *
+ */
+public class GroupListStreamConsumer implements StreamConsumer {
+    private List<Group> groups = new ArrayList<Group>();
+
+    @Override
+    public void consumeLine(String line) {
+        if (line.trim().length() > 0) {
+            groups.add(new Group(line.trim()));
+        }
+    }
+    
+    /**
+     * Get the group list from blocks output.
+     * @return a list of Group instance.
+     */
+    public List<Group> getGroups() {
+        return groups;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/Repository.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks;
+
+
+/**
+ * This class stores the information related to a 
+ * repository. 
+ *
+ */
+public class Repository {
+    private int id;
+    private String name;
+    private String url;
+
+    /**
+     * Set the repository id.
+     * @param id
+     */
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    /**
+     * Set the repository name.
+     * @param id
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * Set the repository location.
+     * @param id
+     */
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    /**
+     * Get the repository id.
+     * @param id
+     */
+    public int getId() {
+        return id;
+    }
+
+    /**
+     * Get the repository name.
+     * @param id
+     */
+    public String getName() {
+        return name;
+    }
+
+
+    /**
+     * Get the repository location.
+     * @param id
+     */
+    public String getUrl() {
+        return url;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/RepositoryListStreamConsumer.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.codehaus.plexus.util.cli.StreamConsumer;
+
+/**
+ * Implements repo-list results parsing.
+ *
+ */
+public class RepositoryListStreamConsumer implements StreamConsumer  {
+    private List<Repository> repositories = new ArrayList<Repository>();
+    private Repository repository;
+    
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void consumeLine(String line) {
+        if (repository == null && line.matches("^\\d+\\*?$")) {
+            repository = new Repository();
+            repository.setId(Integer.parseInt(line.trim().replaceAll("\\*", "")));
+        } else if (repository != null && line.matches("^\\s+Name:\\s+.+$")) {
+            repository.setName(line.split("Name:")[1].trim());
+        } else if (repository != null && line.matches("^\\s+URI:\\s+.+$")) {
+            repository.setUrl(line.split("URI:")[1].trim());
+            repositories.add(repository);
+            repository = null;
+        }
+    }
+    
+    /**
+     * Get the list of repositories found.
+     * @return the list of repositories.
+     */
+    public List<Repository> getRepositories() {
+        return repositories;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/SearchStreamConsumer.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.codehaus.plexus.util.cli.StreamConsumer;
+
+/**
+ * Implements search results parsing.
+ *
+ */
+public class SearchStreamConsumer implements StreamConsumer  {
+    private static final String SEPARATOR = " - ";
+    private List<String> results = new ArrayList<String>();
+    
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void consumeLine(String line) {
+        if (line.contains(SEPARATOR)) {
+            results.add(line.substring(0, line.indexOf(SEPARATOR)));
+        }
+    }
+    
+    /**
+     * Get the search result list.
+     * @return
+     */
+    public List<String> getSearchResults() {
+        return results;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/Workspace.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,81 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks;
+
+import java.io.File;
+
+/**
+ * Holder for workspace information:
+ *  - ID
+ *  - Name
+ *  - Location
+ *
+ */
+public class Workspace {
+    private int wsid;
+    private String name;
+    private File location;
+    
+    
+    /**
+     * Get the workspace id.
+     * @return the workspace id.
+     */
+    public int getWsid() {
+        return wsid;
+    }
+    
+    /**
+     * Set the workspace id. 
+     * @param wsid the workspace id
+     */
+    public void setWsid(int wsid) {
+        this.wsid = wsid;
+    }
+    
+    /**
+     * Get the workspace name.
+     * @return the workspace name
+     */
+    public String getName() {
+        return name;
+    }
+    
+    /**
+     * Set the workspace name.
+     * @param name The workspace name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+    
+    /**
+     * Get the workspace location.
+     * @return the workspace directory.
+     */
+    public File getLocation() {
+        return location;
+    }
+    
+    /**
+     * Set the workspace location.
+     * @param location the location to set.
+     */
+    public void setLocation(File location) {
+        this.location = location;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/WorkspaceListStreamConsumer.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks;
+
+import java.io.File;
+import java.util.Vector;
+
+import org.codehaus.plexus.util.cli.StreamConsumer;
+
+/**
+ * Implements a parser of workspace list calls. 
+ *
+ */
+public class WorkspaceListStreamConsumer implements  StreamConsumer {
+
+    private Workspace workspace;
+    private Vector<Workspace> workspaces = new Vector<Workspace>();
+    
+    @Override
+    public void consumeLine(String line) {
+        if (workspace == null && line.matches("^\\d+\\*?$")) {
+            workspace = new Workspace();
+            workspace.setWsid(Integer.parseInt(line.trim().replaceAll("\\*", "")));
+        } else if (workspace != null && line.matches("^\\s+name:\\s+.+$")) {
+            workspace.setName(line.split("name:")[1].trim());
+        } else if (workspace != null && line.matches("^\\s+path:\\s+.+$")) {
+            workspace.setLocation(new File(line.split("path:")[1].trim()));
+            workspaces.add(workspace);
+            workspace = null;
+        }
+    }
+    
+    /**
+     * Returns the list of found workspaces.
+     * @return
+     */
+    public Workspace[] getWorkspaces() {
+        return workspaces.toArray(new Workspace[workspaces.size()]);        
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/ant/AbstractBlocksTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,88 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.ant;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+
+import com.nokia.helium.blocks.Blocks;
+import com.nokia.helium.core.plexus.AntStreamConsumer;
+
+/**
+ * This class implement an abstract Blocks task. It predefines 
+ * some method to handle the workspace id. 
+ *
+ */
+public abstract class AbstractBlocksTask extends Task {
+
+    private Blocks blocks;
+    private boolean verbose;
+    private Integer wsid;
+
+    /**
+     * The workspace id.
+     * @param wsid
+     * @ant.not-required
+     */
+    public void setWsid(Integer wsid) {
+        this.wsid = wsid;
+    }
+
+    /**
+     * Get the workspace id, it throws a BuildException if not set.
+     * @return
+     */
+    public int getWsid() {
+        if (wsid == null) {
+            throw new BuildException("wsid has not been specified.");
+        }
+        return wsid.intValue();
+    }
+    
+    
+    /**
+     * Are we execution the task in verbose mode.
+     * @return
+     */
+    public boolean isVerbose() {
+        return verbose;
+    }
+
+    /**
+     * Set true to show the output from blocks command execution.
+     * @param verbose
+     * @ant.not-required Default to false.
+     */
+    public void setVerbose(boolean verbose) {
+        this.verbose = verbose;
+    }
+
+    protected Blocks getBlocks() {
+        if (blocks == null) {
+            blocks = new Blocks();
+            if (isVerbose()) {
+                blocks.addOutputLineHandler(new AntStreamConsumer(this, Project.MSG_INFO));
+            } else {
+                blocks.addOutputLineHandler(new AntStreamConsumer(this, Project.MSG_DEBUG));
+            }
+            blocks.addErrorLineHandler(new AntStreamConsumer(this, Project.MSG_ERR));
+        }
+        return blocks;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/ant/antlib.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : antlib.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<antlib>
+    <!-- Task definition -->
+    <taskdef name="blocksAddWorkspace" classname="com.nokia.helium.blocks.ant.taskdefs.AddWorkspaceTask"/>
+    <taskdef name="blocksRemoveWorkspace" classname="com.nokia.helium.blocks.ant.taskdefs.RemoveWorkspaceTask"/>
+    <taskdef name="blocksGetWorkspaceId" classname="com.nokia.helium.blocks.ant.taskdefs.GetWorkspaceIdTask"/>
+    <taskdef name="blocksCreateRepositoryIndex" classname="com.nokia.helium.blocks.ant.taskdefs.CreateRepositoryIndexTask"/>
+    <taskdef name="blocksInstallBundle" classname="com.nokia.helium.blocks.ant.taskdefs.InstallBundleTask"/>
+    <taskdef name="blocksAddRepository" classname="com.nokia.helium.blocks.ant.taskdefs.AddRepoTask"/>
+    <taskdef name="blocksRemoveRepository" classname="com.nokia.helium.blocks.ant.taskdefs.RemoveRepoTask"/>
+    <taskdef name="blocksUpdate" classname="com.nokia.helium.blocks.ant.taskdefs.UpdateTask"/>
+    
+    <!-- Type definition -->
+    <typedef name="blocksWorkspaceExists" classname="com.nokia.helium.blocks.ant.conditions.WorkspaceExists"/>
+    <typedef name="blocksRepositoryExists" classname="com.nokia.helium.blocks.ant.conditions.RepositoryExists"/>
+    <typedef name="blocksRepositorySet" classname="com.nokia.helium.blocks.ant.types.RepositorySet"/>
+</antlib>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/ant/conditions/RepositoryExists.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.ant.conditions;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.taskdefs.condition.Condition;
+
+import com.nokia.helium.blocks.Blocks;
+import com.nokia.helium.blocks.BlocksException;
+import com.nokia.helium.blocks.Repository;
+import com.nokia.helium.blocks.ant.AbstractBlocksTask;
+
+/**
+ * The blocksRepositoryExists condition help you to check the existence of a repository definition under
+ * a specific workspace.  
+ * 
+ * This example will set the 'exists' property if a 'my_repository_name' repository is defined in the wsid workspace:
+ * <pre>
+ * &lt;condition property=&quot;exists&quot; &gt;
+ *     &lt;hlm:blocksRepositoryExists  name=&quot;my_repository_name&quot; /&gt;
+ * &lt;/condition&gt;
+ * </pre>
+
+ * This example will set the 'exists' property if any repository are defined in the wsid workspace:
+ * <pre>
+ * &lt;condition property=&quot;exists&quot; &gt;
+ *     &lt;hlm:blocksRepositoryExists /&gt;
+ * &lt;/condition&gt;
+ * </pre>
+ * 
+ * @ant.type name="blocksRepositoryExists" category="Blocks"
+ */
+
+public class RepositoryExists extends AbstractBlocksTask implements Condition {
+    private String name;
+    
+    /**
+     * The name of the repository to check the existence.
+     * @param name
+     * @ant.not-required
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean eval() {        
+        Blocks blocks = getBlocks();
+        try {
+            for (Repository repository : blocks.listRepository(getWsid())) {
+                if (name != null && name.equals(repository.getName())) {
+                    return true;
+                } else if (name == null) {
+                    return true;
+                }
+
+            }
+        } catch (BlocksException e) {
+            throw new BuildException(e);
+        }
+        return false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/ant/conditions/WorkspaceExists.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.ant.conditions;
+
+import hidden.org.codehaus.plexus.interpolation.os.Os;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.taskdefs.condition.Condition;
+
+import com.nokia.helium.blocks.Blocks;
+import com.nokia.helium.blocks.BlocksException;
+import com.nokia.helium.blocks.Workspace;
+import com.nokia.helium.blocks.ant.AbstractBlocksTask;
+import com.nokia.helium.core.filesystem.windows.Subst;
+
+/**
+ * The blocksWorkspaceExists condition help you to check the existence of a workspace  
+ * based on his name or location.
+ * 
+ * In the following example the property 'exists' is set if the blocks workspace named 'workspace_name' exists:
+ * <pre>
+ * &lt;condition property="exists" &gt;
+ *     &lt;hlm:blocksWorkspaceExists  name="workspace_name" /&gt;
+ * &lt;/condition&gt;
+ * </pre>
+ * 
+ * @ant.type name="blocksWorkspaceExists" category="Blocks"
+ */
+public class WorkspaceExists extends AbstractBlocksTask implements Condition {
+    
+    private File dir;
+    private String name;
+    
+    /**
+     * The directory of the workspace to check the existence.
+     * @param dir
+     * @ant.not-required
+     */
+    public void setDir(File dir) {
+        this.dir = dir;
+    }
+
+    /**
+     * The name of the workspace to check the existence.
+     * @param name
+     * @ant.not-required
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean eval() {
+        if (dir == null && name == null) {
+            throw new BuildException("Either name or dir should be defined.");
+        }
+        if (dir != null && name != null) {
+            throw new BuildException("name or dir should not be defined at the same time.");
+        }
+        
+        Blocks blocks = getBlocks();
+        try {
+            for (Workspace workspace : blocks.listWorkspaces()) {
+                if (dir != null && getRealDir().equals(workspace.getLocation().getCanonicalFile())) {
+                    return true;
+                }
+                if (name != null && name.equals(workspace.getName())) {
+                    return true;
+                }
+            }
+        } catch (BlocksException e) {
+            throw new BuildException(e);
+        } catch (IOException e) {
+            throw new BuildException(e);
+        }
+        return false;
+    }
+    
+    /**
+     * Solve subst drives on windows.
+     * @return the realpath.
+     * @throws IOException
+     */
+    protected File getRealDir() throws IOException {
+        if (Os.isFamily(Os.FAMILY_WINDOWS) && dir != null) {
+            Subst subst = new Subst();
+            log("Real path: " + subst.getRealPath(dir).getCanonicalFile());
+            return subst.getRealPath(dir).getCanonicalFile();            
+        }        
+        return dir != null ? dir.getCanonicalFile() : null;
+    }        
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/ant/helium.antlib.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : helium.antlib.xml 
+Part of     : Helium Antlib 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="libs-blocks" xmlns:hlm="http://www.nokia.com/helium">
+    <description>
+        Ant task definition declarations.
+    </description>    
+    <taskdef resource="com/nokia/helium/blocks/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/ant/taskdefs/AddRepoTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,131 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.ant.taskdefs;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.BuildException;
+
+import com.nokia.helium.blocks.BlocksException;
+import com.nokia.helium.blocks.ant.AbstractBlocksTask;
+import com.nokia.helium.blocks.ant.types.RepositorySet;
+import com.nokia.helium.blocks.ant.types.RepositorySet.Repository;
+
+/**
+ * Adding repository to a workspace.
+ * 
+ * Adding a repository with generated name:
+ * <pre>
+ * &lt;hlm:blocksAddRepository wsid=&quot;1&quot; url=&quot;file:e:/repo&quot; /&gt; 
+ * </pre>
+ * 
+ * Adding repository with a given name:
+ * <pre>
+ * &lt;hlm:blocksAddRepository wsid=&quot;1&quot; name=&quot;repo1&quot; url=&quot;file:e:/repo1&quot; /&gt; 
+ * </pre>
+ * 
+ * Adding several repositories using nested repositorySet elements:
+ * <pre>
+ * &lt;hlm:blocksAddRepository wsid=&quot;1&quot;&gt;
+ *      &lt;repositorySet&gt;
+ *          &lt;repository  name=&quot;repo1&quot; url=&quot;file:e:/repo1&quot;/&gt;
+ *          &lt;repository  name=&quot;repo2&quot; url=&quot;file:e:/repo2&quot;/&gt;
+ *      &lt;/repositorySet&gt; 
+ * &lt;/hlm:blocksAddRepository&gt;
+ * </pre>
+
+ * @ant.task name="blocksAddRepository" category="Blocks"
+ */
+public class AddRepoTask extends AbstractBlocksTask {
+    private String url;
+    private String name;
+    private List<RepositorySet> repositorySets = new ArrayList<RepositorySet>();
+    
+    /**
+     * Add this repository URL to the 
+     * workspace.
+     * @param url
+     */
+    public void setUrl(String url) {
+        this.url = url;
+    }
+    
+    /**
+     * Name of this repository. 
+     * @param name
+     * @ant.not-required Blocks will generate a name.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * Adding a nested RepositorySet element.
+     * @return a new RepositorySet instance.
+     */
+    public RepositorySet createRepositorySet() {
+        RepositorySet repositorySet = new RepositorySet();
+        this.add(repositorySet);
+        return repositorySet;
+    }
+
+    /**
+     * Adding a nested RepositorySet element.
+     * @param repositorySet
+     */
+    public void add(RepositorySet repositorySet) {
+        repositorySets.add(repositorySet);
+    }
+    
+    /**
+     * {@inheritDoc}
+     */
+    public void execute() {
+        if (url == null && repositorySets.isEmpty()) {
+            throw new BuildException("'url' attribute has not been defined.");            
+        }
+        if (url != null && !repositorySets.isEmpty()) {
+            throw new BuildException("'url' attribute and nested repositorySet element cannot be used at the same time.");
+        }
+        try {
+            if (url != null) {
+                if (name == null) {
+                    getBlocks().addRepository(getWsid(), url);
+                    log("The repository " + url + " has been added successfully to workspace " + getWsid() + ".");
+                } else {
+                    getBlocks().addRepository(getWsid(), name, url);
+                    log("The repository " + name + " => " + url +
+                        " has been added successfully to workspace " + getWsid() + ".");
+                }
+            } else {
+                for (RepositorySet repositorySet : repositorySets) {
+                    for (Repository repository : repositorySet.getRepositories()) {
+                        if (repository.getName() == null || repository.getUrl() == null) {
+                            throw new BuildException("Either name or url attribute missing at " + repository.getLocation());
+                        }
+                        getBlocks().addRepository(getWsid(), repository.getName(), repository.getUrl());                        
+                    }
+                }
+            }
+        } catch (BlocksException e) {
+            throw new BuildException(e.getMessage(), e);
+        }
+    }
+    
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/ant/taskdefs/AddWorkspaceTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.ant.taskdefs;
+
+import java.io.File;
+
+import org.apache.tools.ant.BuildException;
+import com.nokia.helium.blocks.BlocksException;
+import com.nokia.helium.blocks.Workspace;
+import com.nokia.helium.blocks.ant.AbstractBlocksTask;
+
+/**
+ * Declare a directory as a Blocks workspace.
+ * 
+ * <pre>
+ * &lt;hlm:blocksAddWorkspace name="myworkspace" dir="/path/to/workspace/dir/" wsidproperty="wsid" /&gt; 
+ * </pre>
+ * 
+ * @ant.task name="blocksAddWorkspace" category="Blocks"
+ */
+public class AddWorkspaceTask extends AbstractBlocksTask {
+
+    private String name;
+    private File dir;
+    private String wsidproperty;
+    
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void execute() {
+        if (dir == null) {
+            throw new BuildException("dir attribute is not defined.");
+        }
+        if (name == null) {
+            throw new BuildException("name attribute is not defined.");
+        }
+        try {
+            Workspace workspace = getBlocks().addWorkspace(dir, name);
+            log("Workspace " + workspace.getWsid() + " has been created successfully.");
+            if (wsidproperty != null) {
+                getProject().setNewProperty(wsidproperty, "" + workspace.getWsid());
+            }
+        } catch (BlocksException exc) {
+            throw new BuildException(exc);
+        }
+    }
+
+    /**
+     * The name of the output property.
+     * @param wsidproperty
+     * @ant.required
+     */
+    public void setWsidproperty(String wsidproperty) {
+        this.wsidproperty = wsidproperty;
+    }
+
+    /**
+     * The name of the workspace.
+     * @param name
+     * @ant.required
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+
+    /**
+     * The location of the workspace.
+     * @param dir
+     * @ant.required
+     */
+    public void setDir(File dir) {
+        this.dir = dir;
+    }
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/ant/taskdefs/CreateRepositoryIndexTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,149 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.ant.taskdefs;
+
+import java.io.File;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+
+import com.nokia.helium.blocks.Bundle;
+import com.nokia.helium.blocks.BundleException;
+import com.nokia.helium.core.plexus.AntStreamConsumer;
+
+/**
+ * This task will help you to create a debian repository index.
+ * To generate the index you need to set the dest attribute to point
+ * to a directory containing .deb packages. The outcome of the process 
+ * will be a Package file under the mentioned directory.
+ * 
+ * <pre>
+ * &lt;hlm:blocksCreateRepositoryIndex dest="E:\some\path\to\a\repo" 
+ *           verbose="true" sign="false" /&gt;
+ * </pre>
+ * @ant.task name="blocksCreateRepositoryIndex" category="Blocks"
+ */
+public class CreateRepositoryIndexTask extends Task {
+
+    private File dest;
+    private boolean sign;
+    private boolean failOnError = true;
+    private boolean verbose;
+    
+    /**
+     * Location where to create the repository index.
+     * @param dest
+     * @ant.required
+     */
+    public void setDest(File dest) {
+        this.dest = dest;
+    }
+   
+    /**
+     * Get the location where to create the repository index.
+     * @return the dest folder.
+     */
+    public File getDest() {
+        return dest;
+    }
+    
+    /**
+     * Defines if the repository index creation should be signed. 
+     * @param sign If true the repository will be signed
+     * @ant.not-required Default is false
+     */
+    public void setSign(boolean sign) {
+        this.sign = sign;
+    }
+    
+    /**
+     * Shall we sign the repository?
+     * @return true is the repository should be signed.
+     */
+    public boolean isSign() {
+        return sign;
+    }
+
+    /**
+     * If defined as true it will fail the build in case of error, 
+     * else it will keepgoing.
+     * @param failOnError
+     * @ant.not-required Default is true.
+     */
+    public void setFailOnError(boolean failOnError) {
+        this.failOnError = failOnError;
+    }
+
+    /**
+     * Shall we fail on error?
+     * @return return true if should fails on error.
+     */
+    public boolean isFailOnError() {
+        return failOnError;
+    }
+
+    /**
+     * Set true to show the output from blocks command execution.
+     * @param verbose
+     * @ant.not-required Default to false.
+     */
+    public void setVerbose(boolean verbose) {
+        this.verbose = verbose;
+    }
+
+    /**
+     * Are we execution the task in verbose mode.
+     * @return
+     */
+    public boolean isVerbose() {
+        return verbose;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void execute() {
+        if (getDest() == null) {
+            throw new BuildException("'dest' attribute must be defined.");
+        }
+        try {
+            getBundle().createRepositoryIndex(getDest(), isSign());
+        } catch (BundleException e) {
+            if (isFailOnError()) {
+                throw new BuildException(e.getMessage(), e);
+            } else {
+                log(e.getMessage(), Project.MSG_ERR);
+            }
+        }
+    }
+    
+    /**
+     * Get a pre-configured Bundle application wrapper instance.
+     * @return a new bundle object.
+     */
+    protected Bundle getBundle() {
+        Bundle bundle = new Bundle();
+        if (isVerbose()) {
+            bundle.addOutputLineHandler(new AntStreamConsumer(this, Project.MSG_INFO));
+        } else {
+            bundle.addOutputLineHandler(new AntStreamConsumer(this, Project.MSG_DEBUG));
+        }
+        bundle.addErrorLineHandler(new AntStreamConsumer(this, Project.MSG_ERR));
+        return bundle;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/ant/taskdefs/GetWorkspaceIdTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,119 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.ant.taskdefs;
+
+import hidden.org.codehaus.plexus.interpolation.os.Os;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.tools.ant.BuildException;
+
+import com.nokia.helium.blocks.BlocksException;
+import com.nokia.helium.blocks.Workspace;
+import com.nokia.helium.blocks.ant.AbstractBlocksTask;
+import com.nokia.helium.core.filesystem.windows.Subst;
+
+/**
+ * Get the workspace based on the a name or a directory. The task fails if it can't find the information.
+ * 
+ * This call will set the id of the workspace named myworkspace into the wsid property: 
+ * <pre>
+ * &lt;hlm:blocksGetWorkspaceId wsidoutput="wsid" name="myworkspace"/&gt; 
+ * </pre>
+ * 
+ * @ant.task name="blocksGetWorkspaceId" category="Blocks"
+ */
+public class GetWorkspaceIdTask extends AbstractBlocksTask {
+    
+    private File dir;
+    private String name;
+    private String wsidoutput;
+   
+    /**
+     * The directory to get the wsid.
+     * @param dir the directory
+     * @ant.not-required
+     */
+    public void setDir(File dir) {
+        this.dir = dir;
+    }
+
+    /**
+     * The name of the workspace to get the wsid.
+     * @param name the name of a workspace
+     * @ant.not-required
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * The name of the output property.
+     * @param wsidoutput
+     * @ant.required
+     */
+    public void setWsidoutput(String wsidoutput) {
+        this.wsidoutput = wsidoutput;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void execute() {
+        if ((dir == null && name == null) || (dir != null && name != null)) {
+            throw new BuildException("You must define either name or dir attribute");
+        }
+        
+        Workspace fw = null;
+        try {
+            File realDir = getRealDir();
+            for (Workspace workspace : getBlocks().listWorkspaces()) {
+                if (workspace.getLocation().getCanonicalFile().equals(realDir) || workspace.getName().equals(name)) {
+                    fw = workspace;
+                    break;
+                }
+            }
+            if (fw != null) {
+                log("Found matching workspace: " + fw.getWsid());
+                if (wsidoutput != null) {
+                    log("Setting property  " + wsidoutput);
+                    getProject().setNewProperty(wsidoutput, "" + fw.getWsid());
+                }
+            }
+        } catch (BlocksException exc) {
+            throw new BuildException(exc);
+        } catch (IOException exc) {
+            throw new BuildException(exc);
+        }
+    }
+
+    /**
+     * Solve subst drives on windows.
+     * @return the realpath.
+     * @throws IOException
+     */
+    protected File getRealDir() throws IOException {
+        if (Os.isFamily(Os.FAMILY_WINDOWS) && dir != null) {
+            Subst subst = new Subst();
+            log("Real path: " + subst.getRealPath(dir).getCanonicalFile());
+            return subst.getRealPath(dir).getCanonicalFile();            
+        }        
+        return dir != null ? dir.getCanonicalFile() : null;
+    }        
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/ant/taskdefs/InstallBundleTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,188 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.ant.taskdefs;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.PatternSet;
+
+import com.nokia.helium.blocks.Blocks;
+import com.nokia.helium.blocks.BlocksException;
+import com.nokia.helium.blocks.Group;
+import com.nokia.helium.blocks.ant.AbstractBlocksTask;
+
+/**
+ * Installing a bundle under a workspace.
+ * 
+ * The bundle &quot;my-bundle-name&quot; will be installed under the workspace 1:
+ * <pre>
+ * &lt;hlm:blocksInstallBundle wsid=&quot;1&quot; bundle=&quot;my-bundle-name&quot; /&gt; 
+ * </pre>
+ * 
+ * The bundles matching the &quot;my-bundle-name.*&quot; pattern will be installed under the workspace 1:
+ * <pre>
+ * &lt;hlm:blocksInstallBundle wsid=&quot;1&quot;&gt;
+ *      &lt;bundleFilterSet&gt;
+ *          &lt;include name=&quot;my-bundle-name.*&quot; /&gt;
+ *          &lt;include name=&quot;.*src.*&quot; /&gt;
+ *      &lt;/bundleFilterSet&gt; 
+ * &lt;/hlm:blocksInstallBundle&gt;
+ * </pre>
+ * 
+ * The groups matching the &quot;.*bin.*&quot; pattern will be installed under the workspace 1:
+ * <pre>
+ * &lt;hlm:blocksInstallBundle wsid=&quot;1&quot;&gt;
+ *      &lt;groupFilterSet&gt;
+ *          &lt;include name=&quot;.*bin.*&quot; /&gt;
+ *      &lt;/groupFilterSet&gt; 
+ * &lt;/hlm:blocksInstallBundle&gt;
+ * </pre>
+ * 
+ * bundleFilterSet and groupFilterSet are regular patternset, so any reference to patternset 
+ * will be working:
+ * <pre>
+ * &lt;patternset id=&quot;my.patternset&quot; /&gt;
+ * ...
+ *    &lt;groupFilterSet refid=&quot;my.patternset&quot; /&gt;
+ * ...
+ * </pre>
+ * 
+ * @ant.task name="blocksInstallBundle" category="Blocks"
+ */
+public class InstallBundleTask extends AbstractBlocksTask {
+    private String group;
+    private String bundle;
+    private List<PatternSet> bundlePatternSets = new ArrayList<PatternSet>();
+    private List<PatternSet> groupPatternSets = new ArrayList<PatternSet>();
+
+    protected void validate() {
+        if ((bundle != null && (!bundlePatternSets.isEmpty() || group != null || !groupPatternSets.isEmpty()))
+                || (group != null && (!bundlePatternSets.isEmpty() || bundle != null || !groupPatternSets.isEmpty()))
+                || (!bundlePatternSets.isEmpty() && (group != null || bundle != null || !groupPatternSets.isEmpty()))
+                || (!groupPatternSets.isEmpty() && (group != null || bundle != null || !bundlePatternSets.isEmpty()))
+                || (bundle == null && bundlePatternSets.isEmpty() && group == null && groupPatternSets.isEmpty())) {
+            throw new BuildException("You can either use the bundle attribute or the group attribute or use nested groupfilterset or bundlefilterset.");
+        }        
+    }
+    
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void execute() {
+        validate();
+        try {
+            if (bundle != null) {
+                log("Installing bundle " + bundle + " under workspace " + this.getWsid() + ".");
+                getBlocks().installBundle(this.getWsid(), bundle);
+            } else if (!bundlePatternSets.isEmpty()) {
+                for (String bundle : getBlocks().search(this.getWsid(), Blocks.SEARCH_ALL_BUNDLES_EXPRESSION)) {
+                    if (shouldInstall(bundlePatternSets, bundle)) {
+                        log("Installing " + bundle + " under workspace " + this.getWsid() + ".");
+                        getBlocks().installBundle(this.getWsid(), bundle);
+                    } else {
+                        log("Skipping bundle " + bundle, Project.MSG_DEBUG);
+                    }
+                }                
+            } else if (group != null) {
+                log("Installing group " + group + " under workspace " + this.getWsid() + ".");
+                getBlocks().installGroup(this.getWsid(), group);
+            } else if (!groupPatternSets.isEmpty()) {
+                for (Group group : getBlocks().listGroup(this.getWsid())) {
+                    if (shouldInstall(groupPatternSets, group.getName())) {
+                        log("Installing group " + group.getName() + " under workspace " + this.getWsid() + ".");
+                        getBlocks().installGroup(this.getWsid(), group.getName());
+                    } else {
+                        log("Skipping group " + bundle, Project.MSG_DEBUG);
+                    }
+                }
+            }                
+        } catch (BlocksException e) {
+            throw new BuildException(e.getMessage(), e);
+        }
+    }
+
+    /**
+     * Defines the bundle name to install.
+     * @param bundle
+     * @ant.required
+     */
+    public void setBundle(String bundle) {
+        this.bundle = bundle;
+    }    
+
+    /**
+     * Defines the bundle name to install.
+     * @param bundle
+     * @ant.required
+     */
+    public void setGroup(String group) {
+        this.group = group;
+    }    
+    
+    /**
+     * Add a nested patternset. Then bundle attribute cannot be used.
+     * @param patternSet
+     */
+    public PatternSet createBundleFilterSet() {
+        PatternSet patternSet = new PatternSet(); 
+        bundlePatternSets.add(patternSet);
+        return patternSet;
+    }
+
+    /**
+     * Add a nested patternset. Then bundle attribute cannot be used.
+     * @param patternSet
+     */
+    public PatternSet createGroupFilterSet() {
+        PatternSet patternSet = new PatternSet(); 
+        groupPatternSets.add(patternSet);
+        return patternSet;
+    }
+    
+    /**
+     * Should the bundle be installed based on the patternsets config.
+     * @param patternSets a list of patternset elements
+     * @param name the name to validate
+     * @return 
+     */
+    protected boolean shouldInstall(List<PatternSet> patternSets, String name) {
+        int includes = 0;
+        for (PatternSet patternSet : patternSets) {
+            if (patternSet.getExcludePatterns(getProject()) != null) {
+                for (String pattern : patternSet.getExcludePatterns(getProject())) {
+                    if (Pattern.matches(pattern, name)) {
+                        return false;
+                    }
+                }
+            }
+            if (patternSet.getIncludePatterns(getProject()) != null) {
+                for (String pattern : patternSet.getIncludePatterns(getProject())) {
+                    includes ++;
+                    if (Pattern.matches(pattern, name)) {
+                        return true;
+                    }
+                }
+            }
+        }
+        return includes == 0;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/ant/taskdefs/RemoveRepoTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.ant.taskdefs;
+
+import org.apache.tools.ant.BuildException;
+
+import com.nokia.helium.blocks.BlocksException;
+import com.nokia.helium.blocks.ant.AbstractBlocksTask;
+
+/**
+ * Remove a repository from a workspace.
+ * 
+ * The repository named &quot;my-repository-name&quot; will be removed from workspace 1:
+ * <pre>
+ * &lt;hlm:blocksRemoveRepository wsid=&quot;1&quot; name=&quot;my-repository-name&quot; /&gt; 
+ * </pre>
+
+ * The repository 1 will be removed from workspace 1:
+ * <pre>
+ * &lt;hlm:blocksRemoveRepository wsid=&quot;1&quot; repositoryId=&quot;1&quot; /&gt; 
+ * </pre>
+ * 
+ * @ant.task name="blocksRemoveRepository" category="Blocks"
+ */
+public class RemoveRepoTask extends AbstractBlocksTask {
+    private Integer repositoryId;
+    private String name;
+
+    /**
+     * Remove the repository using its id. 
+     * workspace.
+     * @param repositoryId the repository id
+     * @ant.required
+     */
+    public void setRepositoryId(Integer repositoryId) {
+        this.repositoryId = repositoryId;
+    }
+
+    /**
+     * Remove the repository using its name. 
+     * workspace.
+     * @param name the repository name
+     * @ant.not-required
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void execute() {
+        if (repositoryId == null && name == null) {
+            throw new BuildException("Either 'repositoryId' or 'name' attribute must be defined.");            
+        }
+        if (repositoryId != null && name != null) {
+            throw new BuildException("'repositoryId' and 'name' attribute cannot be defined at the same time.");            
+        }
+        try {
+            if (name != null) {
+                getBlocks().removeRepository(getWsid(), name);
+                log("The repository " + name + " has been removed successfully from workspace " + getWsid() + ".");
+            } else {
+                getBlocks().removeRepository(getWsid(), repositoryId.intValue());
+                log("The repository " + repositoryId + " has been removed successfully from workspace " + getWsid() + ".");
+            }
+        } catch (BlocksException e) {
+            throw new BuildException(e.getMessage(), e);
+        }
+    }
+    
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/ant/taskdefs/RemoveWorkspaceTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.ant.taskdefs;
+
+import org.apache.tools.ant.BuildException;
+
+import com.nokia.helium.blocks.BlocksException;
+import com.nokia.helium.blocks.ant.AbstractBlocksTask;
+
+/**
+ * Remove a Blocks workspace.
+ * 
+ * The workspace 1 will be removed: 
+ * <pre>
+ * &lt;hlm:blocksRemoveWorkspace wsid="1" /&gt; 
+ * </pre>
+ * 
+ * @ant.task name="blocksRemoveWorkspace" category="Blocks"
+ */
+public class RemoveWorkspaceTask extends AbstractBlocksTask {
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void execute() {
+        try {
+            getBlocks().removeWorkspace(getWsid());
+            log("Workspace " + getWsid() + " removed successfully.");
+        } catch (BlocksException e) {
+            throw new BuildException(e);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/ant/taskdefs/UpdateTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.ant.taskdefs;
+
+import org.apache.tools.ant.BuildException;
+
+import com.nokia.helium.blocks.BlocksException;
+import com.nokia.helium.blocks.ant.AbstractBlocksTask;
+
+/**
+ * Updating a workspace content.
+ * 
+ * This call will update the workspace &quot;1&quot;: 
+ * <pre>
+ * &lt;hlm:blocksUpdate wsid=&quot;1&quot; /&gt; 
+ * </pre>
+ * 
+ * @ant.task name="blocksUpdate" category="Blocks"
+ */
+public class UpdateTask extends AbstractBlocksTask {
+    
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void execute() {
+        try {
+            log("Updating workspace " + getWsid() + ".");
+            getBlocks().update(getWsid());
+            log("Workspace " + getWsid() + " updated successfully.");
+        } catch (BlocksException exc) {
+            throw new BuildException(exc);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/src/com/nokia/helium/blocks/ant/types/RepositorySet.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,102 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.ant.types;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.ProjectComponent;
+import org.apache.tools.ant.types.DataType;
+
+/**
+ * Ant type holding a set of repository definitions.
+ *
+ * Example of use:
+ * <pre>
+ *      &lt;hlm:blocksRepositorySet id=&quot;my.repo.list.ref.id&quot; &gt;
+ *          &lt;repository  name=&quot;repo1&quot; url=&quot;file:e:/repo1&quot;/&gt;
+ *          &lt;repository  name=&quot;repo2&quot; url=&quot;file:e:/repo2&quot;/&gt;
+ *      &lt;/hlm:blocksRepositorySet&gt; 
+ * </pre>
+ * 
+ * @ant.type name="blocksRepositorySet" category="Blocks"
+ */
+public class RepositorySet extends DataType {
+
+    private List<Repository> repositories = new ArrayList<Repository>();
+
+    /**
+     * Element representing a repository definition.
+     *
+     */
+    public class Repository extends ProjectComponent {
+        private String name;
+        private String url;
+        
+        /**
+         * The name of the repository.
+         * @param name
+         */
+        public void setName(String name) {
+            this.name = name;
+        }
+        
+        public String getName() {
+            return name;
+        }
+        
+        /**
+         * The location of the repository.
+         * @param name
+         */
+        public void setUrl(String url) {
+            this.url = url;
+        }
+        
+        public String getUrl() {
+            return url;
+        }
+    }
+
+    /**
+     * Create a nested repository element.
+     * @return
+     */
+    public Repository createRepository() {
+        Repository repo = new Repository();
+        repositories.add(repo);
+        return repo;
+    }
+    
+    /**
+     * Get the list of repository definitions.
+     * @return
+     */
+    public List<Repository> getRepositories() {
+        if (this.isReference()) {
+            if (this.getRefid().getReferencedObject() instanceof RepositorySet) {
+                return ((RepositorySet)this.getRefid().getReferencedObject()).getRepositories();
+            } else {
+                throw new BuildException("The type referenced by " + 
+                        this.getRefid().getRefId() + " is not of RepositorySet type.");
+            }
+        } else {
+            return this.repositories;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/tests/antunits/test_blocks.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : test_blocks.ant.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="helium-antlib-blocks-unittest" xmlns:hlm="http://www.nokia.com/helium" xmlns:au="antlib:org.apache.ant.antunit">
+    <description>Helium Antlib blocks unittests.</description>
+    
+    <target name="setUp">
+        <tstamp>
+            <format property="tstamp" pattern="yyyyMMddHHmmssSSS" locale="en,UK" />
+        </tstamp>
+        <mkdir dir="${test.temp.dir}" />
+        <delete file="${test.temp.dir}" />
+        <mkdir dir="${test.temp.dir}" />
+    </target>
+
+    <target name="tearDown">
+        <delete dir="${test.temp.dir}" />
+    </target>
+    
+    <target name="is-blocks-available">
+        <exec executable="blocks.bat"  resultproperty="blocks.result" failifexecutionfails="false" osfamily="windows" />
+        <exec executable="blocks"  resultproperty="blocks.result" failifexecutionfails="false" osfamily="unix" />
+        <condition property="execute.test" value="true">
+            <equals arg1="${blocks.result}" arg2="0" />
+        </condition>
+        <echo>execute.test: ${execute.test}</echo>    
+    </target>
+    
+    <target name="test-addworkspace" depends="is-blocks-available" if="execute.test">
+        <mkdir dir="${test.temp.dir}/workspace-addworkspace" />
+        <hlm:blocksAddWorkspace name="unittest-addworkspace-${tstamp}" dir="${test.temp.dir}/workspace-addworkspace" wsidproperty="wsid" />
+        <hlm:blocksRemoveWorkspace wsid="${wsid}" />
+    </target>
+
+    <target name="test-workspace-cond-dir" depends="is-blocks-available" if="execute.test">
+        <mkdir dir="${test.temp.dir}/workspace-workspacecond" />
+        <hlm:blocksAddWorkspace name="workspace-workspacecond-${tstamp}" dir="${test.temp.dir}/workspace-workspacecond" wsidproperty="wsid" />
+        <au:assertTrue>
+            <hlm:blocksWorkspaceExists dir="${test.temp.dir}/workspace-workspacecond" />
+        </au:assertTrue>
+        <hlm:blocksRemoveWorkspace wsid="${wsid}" />
+    </target>
+
+    <target name="test-workspace-cond-name" depends="is-blocks-available" if="execute.test">
+        <mkdir dir="${test.temp.dir}/workspace-workspacecond" />
+        <hlm:blocksAddWorkspace name="workspace-workspacecond-${tstamp}" dir="${test.temp.dir}/workspace-workspacecond" wsidproperty="wsid" />
+        <au:assertTrue>
+            <hlm:blocksWorkspaceExists name="workspace-workspacecond-${tstamp}" />
+        </au:assertTrue>
+        <hlm:blocksRemoveWorkspace wsid="${wsid}" />
+    </target>
+
+    <target name="test-workspace-cond-not-workspace-dir" depends="is-blocks-available" if="execute.test">
+        <mkdir dir="${test.temp.dir}/workspace-workspacecond" />
+        <au:assertTrue>
+            <not>
+                <hlm:blocksWorkspaceExists dir="${test.temp.dir}/workspace-workspacecond" />
+            </not>
+        </au:assertTrue>
+    </target>
+
+    <target name="test-workspace-cond-not-workspace-name" depends="is-blocks-available" if="execute.test">
+        <mkdir dir="${test.temp.dir}/workspace-workspacecond" />
+        <au:assertTrue>
+            <not>
+                <hlm:blocksWorkspaceExists name="workspacecond" />
+            </not>
+        </au:assertTrue>
+    </target>
+
+    <target name="test-workspace-get-workspace-id-no-args" depends="is-blocks-available" if="execute.test">
+        <au:expectfailure message="You must define either name or dir attribute">
+        	<hlm:blocksGetWorkspaceId />
+        </au:expectfailure>
+    </target>
+
+    <target name="test-workspace-get-workspace-id-both-args" depends="is-blocks-available" if="execute.test">
+        <mkdir dir="${test.temp.dir}/workspace-addworkspace" />
+        <au:expectfailure message="You must define either name or dir attribute">
+        	<hlm:blocksGetWorkspaceId name="some-invalid-name" dir="${test.temp.dir}/workspace-addworkspace"/>
+        </au:expectfailure>
+    </target>
+
+    <target name="test-workspace-get-workspace-name" depends="is-blocks-available" if="execute.test">
+        <mkdir dir="${test.temp.dir}/workspace-workspacecond" />
+        <hlm:blocksAddWorkspace name="workspace-workspacecond-${tstamp}" dir="${test.temp.dir}/workspace-workspacecond" wsidproperty="wsid" />
+        <hlm:blocksGetWorkspaceId name="workspace-workspacecond-${tstamp}" wsidoutput="get.wsid"/>
+        <hlm:blocksRemoveWorkspace wsid="${wsid}" />
+        <au:assertTrue>
+            <equals arg1="${get.wsid}" arg2="${wsid}" />
+        </au:assertTrue>
+    </target>
+
+    <target name="test-workspace-get-workspace-dir" depends="is-blocks-available" if="execute.test">
+        <mkdir dir="${test.temp.dir}/workspace-workspacecond" />
+        <hlm:blocksAddWorkspace name="workspace-workspacecond-${tstamp}" dir="${test.temp.dir}/workspace-workspacecond" wsidproperty="wsid" />
+        <hlm:blocksGetWorkspaceId dir="${test.temp.dir}/workspace-workspacecond" wsidoutput="get.wsid"/>
+        <hlm:blocksRemoveWorkspace wsid="${wsid}" />
+        <au:assertTrue>
+            <equals arg1="${get.wsid}" arg2="${wsid}" />
+        </au:assertTrue>
+    </target>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/tests/antunits/test_blocks_bundles.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : test_blocks.ant.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="helium-blocks-bundles-unittest" xmlns:hlm="http://www.nokia.com/helium" xmlns:au="antlib:org.apache.ant.antunit" 
+    xmlns:ac="antlib:net.sf.antcontrib">
+    <description>Helium Antlib blocks unittests.</description>
+    
+    <property name="workspace" location="${test.temp.dir}/workspace" />
+    <property name="repo" location="${test.temp.dir}/repo" />
+    
+    <target name="setUp">
+        <tstamp>
+            <format property="tstamp" pattern="yyyyMMddHHmmssSSS" locale="en,UK" />
+        </tstamp>
+        <mkdir dir="${test.temp.dir}" />
+        <delete file="${test.temp.dir}" />
+        <mkdir dir="${test.temp.dir}" />
+        <mkdir dir="${workspace}" />
+        <mkdir dir="${repo}" />
+        
+        <exec executable="blocks.bat"  resultproperty="blocks.result" failifexecutionfails="false" osfamily="windows" />
+        <exec executable="blocks"  resultproperty="blocks.result" failifexecutionfails="false" osfamily="unix" />
+        <condition property="execute.test" value="true">
+            <equals arg1="${blocks.result}" arg2="0" />
+        </condition>
+        <echo>execute.test: ${execute.test}</echo>    
+        <ac:if>
+        	<istrue value="${execute.test}" />
+        	<then>
+                <hlm:blocksAddWorkspace name="unittest-addworkspace-${tstamp}" dir="${workspace}"
+                    wsidproperty="wsid" />
+        	    <copy todir="${workspace}">
+        	        <fileset dir="../" includes="src/**" />
+        	    </copy>
+        	    <mkdir dir="${workspace}/epoc32" />
+        	    <copy todir="${workspace}/epoc32">
+        	        <fileset dir="../" includes="src/**" />
+        	    </copy>
+        	    <exec executable="bundle.bat" dir="${workspace}" osfamily="windows">
+        	        <arg line="create-xml -n blocks -v 1.0" />
+        	        <arg value="--source=${workspace}/src" />
+        	        <arg value="--target=${workspace}/epoc32" />
+        	        <arg value="${test.temp.dir}/blocks.xml" />
+        	    </exec>
+        	    <exec executable="bundle.bat" dir="${workspace}" osfamily="windows">
+        	        <arg line="create" />
+        	        <arg line="-o ${repo}" />
+        	        <arg value="${test.temp.dir}/blocks.xml" />
+        	    </exec>
+                <hlm:blocksCreateRepositoryIndex dest="${repo}" verbose="true" />
+        	    <hlm:blocksAddRepository wsid="${wsid}" name="repo" url="file:${repo}" />
+        	    <delete dir="${workspace}/src" />
+        	    <delete dir="${workspace}/epoc32" />
+        	</then>
+        </ac:if>
+    </target>
+
+    <target name="tearDown">
+        <ac:if>
+        	<isset property="execute.test" />
+        	<then>
+	        	<hlm:blocksRemoveWorkspace wsid="${wsid}" />
+        	</then>
+        </ac:if>
+        <delete dir="${workspace}" />
+    </target>
+        
+    <target name="test-bundle-install-fail-wsid-not-defined" if="execute.test">
+        <au:expectfailure expectedMessage="wsid has not been specified.">
+    		<hlm:blocksInstallBundle bundle="name" />
+        </au:expectfailure>
+    </target>
+
+    <target name="test-bundle-install-fail-bundle-not-defined" if="execute.test">
+        <au:expectfailure expectedMessage="You can either use the bundle attribute or the group attribute or use nested groupfilterset or bundlefilterset.">
+    		<hlm:blocksInstallBundle wsid="${wsid}" />
+        </au:expectfailure>
+    </target>
+
+    <target name="test-bundle-install-fail-bundle-and-patternset-defined" if="execute.test">
+        <au:expectfailure expectedMessage="You can either use the bundle attribute or the group attribute or use nested groupfilterset or bundlefilterset.">
+    		<hlm:blocksInstallBundle wsid="${wsid}" bundle="bundle">
+    		    <bundleFilterSet>
+    		        <include name=".*" />
+    		    </bundleFilterSet>
+    		</hlm:blocksInstallBundle>
+        </au:expectfailure>
+    </target>
+    
+    <target name="test-blocks-single-bundle-install" if="execute.test">
+        <au:assertFileDoesntExist file="${workspace}/epoc32" />
+        <hlm:blocksInstallBundle wsid="${wsid}" bundle="blocks.extras" />
+        <au:assertFileExists file="${workspace}/epoc32" />
+    </target>
+
+    <target name="test-blocks-single-invalid-bundle-install" if="execute.test">
+        <au:expectfailure message="External process error: apt-get failed">
+        	<hlm:blocksInstallBundle wsid="${wsid}" bundle="blocks.invalid.bundle" />
+        </au:expectfailure>
+    </target>
+
+    <target name="test-blocks-single-bundle-install-all" if="execute.test">
+        <au:assertFileDoesntExist file="${workspace}/src" />
+        <au:assertFileDoesntExist file="${workspace}/epoc32" />
+        <hlm:blocksInstallBundle wsid="${wsid}">
+		    <bundleFilterSet>
+		        <include name=".*" />
+		    </bundleFilterSet>
+  		</hlm:blocksInstallBundle>
+        <au:assertFileExists file="${workspace}/src" />
+        <au:assertFileExists file="${workspace}/epoc32" />
+    </target>
+
+    <target name="test-blocks-single-bundle-install-exclude" if="execute.test">
+        <au:assertFileDoesntExist file="${workspace}/src" />
+        <au:assertFileDoesntExist file="${workspace}/epoc32" />
+        <hlm:blocksInstallBundle wsid="${wsid}">
+		    <bundleFilterSet>
+		        <exclude name=".*extra.*" />
+		    </bundleFilterSet>
+  		</hlm:blocksInstallBundle>
+        <au:assertFileExists file="${workspace}/src" />
+        <au:assertFileDoesntExist file="${workspace}/epoc32" />
+    </target>
+
+    <target name="test-blocks-single-group-install" if="execute.test">
+        <au:assertFileDoesntExist file="${workspace}/src" />
+        <au:assertFileDoesntExist file="${workspace}/epoc32" />
+        <hlm:blocksInstallBundle wsid="${wsid}" group="Sources" />
+        <au:assertFileExists file="${workspace}/src" />
+        <au:assertFileDoesntExist file="${workspace}/epoc32" />
+    </target>
+
+    <target name="test-blocks-filter-group-install" if="execute.test">
+        <au:assertFileDoesntExist file="${workspace}/src" />
+        <au:assertFileDoesntExist file="${workspace}/epoc32" />
+        <hlm:blocksInstallBundle wsid="${wsid}">
+		    <groupFilterSet>
+		        <include name="Source.*" />
+		    </groupFilterSet>
+  		</hlm:blocksInstallBundle>
+        <au:assertFileExists file="${workspace}/src" />
+        <au:assertFileDoesntExist file="${workspace}/epoc32" />
+    </target>
+        
+    <target name="test-blocks-update-workspace" if="execute.test">
+        <hlm:blocksInstallBundle wsid="${wsid}" group="Sources" />
+        <hlm:blocksUpdate wsid="${wsid}" verbose="true" />
+        <au:assertLogContains text="Updating workspace " />
+        <au:assertLogContains text="updated successfully." />
+        <au:assertLogContains text="Reading package lists..." />
+    </target>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/tests/antunits/test_blocks_repo.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : test_blocks_repo.ant.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="helium-blocks-repo-unittest" xmlns:hlm="http://www.nokia.com/helium" xmlns:au="antlib:org.apache.ant.antunit" 
+    xmlns:ac="antlib:net.sf.antcontrib">
+    <description>Helium blocks repository unittests.</description>
+    
+    <property name="workspace" location="${test.temp.dir}/workspace" />
+    <property name="repo" location="${test.temp.dir}/repo" />
+    
+    <target name="setUp">
+        <tstamp>
+            <format property="tstamp" pattern="yyyyMMddHHmmssSSS" locale="en,UK" />
+        </tstamp>
+        <mkdir dir="${test.temp.dir}" />
+        <delete file="${test.temp.dir}" />
+        <mkdir dir="${test.temp.dir}" />
+        <mkdir dir="${workspace}" />
+        <mkdir dir="${repo}" />
+        
+        <exec executable="blocks.bat"  resultproperty="blocks.result" failifexecutionfails="false" osfamily="windows" />
+        <exec executable="blocks"  resultproperty="blocks.result" failifexecutionfails="false" osfamily="unix" />
+        <condition property="execute.test" value="true">
+            <equals arg1="${blocks.result}" arg2="0" />
+        </condition>
+        <echo>execute.test: ${execute.test}</echo>    
+        <ac:if>
+        	<istrue value="${execute.test}" />
+        	<then>
+                <hlm:blocksAddWorkspace name="unittest-addworkspace-${tstamp}" dir="${workspace}"
+                    wsidproperty="wsid" />
+        	    <copy todir="${workspace}">
+        	        <fileset dir="../" includes="src/**" />
+        	    </copy>
+        	    <mkdir dir="${workspace}/epoc32" />
+        	    <copy todir="${workspace}/epoc32">
+        	        <fileset dir="../" includes="src/**" />
+        	    </copy>
+        	    <exec executable="bundle.bat" dir="${workspace}" osfamily="windows">
+        	        <arg line="create-xml -n blocks -v 1.0" />
+        	        <arg value="--source=${workspace}/src" />
+        	        <arg value="--target=${workspace}/epoc32" />
+        	        <arg value="${test.temp.dir}/blocks.xml" />
+        	    </exec>
+        	    <exec executable="bundle.bat" dir="${workspace}" osfamily="windows">
+        	        <arg line="create" />
+        	        <arg line="-o ${repo}" />
+        	        <arg value="${test.temp.dir}/blocks.xml" />
+        	    </exec>
+                <hlm:blocksCreateRepositoryIndex dest="${repo}" verbose="true" />
+        	</then>
+        </ac:if>
+    </target>
+
+    <target name="tearDown">
+        <ac:if>
+        	<isset property="execute.test" />
+        	<then>
+	        	<hlm:blocksRemoveWorkspace wsid="${wsid}" />
+        	</then>
+        </ac:if>
+        <delete dir="${workspace}" />
+    </target>
+        
+    <target name="test-add-repo-fail-if-url-is-not-defined" if="execute.test">
+        <au:expectfailure expectedMessage="'url' attribute has not been defined.">
+    	    <hlm:blocksAddRepository wsid="${wsid}" />
+        </au:expectfailure>
+    </target>
+
+    <target name="test-add-repo-fail-if-url-is-not-defined-with-name" if="execute.test">
+        <au:expectfailure expectedMessage="'url' attribute has not been defined.">
+    	    <hlm:blocksAddRepository wsid="${wsid}" name="demo"/>
+        </au:expectfailure>
+    </target>
+    
+    <target name="test-add-repo-fail-if-url-defined-with-nested-reposet" if="execute.test">
+        <au:expectfailure expectedMessage="'url' attribute and nested repositorySet element cannot be used at the same time.">
+    	    <hlm:blocksAddRepository wsid="${wsid}" url="${repo}">
+    	        <repositorySet />
+    	    </hlm:blocksAddRepository>
+        </au:expectfailure>
+    </target>
+
+    <target name="test-add-repo-fail-if-nested-reposet-has-invalid-reference-type" if="execute.test">
+        <patternset id="patternset.id" />
+        <au:expectfailure expectedMessage="The type referenced by patternset.id is not of RepositorySet type.">
+    	    <hlm:blocksAddRepository wsid="${wsid}">
+    	        <repositorySet refid="patternset.id" />
+    	    </hlm:blocksAddRepository>
+        </au:expectfailure>
+    </target>
+
+    <target name="test-add-repo-is-working-using-url" if="execute.test">
+        <au:assertFalse message="The workspace should not have any repo allocted yet.">
+            <hlm:blocksRepositoryExists wsid="${wsid}" />
+        </au:assertFalse>
+  	    <hlm:blocksAddRepository wsid="${wsid}" url="file:${repo}" />
+        <au:assertTrue message="The workspace should have a declared repo.">
+            <hlm:blocksRepositoryExists wsid="${wsid}" />
+        </au:assertTrue>
+    </target>
+
+    <target name="test-add-repo-is-working-using-url-and-name" if="execute.test">
+        <au:assertFalse message="The workspace should not have any repo allocted yet.">
+            <hlm:blocksRepositoryExists wsid="${wsid}" />
+        </au:assertFalse>
+  	    <hlm:blocksAddRepository wsid="${wsid}" name="demo" url="file:${repo}" />
+        <au:assertTrue message="The workspace should have a declared repo.">
+            <hlm:blocksRepositoryExists wsid="${wsid}" name="demo" />
+        </au:assertTrue>
+    </target>
+
+    <target name="test-add-repo-is-working-using-nested-reposet" if="execute.test">
+        <au:assertFalse message="The workspace should not have any repo allocted yet.">
+            <hlm:blocksRepositoryExists wsid="${wsid}" />
+        </au:assertFalse>
+  	    <hlm:blocksAddRepository wsid="${wsid}">
+  	        <repositorySet>
+  	            <repository  name="demo" url="file:${repo}" />
+  	        </repositorySet>
+  	    </hlm:blocksAddRepository>
+        <au:assertTrue message="The workspace should have a declared repo.">
+            <hlm:blocksRepositoryExists wsid="${wsid}" name="demo" />
+        </au:assertTrue>
+    </target>
+
+    <hlm:blocksRepositorySet id="reposet.id">
+        <repository  name="demo" url="file:${repo}" />
+    </hlm:blocksRepositorySet>
+
+    <target name="test-add-repo-is-working-using-nested-reposet-ref" if="execute.test">
+        <au:assertFalse message="The workspace should not have any repo allocted yet.">
+            <hlm:blocksRepositoryExists wsid="${wsid}" />
+        </au:assertFalse>
+  	    <hlm:blocksAddRepository wsid="${wsid}">
+  	        <repositorySet refid="reposet.id" />
+  	    </hlm:blocksAddRepository>
+        <au:assertTrue message="The workspace should have a declared repo.">
+            <hlm:blocksRepositoryExists wsid="${wsid}" name="demo" />
+        </au:assertTrue>
+    </target>
+
+    <target name="test-remove-repo-fail-if-repositoryId-is-not-defined" if="execute.test">
+        <au:expectfailure message="'repositoryId' attribute has not been defined.">
+    	    <hlm:blocksRemoveRepository wsid="${wsid}" />
+        </au:expectfailure>
+    </target>
+
+    <target name="test-remove-repo-fail-if-repositoryId-and-name-are-defined" if="execute.test">
+        <au:expectfailure message="'repositoryId' attribute has not been defined.">
+    	    <hlm:blocksRemoveRepository wsid="${wsid}" />
+        </au:expectfailure>
+    </target>
+
+    <target name="test-remove-repo-with-repositoryid" if="execute.test">
+        <au:assertFalse message="The workspace should not have any repo allocted yet.">
+            <hlm:blocksRepositoryExists wsid="${wsid}" />
+        </au:assertFalse>
+  	    <hlm:blocksAddRepository wsid="${wsid}">
+  	        <repositorySet>
+  	            <repository  name="demo" url="file:${repo}" />
+  	        </repositorySet>
+  	    </hlm:blocksAddRepository>
+        <au:assertTrue message="The workspace should have a declared repo.">
+            <hlm:blocksRepositoryExists wsid="${wsid}" name="demo" />
+        </au:assertTrue>
+	    <hlm:blocksRemoveRepository wsid="${wsid}" repositoryId="1" />
+        <au:assertFalse message="The workspace should not have any declared repo.">
+            <hlm:blocksRepositoryExists wsid="${wsid}" />
+        </au:assertFalse>
+    </target>
+
+    <target name="test-remove-repo-with-name" if="execute.test">
+        <au:assertFalse message="The workspace should not have any repo allocted yet.">
+            <hlm:blocksRepositoryExists wsid="${wsid}" />
+        </au:assertFalse>
+  	    <hlm:blocksAddRepository wsid="${wsid}">
+  	        <repositorySet>
+  	            <repository  name="demo" url="file:${repo}" />
+  	        </repositorySet>
+  	    </hlm:blocksAddRepository>
+        <au:assertTrue message="The workspace should have a declared repo.">
+            <hlm:blocksRepositoryExists wsid="${wsid}" name="demo" />
+        </au:assertTrue>
+	    <hlm:blocksRemoveRepository wsid="${wsid}" name="demo" />
+        <au:assertFalse message="The workspace should not have a declared repo.">
+            <hlm:blocksRepositoryExists wsid="${wsid}" name="demo" />
+        </au:assertFalse>
+    </target>
+
+    
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/tests/antunits/test_bundle.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : test_blocks.ant.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="helium-antlib-bundle-unittest" xmlns:hlm="http://www.nokia.com/helium" xmlns:au="antlib:org.apache.ant.antunit">
+    <description>Helium Antlib bundle unittests.</description>
+    
+    <target name="setUp">
+        <delete file="${test.temp.dir}" />
+        <mkdir dir="${test.temp.dir}" />
+    </target>
+
+    <target name="tearDown">
+        <delete dir="${test.temp.dir}" />
+    </target>
+    
+    <target name="is-bundle-available">
+        <exec executable="bundle.bat"  resultproperty="bundle.result" failifexecutionfails="false" osfamily="windows" />
+        <exec executable="bundle"  resultproperty="bundle.result" failifexecutionfails="false" osfamily="unix" />
+        <condition property="execute.test" value="true">
+            <equals arg1="${bundle.result}" arg2="0" />
+        </condition>
+        <echo>execute.test: ${execute.test}</echo>    
+    </target>
+    
+    <target name="test-nonsign-invalid-debs" depends="is-bundle-available" if="execute.test">
+        <mkdir dir="${test.temp.dir}/repo" />
+        <copy todir="${test.temp.dir}/repo">
+            <fileset dir="${ant.file.helium-antlib-bundle-unittest}/../../data" includes="invalid*.deb"/>
+        </copy>
+        <au:expectfailure>
+            <hlm:blocksCreateRepositoryIndex dest="${test.temp.dir}/repo" verbose="true" />
+        </au:expectfailure>
+        <au:assertFileExists file="${test.temp.dir}/repo/Packages" />
+    </target>
+
+    <target name="test-nonsign-invalid-debs-failonerror-false" depends="is-bundle-available" if="execute.test">
+        <mkdir dir="${test.temp.dir}/repo" />
+        <copy todir="${test.temp.dir}/repo">
+            <fileset dir="${ant.file.helium-antlib-bundle-unittest}/../../data" includes="invalid*.deb"/>
+        </copy>
+        <hlm:blocksCreateRepositoryIndex dest="${test.temp.dir}/repo" verbose="true" failonerror="false" />
+        <au:assertFileExists file="${test.temp.dir}/repo/Packages" />
+    </target>
+
+    <target name="test-nonsign-empty" depends="is-bundle-available" if="execute.test">
+        <mkdir dir="${test.temp.dir}/repo" />
+        <hlm:blocksCreateRepositoryIndex dest="${test.temp.dir}/repo" verbose="true" />
+        <au:assertFileExists file="${test.temp.dir}/repo/Packages" />
+    </target>
+
+    <target name="test-noargs" depends="is-bundle-available" if="execute.test">
+        <mkdir dir="${test.temp.dir}/repo" />
+        <au:expectfailure message="'dest' attribute must be defined.">
+            <hlm:blocksCreateRepositoryIndex />
+        </au:expectfailure>
+        <au:assertFileDoesntExist file="${test.temp.dir}/repo/Packages" />
+    </target>
+
+    <target name="test-nonsign-valid-debs" depends="is-bundle-available" if="execute.test">
+        <mkdir dir="${test.temp.dir}/repo" />
+        <copy todir="${test.temp.dir}/repo">
+            <fileset dir="${ant.file.helium-antlib-bundle-unittest}/../../data" includes="demo*.deb"/>
+        </copy>
+        <hlm:blocksCreateRepositoryIndex dest="${test.temp.dir}/repo" verbose="true" />
+        <au:assertFileExists file="${test.temp.dir}/repo/Packages" />
+    </target>
+
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/tests/bld.sh	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+if [ -f ~/.bashrc ] ; then
+    . ~/.bashrc
+fi
+
+ant $*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/tests/build.bat	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,33 @@
+@echo off
+
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of the License "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description: 
+rem
+
+setlocal
+if not defined JAVA_6_HOME (
+set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02
+) ELSE  set TESTED_JAVA=%JAVA_6_HOME%
+if exist %TESTED_JAVA% (set JAVA_HOME=%TESTED_JAVA%)
+set OLDANT_ARGS=-lib %CD%\..\lib -lib %ANT_LIB_HOME%\lib -lib %ANT_LIB_HOME%\bin\helium-core.jar -lib %CD%\..\..\bin\helium-blocks.jar -lib %ANT_LIB_HOME%\antlibs
+call ant %*
+if "%ERRORLEVEL%" neq "0" (goto error)
+endlocal
+goto :eof
+
+:error
+endlocal
+if "%OS%"=="Windows_NT" color 00
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/tests/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : build.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="helium-blocks" xmlns:au="antlib:org.apache.ant.antunit">
+    <description>Helium Antlib blocks tests.</description>
+    <taskdef resource="com/nokia/helium/blocks/ant/antlib.xml" uri="http://www.nokia.com/helium" />
+
+    <import file="${builder.dir}/java/test-macros.ant.xml"/>
+    
+</project>
Binary file buildframework/helium/sf/java/blocks/tests/data/demo.src_1.0-1.deb has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/tests/data/invalid1.deb	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,1 @@
+1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/tests/data/invalid2.deb	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,1 @@
+1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/tests/hlm_debug.log	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,3569 @@
+11:02:26,198  DEBUG - Execution of blocks returned: 0  
+11:02:26,229  DEBUG - Execution of subst returned: 0  
+11:02:26,244  DEBUG - Execution of subst returned: 0  
+11:02:26,666  DEBUG - Execution of blocks returned: 0  
+11:02:27,119  DEBUG - Execution of blocks returned: 0  
+11:02:27,932  DEBUG - Execution of blocks returned: 0  
+11:02:28,744  DEBUG - Execution of blocks returned: 0  
+11:02:29,151  DEBUG - Execution of blocks returned: 0  
+11:02:29,166  DEBUG - Execution of subst returned: 0  
+11:02:29,197  DEBUG - Execution of subst returned: 0  
+11:02:29,213  DEBUG - Execution of subst returned: 0  
+11:02:29,244  DEBUG - Execution of subst returned: 0  
+11:02:29,260  DEBUG - Execution of subst returned: 0  
+11:02:29,291  DEBUG - Execution of subst returned: 0  
+11:02:29,307  DEBUG - Execution of subst returned: 0  
+11:02:29,338  DEBUG - Execution of subst returned: 0  
+11:02:29,354  DEBUG - Execution of subst returned: 0  
+11:02:29,385  DEBUG - Execution of subst returned: 0  
+11:02:29,807  DEBUG - Execution of blocks returned: 0  
+11:02:30,619  DEBUG - Execution of blocks returned: 0  
+11:02:30,635  DEBUG - Execution of subst returned: 0  
+11:02:30,666  DEBUG - Execution of subst returned: 0  
+11:02:30,682  DEBUG - Execution of subst returned: 0  
+11:02:30,713  DEBUG - Execution of subst returned: 0  
+11:02:30,729  DEBUG - Execution of subst returned: 0  
+11:02:30,760  DEBUG - Execution of subst returned: 0  
+11:02:30,776  DEBUG - Execution of subst returned: 0  
+11:02:30,807  DEBUG - Execution of subst returned: 0  
+11:02:31,619  DEBUG - Execution of blocks returned: 0  
+11:02:32,041  DEBUG - Execution of blocks returned: 0  
+11:02:33,275  DEBUG - Execution of blocks returned: 0  
+11:02:33,682  DEBUG - Execution of blocks returned: 0  
+11:02:34,104  DEBUG - Execution of blocks returned: 0  
+11:02:34,916  DEBUG - Execution of blocks returned: 0  
+11:02:35,322  DEBUG - Execution of blocks returned: 0  
+11:02:35,744  DEBUG - Execution of blocks returned: 0  
+11:02:37,057  DEBUG - Execution of blocks returned: 0  
+11:02:40,275  DEBUG - Execution of bundle returned: 0  
+11:02:41,681  DEBUG - Execution of blocks returned: 0  
+11:02:42,103  DEBUG - Execution of blocks returned: 0  
+11:02:42,931  DEBUG - Execution of blocks returned: 0  
+11:02:45,322  DEBUG - Execution of bundle returned: 0  
+11:02:46,353  DEBUG - Execution of blocks returned: 0  
+11:02:47,416  DEBUG - Execution of blocks returned: 0  
+11:02:50,369  DEBUG - Execution of blocks returned: 0  
+11:02:52,931  DEBUG - Execution of blocks returned: 0  
+11:02:53,353  DEBUG - Execution of blocks returned: 0  
+11:02:54,181  DEBUG - Execution of blocks returned: 0  
+11:02:56,556  DEBUG - Execution of bundle returned: 0  
+11:02:57,587  DEBUG - Execution of blocks returned: 0  
+11:02:58,368  DEBUG - External process error: apt-get failed with error code 100  
+11:02:58,493  DEBUG - Execution of blocks returned: 1  
+11:02:58,915  DEBUG - Execution of blocks returned: 0  
+11:02:59,728  DEBUG - Execution of blocks returned: 0  
+11:03:02,118  DEBUG - Execution of bundle returned: 0  
+11:03:03,149  DEBUG - Execution of blocks returned: 0  
+11:03:05,774  DEBUG - Execution of blocks returned: 0  
+11:03:06,696  DEBUG - Execution of blocks returned: 0  
+11:03:07,118  DEBUG - Execution of blocks returned: 0  
+11:03:07,946  DEBUG - Execution of blocks returned: 0  
+11:03:10,383  DEBUG - Execution of bundle returned: 0  
+11:03:11,415  DEBUG - Execution of blocks returned: 0  
+11:03:11,836  DEBUG - Execution of blocks returned: 0  
+11:03:12,665  DEBUG - Execution of blocks returned: 0  
+11:03:15,055  DEBUG - Execution of bundle returned: 0  
+11:03:16,086  DEBUG - Execution of blocks returned: 0  
+11:03:16,977  DEBUG - Execution of blocks returned: 0  
+11:03:19,586  DEBUG - Execution of blocks returned: 0  
+11:03:20,008  DEBUG - Execution of blocks returned: 0  
+11:03:20,852  DEBUG - Execution of blocks returned: 0  
+11:03:23,242  DEBUG - Execution of bundle returned: 0  
+11:03:24,148  DEBUG - Traceback (most recent call last):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:24,148  DEBUG -     self.doRollover()  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:24,148  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:24,148  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:24,148  DEBUG - Traceback (most recent call last):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:24,148  DEBUG -     if self.shouldRollover(record):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:24,148  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:24,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:24,148  DEBUG - Traceback (most recent call last):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:24,148  DEBUG -     if self.shouldRollover(record):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:24,148  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:24,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:24,148  DEBUG - Traceback (most recent call last):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:24,148  DEBUG -     if self.shouldRollover(record):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:24,148  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:24,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:24,148  DEBUG - Traceback (most recent call last):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:24,148  DEBUG -     if self.shouldRollover(record):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:24,148  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:24,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:24,148  DEBUG - Traceback (most recent call last):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:24,148  DEBUG -     if self.shouldRollover(record):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:24,148  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:24,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:24,148  DEBUG - Traceback (most recent call last):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:24,148  DEBUG -     if self.shouldRollover(record):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:24,148  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:24,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:24,148  DEBUG - Traceback (most recent call last):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:24,148  DEBUG -     if self.shouldRollover(record):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:24,148  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:24,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:24,148  DEBUG - Traceback (most recent call last):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:24,148  DEBUG -     if self.shouldRollover(record):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:24,148  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:24,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:24,148  DEBUG - Traceback (most recent call last):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:24,148  DEBUG -     if self.shouldRollover(record):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:24,148  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:24,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:24,148  DEBUG - Traceback (most recent call last):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:24,148  DEBUG -     if self.shouldRollover(record):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:24,148  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:24,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:24,148  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:24,148  DEBUG - Traceback (most recent call last):  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:24,148  DEBUG -     func(*targs, **kargs)  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:24,148  DEBUG -     h.flush()  
+11:03:24,148  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:24,148  DEBUG -     self.stream.flush()  
+11:03:24,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:24,148  DEBUG - Error in sys.exitfunc:  
+11:03:24,164  DEBUG - Traceback (most recent call last):  
+11:03:24,164  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:24,164  DEBUG -     func(*targs, **kargs)  
+11:03:24,164  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:24,164  DEBUG -     h.flush()  
+11:03:24,164  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:24,164  DEBUG -     self.stream.flush()  
+11:03:24,164  DEBUG - ValueError: I/O operation on closed file  
+11:03:24,273  DEBUG - Execution of blocks returned: 0  
+11:03:25,039  DEBUG - Traceback (most recent call last):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:25,039  DEBUG -     self.doRollover()  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:25,039  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:25,039  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:25,039  DEBUG - Traceback (most recent call last):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:25,039  DEBUG -     if self.shouldRollover(record):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:25,039  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:25,039  DEBUG - ValueError: I/O operation on closed file  
+11:03:25,039  DEBUG - Traceback (most recent call last):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:25,039  DEBUG -     if self.shouldRollover(record):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:25,039  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:25,039  DEBUG - ValueError: I/O operation on closed file  
+11:03:25,039  DEBUG - Traceback (most recent call last):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:25,039  DEBUG -     if self.shouldRollover(record):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:25,039  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:25,039  DEBUG - ValueError: I/O operation on closed file  
+11:03:25,039  DEBUG - Traceback (most recent call last):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:25,039  DEBUG -     if self.shouldRollover(record):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:25,039  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:25,039  DEBUG - ValueError: I/O operation on closed file  
+11:03:25,039  DEBUG - Traceback (most recent call last):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:25,039  DEBUG -     if self.shouldRollover(record):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:25,039  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:25,039  DEBUG - ValueError: I/O operation on closed file  
+11:03:25,039  DEBUG - Traceback (most recent call last):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:25,039  DEBUG -     if self.shouldRollover(record):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:25,039  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:25,039  DEBUG - ValueError: I/O operation on closed file  
+11:03:25,039  DEBUG - Traceback (most recent call last):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:25,039  DEBUG -     if self.shouldRollover(record):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:25,039  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:25,039  DEBUG - ValueError: I/O operation on closed file  
+11:03:25,039  DEBUG - Traceback (most recent call last):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:25,039  DEBUG -     if self.shouldRollover(record):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:25,039  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:25,039  DEBUG - ValueError: I/O operation on closed file  
+11:03:25,039  DEBUG - Traceback (most recent call last):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:25,039  DEBUG -     if self.shouldRollover(record):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:25,039  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:25,039  DEBUG - ValueError: I/O operation on closed file  
+11:03:25,039  DEBUG - Traceback (most recent call last):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:25,039  DEBUG -     if self.shouldRollover(record):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:25,039  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:25,039  DEBUG - ValueError: I/O operation on closed file  
+11:03:25,039  DEBUG - Traceback (most recent call last):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:25,039  DEBUG -     if self.shouldRollover(record):  
+11:03:25,039  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:25,039  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:25,039  DEBUG - ValueError: I/O operation on closed file  
+11:03:25,039  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:25,039  DEBUG - Traceback (most recent call last):  
+11:03:25,070  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:25,070  DEBUG -     func(*targs, **kargs)  
+11:03:25,070  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:25,070  DEBUG -     h.flush()  
+11:03:25,070  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:25,070  DEBUG -     self.stream.flush()  
+11:03:25,070  DEBUG - ValueError: I/O operation on closed file  
+11:03:25,070  DEBUG - Error in sys.exitfunc:  
+11:03:25,070  DEBUG - Traceback (most recent call last):  
+11:03:25,070  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:25,070  DEBUG -     func(*targs, **kargs)  
+11:03:25,070  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:25,070  DEBUG -     h.flush()  
+11:03:25,070  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:25,070  DEBUG -     self.stream.flush()  
+11:03:25,070  DEBUG - ValueError: I/O operation on closed file  
+11:03:25,180  DEBUG - Execution of blocks returned: 0  
+11:03:27,617  DEBUG - Traceback (most recent call last):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:27,617  DEBUG -     self.doRollover()  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:27,617  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:27,617  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:27,617  DEBUG - Traceback (most recent call last):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:27,617  DEBUG -     if self.shouldRollover(record):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:27,617  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:27,617  DEBUG - ValueError: I/O operation on closed file  
+11:03:27,617  DEBUG - Traceback (most recent call last):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:27,617  DEBUG -     if self.shouldRollover(record):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:27,617  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:27,617  DEBUG - ValueError: I/O operation on closed file  
+11:03:27,617  DEBUG - Traceback (most recent call last):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:27,617  DEBUG -     if self.shouldRollover(record):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:27,617  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:27,617  DEBUG - ValueError: I/O operation on closed file  
+11:03:27,617  DEBUG - Traceback (most recent call last):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:27,617  DEBUG -     if self.shouldRollover(record):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:27,617  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:27,617  DEBUG - ValueError: I/O operation on closed file  
+11:03:27,617  DEBUG - Traceback (most recent call last):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:27,617  DEBUG -     if self.shouldRollover(record):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:27,617  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:27,617  DEBUG - ValueError: I/O operation on closed file  
+11:03:27,617  DEBUG - Traceback (most recent call last):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:27,617  DEBUG -     if self.shouldRollover(record):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:27,617  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:27,617  DEBUG - ValueError: I/O operation on closed file  
+11:03:27,617  DEBUG - Traceback (most recent call last):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:27,617  DEBUG -     if self.shouldRollover(record):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:27,617  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:27,617  DEBUG - ValueError: I/O operation on closed file  
+11:03:27,617  DEBUG - Traceback (most recent call last):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:27,617  DEBUG -     if self.shouldRollover(record):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:27,617  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:27,617  DEBUG - ValueError: I/O operation on closed file  
+11:03:27,617  DEBUG - Traceback (most recent call last):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:27,617  DEBUG -     if self.shouldRollover(record):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:27,617  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:27,617  DEBUG - ValueError: I/O operation on closed file  
+11:03:27,617  DEBUG - Traceback (most recent call last):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:27,617  DEBUG -     if self.shouldRollover(record):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:27,617  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:27,617  DEBUG - ValueError: I/O operation on closed file  
+11:03:27,617  DEBUG - Traceback (most recent call last):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:27,617  DEBUG -     if self.shouldRollover(record):  
+11:03:27,617  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:27,617  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:27,617  DEBUG - ValueError: I/O operation on closed file  
+11:03:27,617  DEBUG - Traceback (most recent call last):  
+11:03:27,648  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:27,648  DEBUG -     if self.shouldRollover(record):  
+11:03:27,648  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:27,648  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:27,648  DEBUG - ValueError: I/O operation on closed file  
+11:03:27,648  DEBUG - Traceback (most recent call last):  
+11:03:27,648  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:27,648  DEBUG -     if self.shouldRollover(record):  
+11:03:27,648  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:27,648  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:27,648  DEBUG - ValueError: I/O operation on closed file  
+11:03:27,648  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:27,648  DEBUG - Traceback (most recent call last):  
+11:03:27,648  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:27,648  DEBUG -     func(*targs, **kargs)  
+11:03:27,648  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:27,648  DEBUG -     h.flush()  
+11:03:27,648  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:27,648  DEBUG -     self.stream.flush()  
+11:03:27,648  DEBUG - ValueError: I/O operation on closed file  
+11:03:27,648  DEBUG - Error in sys.exitfunc:  
+11:03:27,648  DEBUG - Traceback (most recent call last):  
+11:03:27,648  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:27,648  DEBUG -     func(*targs, **kargs)  
+11:03:27,648  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:27,648  DEBUG -     h.flush()  
+11:03:27,648  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:27,648  DEBUG -     self.stream.flush()  
+11:03:27,648  DEBUG - ValueError: I/O operation on closed file  
+11:03:27,758  DEBUG - Execution of blocks returned: 0  
+11:03:28,070  DEBUG - Traceback (most recent call last):  
+11:03:28,070  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:28,070  DEBUG -     self.doRollover()  
+11:03:28,070  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:28,070  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:28,070  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:28,070  DEBUG - Traceback (most recent call last):  
+11:03:28,070  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:28,070  DEBUG -     if self.shouldRollover(record):  
+11:03:28,070  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:28,070  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:28,070  DEBUG - ValueError: I/O operation on closed file  
+11:03:28,070  DEBUG - Traceback (most recent call last):  
+11:03:28,070  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:28,070  DEBUG -     if self.shouldRollover(record):  
+11:03:28,070  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:28,070  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:28,070  DEBUG - ValueError: I/O operation on closed file  
+11:03:28,070  DEBUG - Traceback (most recent call last):  
+11:03:28,070  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:28,070  DEBUG -     if self.shouldRollover(record):  
+11:03:28,070  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:28,070  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:28,070  DEBUG - ValueError: I/O operation on closed file  
+11:03:28,070  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:28,070  DEBUG - Traceback (most recent call last):  
+11:03:28,070  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:28,070  DEBUG -     func(*targs, **kargs)  
+11:03:28,070  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:28,070  DEBUG -     h.flush()  
+11:03:28,070  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:28,070  DEBUG -     self.stream.flush()  
+11:03:28,070  DEBUG - ValueError: I/O operation on closed file  
+11:03:28,070  DEBUG - Error in sys.exitfunc:  
+11:03:28,070  DEBUG - Traceback (most recent call last):  
+11:03:28,070  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:28,070  DEBUG -     func(*targs, **kargs)  
+11:03:28,070  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:28,070  DEBUG -     h.flush()  
+11:03:28,070  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:28,070  DEBUG -     self.stream.flush()  
+11:03:28,070  DEBUG - ValueError: I/O operation on closed file  
+11:03:28,180  DEBUG - Execution of blocks returned: 0  
+11:03:28,898  DEBUG - Traceback (most recent call last):  
+11:03:28,898  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:28,898  DEBUG -     self.doRollover()  
+11:03:28,898  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:28,898  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:28,898  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:28,898  DEBUG - Traceback (most recent call last):  
+11:03:28,898  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:28,898  DEBUG -     if self.shouldRollover(record):  
+11:03:28,898  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:28,898  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:28,898  DEBUG - ValueError: I/O operation on closed file  
+11:03:28,898  DEBUG - Traceback (most recent call last):  
+11:03:28,898  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:28,898  DEBUG -     if self.shouldRollover(record):  
+11:03:28,898  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:28,898  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:28,898  DEBUG - ValueError: I/O operation on closed file  
+11:03:28,898  DEBUG - Traceback (most recent call last):  
+11:03:28,898  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:28,898  DEBUG -     if self.shouldRollover(record):  
+11:03:28,898  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:28,898  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:28,898  DEBUG - ValueError: I/O operation on closed file  
+11:03:28,898  DEBUG - Traceback (most recent call last):  
+11:03:28,898  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:28,898  DEBUG -     if self.shouldRollover(record):  
+11:03:28,898  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:28,898  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:28,898  DEBUG - ValueError: I/O operation on closed file  
+11:03:28,898  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:28,898  DEBUG - Traceback (most recent call last):  
+11:03:28,898  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:28,898  DEBUG -     func(*targs, **kargs)  
+11:03:28,898  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:28,898  DEBUG -     h.flush()  
+11:03:28,898  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:28,898  DEBUG -     self.stream.flush()  
+11:03:28,898  DEBUG - ValueError: I/O operation on closed file  
+11:03:28,898  DEBUG - Error in sys.exitfunc:  
+11:03:28,898  DEBUG - Traceback (most recent call last):  
+11:03:28,898  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:28,898  DEBUG -     func(*targs, **kargs)  
+11:03:28,898  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:28,898  DEBUG -     h.flush()  
+11:03:28,898  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:28,898  DEBUG -     self.stream.flush()  
+11:03:28,898  DEBUG - ValueError: I/O operation on closed file  
+11:03:29,008  DEBUG - Execution of blocks returned: 0  
+11:03:31,383  DEBUG - Execution of bundle returned: 0  
+11:03:32,289  DEBUG - Traceback (most recent call last):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:32,289  DEBUG -     self.doRollover()  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:32,289  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:32,289  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:32,289  DEBUG - Traceback (most recent call last):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:32,289  DEBUG -     if self.shouldRollover(record):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:32,289  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:32,289  DEBUG - ValueError: I/O operation on closed file  
+11:03:32,289  DEBUG - Traceback (most recent call last):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:32,289  DEBUG -     if self.shouldRollover(record):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:32,289  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:32,289  DEBUG - ValueError: I/O operation on closed file  
+11:03:32,289  DEBUG - Traceback (most recent call last):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:32,289  DEBUG -     if self.shouldRollover(record):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:32,289  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:32,289  DEBUG - ValueError: I/O operation on closed file  
+11:03:32,289  DEBUG - Traceback (most recent call last):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:32,289  DEBUG -     if self.shouldRollover(record):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:32,289  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:32,289  DEBUG - ValueError: I/O operation on closed file  
+11:03:32,289  DEBUG - Traceback (most recent call last):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:32,289  DEBUG -     if self.shouldRollover(record):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:32,289  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:32,289  DEBUG - ValueError: I/O operation on closed file  
+11:03:32,289  DEBUG - Traceback (most recent call last):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:32,289  DEBUG -     if self.shouldRollover(record):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:32,289  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:32,289  DEBUG - ValueError: I/O operation on closed file  
+11:03:32,289  DEBUG - Traceback (most recent call last):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:32,289  DEBUG -     if self.shouldRollover(record):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:32,289  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:32,289  DEBUG - ValueError: I/O operation on closed file  
+11:03:32,289  DEBUG - Traceback (most recent call last):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:32,289  DEBUG -     if self.shouldRollover(record):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:32,289  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:32,289  DEBUG - ValueError: I/O operation on closed file  
+11:03:32,289  DEBUG - Traceback (most recent call last):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:32,289  DEBUG -     if self.shouldRollover(record):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:32,289  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:32,289  DEBUG - ValueError: I/O operation on closed file  
+11:03:32,289  DEBUG - Traceback (most recent call last):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:32,289  DEBUG -     if self.shouldRollover(record):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:32,289  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:32,289  DEBUG - ValueError: I/O operation on closed file  
+11:03:32,289  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:32,289  DEBUG - Traceback (most recent call last):  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:32,289  DEBUG -     func(*targs, **kargs)  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:32,289  DEBUG -     h.flush()  
+11:03:32,289  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:32,289  DEBUG -     self.stream.flush()  
+11:03:32,289  DEBUG - ValueError: I/O operation on closed file  
+11:03:32,289  DEBUG - Error in sys.exitfunc:  
+11:03:32,304  DEBUG - Traceback (most recent call last):  
+11:03:32,304  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:32,304  DEBUG -     func(*targs, **kargs)  
+11:03:32,304  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:32,304  DEBUG -     h.flush()  
+11:03:32,304  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:32,304  DEBUG -     self.stream.flush()  
+11:03:32,304  DEBUG - ValueError: I/O operation on closed file  
+11:03:32,414  DEBUG - Execution of blocks returned: 0  
+11:03:34,867  DEBUG - Traceback (most recent call last):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:34,867  DEBUG -     self.doRollover()  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:34,867  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:34,867  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:34,867  DEBUG - Traceback (most recent call last):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:34,867  DEBUG -     if self.shouldRollover(record):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:34,867  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:34,867  DEBUG - ValueError: I/O operation on closed file  
+11:03:34,867  DEBUG - Traceback (most recent call last):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:34,867  DEBUG -     if self.shouldRollover(record):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:34,867  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:34,867  DEBUG - ValueError: I/O operation on closed file  
+11:03:34,867  DEBUG - Traceback (most recent call last):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:34,867  DEBUG -     if self.shouldRollover(record):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:34,867  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:34,867  DEBUG - ValueError: I/O operation on closed file  
+11:03:34,867  DEBUG - Traceback (most recent call last):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:34,867  DEBUG -     if self.shouldRollover(record):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:34,867  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:34,867  DEBUG - ValueError: I/O operation on closed file  
+11:03:34,867  DEBUG - Traceback (most recent call last):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:34,867  DEBUG -     if self.shouldRollover(record):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:34,867  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:34,867  DEBUG - ValueError: I/O operation on closed file  
+11:03:34,867  DEBUG - Traceback (most recent call last):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:34,867  DEBUG -     if self.shouldRollover(record):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:34,867  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:34,867  DEBUG - ValueError: I/O operation on closed file  
+11:03:34,867  DEBUG - Traceback (most recent call last):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:34,867  DEBUG -     if self.shouldRollover(record):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:34,867  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:34,867  DEBUG - ValueError: I/O operation on closed file  
+11:03:34,867  DEBUG - Traceback (most recent call last):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:34,867  DEBUG -     if self.shouldRollover(record):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:34,867  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:34,867  DEBUG - ValueError: I/O operation on closed file  
+11:03:34,867  DEBUG - Traceback (most recent call last):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:34,867  DEBUG -     if self.shouldRollover(record):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:34,867  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:34,867  DEBUG - ValueError: I/O operation on closed file  
+11:03:34,867  DEBUG - Traceback (most recent call last):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:34,867  DEBUG -     if self.shouldRollover(record):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:34,867  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:34,867  DEBUG - ValueError: I/O operation on closed file  
+11:03:34,867  DEBUG - Traceback (most recent call last):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:34,867  DEBUG -     if self.shouldRollover(record):  
+11:03:34,867  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:34,867  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:34,867  DEBUG - ValueError: I/O operation on closed file  
+11:03:34,867  DEBUG - Traceback (most recent call last):  
+11:03:34,898  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:34,898  DEBUG -     if self.shouldRollover(record):  
+11:03:34,898  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:34,898  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:34,898  DEBUG - ValueError: I/O operation on closed file  
+11:03:34,898  DEBUG - Traceback (most recent call last):  
+11:03:34,898  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:34,898  DEBUG -     if self.shouldRollover(record):  
+11:03:34,898  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:34,898  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:34,898  DEBUG - ValueError: I/O operation on closed file  
+11:03:34,898  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:34,898  DEBUG - Traceback (most recent call last):  
+11:03:34,898  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:34,898  DEBUG -     func(*targs, **kargs)  
+11:03:34,898  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:34,898  DEBUG -     h.flush()  
+11:03:34,898  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:34,898  DEBUG -     self.stream.flush()  
+11:03:34,898  DEBUG - ValueError: I/O operation on closed file  
+11:03:34,898  DEBUG - Error in sys.exitfunc:  
+11:03:34,898  DEBUG - Traceback (most recent call last):  
+11:03:34,898  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:34,898  DEBUG -     func(*targs, **kargs)  
+11:03:34,898  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:34,898  DEBUG -     h.flush()  
+11:03:34,898  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:34,898  DEBUG -     self.stream.flush()  
+11:03:34,898  DEBUG - ValueError: I/O operation on closed file  
+11:03:35,007  DEBUG - Execution of blocks returned: 0  
+11:03:35,320  DEBUG - Traceback (most recent call last):  
+11:03:35,320  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:35,320  DEBUG -     self.doRollover()  
+11:03:35,320  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:35,320  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:35,320  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:35,320  DEBUG - Traceback (most recent call last):  
+11:03:35,320  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:35,320  DEBUG -     if self.shouldRollover(record):  
+11:03:35,320  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:35,320  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:35,320  DEBUG - ValueError: I/O operation on closed file  
+11:03:35,320  DEBUG - Traceback (most recent call last):  
+11:03:35,320  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:35,320  DEBUG -     if self.shouldRollover(record):  
+11:03:35,320  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:35,320  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:35,320  DEBUG - ValueError: I/O operation on closed file  
+11:03:35,320  DEBUG - Traceback (most recent call last):  
+11:03:35,320  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:35,320  DEBUG -     if self.shouldRollover(record):  
+11:03:35,320  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:35,320  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:35,320  DEBUG - ValueError: I/O operation on closed file  
+11:03:35,320  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:35,320  DEBUG - Traceback (most recent call last):  
+11:03:35,320  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:35,320  DEBUG -     func(*targs, **kargs)  
+11:03:35,320  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:35,320  DEBUG -     h.flush()  
+11:03:35,320  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:35,320  DEBUG -     self.stream.flush()  
+11:03:35,320  DEBUG - ValueError: I/O operation on closed file  
+11:03:35,320  DEBUG - Error in sys.exitfunc:  
+11:03:35,320  DEBUG - Traceback (most recent call last):  
+11:03:35,320  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:35,320  DEBUG -     func(*targs, **kargs)  
+11:03:35,320  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:35,320  DEBUG -     h.flush()  
+11:03:35,320  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:35,320  DEBUG -     self.stream.flush()  
+11:03:35,320  DEBUG - ValueError: I/O operation on closed file  
+11:03:35,429  DEBUG - Execution of blocks returned: 0  
+11:03:36,148  DEBUG - Traceback (most recent call last):  
+11:03:36,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:36,148  DEBUG -     self.doRollover()  
+11:03:36,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:36,148  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:36,148  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:36,148  DEBUG - Traceback (most recent call last):  
+11:03:36,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:36,148  DEBUG -     if self.shouldRollover(record):  
+11:03:36,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:36,148  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:36,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:36,148  DEBUG - Traceback (most recent call last):  
+11:03:36,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:36,148  DEBUG -     if self.shouldRollover(record):  
+11:03:36,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:36,148  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:36,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:36,148  DEBUG - Traceback (most recent call last):  
+11:03:36,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:36,148  DEBUG -     if self.shouldRollover(record):  
+11:03:36,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:36,148  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:36,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:36,148  DEBUG - Traceback (most recent call last):  
+11:03:36,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:36,148  DEBUG -     if self.shouldRollover(record):  
+11:03:36,148  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:36,148  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:36,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:36,148  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:36,148  DEBUG - Traceback (most recent call last):  
+11:03:36,148  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:36,148  DEBUG -     func(*targs, **kargs)  
+11:03:36,148  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:36,148  DEBUG -     h.flush()  
+11:03:36,148  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:36,148  DEBUG -     self.stream.flush()  
+11:03:36,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:36,148  DEBUG - Error in sys.exitfunc:  
+11:03:36,148  DEBUG - Traceback (most recent call last):  
+11:03:36,148  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:36,148  DEBUG -     func(*targs, **kargs)  
+11:03:36,148  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:36,148  DEBUG -     h.flush()  
+11:03:36,148  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:36,148  DEBUG -     self.stream.flush()  
+11:03:36,148  DEBUG - ValueError: I/O operation on closed file  
+11:03:36,257  DEBUG - Execution of blocks returned: 0  
+11:03:38,648  DEBUG - Execution of bundle returned: 0  
+11:03:39,554  DEBUG - Traceback (most recent call last):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:39,554  DEBUG -     self.doRollover()  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:39,554  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:39,554  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:39,554  DEBUG - Traceback (most recent call last):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:39,554  DEBUG -     if self.shouldRollover(record):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:39,554  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:39,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:39,554  DEBUG - Traceback (most recent call last):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:39,554  DEBUG -     if self.shouldRollover(record):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:39,554  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:39,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:39,554  DEBUG - Traceback (most recent call last):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:39,554  DEBUG -     if self.shouldRollover(record):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:39,554  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:39,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:39,554  DEBUG - Traceback (most recent call last):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:39,554  DEBUG -     if self.shouldRollover(record):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:39,554  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:39,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:39,554  DEBUG - Traceback (most recent call last):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:39,554  DEBUG -     if self.shouldRollover(record):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:39,554  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:39,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:39,554  DEBUG - Traceback (most recent call last):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:39,554  DEBUG -     if self.shouldRollover(record):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:39,554  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:39,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:39,554  DEBUG - Traceback (most recent call last):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:39,554  DEBUG -     if self.shouldRollover(record):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:39,554  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:39,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:39,554  DEBUG - Traceback (most recent call last):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:39,554  DEBUG -     if self.shouldRollover(record):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:39,554  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:39,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:39,554  DEBUG - Traceback (most recent call last):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:39,554  DEBUG -     if self.shouldRollover(record):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:39,554  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:39,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:39,554  DEBUG - Traceback (most recent call last):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:39,554  DEBUG -     if self.shouldRollover(record):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:39,554  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:39,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:39,554  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:39,554  DEBUG - Traceback (most recent call last):  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:39,554  DEBUG -     func(*targs, **kargs)  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:39,554  DEBUG -     h.flush()  
+11:03:39,554  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:39,554  DEBUG -     self.stream.flush()  
+11:03:39,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:39,554  DEBUG - Error in sys.exitfunc:  
+11:03:39,570  DEBUG - Traceback (most recent call last):  
+11:03:39,570  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:39,570  DEBUG -     func(*targs, **kargs)  
+11:03:39,570  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:39,570  DEBUG -     h.flush()  
+11:03:39,570  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:39,570  DEBUG -     self.stream.flush()  
+11:03:39,570  DEBUG - ValueError: I/O operation on closed file  
+11:03:39,679  DEBUG - Execution of blocks returned: 0  
+11:03:40,445  DEBUG - Traceback (most recent call last):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:40,445  DEBUG -     self.doRollover()  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:40,445  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:40,445  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:40,445  DEBUG - Traceback (most recent call last):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:40,445  DEBUG -     if self.shouldRollover(record):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:40,445  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:40,445  DEBUG - ValueError: I/O operation on closed file  
+11:03:40,445  DEBUG - Traceback (most recent call last):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:40,445  DEBUG -     if self.shouldRollover(record):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:40,445  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:40,445  DEBUG - ValueError: I/O operation on closed file  
+11:03:40,445  DEBUG - Traceback (most recent call last):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:40,445  DEBUG -     if self.shouldRollover(record):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:40,445  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:40,445  DEBUG - ValueError: I/O operation on closed file  
+11:03:40,445  DEBUG - Traceback (most recent call last):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:40,445  DEBUG -     if self.shouldRollover(record):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:40,445  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:40,445  DEBUG - ValueError: I/O operation on closed file  
+11:03:40,445  DEBUG - Traceback (most recent call last):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:40,445  DEBUG -     if self.shouldRollover(record):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:40,445  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:40,445  DEBUG - ValueError: I/O operation on closed file  
+11:03:40,445  DEBUG - Traceback (most recent call last):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:40,445  DEBUG -     if self.shouldRollover(record):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:40,445  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:40,445  DEBUG - ValueError: I/O operation on closed file  
+11:03:40,445  DEBUG - Traceback (most recent call last):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:40,445  DEBUG -     if self.shouldRollover(record):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:40,445  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:40,445  DEBUG - ValueError: I/O operation on closed file  
+11:03:40,445  DEBUG - Traceback (most recent call last):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:40,445  DEBUG -     if self.shouldRollover(record):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:40,445  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:40,445  DEBUG - ValueError: I/O operation on closed file  
+11:03:40,445  DEBUG - Traceback (most recent call last):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:40,445  DEBUG -     if self.shouldRollover(record):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:40,445  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:40,445  DEBUG - ValueError: I/O operation on closed file  
+11:03:40,445  DEBUG - Traceback (most recent call last):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:40,445  DEBUG -     if self.shouldRollover(record):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:40,445  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:40,445  DEBUG - ValueError: I/O operation on closed file  
+11:03:40,445  DEBUG - Traceback (most recent call last):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:40,445  DEBUG -     if self.shouldRollover(record):  
+11:03:40,445  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:40,445  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:40,445  DEBUG - ValueError: I/O operation on closed file  
+11:03:40,445  DEBUG - Traceback (most recent call last):  
+11:03:42,210  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:42,210  DEBUG -     if self.shouldRollover(record):  
+11:03:42,210  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:42,210  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:42,210  DEBUG - ValueError: I/O operation on closed file  
+11:03:42,210  DEBUG - Traceback (most recent call last):  
+11:03:42,210  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:42,210  DEBUG -     if self.shouldRollover(record):  
+11:03:42,210  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:42,210  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:42,210  DEBUG - ValueError: I/O operation on closed file  
+11:03:42,210  DEBUG - Traceback (most recent call last):  
+11:03:42,210  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:42,210  DEBUG -     if self.shouldRollover(record):  
+11:03:42,210  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:42,210  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:42,210  DEBUG - ValueError: I/O operation on closed file  
+11:03:42,210  DEBUG - Traceback (most recent call last):  
+11:03:42,210  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:42,210  DEBUG -     if self.shouldRollover(record):  
+11:03:42,210  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:42,210  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:42,210  DEBUG - ValueError: I/O operation on closed file  
+11:03:42,210  DEBUG - Traceback (most recent call last):  
+11:03:42,210  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:42,210  DEBUG -     if self.shouldRollover(record):  
+11:03:42,210  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:42,210  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:42,210  DEBUG - ValueError: I/O operation on closed file  
+11:03:42,210  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:42,210  DEBUG - Traceback (most recent call last):  
+11:03:42,210  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:42,210  DEBUG -     func(*targs, **kargs)  
+11:03:42,210  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:42,210  DEBUG -     h.flush()  
+11:03:42,210  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:42,210  DEBUG -     self.stream.flush()  
+11:03:42,210  DEBUG - ValueError: I/O operation on closed file  
+11:03:42,210  DEBUG - Error in sys.exitfunc:  
+11:03:42,210  DEBUG - Traceback (most recent call last):  
+11:03:42,210  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:42,210  DEBUG -     func(*targs, **kargs)  
+11:03:42,210  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:42,210  DEBUG -     h.flush()  
+11:03:42,210  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:42,210  DEBUG -     self.stream.flush()  
+11:03:42,210  DEBUG - ValueError: I/O operation on closed file  
+11:03:42,320  DEBUG - Execution of blocks returned: 0  
+11:03:42,648  DEBUG - Traceback (most recent call last):  
+11:03:42,648  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:42,648  DEBUG -     self.doRollover()  
+11:03:42,648  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:42,648  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:42,648  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:42,648  DEBUG - Traceback (most recent call last):  
+11:03:42,648  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:42,648  DEBUG -     if self.shouldRollover(record):  
+11:03:42,648  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:42,648  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:42,648  DEBUG - ValueError: I/O operation on closed file  
+11:03:42,648  DEBUG - Traceback (most recent call last):  
+11:03:42,648  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:42,648  DEBUG -     if self.shouldRollover(record):  
+11:03:42,648  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:42,648  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:42,648  DEBUG - ValueError: I/O operation on closed file  
+11:03:42,648  DEBUG - Traceback (most recent call last):  
+11:03:42,648  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:42,648  DEBUG -     if self.shouldRollover(record):  
+11:03:42,648  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:42,648  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:42,648  DEBUG - ValueError: I/O operation on closed file  
+11:03:42,648  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:42,648  DEBUG - Traceback (most recent call last):  
+11:03:42,648  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:42,648  DEBUG -     func(*targs, **kargs)  
+11:03:42,648  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:42,648  DEBUG -     h.flush()  
+11:03:42,648  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:42,648  DEBUG -     self.stream.flush()  
+11:03:42,648  DEBUG - ValueError: I/O operation on closed file  
+11:03:42,648  DEBUG - Error in sys.exitfunc:  
+11:03:42,648  DEBUG - Traceback (most recent call last):  
+11:03:42,648  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:42,648  DEBUG -     func(*targs, **kargs)  
+11:03:42,648  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:42,648  DEBUG -     h.flush()  
+11:03:42,648  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:42,648  DEBUG -     self.stream.flush()  
+11:03:42,648  DEBUG - ValueError: I/O operation on closed file  
+11:03:42,757  DEBUG - Execution of blocks returned: 0  
+11:03:43,476  DEBUG - Traceback (most recent call last):  
+11:03:43,476  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:43,476  DEBUG -     self.doRollover()  
+11:03:43,476  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:43,476  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:43,476  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:43,476  DEBUG - Traceback (most recent call last):  
+11:03:43,476  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:43,476  DEBUG -     if self.shouldRollover(record):  
+11:03:43,476  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:43,476  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:43,476  DEBUG - ValueError: I/O operation on closed file  
+11:03:43,476  DEBUG - Traceback (most recent call last):  
+11:03:43,476  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:43,476  DEBUG -     if self.shouldRollover(record):  
+11:03:43,476  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:43,476  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:43,476  DEBUG - ValueError: I/O operation on closed file  
+11:03:43,476  DEBUG - Traceback (most recent call last):  
+11:03:43,476  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:43,476  DEBUG -     if self.shouldRollover(record):  
+11:03:43,476  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:43,476  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:43,476  DEBUG - ValueError: I/O operation on closed file  
+11:03:43,476  DEBUG - Traceback (most recent call last):  
+11:03:43,476  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:43,476  DEBUG -     if self.shouldRollover(record):  
+11:03:43,476  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:43,476  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:43,476  DEBUG - ValueError: I/O operation on closed file  
+11:03:43,476  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:43,476  DEBUG - Traceback (most recent call last):  
+11:03:43,476  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:43,476  DEBUG -     func(*targs, **kargs)  
+11:03:43,476  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:43,476  DEBUG -     h.flush()  
+11:03:43,476  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:43,476  DEBUG -     self.stream.flush()  
+11:03:43,476  DEBUG - ValueError: I/O operation on closed file  
+11:03:43,476  DEBUG - Error in sys.exitfunc:  
+11:03:43,476  DEBUG - Traceback (most recent call last):  
+11:03:43,476  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:43,476  DEBUG -     func(*targs, **kargs)  
+11:03:43,476  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:43,476  DEBUG -     h.flush()  
+11:03:43,476  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:43,476  DEBUG -     self.stream.flush()  
+11:03:43,476  DEBUG - ValueError: I/O operation on closed file  
+11:03:43,585  DEBUG - Execution of blocks returned: 0  
+11:03:45,960  DEBUG - Execution of bundle returned: 0  
+11:03:46,866  DEBUG - Traceback (most recent call last):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:46,866  DEBUG -     self.doRollover()  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:46,866  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:46,866  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:46,866  DEBUG - Traceback (most recent call last):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:46,866  DEBUG -     if self.shouldRollover(record):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:46,866  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:46,866  DEBUG - ValueError: I/O operation on closed file  
+11:03:46,866  DEBUG - Traceback (most recent call last):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:46,866  DEBUG -     if self.shouldRollover(record):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:46,866  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:46,866  DEBUG - ValueError: I/O operation on closed file  
+11:03:46,866  DEBUG - Traceback (most recent call last):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:46,866  DEBUG -     if self.shouldRollover(record):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:46,866  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:46,866  DEBUG - ValueError: I/O operation on closed file  
+11:03:46,866  DEBUG - Traceback (most recent call last):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:46,866  DEBUG -     if self.shouldRollover(record):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:46,866  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:46,866  DEBUG - ValueError: I/O operation on closed file  
+11:03:46,866  DEBUG - Traceback (most recent call last):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:46,866  DEBUG -     if self.shouldRollover(record):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:46,866  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:46,866  DEBUG - ValueError: I/O operation on closed file  
+11:03:46,866  DEBUG - Traceback (most recent call last):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:46,866  DEBUG -     if self.shouldRollover(record):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:46,866  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:46,866  DEBUG - ValueError: I/O operation on closed file  
+11:03:46,866  DEBUG - Traceback (most recent call last):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:46,866  DEBUG -     if self.shouldRollover(record):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:46,866  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:46,866  DEBUG - ValueError: I/O operation on closed file  
+11:03:46,866  DEBUG - Traceback (most recent call last):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:46,866  DEBUG -     if self.shouldRollover(record):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:46,866  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:46,866  DEBUG - ValueError: I/O operation on closed file  
+11:03:46,866  DEBUG - Traceback (most recent call last):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:46,866  DEBUG -     if self.shouldRollover(record):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:46,866  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:46,866  DEBUG - ValueError: I/O operation on closed file  
+11:03:46,866  DEBUG - Traceback (most recent call last):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:46,866  DEBUG -     if self.shouldRollover(record):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:46,866  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:46,866  DEBUG - ValueError: I/O operation on closed file  
+11:03:46,866  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:46,866  DEBUG - Traceback (most recent call last):  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:46,866  DEBUG -     func(*targs, **kargs)  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:46,866  DEBUG -     h.flush()  
+11:03:46,866  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:46,866  DEBUG -     self.stream.flush()  
+11:03:46,866  DEBUG - ValueError: I/O operation on closed file  
+11:03:46,866  DEBUG - Error in sys.exitfunc:  
+11:03:46,882  DEBUG - Traceback (most recent call last):  
+11:03:46,882  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:46,882  DEBUG -     func(*targs, **kargs)  
+11:03:46,882  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:46,882  DEBUG -     h.flush()  
+11:03:46,882  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:46,882  DEBUG -     self.stream.flush()  
+11:03:46,882  DEBUG - ValueError: I/O operation on closed file  
+11:03:46,991  DEBUG - Execution of blocks returned: 0  
+11:03:47,319  DEBUG - Traceback (most recent call last):  
+11:03:47,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:47,319  DEBUG -     self.doRollover()  
+11:03:47,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:47,319  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:47,319  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:47,319  DEBUG - Traceback (most recent call last):  
+11:03:47,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:47,319  DEBUG -     if self.shouldRollover(record):  
+11:03:47,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:47,319  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:47,319  DEBUG - ValueError: I/O operation on closed file  
+11:03:47,319  DEBUG - Traceback (most recent call last):  
+11:03:47,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:47,319  DEBUG -     if self.shouldRollover(record):  
+11:03:47,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:47,319  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:47,319  DEBUG - ValueError: I/O operation on closed file  
+11:03:47,319  DEBUG - Traceback (most recent call last):  
+11:03:47,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:47,319  DEBUG -     if self.shouldRollover(record):  
+11:03:47,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:47,319  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:47,319  DEBUG - ValueError: I/O operation on closed file  
+11:03:47,319  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:47,319  DEBUG - Traceback (most recent call last):  
+11:03:47,319  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:47,319  DEBUG -     func(*targs, **kargs)  
+11:03:47,319  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:47,319  DEBUG -     h.flush()  
+11:03:47,319  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:47,319  DEBUG -     self.stream.flush()  
+11:03:47,319  DEBUG - ValueError: I/O operation on closed file  
+11:03:47,319  DEBUG - Error in sys.exitfunc:  
+11:03:47,319  DEBUG - Traceback (most recent call last):  
+11:03:47,319  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:47,319  DEBUG -     func(*targs, **kargs)  
+11:03:47,319  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:47,319  DEBUG -     h.flush()  
+11:03:47,319  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:47,319  DEBUG -     self.stream.flush()  
+11:03:47,319  DEBUG - ValueError: I/O operation on closed file  
+11:03:47,429  DEBUG - Execution of blocks returned: 0  
+11:03:48,319  DEBUG - Traceback (most recent call last):  
+11:03:48,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:48,319  DEBUG -     self.doRollover()  
+11:03:48,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:48,319  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:48,319  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:48,319  DEBUG - Traceback (most recent call last):  
+11:03:48,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:48,319  DEBUG -     if self.shouldRollover(record):  
+11:03:48,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:48,319  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:48,319  DEBUG - ValueError: I/O operation on closed file  
+11:03:48,319  DEBUG - Traceback (most recent call last):  
+11:03:48,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:48,319  DEBUG -     if self.shouldRollover(record):  
+11:03:48,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:48,319  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:48,319  DEBUG - ValueError: I/O operation on closed file  
+11:03:48,319  DEBUG - Traceback (most recent call last):  
+11:03:48,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:48,319  DEBUG -     if self.shouldRollover(record):  
+11:03:48,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:48,319  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:48,319  DEBUG - ValueError: I/O operation on closed file  
+11:03:48,319  DEBUG - Traceback (most recent call last):  
+11:03:48,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:48,319  DEBUG -     if self.shouldRollover(record):  
+11:03:48,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:48,319  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:48,319  DEBUG - ValueError: I/O operation on closed file  
+11:03:48,319  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:48,319  DEBUG - Traceback (most recent call last):  
+11:03:48,319  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:48,319  DEBUG -     func(*targs, **kargs)  
+11:03:48,319  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:48,319  DEBUG -     h.flush()  
+11:03:48,319  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:48,319  DEBUG -     self.stream.flush()  
+11:03:48,319  DEBUG - ValueError: I/O operation on closed file  
+11:03:48,319  DEBUG - Error in sys.exitfunc:  
+11:03:48,319  DEBUG - Traceback (most recent call last):  
+11:03:48,319  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:48,319  DEBUG -     func(*targs, **kargs)  
+11:03:48,319  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:48,319  DEBUG -     h.flush()  
+11:03:48,319  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:48,319  DEBUG -     self.stream.flush()  
+11:03:48,319  DEBUG - ValueError: I/O operation on closed file  
+11:03:48,429  DEBUG - Execution of blocks returned: 0  
+11:03:50,819  DEBUG - Execution of bundle returned: 0  
+11:03:51,116  DEBUG - Traceback (most recent call last):  
+11:03:51,116  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:51,116  DEBUG -     self.doRollover()  
+11:03:51,116  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:51,116  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:51,116  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:51,116  DEBUG - Traceback (most recent call last):  
+11:03:51,116  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:51,116  DEBUG -     if self.shouldRollover(record):  
+11:03:51,116  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:51,116  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:51,116  DEBUG - ValueError: I/O operation on closed file  
+11:03:51,116  DEBUG - Traceback (most recent call last):  
+11:03:51,116  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:51,116  DEBUG -     if self.shouldRollover(record):  
+11:03:51,116  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:51,116  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:51,116  DEBUG - ValueError: I/O operation on closed file  
+11:03:51,116  DEBUG - Traceback (most recent call last):  
+11:03:51,116  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:51,116  DEBUG -     if self.shouldRollover(record):  
+11:03:51,116  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:51,116  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:51,116  DEBUG - ValueError: I/O operation on closed file  
+11:03:51,116  DEBUG - Traceback (most recent call last):  
+11:03:51,116  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:51,116  DEBUG -     if self.shouldRollover(record):  
+11:03:51,116  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:51,116  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:51,116  DEBUG - ValueError: I/O operation on closed file  
+11:03:51,116  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:51,116  DEBUG - Traceback (most recent call last):  
+11:03:51,116  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:51,116  DEBUG -     func(*targs, **kargs)  
+11:03:51,116  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:51,116  DEBUG -     h.flush()  
+11:03:51,116  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:51,116  DEBUG -     self.stream.flush()  
+11:03:51,116  DEBUG - ValueError: I/O operation on closed file  
+11:03:51,116  DEBUG - Error in sys.exitfunc:  
+11:03:51,116  DEBUG - Traceback (most recent call last):  
+11:03:51,116  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:51,132  DEBUG -     func(*targs, **kargs)  
+11:03:51,132  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:51,132  DEBUG -     h.flush()  
+11:03:51,132  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:51,132  DEBUG -     self.stream.flush()  
+11:03:51,132  DEBUG - ValueError: I/O operation on closed file  
+11:03:51,226  DEBUG - Execution of blocks returned: 0  
+11:03:52,132  DEBUG - Traceback (most recent call last):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:52,132  DEBUG -     self.doRollover()  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:52,132  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:52,132  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:52,132  DEBUG - Traceback (most recent call last):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,132  DEBUG -     if self.shouldRollover(record):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,132  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,132  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,132  DEBUG - Traceback (most recent call last):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,132  DEBUG -     if self.shouldRollover(record):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,132  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,132  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,132  DEBUG - Traceback (most recent call last):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,132  DEBUG -     if self.shouldRollover(record):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,132  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,132  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,132  DEBUG - Traceback (most recent call last):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,132  DEBUG -     if self.shouldRollover(record):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,132  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,132  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,132  DEBUG - Traceback (most recent call last):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,132  DEBUG -     if self.shouldRollover(record):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,132  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,132  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,132  DEBUG - Traceback (most recent call last):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,132  DEBUG -     if self.shouldRollover(record):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,132  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,132  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,132  DEBUG - Traceback (most recent call last):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,132  DEBUG -     if self.shouldRollover(record):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,132  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,132  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,132  DEBUG - Traceback (most recent call last):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,132  DEBUG -     if self.shouldRollover(record):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,132  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,132  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,132  DEBUG - Traceback (most recent call last):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,132  DEBUG -     if self.shouldRollover(record):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,132  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,132  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,132  DEBUG - Traceback (most recent call last):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,132  DEBUG -     if self.shouldRollover(record):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,132  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,132  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,132  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:52,132  DEBUG - Traceback (most recent call last):  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:52,132  DEBUG -     func(*targs, **kargs)  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:52,132  DEBUG -     h.flush()  
+11:03:52,132  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:52,132  DEBUG -     self.stream.flush()  
+11:03:52,132  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,132  DEBUG - Error in sys.exitfunc:  
+11:03:52,147  DEBUG - Traceback (most recent call last):  
+11:03:52,147  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:52,147  DEBUG -     func(*targs, **kargs)  
+11:03:52,147  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:52,147  DEBUG -     h.flush()  
+11:03:52,147  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:52,147  DEBUG -     self.stream.flush()  
+11:03:52,147  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,257  DEBUG - Execution of blocks returned: 0  
+11:03:52,554  DEBUG - Traceback (most recent call last):  
+11:03:52,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:52,554  DEBUG -     self.doRollover()  
+11:03:52,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:52,554  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:52,554  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:52,554  DEBUG - Traceback (most recent call last):  
+11:03:52,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,554  DEBUG -     if self.shouldRollover(record):  
+11:03:52,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,554  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,554  DEBUG - Traceback (most recent call last):  
+11:03:52,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,554  DEBUG -     if self.shouldRollover(record):  
+11:03:52,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,554  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,554  DEBUG - Traceback (most recent call last):  
+11:03:52,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,554  DEBUG -     if self.shouldRollover(record):  
+11:03:52,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,554  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,554  DEBUG - Traceback (most recent call last):  
+11:03:52,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,554  DEBUG -     if self.shouldRollover(record):  
+11:03:52,554  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,554  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,554  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:52,554  DEBUG - Traceback (most recent call last):  
+11:03:52,554  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:52,554  DEBUG -     func(*targs, **kargs)  
+11:03:52,554  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:52,554  DEBUG -     h.flush()  
+11:03:52,554  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:52,554  DEBUG -     self.stream.flush()  
+11:03:52,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,554  DEBUG - Error in sys.exitfunc:  
+11:03:52,554  DEBUG - Traceback (most recent call last):  
+11:03:52,554  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:52,554  DEBUG -     func(*targs, **kargs)  
+11:03:52,554  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:52,554  DEBUG -     h.flush()  
+11:03:52,554  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:52,554  DEBUG -     self.stream.flush()  
+11:03:52,554  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,663  DEBUG - Execution of blocks returned: 0  
+11:03:52,975  DEBUG - Traceback (most recent call last):  
+11:03:52,975  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:52,975  DEBUG -     self.doRollover()  
+11:03:52,975  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:52,975  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:52,975  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:52,975  DEBUG - Traceback (most recent call last):  
+11:03:52,975  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,975  DEBUG -     if self.shouldRollover(record):  
+11:03:52,975  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,975  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,975  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,975  DEBUG - Traceback (most recent call last):  
+11:03:52,975  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,975  DEBUG -     if self.shouldRollover(record):  
+11:03:52,975  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,975  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,975  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,975  DEBUG - Traceback (most recent call last):  
+11:03:52,975  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:52,975  DEBUG -     if self.shouldRollover(record):  
+11:03:52,975  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:52,975  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:52,975  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,975  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:52,975  DEBUG - Traceback (most recent call last):  
+11:03:52,975  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:52,975  DEBUG -     func(*targs, **kargs)  
+11:03:52,975  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:52,975  DEBUG -     h.flush()  
+11:03:52,975  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:52,975  DEBUG -     self.stream.flush()  
+11:03:52,975  DEBUG - ValueError: I/O operation on closed file  
+11:03:52,975  DEBUG - Error in sys.exitfunc:  
+11:03:52,975  DEBUG - Traceback (most recent call last):  
+11:03:52,975  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:52,975  DEBUG -     func(*targs, **kargs)  
+11:03:52,975  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:52,975  DEBUG -     h.flush()  
+11:03:52,975  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:52,975  DEBUG -     self.stream.flush()  
+11:03:52,975  DEBUG - ValueError: I/O operation on closed file  
+11:03:53,085  DEBUG - Execution of blocks returned: 0  
+11:03:53,819  DEBUG - Traceback (most recent call last):  
+11:03:53,819  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:53,819  DEBUG -     self.doRollover()  
+11:03:53,819  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:53,819  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:53,819  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:53,819  DEBUG - Traceback (most recent call last):  
+11:03:53,819  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:53,819  DEBUG -     if self.shouldRollover(record):  
+11:03:53,819  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:53,819  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:53,819  DEBUG - ValueError: I/O operation on closed file  
+11:03:53,819  DEBUG - Traceback (most recent call last):  
+11:03:53,819  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:53,819  DEBUG -     if self.shouldRollover(record):  
+11:03:53,819  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:53,819  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:53,819  DEBUG - ValueError: I/O operation on closed file  
+11:03:53,819  DEBUG - Traceback (most recent call last):  
+11:03:53,819  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:53,819  DEBUG -     if self.shouldRollover(record):  
+11:03:53,819  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:53,819  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:53,819  DEBUG - ValueError: I/O operation on closed file  
+11:03:53,819  DEBUG - Traceback (most recent call last):  
+11:03:53,819  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:53,819  DEBUG -     if self.shouldRollover(record):  
+11:03:53,819  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:53,819  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:53,819  DEBUG - ValueError: I/O operation on closed file  
+11:03:53,819  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:53,819  DEBUG - Traceback (most recent call last):  
+11:03:53,819  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:53,819  DEBUG -     func(*targs, **kargs)  
+11:03:53,819  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:53,819  DEBUG -     h.flush()  
+11:03:53,819  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:53,819  DEBUG -     self.stream.flush()  
+11:03:53,819  DEBUG - ValueError: I/O operation on closed file  
+11:03:53,819  DEBUG - Error in sys.exitfunc:  
+11:03:53,819  DEBUG - Traceback (most recent call last):  
+11:03:53,819  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:53,819  DEBUG -     func(*targs, **kargs)  
+11:03:53,819  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:53,819  DEBUG -     h.flush()  
+11:03:53,819  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:53,819  DEBUG -     self.stream.flush()  
+11:03:53,819  DEBUG - ValueError: I/O operation on closed file  
+11:03:53,929  DEBUG - Execution of blocks returned: 0  
+11:03:56,303  DEBUG - Execution of bundle returned: 0  
+11:03:56,600  DEBUG - Traceback (most recent call last):  
+11:03:56,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:56,600  DEBUG -     self.doRollover()  
+11:03:56,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:56,600  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:56,600  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:56,600  DEBUG - Traceback (most recent call last):  
+11:03:56,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:56,600  DEBUG -     if self.shouldRollover(record):  
+11:03:56,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:56,600  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:56,600  DEBUG - ValueError: I/O operation on closed file  
+11:03:56,600  DEBUG - Traceback (most recent call last):  
+11:03:56,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:56,600  DEBUG -     if self.shouldRollover(record):  
+11:03:56,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:56,600  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:56,600  DEBUG - ValueError: I/O operation on closed file  
+11:03:56,600  DEBUG - Traceback (most recent call last):  
+11:03:56,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:56,600  DEBUG -     if self.shouldRollover(record):  
+11:03:56,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:56,600  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:56,600  DEBUG - ValueError: I/O operation on closed file  
+11:03:56,600  DEBUG - Traceback (most recent call last):  
+11:03:56,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:56,600  DEBUG -     if self.shouldRollover(record):  
+11:03:56,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:56,600  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:56,600  DEBUG - ValueError: I/O operation on closed file  
+11:03:56,600  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:56,600  DEBUG - Traceback (most recent call last):  
+11:03:56,600  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:56,600  DEBUG -     func(*targs, **kargs)  
+11:03:56,600  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:56,600  DEBUG -     h.flush()  
+11:03:56,600  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:56,600  DEBUG -     self.stream.flush()  
+11:03:56,600  DEBUG - ValueError: I/O operation on closed file  
+11:03:56,600  DEBUG - Error in sys.exitfunc:  
+11:03:56,600  DEBUG - Traceback (most recent call last):  
+11:03:56,600  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:56,600  DEBUG -     func(*targs, **kargs)  
+11:03:56,600  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:56,600  DEBUG -     h.flush()  
+11:03:56,600  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:56,600  DEBUG -     self.stream.flush()  
+11:03:56,600  DEBUG - ValueError: I/O operation on closed file  
+11:03:56,710  DEBUG - Execution of blocks returned: 0  
+11:03:57,616  DEBUG - Traceback (most recent call last):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:57,616  DEBUG -     self.doRollover()  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:57,616  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:57,616  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:57,616  DEBUG - Traceback (most recent call last):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:57,616  DEBUG -     if self.shouldRollover(record):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:57,616  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:57,616  DEBUG - ValueError: I/O operation on closed file  
+11:03:57,616  DEBUG - Traceback (most recent call last):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:57,616  DEBUG -     if self.shouldRollover(record):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:57,616  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:57,616  DEBUG - ValueError: I/O operation on closed file  
+11:03:57,616  DEBUG - Traceback (most recent call last):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:57,616  DEBUG -     if self.shouldRollover(record):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:57,616  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:57,616  DEBUG - ValueError: I/O operation on closed file  
+11:03:57,616  DEBUG - Traceback (most recent call last):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:57,616  DEBUG -     if self.shouldRollover(record):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:57,616  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:57,616  DEBUG - ValueError: I/O operation on closed file  
+11:03:57,616  DEBUG - Traceback (most recent call last):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:57,616  DEBUG -     if self.shouldRollover(record):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:57,616  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:57,616  DEBUG - ValueError: I/O operation on closed file  
+11:03:57,616  DEBUG - Traceback (most recent call last):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:57,616  DEBUG -     if self.shouldRollover(record):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:57,616  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:57,616  DEBUG - ValueError: I/O operation on closed file  
+11:03:57,616  DEBUG - Traceback (most recent call last):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:57,616  DEBUG -     if self.shouldRollover(record):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:57,616  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:57,616  DEBUG - ValueError: I/O operation on closed file  
+11:03:57,616  DEBUG - Traceback (most recent call last):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:57,616  DEBUG -     if self.shouldRollover(record):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:57,616  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:57,616  DEBUG - ValueError: I/O operation on closed file  
+11:03:57,616  DEBUG - Traceback (most recent call last):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:57,616  DEBUG -     if self.shouldRollover(record):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:57,616  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:57,616  DEBUG - ValueError: I/O operation on closed file  
+11:03:57,616  DEBUG - Traceback (most recent call last):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:57,616  DEBUG -     if self.shouldRollover(record):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:57,616  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:57,616  DEBUG - ValueError: I/O operation on closed file  
+11:03:57,616  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:57,616  DEBUG - Traceback (most recent call last):  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:57,616  DEBUG -     func(*targs, **kargs)  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:57,616  DEBUG -     h.flush()  
+11:03:57,616  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:57,616  DEBUG -     self.stream.flush()  
+11:03:57,616  DEBUG - ValueError: I/O operation on closed file  
+11:03:57,616  DEBUG - Error in sys.exitfunc:  
+11:03:57,632  DEBUG - Traceback (most recent call last):  
+11:03:57,632  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:57,632  DEBUG -     func(*targs, **kargs)  
+11:03:57,632  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:57,632  DEBUG -     h.flush()  
+11:03:57,632  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:57,632  DEBUG -     self.stream.flush()  
+11:03:57,632  DEBUG - ValueError: I/O operation on closed file  
+11:03:57,741  DEBUG - Execution of blocks returned: 0  
+11:03:58,038  DEBUG - Traceback (most recent call last):  
+11:03:58,038  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:58,038  DEBUG -     self.doRollover()  
+11:03:58,038  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:58,038  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:58,038  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:58,038  DEBUG - Traceback (most recent call last):  
+11:03:58,038  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:58,038  DEBUG -     if self.shouldRollover(record):  
+11:03:58,038  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:58,038  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:58,038  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,038  DEBUG - Traceback (most recent call last):  
+11:03:58,038  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:58,038  DEBUG -     if self.shouldRollover(record):  
+11:03:58,038  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:58,038  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:58,038  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,038  DEBUG - Traceback (most recent call last):  
+11:03:58,038  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:58,038  DEBUG -     if self.shouldRollover(record):  
+11:03:58,038  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:58,038  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:58,038  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,038  DEBUG - Traceback (most recent call last):  
+11:03:58,038  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:58,038  DEBUG -     if self.shouldRollover(record):  
+11:03:58,038  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:58,038  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:58,038  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,038  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:58,038  DEBUG - Traceback (most recent call last):  
+11:03:58,038  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:58,038  DEBUG -     func(*targs, **kargs)  
+11:03:58,038  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:58,038  DEBUG -     h.flush()  
+11:03:58,038  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:58,038  DEBUG -     self.stream.flush()  
+11:03:58,038  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,038  DEBUG - Error in sys.exitfunc:  
+11:03:58,038  DEBUG - Traceback (most recent call last):  
+11:03:58,038  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:58,038  DEBUG -     func(*targs, **kargs)  
+11:03:58,038  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:58,038  DEBUG -     h.flush()  
+11:03:58,038  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:58,038  DEBUG -     self.stream.flush()  
+11:03:58,038  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,147  DEBUG - Execution of blocks returned: 0  
+11:03:58,444  DEBUG - Traceback (most recent call last):  
+11:03:58,444  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:58,444  DEBUG -     self.doRollover()  
+11:03:58,444  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:58,444  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:58,444  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:58,444  DEBUG - Traceback (most recent call last):  
+11:03:58,444  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:58,444  DEBUG -     if self.shouldRollover(record):  
+11:03:58,444  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:58,444  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:58,444  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,444  DEBUG - Traceback (most recent call last):  
+11:03:58,444  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:58,444  DEBUG -     if self.shouldRollover(record):  
+11:03:58,444  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:58,444  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:58,444  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,444  DEBUG - Traceback (most recent call last):  
+11:03:58,444  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:58,444  DEBUG -     if self.shouldRollover(record):  
+11:03:58,444  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:58,444  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:58,444  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,444  DEBUG - Traceback (most recent call last):  
+11:03:58,444  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:58,444  DEBUG -     if self.shouldRollover(record):  
+11:03:58,444  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:58,444  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:58,444  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,444  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:58,444  DEBUG - Traceback (most recent call last):  
+11:03:58,444  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:58,444  DEBUG -     func(*targs, **kargs)  
+11:03:58,444  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:58,444  DEBUG -     h.flush()  
+11:03:58,444  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:58,444  DEBUG -     self.stream.flush()  
+11:03:58,444  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,444  DEBUG - Error in sys.exitfunc:  
+11:03:58,444  DEBUG - Traceback (most recent call last):  
+11:03:58,444  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:58,444  DEBUG -     func(*targs, **kargs)  
+11:03:58,444  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:58,444  DEBUG -     h.flush()  
+11:03:58,444  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:58,444  DEBUG -     self.stream.flush()  
+11:03:58,444  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,553  DEBUG - Execution of blocks returned: 0  
+11:03:58,850  DEBUG - Traceback (most recent call last):  
+11:03:58,850  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:58,850  DEBUG -     self.doRollover()  
+11:03:58,850  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:58,850  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:58,850  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:58,850  DEBUG - Traceback (most recent call last):  
+11:03:58,850  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:58,850  DEBUG -     if self.shouldRollover(record):  
+11:03:58,850  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:58,850  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:58,850  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,850  DEBUG - Traceback (most recent call last):  
+11:03:58,850  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:58,850  DEBUG -     if self.shouldRollover(record):  
+11:03:58,850  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:58,850  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:58,850  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,850  DEBUG - Traceback (most recent call last):  
+11:03:58,850  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:58,850  DEBUG -     if self.shouldRollover(record):  
+11:03:58,850  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:58,850  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:58,850  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,850  DEBUG - Traceback (most recent call last):  
+11:03:58,850  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:58,850  DEBUG -     if self.shouldRollover(record):  
+11:03:58,850  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:58,850  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:58,850  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,850  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:58,850  DEBUG - Traceback (most recent call last):  
+11:03:58,850  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:58,850  DEBUG -     func(*targs, **kargs)  
+11:03:58,850  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:58,850  DEBUG -     h.flush()  
+11:03:58,850  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:58,850  DEBUG -     self.stream.flush()  
+11:03:58,850  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,850  DEBUG - Error in sys.exitfunc:  
+11:03:58,850  DEBUG - Traceback (most recent call last):  
+11:03:58,850  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:58,850  DEBUG -     func(*targs, **kargs)  
+11:03:58,850  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:58,850  DEBUG -     h.flush()  
+11:03:58,850  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:58,850  DEBUG -     self.stream.flush()  
+11:03:58,850  DEBUG - ValueError: I/O operation on closed file  
+11:03:58,960  DEBUG - Execution of blocks returned: 0  
+11:03:59,272  DEBUG - Traceback (most recent call last):  
+11:03:59,272  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:03:59,272  DEBUG -     self.doRollover()  
+11:03:59,272  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:03:59,272  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:03:59,272  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:03:59,272  DEBUG - Traceback (most recent call last):  
+11:03:59,272  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:59,272  DEBUG -     if self.shouldRollover(record):  
+11:03:59,272  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:59,272  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:59,272  DEBUG - ValueError: I/O operation on closed file  
+11:03:59,272  DEBUG - Traceback (most recent call last):  
+11:03:59,272  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:59,272  DEBUG -     if self.shouldRollover(record):  
+11:03:59,272  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:59,272  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:59,272  DEBUG - ValueError: I/O operation on closed file  
+11:03:59,272  DEBUG - Traceback (most recent call last):  
+11:03:59,272  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:03:59,272  DEBUG -     if self.shouldRollover(record):  
+11:03:59,272  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:03:59,272  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:03:59,272  DEBUG - ValueError: I/O operation on closed file  
+11:03:59,272  DEBUG - Error in atexit._run_exitfuncs:  
+11:03:59,272  DEBUG - Traceback (most recent call last):  
+11:03:59,272  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:59,272  DEBUG -     func(*targs, **kargs)  
+11:03:59,272  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:59,272  DEBUG -     h.flush()  
+11:03:59,272  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:59,272  DEBUG -     self.stream.flush()  
+11:03:59,272  DEBUG - ValueError: I/O operation on closed file  
+11:03:59,272  DEBUG - Error in sys.exitfunc:  
+11:03:59,272  DEBUG - Traceback (most recent call last):  
+11:03:59,272  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:03:59,272  DEBUG -     func(*targs, **kargs)  
+11:03:59,272  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:03:59,272  DEBUG -     h.flush()  
+11:03:59,272  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:03:59,272  DEBUG -     self.stream.flush()  
+11:03:59,272  DEBUG - ValueError: I/O operation on closed file  
+11:03:59,381  DEBUG - Execution of blocks returned: 0  
+11:04:00,100  DEBUG - Traceback (most recent call last):  
+11:04:00,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:00,100  DEBUG -     self.doRollover()  
+11:04:00,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:00,100  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:00,100  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:00,100  DEBUG - Traceback (most recent call last):  
+11:04:00,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:00,100  DEBUG -     if self.shouldRollover(record):  
+11:04:00,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:00,100  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:00,100  DEBUG - ValueError: I/O operation on closed file  
+11:04:00,100  DEBUG - Traceback (most recent call last):  
+11:04:00,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:00,100  DEBUG -     if self.shouldRollover(record):  
+11:04:00,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:00,100  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:00,100  DEBUG - ValueError: I/O operation on closed file  
+11:04:00,100  DEBUG - Traceback (most recent call last):  
+11:04:00,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:00,100  DEBUG -     if self.shouldRollover(record):  
+11:04:00,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:00,100  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:00,100  DEBUG - ValueError: I/O operation on closed file  
+11:04:00,100  DEBUG - Traceback (most recent call last):  
+11:04:00,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:00,100  DEBUG -     if self.shouldRollover(record):  
+11:04:00,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:00,100  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:00,100  DEBUG - ValueError: I/O operation on closed file  
+11:04:00,100  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:00,100  DEBUG - Traceback (most recent call last):  
+11:04:00,100  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:00,100  DEBUG -     func(*targs, **kargs)  
+11:04:00,100  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:00,100  DEBUG -     h.flush()  
+11:04:00,100  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:00,100  DEBUG -     self.stream.flush()  
+11:04:00,100  DEBUG - ValueError: I/O operation on closed file  
+11:04:00,100  DEBUG - Error in sys.exitfunc:  
+11:04:00,100  DEBUG - Traceback (most recent call last):  
+11:04:00,100  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:00,100  DEBUG -     func(*targs, **kargs)  
+11:04:00,100  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:00,100  DEBUG -     h.flush()  
+11:04:00,100  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:00,100  DEBUG -     self.stream.flush()  
+11:04:00,100  DEBUG - ValueError: I/O operation on closed file  
+11:04:00,210  DEBUG - Execution of blocks returned: 0  
+11:04:02,584  DEBUG - Execution of bundle returned: 0  
+11:04:02,881  DEBUG - Traceback (most recent call last):  
+11:04:02,881  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:02,881  DEBUG -     self.doRollover()  
+11:04:02,881  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:02,881  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:02,881  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:02,881  DEBUG - Traceback (most recent call last):  
+11:04:02,881  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:02,881  DEBUG -     if self.shouldRollover(record):  
+11:04:02,881  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:02,881  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:02,881  DEBUG - ValueError: I/O operation on closed file  
+11:04:02,881  DEBUG - Traceback (most recent call last):  
+11:04:02,881  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:02,881  DEBUG -     if self.shouldRollover(record):  
+11:04:02,881  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:02,881  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:02,881  DEBUG - ValueError: I/O operation on closed file  
+11:04:02,881  DEBUG - Traceback (most recent call last):  
+11:04:02,881  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:02,881  DEBUG -     if self.shouldRollover(record):  
+11:04:02,881  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:02,881  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:02,881  DEBUG - ValueError: I/O operation on closed file  
+11:04:02,881  DEBUG - Traceback (most recent call last):  
+11:04:02,881  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:02,881  DEBUG -     if self.shouldRollover(record):  
+11:04:02,881  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:02,881  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:02,881  DEBUG - ValueError: I/O operation on closed file  
+11:04:02,881  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:02,881  DEBUG - Traceback (most recent call last):  
+11:04:02,881  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:02,881  DEBUG -     func(*targs, **kargs)  
+11:04:02,881  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:02,881  DEBUG -     h.flush()  
+11:04:02,881  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:02,881  DEBUG -     self.stream.flush()  
+11:04:02,881  DEBUG - ValueError: I/O operation on closed file  
+11:04:02,881  DEBUG - Error in sys.exitfunc:  
+11:04:02,881  DEBUG - Traceback (most recent call last):  
+11:04:02,881  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:02,881  DEBUG -     func(*targs, **kargs)  
+11:04:02,881  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:02,881  DEBUG -     h.flush()  
+11:04:02,881  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:02,881  DEBUG -     self.stream.flush()  
+11:04:02,881  DEBUG - ValueError: I/O operation on closed file  
+11:04:02,991  DEBUG - Execution of blocks returned: 0  
+11:04:03,897  DEBUG - Traceback (most recent call last):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:03,897  DEBUG -     self.doRollover()  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:03,897  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:03,897  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:03,897  DEBUG - Traceback (most recent call last):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:03,897  DEBUG -     if self.shouldRollover(record):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:03,897  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:03,897  DEBUG - ValueError: I/O operation on closed file  
+11:04:03,897  DEBUG - Traceback (most recent call last):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:03,897  DEBUG -     if self.shouldRollover(record):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:03,897  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:03,897  DEBUG - ValueError: I/O operation on closed file  
+11:04:03,897  DEBUG - Traceback (most recent call last):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:03,897  DEBUG -     if self.shouldRollover(record):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:03,897  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:03,897  DEBUG - ValueError: I/O operation on closed file  
+11:04:03,897  DEBUG - Traceback (most recent call last):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:03,897  DEBUG -     if self.shouldRollover(record):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:03,897  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:03,897  DEBUG - ValueError: I/O operation on closed file  
+11:04:03,897  DEBUG - Traceback (most recent call last):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:03,897  DEBUG -     if self.shouldRollover(record):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:03,897  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:03,897  DEBUG - ValueError: I/O operation on closed file  
+11:04:03,897  DEBUG - Traceback (most recent call last):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:03,897  DEBUG -     if self.shouldRollover(record):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:03,897  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:03,897  DEBUG - ValueError: I/O operation on closed file  
+11:04:03,897  DEBUG - Traceback (most recent call last):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:03,897  DEBUG -     if self.shouldRollover(record):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:03,897  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:03,897  DEBUG - ValueError: I/O operation on closed file  
+11:04:03,897  DEBUG - Traceback (most recent call last):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:03,897  DEBUG -     if self.shouldRollover(record):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:03,897  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:03,897  DEBUG - ValueError: I/O operation on closed file  
+11:04:03,897  DEBUG - Traceback (most recent call last):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:03,897  DEBUG -     if self.shouldRollover(record):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:03,897  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:03,897  DEBUG - ValueError: I/O operation on closed file  
+11:04:03,897  DEBUG - Traceback (most recent call last):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:03,897  DEBUG -     if self.shouldRollover(record):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:03,897  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:03,897  DEBUG - ValueError: I/O operation on closed file  
+11:04:03,897  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:03,897  DEBUG - Traceback (most recent call last):  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:03,897  DEBUG -     func(*targs, **kargs)  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:03,897  DEBUG -     h.flush()  
+11:04:03,897  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:03,897  DEBUG -     self.stream.flush()  
+11:04:03,897  DEBUG - ValueError: I/O operation on closed file  
+11:04:03,897  DEBUG - Error in sys.exitfunc:  
+11:04:03,913  DEBUG - Traceback (most recent call last):  
+11:04:03,913  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:03,913  DEBUG -     func(*targs, **kargs)  
+11:04:03,913  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:03,913  DEBUG -     h.flush()  
+11:04:03,913  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:03,913  DEBUG -     self.stream.flush()  
+11:04:03,913  DEBUG - ValueError: I/O operation on closed file  
+11:04:04,022  DEBUG - Execution of blocks returned: 0  
+11:04:04,319  DEBUG - Traceback (most recent call last):  
+11:04:04,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:04,319  DEBUG -     self.doRollover()  
+11:04:04,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:04,319  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:04,319  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:04,319  DEBUG - Traceback (most recent call last):  
+11:04:04,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:04,319  DEBUG -     if self.shouldRollover(record):  
+11:04:04,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:04,319  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:04,319  DEBUG - ValueError: I/O operation on closed file  
+11:04:04,319  DEBUG - Traceback (most recent call last):  
+11:04:04,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:04,319  DEBUG -     if self.shouldRollover(record):  
+11:04:04,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:04,319  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:04,319  DEBUG - ValueError: I/O operation on closed file  
+11:04:04,319  DEBUG - Traceback (most recent call last):  
+11:04:04,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:04,319  DEBUG -     if self.shouldRollover(record):  
+11:04:04,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:04,319  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:04,319  DEBUG - ValueError: I/O operation on closed file  
+11:04:04,319  DEBUG - Traceback (most recent call last):  
+11:04:04,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:04,319  DEBUG -     if self.shouldRollover(record):  
+11:04:04,319  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:04,319  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:04,319  DEBUG - ValueError: I/O operation on closed file  
+11:04:04,319  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:04,319  DEBUG - Traceback (most recent call last):  
+11:04:04,319  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:04,319  DEBUG -     func(*targs, **kargs)  
+11:04:04,319  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:04,319  DEBUG -     h.flush()  
+11:04:04,319  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:04,319  DEBUG -     self.stream.flush()  
+11:04:04,319  DEBUG - ValueError: I/O operation on closed file  
+11:04:04,319  DEBUG - Error in sys.exitfunc:  
+11:04:04,319  DEBUG - Traceback (most recent call last):  
+11:04:04,319  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:04,319  DEBUG -     func(*targs, **kargs)  
+11:04:04,319  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:04,319  DEBUG -     h.flush()  
+11:04:04,319  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:04,319  DEBUG -     self.stream.flush()  
+11:04:04,319  DEBUG - ValueError: I/O operation on closed file  
+11:04:04,428  DEBUG - Execution of blocks returned: 0  
+11:04:04,741  DEBUG - Traceback (most recent call last):  
+11:04:04,741  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:04,741  DEBUG -     self.doRollover()  
+11:04:04,741  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:04,741  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:04,741  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:04,741  DEBUG - Traceback (most recent call last):  
+11:04:04,741  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:04,741  DEBUG -     if self.shouldRollover(record):  
+11:04:04,741  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:04,741  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:04,741  DEBUG - ValueError: I/O operation on closed file  
+11:04:04,741  DEBUG - Traceback (most recent call last):  
+11:04:04,741  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:04,741  DEBUG -     if self.shouldRollover(record):  
+11:04:04,741  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:04,741  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:04,741  DEBUG - ValueError: I/O operation on closed file  
+11:04:04,741  DEBUG - Traceback (most recent call last):  
+11:04:04,741  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:04,741  DEBUG -     if self.shouldRollover(record):  
+11:04:04,741  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:04,741  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:04,741  DEBUG - ValueError: I/O operation on closed file  
+11:04:04,741  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:04,741  DEBUG - Traceback (most recent call last):  
+11:04:04,741  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:04,741  DEBUG -     func(*targs, **kargs)  
+11:04:04,741  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:04,741  DEBUG -     h.flush()  
+11:04:04,741  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:04,741  DEBUG -     self.stream.flush()  
+11:04:04,741  DEBUG - ValueError: I/O operation on closed file  
+11:04:04,741  DEBUG - Error in sys.exitfunc:  
+11:04:04,741  DEBUG - Traceback (most recent call last):  
+11:04:04,741  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:04,741  DEBUG -     func(*targs, **kargs)  
+11:04:04,741  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:04,741  DEBUG -     h.flush()  
+11:04:04,741  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:04,741  DEBUG -     self.stream.flush()  
+11:04:04,741  DEBUG - ValueError: I/O operation on closed file  
+11:04:04,850  DEBUG - Execution of blocks returned: 0  
+11:04:05,600  DEBUG - Traceback (most recent call last):  
+11:04:05,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:05,600  DEBUG -     self.doRollover()  
+11:04:05,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:05,600  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:05,600  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:05,600  DEBUG - Traceback (most recent call last):  
+11:04:05,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:05,600  DEBUG -     if self.shouldRollover(record):  
+11:04:05,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:05,600  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:05,600  DEBUG - ValueError: I/O operation on closed file  
+11:04:05,600  DEBUG - Traceback (most recent call last):  
+11:04:05,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:05,600  DEBUG -     if self.shouldRollover(record):  
+11:04:05,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:05,600  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:05,600  DEBUG - ValueError: I/O operation on closed file  
+11:04:05,600  DEBUG - Traceback (most recent call last):  
+11:04:05,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:05,600  DEBUG -     if self.shouldRollover(record):  
+11:04:05,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:05,600  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:05,600  DEBUG - ValueError: I/O operation on closed file  
+11:04:05,600  DEBUG - Traceback (most recent call last):  
+11:04:05,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:05,600  DEBUG -     if self.shouldRollover(record):  
+11:04:05,600  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:05,600  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:05,600  DEBUG - ValueError: I/O operation on closed file  
+11:04:05,600  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:05,600  DEBUG - Traceback (most recent call last):  
+11:04:05,600  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:05,600  DEBUG -     func(*targs, **kargs)  
+11:04:05,600  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:05,600  DEBUG -     h.flush()  
+11:04:05,600  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:05,600  DEBUG -     self.stream.flush()  
+11:04:05,600  DEBUG - ValueError: I/O operation on closed file  
+11:04:05,600  DEBUG - Error in sys.exitfunc:  
+11:04:05,600  DEBUG - Traceback (most recent call last):  
+11:04:05,600  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:05,600  DEBUG -     func(*targs, **kargs)  
+11:04:05,600  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:05,600  DEBUG -     h.flush()  
+11:04:05,600  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:05,600  DEBUG -     self.stream.flush()  
+11:04:05,600  DEBUG - ValueError: I/O operation on closed file  
+11:04:05,709  DEBUG - Execution of blocks returned: 0  
+11:04:08,084  DEBUG - Execution of bundle returned: 0  
+11:04:08,397  DEBUG - Traceback (most recent call last):  
+11:04:08,397  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:08,397  DEBUG -     self.doRollover()  
+11:04:08,397  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:08,397  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:08,397  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:08,397  DEBUG - Traceback (most recent call last):  
+11:04:08,397  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:08,397  DEBUG -     if self.shouldRollover(record):  
+11:04:08,397  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:08,397  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:08,397  DEBUG - ValueError: I/O operation on closed file  
+11:04:08,397  DEBUG - Traceback (most recent call last):  
+11:04:08,397  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:08,397  DEBUG -     if self.shouldRollover(record):  
+11:04:08,397  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:08,397  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:08,397  DEBUG - ValueError: I/O operation on closed file  
+11:04:08,397  DEBUG - Traceback (most recent call last):  
+11:04:08,397  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:08,397  DEBUG -     if self.shouldRollover(record):  
+11:04:08,397  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:08,397  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:08,397  DEBUG - ValueError: I/O operation on closed file  
+11:04:08,397  DEBUG - Traceback (most recent call last):  
+11:04:08,397  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:08,397  DEBUG -     if self.shouldRollover(record):  
+11:04:08,397  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:08,397  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:08,397  DEBUG - ValueError: I/O operation on closed file  
+11:04:08,397  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:08,397  DEBUG - Traceback (most recent call last):  
+11:04:08,397  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:08,397  DEBUG -     func(*targs, **kargs)  
+11:04:08,397  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:08,397  DEBUG -     h.flush()  
+11:04:08,397  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:08,397  DEBUG -     self.stream.flush()  
+11:04:08,397  DEBUG - ValueError: I/O operation on closed file  
+11:04:08,397  DEBUG - Error in sys.exitfunc:  
+11:04:08,397  DEBUG - Traceback (most recent call last):  
+11:04:08,397  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:08,397  DEBUG -     func(*targs, **kargs)  
+11:04:08,397  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:08,397  DEBUG -     h.flush()  
+11:04:08,397  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:08,397  DEBUG -     self.stream.flush()  
+11:04:08,397  DEBUG - ValueError: I/O operation on closed file  
+11:04:08,506  DEBUG - Execution of blocks returned: 0  
+11:04:09,412  DEBUG - Traceback (most recent call last):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:09,412  DEBUG -     self.doRollover()  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:09,412  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:09,412  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:09,412  DEBUG - Traceback (most recent call last):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:09,412  DEBUG -     if self.shouldRollover(record):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:09,412  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:09,412  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,412  DEBUG - Traceback (most recent call last):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:09,412  DEBUG -     if self.shouldRollover(record):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:09,412  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:09,412  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,412  DEBUG - Traceback (most recent call last):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:09,412  DEBUG -     if self.shouldRollover(record):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:09,412  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:09,412  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,412  DEBUG - Traceback (most recent call last):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:09,412  DEBUG -     if self.shouldRollover(record):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:09,412  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:09,412  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,412  DEBUG - Traceback (most recent call last):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:09,412  DEBUG -     if self.shouldRollover(record):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:09,412  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:09,412  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,412  DEBUG - Traceback (most recent call last):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:09,412  DEBUG -     if self.shouldRollover(record):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:09,412  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:09,412  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,412  DEBUG - Traceback (most recent call last):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:09,412  DEBUG -     if self.shouldRollover(record):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:09,412  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:09,412  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,412  DEBUG - Traceback (most recent call last):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:09,412  DEBUG -     if self.shouldRollover(record):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:09,412  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:09,412  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,412  DEBUG - Traceback (most recent call last):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:09,412  DEBUG -     if self.shouldRollover(record):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:09,412  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:09,412  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,412  DEBUG - Traceback (most recent call last):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:09,412  DEBUG -     if self.shouldRollover(record):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:09,412  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:09,412  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,412  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:09,412  DEBUG - Traceback (most recent call last):  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:09,412  DEBUG -     func(*targs, **kargs)  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:09,412  DEBUG -     h.flush()  
+11:04:09,412  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:09,412  DEBUG -     self.stream.flush()  
+11:04:09,412  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,412  DEBUG - Error in sys.exitfunc:  
+11:04:09,428  DEBUG - Traceback (most recent call last):  
+11:04:09,428  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:09,428  DEBUG -     func(*targs, **kargs)  
+11:04:09,428  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:09,428  DEBUG -     h.flush()  
+11:04:09,428  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:09,428  DEBUG -     self.stream.flush()  
+11:04:09,428  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,537  DEBUG - Execution of blocks returned: 0  
+11:04:09,834  DEBUG - Traceback (most recent call last):  
+11:04:09,834  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:09,834  DEBUG -     self.doRollover()  
+11:04:09,834  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:09,834  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:09,834  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:09,834  DEBUG - Traceback (most recent call last):  
+11:04:09,834  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:09,834  DEBUG -     if self.shouldRollover(record):  
+11:04:09,834  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:09,834  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:09,834  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,834  DEBUG - Traceback (most recent call last):  
+11:04:09,834  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:09,834  DEBUG -     if self.shouldRollover(record):  
+11:04:09,834  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:09,834  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:09,834  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,834  DEBUG - Traceback (most recent call last):  
+11:04:09,834  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:09,834  DEBUG -     if self.shouldRollover(record):  
+11:04:09,834  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:09,834  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:09,834  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,834  DEBUG - Traceback (most recent call last):  
+11:04:09,834  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:09,834  DEBUG -     if self.shouldRollover(record):  
+11:04:09,834  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:09,834  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:09,834  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,834  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:09,834  DEBUG - Traceback (most recent call last):  
+11:04:09,834  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:09,834  DEBUG -     func(*targs, **kargs)  
+11:04:09,834  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:09,834  DEBUG -     h.flush()  
+11:04:09,834  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:09,834  DEBUG -     self.stream.flush()  
+11:04:09,834  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,834  DEBUG - Error in sys.exitfunc:  
+11:04:09,834  DEBUG - Traceback (most recent call last):  
+11:04:09,834  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:09,834  DEBUG -     func(*targs, **kargs)  
+11:04:09,834  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:09,850  DEBUG -     h.flush()  
+11:04:09,850  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:09,850  DEBUG -     self.stream.flush()  
+11:04:09,850  DEBUG - ValueError: I/O operation on closed file  
+11:04:09,944  DEBUG - Execution of blocks returned: 0  
+11:04:10,256  DEBUG - Traceback (most recent call last):  
+11:04:10,256  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:10,256  DEBUG -     self.doRollover()  
+11:04:10,256  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:10,256  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:10,256  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:10,256  DEBUG - Traceback (most recent call last):  
+11:04:10,256  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:10,256  DEBUG -     if self.shouldRollover(record):  
+11:04:10,256  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:10,256  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:10,256  DEBUG - ValueError: I/O operation on closed file  
+11:04:10,256  DEBUG - Traceback (most recent call last):  
+11:04:10,256  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:10,256  DEBUG -     if self.shouldRollover(record):  
+11:04:10,256  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:10,256  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:10,256  DEBUG - ValueError: I/O operation on closed file  
+11:04:10,256  DEBUG - Traceback (most recent call last):  
+11:04:10,256  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:10,256  DEBUG -     if self.shouldRollover(record):  
+11:04:10,256  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:10,256  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:10,256  DEBUG - ValueError: I/O operation on closed file  
+11:04:10,256  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:10,256  DEBUG - Traceback (most recent call last):  
+11:04:10,256  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:10,256  DEBUG -     func(*targs, **kargs)  
+11:04:10,256  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:10,256  DEBUG -     h.flush()  
+11:04:10,256  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:10,256  DEBUG -     self.stream.flush()  
+11:04:10,256  DEBUG - ValueError: I/O operation on closed file  
+11:04:10,256  DEBUG - Error in sys.exitfunc:  
+11:04:10,256  DEBUG - Traceback (most recent call last):  
+11:04:10,256  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:10,256  DEBUG -     func(*targs, **kargs)  
+11:04:10,256  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:10,256  DEBUG -     h.flush()  
+11:04:10,256  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:10,256  DEBUG -     self.stream.flush()  
+11:04:10,256  DEBUG - ValueError: I/O operation on closed file  
+11:04:10,365  DEBUG - Execution of blocks returned: 0  
+11:04:11,100  DEBUG - Traceback (most recent call last):  
+11:04:11,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:11,100  DEBUG -     self.doRollover()  
+11:04:11,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:11,100  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:11,100  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:11,100  DEBUG - Traceback (most recent call last):  
+11:04:11,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:11,100  DEBUG -     if self.shouldRollover(record):  
+11:04:11,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:11,100  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:11,100  DEBUG - ValueError: I/O operation on closed file  
+11:04:11,100  DEBUG - Traceback (most recent call last):  
+11:04:11,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:11,100  DEBUG -     if self.shouldRollover(record):  
+11:04:11,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:11,100  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:11,100  DEBUG - ValueError: I/O operation on closed file  
+11:04:11,100  DEBUG - Traceback (most recent call last):  
+11:04:11,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:11,100  DEBUG -     if self.shouldRollover(record):  
+11:04:11,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:11,100  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:11,100  DEBUG - ValueError: I/O operation on closed file  
+11:04:11,100  DEBUG - Traceback (most recent call last):  
+11:04:11,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:11,100  DEBUG -     if self.shouldRollover(record):  
+11:04:11,100  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:11,100  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:11,100  DEBUG - ValueError: I/O operation on closed file  
+11:04:11,100  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:11,100  DEBUG - Traceback (most recent call last):  
+11:04:11,100  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:11,100  DEBUG -     func(*targs, **kargs)  
+11:04:11,100  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:11,100  DEBUG -     h.flush()  
+11:04:11,100  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:11,100  DEBUG -     self.stream.flush()  
+11:04:11,100  DEBUG - ValueError: I/O operation on closed file  
+11:04:11,100  DEBUG - Error in sys.exitfunc:  
+11:04:11,100  DEBUG - Traceback (most recent call last):  
+11:04:11,100  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:11,100  DEBUG -     func(*targs, **kargs)  
+11:04:11,100  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:11,100  DEBUG -     h.flush()  
+11:04:11,100  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:11,100  DEBUG -     self.stream.flush()  
+11:04:11,100  DEBUG - ValueError: I/O operation on closed file  
+11:04:11,209  DEBUG - Execution of blocks returned: 0  
+11:04:13,584  DEBUG - Execution of bundle returned: 0  
+11:04:13,897  DEBUG - Traceback (most recent call last):  
+11:04:13,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:13,897  DEBUG -     self.doRollover()  
+11:04:13,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:13,897  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:13,897  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:13,897  DEBUG - Traceback (most recent call last):  
+11:04:13,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:13,897  DEBUG -     if self.shouldRollover(record):  
+11:04:13,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:13,897  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:13,897  DEBUG - ValueError: I/O operation on closed file  
+11:04:13,897  DEBUG - Traceback (most recent call last):  
+11:04:13,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:13,897  DEBUG -     if self.shouldRollover(record):  
+11:04:13,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:13,897  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:13,897  DEBUG - ValueError: I/O operation on closed file  
+11:04:13,897  DEBUG - Traceback (most recent call last):  
+11:04:13,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:13,897  DEBUG -     if self.shouldRollover(record):  
+11:04:13,897  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:13,897  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:13,897  DEBUG - ValueError: I/O operation on closed file  
+11:04:13,897  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:13,897  DEBUG - Traceback (most recent call last):  
+11:04:13,897  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:13,897  DEBUG -     func(*targs, **kargs)  
+11:04:13,897  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:13,897  DEBUG -     h.flush()  
+11:04:13,897  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:13,897  DEBUG -     self.stream.flush()  
+11:04:13,897  DEBUG - ValueError: I/O operation on closed file  
+11:04:13,897  DEBUG - Error in sys.exitfunc:  
+11:04:13,897  DEBUG - Traceback (most recent call last):  
+11:04:13,897  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:13,897  DEBUG -     func(*targs, **kargs)  
+11:04:13,897  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:13,897  DEBUG -     h.flush()  
+11:04:13,897  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:13,897  DEBUG -     self.stream.flush()  
+11:04:13,897  DEBUG - ValueError: I/O operation on closed file  
+11:04:14,006  DEBUG - Execution of blocks returned: 0  
+11:04:14,740  DEBUG - Traceback (most recent call last):  
+11:04:14,740  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:14,740  DEBUG -     self.doRollover()  
+11:04:14,740  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:14,740  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:14,740  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:14,740  DEBUG - Traceback (most recent call last):  
+11:04:14,740  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:14,740  DEBUG -     if self.shouldRollover(record):  
+11:04:14,740  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:14,740  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:14,740  DEBUG - ValueError: I/O operation on closed file  
+11:04:14,740  DEBUG - Traceback (most recent call last):  
+11:04:14,740  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:14,740  DEBUG -     if self.shouldRollover(record):  
+11:04:14,740  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:14,740  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:14,740  DEBUG - ValueError: I/O operation on closed file  
+11:04:14,740  DEBUG - Traceback (most recent call last):  
+11:04:14,740  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:14,740  DEBUG -     if self.shouldRollover(record):  
+11:04:14,740  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:14,740  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:14,740  DEBUG - ValueError: I/O operation on closed file  
+11:04:14,740  DEBUG - Traceback (most recent call last):  
+11:04:14,740  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:14,740  DEBUG -     if self.shouldRollover(record):  
+11:04:14,740  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:14,740  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:14,740  DEBUG - ValueError: I/O operation on closed file  
+11:04:14,740  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:14,740  DEBUG - Traceback (most recent call last):  
+11:04:14,740  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:14,740  DEBUG -     func(*targs, **kargs)  
+11:04:14,740  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:14,740  DEBUG -     h.flush()  
+11:04:14,740  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:14,740  DEBUG -     self.stream.flush()  
+11:04:14,740  DEBUG - ValueError: I/O operation on closed file  
+11:04:14,740  DEBUG - Error in sys.exitfunc:  
+11:04:14,740  DEBUG - Traceback (most recent call last):  
+11:04:14,740  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:14,740  DEBUG -     func(*targs, **kargs)  
+11:04:14,740  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:14,740  DEBUG -     h.flush()  
+11:04:14,740  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:14,740  DEBUG -     self.stream.flush()  
+11:04:14,740  DEBUG - ValueError: I/O operation on closed file  
+11:04:14,850  DEBUG - Execution of blocks returned: 0  
+11:04:17,225  DEBUG - Execution of bundle returned: 0  
+11:04:17,537  DEBUG - Traceback (most recent call last):  
+11:04:17,537  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:17,537  DEBUG -     self.doRollover()  
+11:04:17,537  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:17,537  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:17,537  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:17,537  DEBUG - Traceback (most recent call last):  
+11:04:17,537  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:17,537  DEBUG -     if self.shouldRollover(record):  
+11:04:17,537  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:17,537  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:17,537  DEBUG - ValueError: I/O operation on closed file  
+11:04:17,537  DEBUG - Traceback (most recent call last):  
+11:04:17,537  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:17,537  DEBUG -     if self.shouldRollover(record):  
+11:04:17,537  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:17,537  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:17,537  DEBUG - ValueError: I/O operation on closed file  
+11:04:17,537  DEBUG - Traceback (most recent call last):  
+11:04:17,537  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:17,537  DEBUG -     if self.shouldRollover(record):  
+11:04:17,537  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:17,537  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:17,537  DEBUG - ValueError: I/O operation on closed file  
+11:04:17,537  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:17,537  DEBUG - Traceback (most recent call last):  
+11:04:17,537  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:17,537  DEBUG -     func(*targs, **kargs)  
+11:04:17,537  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:17,537  DEBUG -     h.flush()  
+11:04:17,537  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:17,537  DEBUG -     self.stream.flush()  
+11:04:17,537  DEBUG - ValueError: I/O operation on closed file  
+11:04:17,537  DEBUG - Error in sys.exitfunc:  
+11:04:17,537  DEBUG - Traceback (most recent call last):  
+11:04:17,537  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:17,537  DEBUG -     func(*targs, **kargs)  
+11:04:17,537  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:17,537  DEBUG -     h.flush()  
+11:04:17,537  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:17,537  DEBUG -     self.stream.flush()  
+11:04:17,537  DEBUG - ValueError: I/O operation on closed file  
+11:04:17,646  DEBUG - Execution of blocks returned: 0  
+11:04:18,381  DEBUG - Traceback (most recent call last):  
+11:04:18,381  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:18,381  DEBUG -     self.doRollover()  
+11:04:18,381  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:18,381  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:18,381  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:18,381  DEBUG - Traceback (most recent call last):  
+11:04:18,381  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:18,381  DEBUG -     if self.shouldRollover(record):  
+11:04:18,381  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:18,381  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:18,381  DEBUG - ValueError: I/O operation on closed file  
+11:04:18,381  DEBUG - Traceback (most recent call last):  
+11:04:18,381  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:18,381  DEBUG -     if self.shouldRollover(record):  
+11:04:18,381  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:18,381  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:18,381  DEBUG - ValueError: I/O operation on closed file  
+11:04:18,381  DEBUG - Traceback (most recent call last):  
+11:04:18,381  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:18,381  DEBUG -     if self.shouldRollover(record):  
+11:04:18,381  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:18,381  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:18,381  DEBUG - ValueError: I/O operation on closed file  
+11:04:18,381  DEBUG - Traceback (most recent call last):  
+11:04:18,381  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:18,381  DEBUG -     if self.shouldRollover(record):  
+11:04:18,381  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:18,381  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:18,381  DEBUG - ValueError: I/O operation on closed file  
+11:04:18,381  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:18,381  DEBUG - Traceback (most recent call last):  
+11:04:18,381  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:18,381  DEBUG -     func(*targs, **kargs)  
+11:04:18,381  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:18,381  DEBUG -     h.flush()  
+11:04:18,381  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:18,381  DEBUG -     self.stream.flush()  
+11:04:18,381  DEBUG - ValueError: I/O operation on closed file  
+11:04:18,381  DEBUG - Error in sys.exitfunc:  
+11:04:18,381  DEBUG - Traceback (most recent call last):  
+11:04:18,381  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:18,381  DEBUG -     func(*targs, **kargs)  
+11:04:18,381  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:18,381  DEBUG -     h.flush()  
+11:04:18,381  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:18,381  DEBUG -     self.stream.flush()  
+11:04:18,381  DEBUG - ValueError: I/O operation on closed file  
+11:04:18,490  DEBUG - Execution of blocks returned: 0  
+11:04:20,849  DEBUG - Execution of bundle returned: 0  
+11:04:21,146  DEBUG - Traceback (most recent call last):  
+11:04:21,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:21,146  DEBUG -     self.doRollover()  
+11:04:21,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:21,146  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:21,146  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:21,146  DEBUG - Traceback (most recent call last):  
+11:04:21,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:21,146  DEBUG -     if self.shouldRollover(record):  
+11:04:21,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:21,146  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:21,146  DEBUG - ValueError: I/O operation on closed file  
+11:04:21,146  DEBUG - Traceback (most recent call last):  
+11:04:21,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:21,146  DEBUG -     if self.shouldRollover(record):  
+11:04:21,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:21,146  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:21,146  DEBUG - ValueError: I/O operation on closed file  
+11:04:21,146  DEBUG - Traceback (most recent call last):  
+11:04:21,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:21,146  DEBUG -     if self.shouldRollover(record):  
+11:04:21,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:21,146  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:21,146  DEBUG - ValueError: I/O operation on closed file  
+11:04:21,146  DEBUG - Traceback (most recent call last):  
+11:04:21,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:21,146  DEBUG -     if self.shouldRollover(record):  
+11:04:21,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:21,146  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:21,146  DEBUG - ValueError: I/O operation on closed file  
+11:04:21,146  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:21,146  DEBUG - Traceback (most recent call last):  
+11:04:21,146  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:21,146  DEBUG -     func(*targs, **kargs)  
+11:04:21,146  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:21,146  DEBUG -     h.flush()  
+11:04:21,146  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:21,146  DEBUG -     self.stream.flush()  
+11:04:21,146  DEBUG - ValueError: I/O operation on closed file  
+11:04:21,146  DEBUG - Error in sys.exitfunc:  
+11:04:21,146  DEBUG - Traceback (most recent call last):  
+11:04:21,146  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:21,146  DEBUG -     func(*targs, **kargs)  
+11:04:21,146  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:21,146  DEBUG -     h.flush()  
+11:04:21,146  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:21,146  DEBUG -     self.stream.flush()  
+11:04:21,146  DEBUG - ValueError: I/O operation on closed file  
+11:04:21,256  DEBUG - Execution of blocks returned: 0  
+11:04:22,162  DEBUG - Traceback (most recent call last):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:22,162  DEBUG -     self.doRollover()  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:22,162  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:22,162  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:22,162  DEBUG - Traceback (most recent call last):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,162  DEBUG -     if self.shouldRollover(record):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,162  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,162  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,162  DEBUG - Traceback (most recent call last):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,162  DEBUG -     if self.shouldRollover(record):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,162  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,162  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,162  DEBUG - Traceback (most recent call last):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,162  DEBUG -     if self.shouldRollover(record):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,162  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,162  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,162  DEBUG - Traceback (most recent call last):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,162  DEBUG -     if self.shouldRollover(record):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,162  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,162  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,162  DEBUG - Traceback (most recent call last):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,162  DEBUG -     if self.shouldRollover(record):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,162  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,162  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,162  DEBUG - Traceback (most recent call last):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,162  DEBUG -     if self.shouldRollover(record):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,162  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,162  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,162  DEBUG - Traceback (most recent call last):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,162  DEBUG -     if self.shouldRollover(record):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,162  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,162  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,162  DEBUG - Traceback (most recent call last):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,162  DEBUG -     if self.shouldRollover(record):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,162  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,162  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,162  DEBUG - Traceback (most recent call last):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,162  DEBUG -     if self.shouldRollover(record):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,162  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,162  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,162  DEBUG - Traceback (most recent call last):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,162  DEBUG -     if self.shouldRollover(record):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,162  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,162  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,162  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:22,162  DEBUG - Traceback (most recent call last):  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:22,162  DEBUG -     func(*targs, **kargs)  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:22,162  DEBUG -     h.flush()  
+11:04:22,162  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:22,162  DEBUG -     self.stream.flush()  
+11:04:22,162  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,162  DEBUG - Error in sys.exitfunc:  
+11:04:22,177  DEBUG - Traceback (most recent call last):  
+11:04:22,177  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:22,177  DEBUG -     func(*targs, **kargs)  
+11:04:22,177  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:22,177  DEBUG -     h.flush()  
+11:04:22,177  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:22,177  DEBUG -     self.stream.flush()  
+11:04:22,177  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,287  DEBUG - Execution of blocks returned: 0  
+11:04:22,584  DEBUG - Traceback (most recent call last):  
+11:04:22,584  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:22,584  DEBUG -     self.doRollover()  
+11:04:22,584  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:22,584  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:22,584  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:22,584  DEBUG - Traceback (most recent call last):  
+11:04:22,584  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,584  DEBUG -     if self.shouldRollover(record):  
+11:04:22,584  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,584  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,584  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,584  DEBUG - Traceback (most recent call last):  
+11:04:22,584  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,584  DEBUG -     if self.shouldRollover(record):  
+11:04:22,584  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,584  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,584  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,584  DEBUG - Traceback (most recent call last):  
+11:04:22,584  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,584  DEBUG -     if self.shouldRollover(record):  
+11:04:22,584  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,584  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,584  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,584  DEBUG - Traceback (most recent call last):  
+11:04:22,584  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,584  DEBUG -     if self.shouldRollover(record):  
+11:04:22,584  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,584  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,584  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,584  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:22,584  DEBUG - Traceback (most recent call last):  
+11:04:22,584  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:22,584  DEBUG -     func(*targs, **kargs)  
+11:04:22,584  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:22,584  DEBUG -     h.flush()  
+11:04:22,584  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:22,584  DEBUG -     self.stream.flush()  
+11:04:22,584  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,584  DEBUG - Error in sys.exitfunc:  
+11:04:22,584  DEBUG - Traceback (most recent call last):  
+11:04:22,584  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:22,584  DEBUG -     func(*targs, **kargs)  
+11:04:22,584  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:22,584  DEBUG -     h.flush()  
+11:04:22,584  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:22,584  DEBUG -     self.stream.flush()  
+11:04:22,584  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,693  DEBUG - Execution of blocks returned: 0  
+11:04:22,990  DEBUG - Traceback (most recent call last):  
+11:04:22,990  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:22,990  DEBUG -     self.doRollover()  
+11:04:22,990  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:22,990  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:22,990  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:22,990  DEBUG - Traceback (most recent call last):  
+11:04:22,990  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,990  DEBUG -     if self.shouldRollover(record):  
+11:04:22,990  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,990  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,990  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,990  DEBUG - Traceback (most recent call last):  
+11:04:22,990  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,990  DEBUG -     if self.shouldRollover(record):  
+11:04:22,990  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,990  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,990  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,990  DEBUG - Traceback (most recent call last):  
+11:04:22,990  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,990  DEBUG -     if self.shouldRollover(record):  
+11:04:22,990  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,990  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,990  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,990  DEBUG - Traceback (most recent call last):  
+11:04:22,990  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:22,990  DEBUG -     if self.shouldRollover(record):  
+11:04:22,990  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:22,990  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:22,990  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,990  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:22,990  DEBUG - Traceback (most recent call last):  
+11:04:22,990  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:22,990  DEBUG -     func(*targs, **kargs)  
+11:04:22,990  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:22,990  DEBUG -     h.flush()  
+11:04:22,990  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:22,990  DEBUG -     self.stream.flush()  
+11:04:22,990  DEBUG - ValueError: I/O operation on closed file  
+11:04:22,990  DEBUG - Error in sys.exitfunc:  
+11:04:22,990  DEBUG - Traceback (most recent call last):  
+11:04:22,990  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:22,990  DEBUG -     func(*targs, **kargs)  
+11:04:22,990  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:22,990  DEBUG -     h.flush()  
+11:04:22,990  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:22,990  DEBUG -     self.stream.flush()  
+11:04:22,990  DEBUG - ValueError: I/O operation on closed file  
+11:04:23,099  DEBUG - Execution of blocks returned: 0  
+11:04:23,396  DEBUG - Traceback (most recent call last):  
+11:04:23,396  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:23,396  DEBUG -     self.doRollover()  
+11:04:23,396  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:23,396  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:23,396  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:23,396  DEBUG - Traceback (most recent call last):  
+11:04:23,396  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:23,396  DEBUG -     if self.shouldRollover(record):  
+11:04:23,396  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:23,396  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:23,396  DEBUG - ValueError: I/O operation on closed file  
+11:04:23,396  DEBUG - Traceback (most recent call last):  
+11:04:23,396  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:23,396  DEBUG -     if self.shouldRollover(record):  
+11:04:23,396  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:23,396  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:23,396  DEBUG - ValueError: I/O operation on closed file  
+11:04:23,396  DEBUG - Traceback (most recent call last):  
+11:04:23,396  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:23,396  DEBUG -     if self.shouldRollover(record):  
+11:04:23,396  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:23,396  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:23,396  DEBUG - ValueError: I/O operation on closed file  
+11:04:23,396  DEBUG - Traceback (most recent call last):  
+11:04:23,396  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:23,396  DEBUG -     if self.shouldRollover(record):  
+11:04:23,396  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:23,396  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:23,396  DEBUG - ValueError: I/O operation on closed file  
+11:04:23,396  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:23,396  DEBUG - Traceback (most recent call last):  
+11:04:23,396  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:23,396  DEBUG -     func(*targs, **kargs)  
+11:04:23,396  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:23,396  DEBUG -     h.flush()  
+11:04:23,396  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:23,396  DEBUG -     self.stream.flush()  
+11:04:23,396  DEBUG - ValueError: I/O operation on closed file  
+11:04:23,396  DEBUG - Error in sys.exitfunc:  
+11:04:23,396  DEBUG - Traceback (most recent call last):  
+11:04:23,396  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:23,396  DEBUG -     func(*targs, **kargs)  
+11:04:23,396  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:23,396  DEBUG -     h.flush()  
+11:04:23,396  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:23,396  DEBUG -     self.stream.flush()  
+11:04:23,396  DEBUG - ValueError: I/O operation on closed file  
+11:04:23,506  DEBUG - Execution of blocks returned: 0  
+11:04:23,818  DEBUG - Traceback (most recent call last):  
+11:04:23,818  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:23,818  DEBUG -     self.doRollover()  
+11:04:23,818  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:23,818  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:23,818  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:23,818  DEBUG - Traceback (most recent call last):  
+11:04:23,818  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:23,818  DEBUG -     if self.shouldRollover(record):  
+11:04:23,818  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:23,818  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:23,818  DEBUG - ValueError: I/O operation on closed file  
+11:04:23,818  DEBUG - Traceback (most recent call last):  
+11:04:23,818  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:23,818  DEBUG -     if self.shouldRollover(record):  
+11:04:23,818  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:23,818  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:23,818  DEBUG - ValueError: I/O operation on closed file  
+11:04:23,818  DEBUG - Traceback (most recent call last):  
+11:04:23,818  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:23,818  DEBUG -     if self.shouldRollover(record):  
+11:04:23,818  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:23,818  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:23,818  DEBUG - ValueError: I/O operation on closed file  
+11:04:23,818  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:23,818  DEBUG - Traceback (most recent call last):  
+11:04:23,818  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:23,818  DEBUG -     func(*targs, **kargs)  
+11:04:23,818  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:23,818  DEBUG -     h.flush()  
+11:04:23,818  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:23,818  DEBUG -     self.stream.flush()  
+11:04:23,818  DEBUG - ValueError: I/O operation on closed file  
+11:04:23,818  DEBUG - Error in sys.exitfunc:  
+11:04:23,818  DEBUG - Traceback (most recent call last):  
+11:04:23,818  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:23,818  DEBUG -     func(*targs, **kargs)  
+11:04:23,818  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:23,818  DEBUG -     h.flush()  
+11:04:23,818  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:23,818  DEBUG -     self.stream.flush()  
+11:04:23,818  DEBUG - ValueError: I/O operation on closed file  
+11:04:23,927  DEBUG - Execution of blocks returned: 0  
+11:04:24,662  DEBUG - Traceback (most recent call last):  
+11:04:24,662  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:24,662  DEBUG -     self.doRollover()  
+11:04:24,662  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:24,662  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:24,662  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:24,662  DEBUG - Traceback (most recent call last):  
+11:04:24,662  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:24,662  DEBUG -     if self.shouldRollover(record):  
+11:04:24,662  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:24,662  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:24,662  DEBUG - ValueError: I/O operation on closed file  
+11:04:24,662  DEBUG - Traceback (most recent call last):  
+11:04:24,662  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:24,662  DEBUG -     if self.shouldRollover(record):  
+11:04:24,662  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:24,662  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:24,662  DEBUG - ValueError: I/O operation on closed file  
+11:04:24,662  DEBUG - Traceback (most recent call last):  
+11:04:24,662  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:24,662  DEBUG -     if self.shouldRollover(record):  
+11:04:24,662  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:24,662  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:24,662  DEBUG - ValueError: I/O operation on closed file  
+11:04:24,662  DEBUG - Traceback (most recent call last):  
+11:04:24,662  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:24,662  DEBUG -     if self.shouldRollover(record):  
+11:04:24,662  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:24,662  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:24,662  DEBUG - ValueError: I/O operation on closed file  
+11:04:24,662  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:24,662  DEBUG - Traceback (most recent call last):  
+11:04:24,662  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:24,662  DEBUG -     func(*targs, **kargs)  
+11:04:24,662  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:24,662  DEBUG -     h.flush()  
+11:04:24,662  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:24,662  DEBUG -     self.stream.flush()  
+11:04:24,662  DEBUG - ValueError: I/O operation on closed file  
+11:04:24,662  DEBUG - Error in sys.exitfunc:  
+11:04:24,662  DEBUG - Traceback (most recent call last):  
+11:04:24,662  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:24,662  DEBUG -     func(*targs, **kargs)  
+11:04:24,662  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:24,662  DEBUG -     h.flush()  
+11:04:24,662  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:24,662  DEBUG -     self.stream.flush()  
+11:04:24,662  DEBUG - ValueError: I/O operation on closed file  
+11:04:24,771  DEBUG - Execution of blocks returned: 0  
+11:04:27,146  DEBUG - Execution of bundle returned: 0  
+11:04:27,459  DEBUG - Traceback (most recent call last):  
+11:04:27,459  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:27,459  DEBUG -     self.doRollover()  
+11:04:27,459  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:27,459  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:27,459  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:27,459  DEBUG - Traceback (most recent call last):  
+11:04:27,459  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:27,459  DEBUG -     if self.shouldRollover(record):  
+11:04:27,459  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:27,459  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:27,459  DEBUG - ValueError: I/O operation on closed file  
+11:04:27,459  DEBUG - Traceback (most recent call last):  
+11:04:27,459  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:27,459  DEBUG -     if self.shouldRollover(record):  
+11:04:27,459  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:27,459  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:27,459  DEBUG - ValueError: I/O operation on closed file  
+11:04:27,459  DEBUG - Traceback (most recent call last):  
+11:04:27,459  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:27,459  DEBUG -     if self.shouldRollover(record):  
+11:04:27,459  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:27,459  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:27,459  DEBUG - ValueError: I/O operation on closed file  
+11:04:27,459  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:27,459  DEBUG - Traceback (most recent call last):  
+11:04:27,459  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:27,459  DEBUG -     func(*targs, **kargs)  
+11:04:27,459  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:27,459  DEBUG -     h.flush()  
+11:04:27,459  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:27,459  DEBUG -     self.stream.flush()  
+11:04:27,459  DEBUG - ValueError: I/O operation on closed file  
+11:04:27,459  DEBUG - Error in sys.exitfunc:  
+11:04:27,459  DEBUG - Traceback (most recent call last):  
+11:04:27,459  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:27,459  DEBUG -     func(*targs, **kargs)  
+11:04:27,459  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:27,459  DEBUG -     h.flush()  
+11:04:27,459  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:27,459  DEBUG -     self.stream.flush()  
+11:04:27,459  DEBUG - ValueError: I/O operation on closed file  
+11:04:27,568  DEBUG - Execution of blocks returned: 0  
+11:04:28,349  DEBUG - Traceback (most recent call last):  
+11:04:28,349  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:28,349  DEBUG -     self.doRollover()  
+11:04:28,349  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:28,349  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:28,349  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:28,349  DEBUG - Traceback (most recent call last):  
+11:04:28,349  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:28,349  DEBUG -     if self.shouldRollover(record):  
+11:04:28,349  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:28,349  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:28,349  DEBUG - ValueError: I/O operation on closed file  
+11:04:28,349  DEBUG - Traceback (most recent call last):  
+11:04:28,349  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:28,349  DEBUG -     if self.shouldRollover(record):  
+11:04:28,349  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:28,349  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:28,349  DEBUG - ValueError: I/O operation on closed file  
+11:04:28,349  DEBUG - Traceback (most recent call last):  
+11:04:28,349  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:28,349  DEBUG -     if self.shouldRollover(record):  
+11:04:28,349  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:28,349  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:28,349  DEBUG - ValueError: I/O operation on closed file  
+11:04:28,349  DEBUG - Traceback (most recent call last):  
+11:04:28,349  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:28,349  DEBUG -     if self.shouldRollover(record):  
+11:04:28,349  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:28,349  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:28,349  DEBUG - ValueError: I/O operation on closed file  
+11:04:28,349  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:28,349  DEBUG - Traceback (most recent call last):  
+11:04:28,349  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:28,349  DEBUG -     func(*targs, **kargs)  
+11:04:28,349  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:28,349  DEBUG -     h.flush()  
+11:04:28,349  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:28,349  DEBUG -     self.stream.flush()  
+11:04:28,349  DEBUG - ValueError: I/O operation on closed file  
+11:04:28,349  DEBUG - Error in sys.exitfunc:  
+11:04:28,349  DEBUG - Traceback (most recent call last):  
+11:04:28,349  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:28,349  DEBUG -     func(*targs, **kargs)  
+11:04:28,349  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:28,349  DEBUG -     h.flush()  
+11:04:28,349  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:28,349  DEBUG -     self.stream.flush()  
+11:04:28,349  DEBUG - ValueError: I/O operation on closed file  
+11:04:28,459  DEBUG - Execution of blocks returned: 0  
+11:04:30,833  DEBUG - Execution of bundle returned: 0  
+11:04:31,146  DEBUG - Traceback (most recent call last):  
+11:04:31,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:31,146  DEBUG -     self.doRollover()  
+11:04:31,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:31,146  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:31,146  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:31,146  DEBUG - Traceback (most recent call last):  
+11:04:31,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:31,146  DEBUG -     if self.shouldRollover(record):  
+11:04:31,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:31,146  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:31,146  DEBUG - ValueError: I/O operation on closed file  
+11:04:31,146  DEBUG - Traceback (most recent call last):  
+11:04:31,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:31,146  DEBUG -     if self.shouldRollover(record):  
+11:04:31,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:31,146  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:31,146  DEBUG - ValueError: I/O operation on closed file  
+11:04:31,146  DEBUG - Traceback (most recent call last):  
+11:04:31,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:31,146  DEBUG -     if self.shouldRollover(record):  
+11:04:31,146  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:31,146  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:31,146  DEBUG - ValueError: I/O operation on closed file  
+11:04:31,146  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:31,146  DEBUG - Traceback (most recent call last):  
+11:04:31,146  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:31,146  DEBUG -     func(*targs, **kargs)  
+11:04:31,146  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:31,146  DEBUG -     h.flush()  
+11:04:31,146  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:31,146  DEBUG -     self.stream.flush()  
+11:04:31,146  DEBUG - ValueError: I/O operation on closed file  
+11:04:31,146  DEBUG - Error in sys.exitfunc:  
+11:04:31,146  DEBUG - Traceback (most recent call last):  
+11:04:31,146  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:31,146  DEBUG -     func(*targs, **kargs)  
+11:04:31,146  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:31,146  DEBUG -     h.flush()  
+11:04:31,146  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:31,146  DEBUG -     self.stream.flush()  
+11:04:31,146  DEBUG - ValueError: I/O operation on closed file  
+11:04:31,255  DEBUG - Execution of blocks returned: 0  
+11:04:31,974  DEBUG - Traceback (most recent call last):  
+11:04:31,974  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:31,974  DEBUG -     self.doRollover()  
+11:04:31,974  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:31,974  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:31,974  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:31,974  DEBUG - Traceback (most recent call last):  
+11:04:31,974  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:31,974  DEBUG -     if self.shouldRollover(record):  
+11:04:31,974  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:31,974  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:31,974  DEBUG - ValueError: I/O operation on closed file  
+11:04:31,974  DEBUG - Traceback (most recent call last):  
+11:04:31,974  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:31,974  DEBUG -     if self.shouldRollover(record):  
+11:04:31,974  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:31,974  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:31,990  DEBUG - ValueError: I/O operation on closed file  
+11:04:31,990  DEBUG - Traceback (most recent call last):  
+11:04:31,990  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:31,990  DEBUG -     if self.shouldRollover(record):  
+11:04:31,990  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:31,990  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:31,990  DEBUG - ValueError: I/O operation on closed file  
+11:04:31,990  DEBUG - Traceback (most recent call last):  
+11:04:31,990  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:31,990  DEBUG -     if self.shouldRollover(record):  
+11:04:31,990  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:31,990  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:31,990  DEBUG - ValueError: I/O operation on closed file  
+11:04:31,990  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:31,990  DEBUG - Traceback (most recent call last):  
+11:04:31,990  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:31,990  DEBUG -     func(*targs, **kargs)  
+11:04:31,990  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:31,990  DEBUG -     h.flush()  
+11:04:31,990  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:31,990  DEBUG -     self.stream.flush()  
+11:04:31,990  DEBUG - ValueError: I/O operation on closed file  
+11:04:31,990  DEBUG - Error in sys.exitfunc:  
+11:04:31,990  DEBUG - Traceback (most recent call last):  
+11:04:31,990  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:31,990  DEBUG -     func(*targs, **kargs)  
+11:04:31,990  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:31,990  DEBUG -     h.flush()  
+11:04:31,990  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:31,990  DEBUG -     self.stream.flush()  
+11:04:31,990  DEBUG - ValueError: I/O operation on closed file  
+11:04:32,083  DEBUG - Execution of blocks returned: 0  
+11:04:34,474  DEBUG - Execution of bundle returned: 0  
+11:04:34,771  DEBUG - Traceback (most recent call last):  
+11:04:34,771  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:34,771  DEBUG -     self.doRollover()  
+11:04:34,771  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:34,771  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:34,771  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:34,771  DEBUG - Traceback (most recent call last):  
+11:04:34,771  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:34,771  DEBUG -     if self.shouldRollover(record):  
+11:04:34,771  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:34,771  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:34,771  DEBUG - ValueError: I/O operation on closed file  
+11:04:34,771  DEBUG - Traceback (most recent call last):  
+11:04:34,771  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:34,771  DEBUG -     if self.shouldRollover(record):  
+11:04:34,771  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:34,771  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:34,771  DEBUG - ValueError: I/O operation on closed file  
+11:04:34,771  DEBUG - Traceback (most recent call last):  
+11:04:34,771  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:34,771  DEBUG -     if self.shouldRollover(record):  
+11:04:34,771  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:34,771  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:34,771  DEBUG - ValueError: I/O operation on closed file  
+11:04:34,771  DEBUG - Traceback (most recent call last):  
+11:04:34,771  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:34,771  DEBUG -     if self.shouldRollover(record):  
+11:04:34,771  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:34,771  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:34,771  DEBUG - ValueError: I/O operation on closed file  
+11:04:34,771  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:34,771  DEBUG - Traceback (most recent call last):  
+11:04:34,771  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:34,771  DEBUG -     func(*targs, **kargs)  
+11:04:34,771  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:34,771  DEBUG -     h.flush()  
+11:04:34,771  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:34,771  DEBUG -     self.stream.flush()  
+11:04:34,771  DEBUG - ValueError: I/O operation on closed file  
+11:04:34,771  DEBUG - Error in sys.exitfunc:  
+11:04:34,771  DEBUG - Traceback (most recent call last):  
+11:04:34,771  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:34,771  DEBUG -     func(*targs, **kargs)  
+11:04:34,771  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:34,771  DEBUG -     h.flush()  
+11:04:34,771  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:34,771  DEBUG -     self.stream.flush()  
+11:04:34,771  DEBUG - ValueError: I/O operation on closed file  
+11:04:34,880  DEBUG - Execution of blocks returned: 0  
+11:04:35,786  DEBUG - Traceback (most recent call last):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:35,786  DEBUG -     self.doRollover()  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:35,786  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:35,786  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:35,786  DEBUG - Traceback (most recent call last):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:35,786  DEBUG -     if self.shouldRollover(record):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:35,786  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:35,786  DEBUG - ValueError: I/O operation on closed file  
+11:04:35,786  DEBUG - Traceback (most recent call last):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:35,786  DEBUG -     if self.shouldRollover(record):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:35,786  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:35,786  DEBUG - ValueError: I/O operation on closed file  
+11:04:35,786  DEBUG - Traceback (most recent call last):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:35,786  DEBUG -     if self.shouldRollover(record):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:35,786  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:35,786  DEBUG - ValueError: I/O operation on closed file  
+11:04:35,786  DEBUG - Traceback (most recent call last):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:35,786  DEBUG -     if self.shouldRollover(record):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:35,786  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:35,786  DEBUG - ValueError: I/O operation on closed file  
+11:04:35,786  DEBUG - Traceback (most recent call last):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:35,786  DEBUG -     if self.shouldRollover(record):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:35,786  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:35,786  DEBUG - ValueError: I/O operation on closed file  
+11:04:35,786  DEBUG - Traceback (most recent call last):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:35,786  DEBUG -     if self.shouldRollover(record):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:35,786  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:35,786  DEBUG - ValueError: I/O operation on closed file  
+11:04:35,786  DEBUG - Traceback (most recent call last):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:35,786  DEBUG -     if self.shouldRollover(record):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:35,786  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:35,786  DEBUG - ValueError: I/O operation on closed file  
+11:04:35,786  DEBUG - Traceback (most recent call last):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:35,786  DEBUG -     if self.shouldRollover(record):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:35,786  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:35,786  DEBUG - ValueError: I/O operation on closed file  
+11:04:35,786  DEBUG - Traceback (most recent call last):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:35,786  DEBUG -     if self.shouldRollover(record):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:35,786  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:35,786  DEBUG - ValueError: I/O operation on closed file  
+11:04:35,786  DEBUG - Traceback (most recent call last):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:35,786  DEBUG -     if self.shouldRollover(record):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:35,786  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:35,786  DEBUG - ValueError: I/O operation on closed file  
+11:04:35,786  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:35,786  DEBUG - Traceback (most recent call last):  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:35,786  DEBUG -     func(*targs, **kargs)  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:35,786  DEBUG -     h.flush()  
+11:04:35,786  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:35,786  DEBUG -     self.stream.flush()  
+11:04:35,786  DEBUG - ValueError: I/O operation on closed file  
+11:04:35,786  DEBUG - Error in sys.exitfunc:  
+11:04:35,802  DEBUG - Traceback (most recent call last):  
+11:04:35,802  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:35,802  DEBUG -     func(*targs, **kargs)  
+11:04:35,802  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:35,802  DEBUG -     h.flush()  
+11:04:35,802  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:35,802  DEBUG -     self.stream.flush()  
+11:04:35,802  DEBUG - ValueError: I/O operation on closed file  
+11:04:35,911  DEBUG - Execution of blocks returned: 0  
+11:04:36,208  DEBUG - Traceback (most recent call last):  
+11:04:36,208  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:36,208  DEBUG -     self.doRollover()  
+11:04:36,208  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:36,208  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:36,208  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:36,208  DEBUG - Traceback (most recent call last):  
+11:04:36,208  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:36,208  DEBUG -     if self.shouldRollover(record):  
+11:04:36,208  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:36,208  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:36,208  DEBUG - ValueError: I/O operation on closed file  
+11:04:36,208  DEBUG - Traceback (most recent call last):  
+11:04:36,208  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:36,208  DEBUG -     if self.shouldRollover(record):  
+11:04:36,208  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:36,208  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:36,208  DEBUG - ValueError: I/O operation on closed file  
+11:04:36,208  DEBUG - Traceback (most recent call last):  
+11:04:36,208  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:36,208  DEBUG -     if self.shouldRollover(record):  
+11:04:36,208  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:36,208  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:36,208  DEBUG - ValueError: I/O operation on closed file  
+11:04:36,208  DEBUG - Traceback (most recent call last):  
+11:04:36,208  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:36,208  DEBUG -     if self.shouldRollover(record):  
+11:04:36,208  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:36,208  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:36,208  DEBUG - ValueError: I/O operation on closed file  
+11:04:36,208  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:36,208  DEBUG - Traceback (most recent call last):  
+11:04:36,208  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:36,208  DEBUG -     func(*targs, **kargs)  
+11:04:36,208  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:36,208  DEBUG -     h.flush()  
+11:04:36,208  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:36,208  DEBUG -     self.stream.flush()  
+11:04:36,208  DEBUG - ValueError: I/O operation on closed file  
+11:04:36,208  DEBUG - Error in sys.exitfunc:  
+11:04:36,208  DEBUG - Traceback (most recent call last):  
+11:04:36,208  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:36,208  DEBUG -     func(*targs, **kargs)  
+11:04:36,208  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:36,208  DEBUG -     h.flush()  
+11:04:36,208  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:36,208  DEBUG -     self.stream.flush()  
+11:04:36,208  DEBUG - ValueError: I/O operation on closed file  
+11:04:36,318  DEBUG - Execution of blocks returned: 0  
+11:04:36,630  DEBUG - Traceback (most recent call last):  
+11:04:36,630  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:36,630  DEBUG -     self.doRollover()  
+11:04:36,630  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:36,630  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:36,630  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:36,630  DEBUG - Traceback (most recent call last):  
+11:04:36,630  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:36,630  DEBUG -     if self.shouldRollover(record):  
+11:04:36,630  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:36,630  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:36,630  DEBUG - ValueError: I/O operation on closed file  
+11:04:36,630  DEBUG - Traceback (most recent call last):  
+11:04:36,630  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:36,630  DEBUG -     if self.shouldRollover(record):  
+11:04:36,630  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:36,630  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:36,630  DEBUG - ValueError: I/O operation on closed file  
+11:04:36,630  DEBUG - Traceback (most recent call last):  
+11:04:36,630  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:36,630  DEBUG -     if self.shouldRollover(record):  
+11:04:36,630  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:36,630  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:36,630  DEBUG - ValueError: I/O operation on closed file  
+11:04:36,630  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:36,630  DEBUG - Traceback (most recent call last):  
+11:04:36,630  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:36,630  DEBUG -     func(*targs, **kargs)  
+11:04:36,630  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:36,630  DEBUG -     h.flush()  
+11:04:36,630  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:36,630  DEBUG -     self.stream.flush()  
+11:04:36,630  DEBUG - ValueError: I/O operation on closed file  
+11:04:36,630  DEBUG - Error in sys.exitfunc:  
+11:04:36,630  DEBUG - Traceback (most recent call last):  
+11:04:36,630  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:36,630  DEBUG -     func(*targs, **kargs)  
+11:04:36,630  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:36,630  DEBUG -     h.flush()  
+11:04:36,630  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:36,630  DEBUG -     self.stream.flush()  
+11:04:36,630  DEBUG - ValueError: I/O operation on closed file  
+11:04:36,739  DEBUG - Execution of blocks returned: 0  
+11:04:37,474  DEBUG - Traceback (most recent call last):  
+11:04:37,474  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:37,474  DEBUG -     self.doRollover()  
+11:04:37,474  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:37,474  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:37,474  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:37,474  DEBUG - Traceback (most recent call last):  
+11:04:37,474  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:37,474  DEBUG -     if self.shouldRollover(record):  
+11:04:37,474  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:37,474  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:37,474  DEBUG - ValueError: I/O operation on closed file  
+11:04:37,474  DEBUG - Traceback (most recent call last):  
+11:04:37,474  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:37,474  DEBUG -     if self.shouldRollover(record):  
+11:04:37,474  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:37,474  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:37,474  DEBUG - ValueError: I/O operation on closed file  
+11:04:37,474  DEBUG - Traceback (most recent call last):  
+11:04:37,474  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:37,474  DEBUG -     if self.shouldRollover(record):  
+11:04:37,474  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:37,474  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:37,474  DEBUG - ValueError: I/O operation on closed file  
+11:04:37,474  DEBUG - Traceback (most recent call last):  
+11:04:37,474  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:37,474  DEBUG -     if self.shouldRollover(record):  
+11:04:37,474  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:37,474  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:37,474  DEBUG - ValueError: I/O operation on closed file  
+11:04:37,474  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:37,474  DEBUG - Traceback (most recent call last):  
+11:04:37,474  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:37,474  DEBUG -     func(*targs, **kargs)  
+11:04:37,474  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:37,474  DEBUG -     h.flush()  
+11:04:37,474  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:37,474  DEBUG -     self.stream.flush()  
+11:04:37,474  DEBUG - ValueError: I/O operation on closed file  
+11:04:37,474  DEBUG - Error in sys.exitfunc:  
+11:04:37,474  DEBUG - Traceback (most recent call last):  
+11:04:37,474  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:37,474  DEBUG -     func(*targs, **kargs)  
+11:04:37,474  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:37,474  DEBUG -     h.flush()  
+11:04:37,474  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:37,474  DEBUG -     self.stream.flush()  
+11:04:37,474  DEBUG - ValueError: I/O operation on closed file  
+11:04:37,583  DEBUG - Execution of blocks returned: 0  
+11:04:39,958  DEBUG - Execution of bundle returned: 0  
+11:04:40,271  DEBUG - Traceback (most recent call last):  
+11:04:40,271  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:40,271  DEBUG -     self.doRollover()  
+11:04:40,271  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:40,271  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:40,271  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:40,271  DEBUG - Traceback (most recent call last):  
+11:04:40,271  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:40,271  DEBUG -     if self.shouldRollover(record):  
+11:04:40,271  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:40,271  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:40,271  DEBUG - ValueError: I/O operation on closed file  
+11:04:40,271  DEBUG - Traceback (most recent call last):  
+11:04:40,271  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:40,271  DEBUG -     if self.shouldRollover(record):  
+11:04:40,271  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:40,271  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:40,271  DEBUG - ValueError: I/O operation on closed file  
+11:04:40,271  DEBUG - Traceback (most recent call last):  
+11:04:40,271  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:40,271  DEBUG -     if self.shouldRollover(record):  
+11:04:40,271  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:40,271  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:40,271  DEBUG - ValueError: I/O operation on closed file  
+11:04:40,271  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:40,271  DEBUG - Traceback (most recent call last):  
+11:04:40,271  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:40,271  DEBUG -     func(*targs, **kargs)  
+11:04:40,271  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:40,271  DEBUG -     h.flush()  
+11:04:40,271  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:40,271  DEBUG -     self.stream.flush()  
+11:04:40,271  DEBUG - ValueError: I/O operation on closed file  
+11:04:40,271  DEBUG - Error in sys.exitfunc:  
+11:04:40,271  DEBUG - Traceback (most recent call last):  
+11:04:40,271  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:40,271  DEBUG -     func(*targs, **kargs)  
+11:04:40,271  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:40,271  DEBUG -     h.flush()  
+11:04:40,271  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:40,271  DEBUG -     self.stream.flush()  
+11:04:40,271  DEBUG - ValueError: I/O operation on closed file  
+11:04:40,380  DEBUG - Execution of blocks returned: 0  
+11:04:41,099  DEBUG - Traceback (most recent call last):  
+11:04:41,099  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:41,099  DEBUG -     self.doRollover()  
+11:04:41,099  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:41,099  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:41,099  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:41,099  DEBUG - Traceback (most recent call last):  
+11:04:41,099  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:41,099  DEBUG -     if self.shouldRollover(record):  
+11:04:41,099  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:41,099  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:41,099  DEBUG - ValueError: I/O operation on closed file  
+11:04:41,099  DEBUG - Traceback (most recent call last):  
+11:04:41,099  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:41,099  DEBUG -     if self.shouldRollover(record):  
+11:04:41,099  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:41,099  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:41,099  DEBUG - ValueError: I/O operation on closed file  
+11:04:41,099  DEBUG - Traceback (most recent call last):  
+11:04:41,099  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:41,099  DEBUG -     if self.shouldRollover(record):  
+11:04:41,099  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:41,099  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:41,099  DEBUG - ValueError: I/O operation on closed file  
+11:04:41,099  DEBUG - Traceback (most recent call last):  
+11:04:41,099  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:41,099  DEBUG -     if self.shouldRollover(record):  
+11:04:41,099  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:41,099  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:41,099  DEBUG - ValueError: I/O operation on closed file  
+11:04:41,099  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:41,099  DEBUG - Traceback (most recent call last):  
+11:04:41,099  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:41,099  DEBUG -     func(*targs, **kargs)  
+11:04:41,099  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:41,099  DEBUG -     h.flush()  
+11:04:41,099  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:41,099  DEBUG -     self.stream.flush()  
+11:04:41,099  DEBUG - ValueError: I/O operation on closed file  
+11:04:41,099  DEBUG - Error in sys.exitfunc:  
+11:04:41,099  DEBUG - Traceback (most recent call last):  
+11:04:41,099  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:41,099  DEBUG -     func(*targs, **kargs)  
+11:04:41,099  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:41,099  DEBUG -     h.flush()  
+11:04:41,099  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:41,099  DEBUG -     self.stream.flush()  
+11:04:41,099  DEBUG - ValueError: I/O operation on closed file  
+11:04:41,208  DEBUG - Execution of blocks returned: 0  
+11:04:43,583  DEBUG - Execution of bundle returned: 0  
+11:04:43,895  DEBUG - Traceback (most recent call last):  
+11:04:43,895  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 72, in emit  
+11:04:43,895  DEBUG -     self.doRollover()  
+11:04:43,895  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 129, in doRollover  
+11:04:43,895  DEBUG -     os.rename(self.baseFilename, dfn)  
+11:04:43,895  DEBUG - WindowsError: [Error 32] The process cannot access the file because it is being used by another process  
+11:04:43,895  DEBUG - Traceback (most recent call last):  
+11:04:43,895  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:43,895  DEBUG -     if self.shouldRollover(record):  
+11:04:43,895  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:43,895  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:43,895  DEBUG - ValueError: I/O operation on closed file  
+11:04:43,895  DEBUG - Traceback (most recent call last):  
+11:04:43,895  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:43,895  DEBUG -     if self.shouldRollover(record):  
+11:04:43,895  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:43,895  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:43,895  DEBUG - ValueError: I/O operation on closed file  
+11:04:43,895  DEBUG - Traceback (most recent call last):  
+11:04:43,895  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 71, in emit  
+11:04:43,895  DEBUG -     if self.shouldRollover(record):  
+11:04:43,895  DEBUG -   File "C:\APPS\actpython\lib\logging\handlers.py", line 145, in shouldRollover  
+11:04:43,895  DEBUG -     self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature  
+11:04:43,895  DEBUG - ValueError: I/O operation on closed file  
+11:04:43,895  DEBUG - Error in atexit._run_exitfuncs:  
+11:04:43,895  DEBUG - Traceback (most recent call last):  
+11:04:43,895  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:43,895  DEBUG -     func(*targs, **kargs)  
+11:04:43,895  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:43,895  DEBUG -     h.flush()  
+11:04:43,895  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:43,895  DEBUG -     self.stream.flush()  
+11:04:43,895  DEBUG - ValueError: I/O operation on closed file  
+11:04:43,895  DEBUG - Error in sys.exitfunc:  
+11:04:43,895  DEBUG - Traceback (most recent call last):  
+11:04:43,895  DEBUG -   File "C:\APPS\actpython\lib\atexit.py", line 24, in _run_exitfuncs  
+11:04:43,895  DEBUG -     func(*targs, **kargs)  
+11:04:43,895  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 1486, in shutdown  
+11:04:43,895  DEBUG -     h.flush()  
+11:04:43,895  DEBUG -   File "C:\APPS\actpython\lib\logging\__init__.py", line 746, in flush  
+11:04:43,895  DEBUG -     self.stream.flush()  
+11:04:43,895  DEBUG - ValueError: I/O operation on closed file  
+11:04:44,005  DEBUG - Execution of blocks returned: 0  
+11:04:45,380  DEBUG - Execution of bundle returned: 0  
+11:04:46,723  DEBUG - External process error: apt-ftparchive failed with error code 100  
+11:04:46,848  DEBUG - Execution of bundle returned: 1  
+11:04:47,755  DEBUG - External process error: apt-ftparchive failed with error code 100  
+11:04:47,880  DEBUG - Execution of bundle returned: 1  
+11:04:48,630  DEBUG - WARNING: Path 'E:\Build_E\wbernard\workspace\helium-working-java2\helium\build\components\helium-blocks\test\temp\repo' does not contain any bundles(*.deb).  
+11:04:48,630  DEBUG - Creating empty repository.  
+11:04:48,911  DEBUG - Execution of bundle returned: 0  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/tests/src/com/nokia/helium/blocks/tests/TestBlocks.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+package com.nokia.helium.blocks.tests;
+
+import java.io.File;
+
+import com.nokia.helium.blocks.Blocks;
+import com.nokia.helium.blocks.BlocksException;
+
+import org.junit.*;
+import static org.junit.Assert.*;
+
+public class TestBlocks {
+    
+    boolean blocksPresent;
+    
+    @Before
+    public void setUp() {
+        // check if blocks is installed. Then test could take place.
+        try {
+            Process p = null;
+            if (System.getProperty("os.name").toLowerCase().startsWith("win")) {
+                p = Runtime.getRuntime().exec("blocks.bat");
+            } else {
+                p = Runtime.getRuntime().exec("blocks");
+            }
+            p.getErrorStream().close();
+            p.getOutputStream().close();
+            p.getInputStream().close();
+            blocksPresent = (p.waitFor()==0);
+        } catch (Exception e) {
+            System.err.println("Blocks is not installed so unittest will be skipped: " + e);
+        }
+    }
+
+    @After
+    public void tearDown() {
+    }
+    
+    /**
+     * Test the simple execution of a blocks command
+     * @throws Exception
+     */
+    @Test
+    public void test_simpleBlocksExecution() throws Exception {
+        if (blocksPresent) {
+            Blocks blocks = new Blocks();
+            blocks.execute(new String[0]);
+        }
+    }
+    
+    /**
+     * Test the simple execution of a blocks command
+     * @throws Exception
+     */
+    @Test
+    public void test_simpleBlocksExecutionFails() throws Exception {
+        if (blocksPresent) {
+            Blocks blocks = new Blocks();
+            String[] args = new String[1];
+            args[0] = "non-existing-command";
+            try {
+                blocks.execute(args);
+                fail("This blocks command must fail!");
+            } catch (BlocksException e) {
+                // nothing to do
+            }
+        }
+    }
+
+    @Test
+    public void test_addWorkspace() throws Exception {
+        if (blocksPresent) {
+            Blocks blocks = new Blocks();
+            try {
+                blocks.addWorkspace(new File("not-existing-dir"), "Not existing dir.");
+                fail("This blocks command must fail!");
+            } catch (BlocksException e) {
+                // nothing to do
+            }
+        }
+    }
+
+    @Test
+    public void test_listWorkspaces() throws Exception {
+        if (blocksPresent) {
+            Blocks blocks = new Blocks();
+            blocks.listWorkspaces();
+        }
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/tests/src/com/nokia/helium/blocks/tests/TestBundle.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,97 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.tests;
+
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.nokia.helium.blocks.Bundle;
+import com.nokia.helium.blocks.BundleException;
+
+/**
+ * Test bundle command interface.
+ */
+public class TestBundle {
+    boolean bundlePresent;
+    
+    @Before
+    public void setUp() {
+        // check if blocks is installed. Then test could take place.
+        try {
+            Process p = null;
+            if (System.getProperty("os.name").toLowerCase().startsWith("win")) {
+                p = Runtime.getRuntime().exec("bundle.bat");
+            } else {
+                p = Runtime.getRuntime().exec("bundle");
+            }
+            p.getErrorStream().close();
+            p.getOutputStream().close();
+            p.getInputStream().close();
+            bundlePresent = (p.waitFor()==0);
+        } catch (Exception e) {
+            System.err.println("Bundler is not installed so unittest will be skipped: " + e);
+        }
+    }
+
+    @After
+    public void tearDown() {
+    }
+
+    @Test
+    public void test_simpleBundleExecution() throws BundleException {
+        if (bundlePresent) {
+            Bundle bundle = new Bundle();
+            bundle.execute(new String[0]);
+        }
+    }
+    
+    @Test
+    public void test_createIndexNullArg() {
+        if (bundlePresent) {
+            Bundle bundle = new Bundle();
+            try {
+                bundle.createRepositoryIndex(null);
+                fail("createRepositoryIndex must fail in case of invalid arg.");
+            } catch (BundleException exc) {
+                // ignore exception
+            }
+        }
+    }
+
+    @Test
+    public void test_createIndexInvalidDir() throws IOException {
+        if (bundlePresent) {
+            Bundle bundle = new Bundle();
+            try {
+                File file = File.createTempFile("invalid", ".dir");
+                file.deleteOnExit();
+                bundle.createRepositoryIndex(file);
+                fail("createRepositoryIndex must fail in case of invalid arg.");
+            } catch (BundleException exc) {
+                // ignore exception
+            }
+        }
+    }
+
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/tests/src/com/nokia/helium/blocks/tests/TestGroupStreamConsumer.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.tests;
+
+import org.junit.Test;
+
+import com.nokia.helium.blocks.GroupListStreamConsumer;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Tests related to the GroupStreamConsumer class.
+ */
+public class TestGroupStreamConsumer {
+   
+    @Test
+    public void parsingOfData() {
+        GroupListStreamConsumer consumer = new GroupListStreamConsumer();
+        consumer.consumeLine("");
+        consumer.consumeLine("   My group");
+        consumer.consumeLine("   My second group");
+        consumer.consumeLine("");
+        assertEquals(consumer.getGroups().size(), 2);
+        assertEquals(consumer.getGroups().get(0).getName(), "My group");
+        assertEquals(consumer.getGroups().get(1).getName(), "My second group");
+    }
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/tests/src/com/nokia/helium/blocks/tests/TestRepositoryListStreamConsumer.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.tests;
+
+import org.junit.Test;
+
+import com.nokia.helium.blocks.RepositoryListStreamConsumer;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Tests related to the GroupStreamConsumer class.
+ */
+public class TestRepositoryListStreamConsumer {
+   
+    @Test
+    public void parsingOfData() {
+        RepositoryListStreamConsumer consumer = new RepositoryListStreamConsumer();
+        consumer.consumeLine("1");
+        consumer.consumeLine("  Name: sbs_22");
+        consumer.consumeLine("  URI: file:///e:/repo1");
+        consumer.consumeLine("");
+        consumer.consumeLine("2");
+        consumer.consumeLine("  Name: sbs_23");
+        consumer.consumeLine("  URI: file:///e:/repo2");
+        consumer.consumeLine("");
+        assertEquals(consumer.getRepositories().size(), 2);
+        assertEquals(consumer.getRepositories().get(0).getName(), "sbs_22");
+        assertEquals(consumer.getRepositories().get(0).getId(), 1);
+        assertEquals(consumer.getRepositories().get(0).getUrl(), "file:///e:/repo1");
+        assertEquals(consumer.getRepositories().get(1).getName(), "sbs_23");
+        assertEquals(consumer.getRepositories().get(1).getId(), 2);
+        assertEquals(consumer.getRepositories().get(1).getUrl(), "file:///e:/repo2");
+    }
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/tests/src/com/nokia/helium/blocks/tests/TestSearchStreamConsumer.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.tests;
+
+import org.junit.Test;
+
+import com.nokia.helium.blocks.SearchStreamConsumer;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Tests related to the SearchStreamConsumer class.
+ */
+public class TestSearchStreamConsumer {
+
+    @Test
+    public void parsingOfInvalidData() {
+        SearchStreamConsumer consumer = new SearchStreamConsumer();
+        consumer.consumeLine("");
+        consumer.consumeLine("foo-bar");
+        consumer.consumeLine("bar");
+        assertEquals(consumer.getSearchResults().size(), 0);
+    }
+
+    @Test
+    public void parsingOfValidData() {
+        SearchStreamConsumer consumer = new SearchStreamConsumer();
+        consumer.consumeLine("");
+        consumer.consumeLine("foo.src - n/a");
+        consumer.consumeLine("foo-dev.src - n/a");
+        assertEquals(consumer.getSearchResults().size(), 2);
+        assertEquals(consumer.getSearchResults().get(0), "foo.src");
+        assertEquals(consumer.getSearchResults().get(1), "foo-dev.src");
+    }
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/blocks/tests/src/com/nokia/helium/blocks/tests/TestWorkspaceListSteamConsumer.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.blocks.tests;
+
+import org.junit.*;
+
+import com.nokia.helium.blocks.Workspace;
+import com.nokia.helium.blocks.WorkspaceListStreamConsumer;
+
+import static org.junit.Assert.*;
+
+public class TestWorkspaceListSteamConsumer {
+
+    @Test
+    public void simpleParsing() {
+        WorkspaceListStreamConsumer consumer = new WorkspaceListStreamConsumer();
+        consumer.consumeLine("");
+        consumer.consumeLine("foo");
+        consumer.consumeLine("bar");
+        assertEquals(consumer.getWorkspaces().length, 0);
+    }
+    
+    @Test
+    public void simpleWorkspaceParsing() {
+        WorkspaceListStreamConsumer consumer = new WorkspaceListStreamConsumer();
+        consumer.consumeLine("1");
+        consumer.consumeLine("  name: foobar");
+        consumer.consumeLine("  path: C:\\workspace\\foo");
+        consumer.consumeLine("");
+        assertEquals(consumer.getWorkspaces().length, 1);
+    }
+
+    @Test
+    public void realWorkspaceParsing() {
+        WorkspaceListStreamConsumer consumer = new WorkspaceListStreamConsumer();
+        consumer.consumeLine("1");
+        consumer.consumeLine("  name: foo");
+        consumer.consumeLine("  path: C:\\workspaces\\foo");
+        consumer.consumeLine("");
+        consumer.consumeLine("2*");
+        consumer.consumeLine("  name: foobar");
+        consumer.consumeLine("  path: C:\\workspaces\\tests");
+        consumer.consumeLine("");
+        Workspace[] ws = consumer.getWorkspaces();
+        assertEquals(ws.length, 2);
+        assertEquals(ws[0].getName(), "foo");
+        assertEquals(ws[0].getLocation().toString(), "C:\\workspaces\\foo");
+        assertEquals(ws[1].getName(), "foobar");
+        assertEquals(ws[1].getLocation().toString(), "C:\\workspaces\\tests");
+    }
+    
+}
--- a/buildframework/helium/sf/java/core/ivy.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/core/ivy.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -36,5 +36,7 @@
     <dependency org="org.apache.commons" name="commons-lang" rev="2.4"  />
     <dependency org="net.sourceforge.fmpp" name="fmpp" rev="0.9.13"  />
     <dependency org="dom4j" name="dom4j" rev="latest.integration"  />
+    <dependency org="com.nokia.helium" name="helium-antdata" rev="latest.integration"  />
+    <dependency org="com.nokia.helium" name="helium-antlint" rev="latest.integration"  />
   </dependencies>
 </ivy-module>
--- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/MessageCreationException.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/MessageCreationException.java	Wed Oct 13 16:31:27 2010 +0800
@@ -19,18 +19,26 @@
 package com.nokia.helium.core;
 
 /**
- * Exception class for Messagecreation implementation
+ * Exception class for Message creation implementation
  * 
  */
 public class MessageCreationException extends Exception {
+    private static final long serialVersionUID = 330899302955104898L;
 
     /**
-     * Constructor
-     * 
-     * @exception - exception to be processed.
+     * Create a MessageCreationException with an error message
+     * @param message the error message.
      */
+    public MessageCreationException(String message) {
+        super("Message Creation Error: " + message);
+    }
 
-    public MessageCreationException(String exception) {
-        super("Message Creation Error: " + exception);
+    /**
+     * Creating a MessageCreationException with a message and a cause.
+     * @param message the message
+     * @param cause the root cause
+     */
+    public MessageCreationException(String message, Throwable cause) {
+        super("Message Creation Error: " + message, cause);
     }
 }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/HeliumLogger.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *
+ */
+
+package com.nokia.helium.core.ant;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.DefaultLogger;
+import org.apache.tools.ant.Project;
+
+/**
+ * Logger class that can connect to Ant and log information regarding to skipped
+ * targets.
+ * 
+ */
+public class HeliumLogger extends DefaultLogger {
+
+    private static final String INTERNALPROPERTY = "internal.";
+    private Project project;
+
+    /**
+     * Triggered when a target starts.
+     */
+    public void targetStarted(BuildEvent event) {
+        project = event.getProject();
+
+        /** The "if" condition to test on execution. */
+        String ifCondition = event.getTarget().getIf();
+        /** The "unless" condition to test on execution. */
+        String unlessCondition = event.getTarget().getUnless();
+
+        super.targetStarted(event);
+
+        /**
+         * if the target is not going to execute (due to 'if' or 'unless'
+         * conditions) print a message telling the user why it is not going to
+         * execute
+         **/
+        if (ifCondition != null && !isPropertyAvailable(ifCondition)) {
+            if (ifCondition.startsWith(INTERNALPROPERTY)) {
+                String enableProperty = ifCondition.substring(INTERNALPROPERTY
+                        .length());
+                project.log("Skipped because property '" + enableProperty
+                        + "' not set to 'true'.", Project.MSG_INFO);
+            } else {
+                project.log("Skipped because property '"
+                        + project.replaceProperties(ifCondition)
+                        + "' is not set.", Project.MSG_INFO);
+            }
+
+        } else if (unlessCondition != null
+                && isPropertyAvailable(unlessCondition)) {
+            if (unlessCondition.startsWith(INTERNALPROPERTY)) {
+                String enableProperty = unlessCondition
+                        .substring(INTERNALPROPERTY.length());
+                project.log("Skipped because property '" + enableProperty
+                        + "' is set.", Project.MSG_INFO);
+            } else {
+                project.log(
+                        "Skipped because property '"
+                                + project.replaceProperties(unlessCondition)
+                                + "' set.", Project.MSG_INFO);
+            }
+        }
+    }
+
+    /**
+     * Method to verify whether the given property is available in the project
+     * or not.
+     * 
+     * @param propertyName
+     *            the name of the property to verify.
+     * @return true, if the property available and is set; otherwise false.
+     */
+    private boolean isPropertyAvailable(String propertyName) {
+        return project.getProperty(project.replaceProperties(propertyName)) != null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/ResourceCollectionUtils.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.core.ant;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.regex.Pattern;
+
+import org.apache.tools.ant.types.Resource;
+import org.apache.tools.ant.types.ResourceCollection;
+
+/**
+ * This utility class provides a set of functions to manipulate Ant
+ * ResourceCollection.
+ *
+ */
+public final class ResourceCollectionUtils {
+
+    /**
+     * Private constructor to make sure the class is never 
+     * Instantiated.
+     */
+    private ResourceCollectionUtils() { }
+    
+    /**
+     * Extract the first file form the resource collection matching the pattern.
+     * Returns null if not found.
+     * @param resourceCollection
+     * @param pattern a regular expression as a string
+     * @return the first resource matching, or null if not found
+     */
+    public static File getFile(ResourceCollection resourceCollection, String pattern) {
+        return getFile(resourceCollection, Pattern.compile(pattern));
+    }
+    
+    /**
+     * Extract the first file form the resource collection matching the pattern.
+     * Returns null if not found.
+     * @param resourceCollection
+     * @param pattern a regular expression as a compile pattern
+     * @return the first resource matching, or null if not found
+     */
+    @SuppressWarnings("unchecked")
+    public static File getFile(ResourceCollection resourceCollection, Pattern pattern) {
+        Iterator<Resource> ri = (Iterator<Resource>)resourceCollection.iterator();
+        while (ri.hasNext()) {
+            Resource resource = ri.next();
+            if (pattern.matcher(resource.toString()).matches()) {
+                return new File(resource.toString());
+            }
+        }
+        return null;
+    }
+    
+    /**
+     * Get the ResourceCollection as a list of files.
+     * Returns null if not found.
+     * @param resourceCollection
+     * @return a list of files.
+     */
+    @SuppressWarnings("unchecked")
+    public static List<File> getFiles(ResourceCollection resourceCollection) {
+        List<File> files = new ArrayList<File>(); 
+        Iterator<Resource> ri = (Iterator<Resource>)resourceCollection.iterator();
+        while (ri.hasNext()) {
+            files.add(new File(ri.next().toString()));
+        }
+        return files;
+    }
+    
+}
--- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/antlib.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/antlib.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -28,6 +28,7 @@
     <taskdef name="python" classname="com.nokia.helium.core.ant.taskdefs.PythonTask"/>
     <taskdef name="retry" classname="com.nokia.helium.core.ant.taskdefs.RetryTask"/>
     <taskdef name="getfreedrive" classname="com.nokia.helium.core.ant.taskdefs.GetFreeDriveTask"/>
+    <taskdef name="resourceaccess" classname="com.nokia.helium.core.ant.taskdefs.ResourceAccessTask"/> 
     
     <!-- Type definition -->
     <typedef name="hasSeverity" classname="com.nokia.helium.core.ant.conditions.XMLLogCondition"/>
--- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/helium.antlib.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/helium.antlib.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -25,9 +25,13 @@
         Ant task definition declarations.
     </description>
     <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
-    <typedef name="finaltargetdef" classname="com.nokia.helium.core.ant.types.HlmFinalTargetDef"/> 
-
+    <typedef name="finaltargetdef" classname="com.nokia.helium.core.ant.types.HlmFinalTargetDef" uri="http://www.nokia.com/helium"/> 
+    <typedef name="postbuildqualitycheck" classname="com.nokia.helium.core.ant.types.PostBuildQualityCheckAction" uri="http://www.nokia.com/helium"/>
+    <typedef name="helpdef" classname="com.nokia.helium.core.ant.types.HelpDef" uri="http://www.nokia.com/helium"/>
+    
     <hlm:deflist id="helium-core.list">
-        <finaltargetdef/>
+        <hlm:postbuildqualitycheck/>
+        <hlm:helpdef/>
+        <hlm:finaltargetdef/>
     </hlm:deflist>
 </project>
\ No newline at end of file
--- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/GetValueFromVariableSetTask.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/GetValueFromVariableSetTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -44,6 +44,7 @@
  * &lt;/hlm:getVariableValue&gt;
  * </pre>
  * 
+ * @ant.task category="Core"
  * @ant.task name="getVariableValue"
  */
 public class GetValueFromVariableSetTask extends Task {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/ResourceAccessTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,195 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+package com.nokia.helium.core.ant.taskdefs;
+
+import java.io.RandomAccessFile;
+import java.nio.channels.FileChannel;
+import java.nio.channels.FileLock;
+import java.io.File;
+import java.util.HashMap;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.taskdefs.Sequential;
+
+/**
+ * This class implements the functionality to provide sequential access of
+ * resources. Resources access could be controled by providing a unique lock name
+ * and when try to access the resource call this task with locking to true so that
+ * no other threads / process can access the same resource at the same time. 
+ *
+ * Examples:
+ * <pre>
+ * &lt;target name=&quot;locksubst&quot;&gt;
+ *   &lt;hlm:resourceaccess lockname=&quot;subst&quot; noOfRetry=&quot;-1&quot;&gt;
+ *   &lt;subst/&gt;
+ *   &lt;/hlm:resourceaccess&gt;
+ * &lt;/target&gt;
+ * </pre>
+ * @ant.task name="resourceaccess" category="Core"
+ */
+public class ResourceAccessTask extends Sequential {
+
+    private static HashMap<String, FileLock> lockMap = 
+        new HashMap<String, FileLock>();
+    private static Object mutexObject = new Object();
+    private int noOfRetry = -1;
+    private String lockName;
+    private File baseDirectory;
+    private long interval = 1000;
+    private FileLock fileLock;
+
+    /*
+     * Default Constructor
+     */
+    public ResourceAccessTask() {
+        String tempDirectory = System.getProperty("java.io.tmpdir");
+        baseDirectory = new File(tempDirectory);
+    }
+    
+    /*
+     * Helper function to set the interval
+     * @param intervalValue - waiting period till to try next time.
+     */
+    public void setInterval(Long intervalValue) {
+        interval = intervalValue;
+    }
+
+    /*
+     * Helper function to retry as many times 
+     * @param retry - no. of times to retry before throwing
+     * LockAccessException
+     */
+    public void setNoOfRetry(int retry) {
+        noOfRetry = retry;
+    }
+
+    /*
+     * A unique lock name for a specific task to be run
+     * sequential. 
+     * @param name of the lock to do sequential task.
+     */
+    public void setLockName(String name) {
+        lockName = name;
+    }
+
+    /*
+     * Base directory for lock file creation. 
+     * @param dir, directory in which the lock file to be created
+     * defaults to temporary directory.
+     */
+    public void setBaseDirectory(File dir) {
+        baseDirectory = dir;
+    }
+
+    /*
+     * Function acquires the lock on the specified lock name. 
+     */
+    public void acquireLock() {
+        File file = new File(baseDirectory, lockName);
+        if (! file.exists()) {
+            FileOutputStream stream = null;
+            try {
+                stream = new FileOutputStream(file);
+                stream.write("do not edit \n lock processing".getBytes());
+                stream.close();
+            } catch (FileNotFoundException e) {
+                throw new BuildException("interrupted during waiting period");
+            } catch (IOException e) {
+                throw new BuildException("I/O exception during creating lock for file: " + file);
+            }
+        }
+        try {
+            FileChannel channel = new RandomAccessFile(new File(baseDirectory, 
+                        lockName), "rw").getChannel();
+            boolean lockAcquired = false;
+            int i = 0;
+            while (!lockAcquired) {
+                try {
+                    synchronized (mutexObject) {
+                        if (lockMap.get(lockName) == null) {
+                            if ( noOfRetry != -1 && i >= noOfRetry) {
+                                throw new BuildException("lock not acquired");
+                            }
+                            i += 1;
+                            fileLock = channel.lock();
+                            lockAcquired = true;
+                            lockMap.put(lockName, fileLock);
+                        } else {
+                            if ( noOfRetry != -1 && i >= noOfRetry) {
+                                throw new BuildException("lock not acquired");
+                            }
+                            try {
+                                Thread.sleep(interval);
+                            } catch (InterruptedException e) {
+                                throw new BuildException("interrupted during waiting period");
+                            }
+                            i += 1;
+                        }
+                    }
+                } catch (IOException e) {
+                    throw new BuildException(e.getMessage());
+                } catch (java.nio.channels.OverlappingFileLockException jex) {
+                    try {
+                        Thread.sleep(interval);
+                    } catch (InterruptedException e) {
+                        throw new BuildException("interrupted during waiting period");
+                    }
+                }
+            }
+        } catch (FileNotFoundException e) {
+            throw new BuildException("interrupted during waiting period");
+        }
+    }
+
+    /*
+     * Function to release the lock. 
+     */
+    public void releaseLock() {
+        try {
+            synchronized (mutexObject) {
+                FileLock fileLock = lockMap.get(lockName);
+                if (fileLock == null) {
+                    throw new BuildException("releasing without trying to lock resource: " + lockName);
+                }
+                lockMap.remove(lockName);
+                fileLock.release();
+            }
+        } catch (IOException e) {
+            throw new BuildException("IOException during releasing lock");
+        }
+    }
+    
+    public void execute() {
+        if (!baseDirectory.exists()) {
+            throw new BuildException("base directory of resource access task not exists");
+        }
+        if (lockName == null) {
+            throw new BuildException("lock name should not "
+                    + "be null during releasing the lock");
+        }
+        acquireLock();
+        try {
+            super.execute();
+        } finally {
+            releaseLock();
+        }
+    }
+}
\ No newline at end of file
--- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/FMPPMessage.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/FMPPMessage.java	Wed Oct 13 16:31:27 2010 +0800
@@ -20,8 +20,8 @@
 
 import java.io.File;
 import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
 import org.apache.tools.ant.types.DataType;
-import org.apache.log4j.Logger;
 import fmpp.tools.AntTask;
 import fmpp.tools.AntTask.AntAttributeSubstitution;
 
@@ -37,22 +37,19 @@
  *
  * Example 1:
  * <pre>
- *   &lt;hlm:fmppMessage target="diamonds" sourceFile="tool.xml.ftl"&gt;
+ *   &lt;hlm:fmppMessage sourceFile="tool.xml.ftl"&gt;
  *        &lt;data expandProperties="yes"&gt;
  *           ant: antProperties()
  *       &lt;/data&gt;
  *   &lt;/hlm:fmppMessage&gt;
  * </pre>
+ * 
  * @ant.type name="fmppMessage" category="Core" 
  */
 public class FMPPMessage extends DataType implements Message {
 
-    private File outputFile;
-
     private AntTask task = new AntTask();
     
-    private Logger log = Logger.getLogger(FMPPMessage.class);
-
     public void setSourceFile(File sourceFile) {
         if (!sourceFile.exists()) {
             throw new BuildException("input file : " + sourceFile + " doesn't exists");
@@ -79,18 +76,18 @@
         InputStream stream = null;
         try {
             task.setProject(getProject());
-            outputFile = File.createTempFile("fmppmessage", ".xml");
+            File outputFile = File.createTempFile("fmppmessage", ".xml");
             outputFile.deleteOnExit();
             task.setTaskName("fmpp");
             task.setOutputFile(outputFile);
             task.execute();
-            log.debug("outputfile in getinputstream: " + outputFile);
+            log("Temp output file for template rendering: " + outputFile, Project.MSG_DEBUG);
             stream = new FileInputStream(outputFile);
         } catch (BuildException bex) {
-            throw new MessageCreationException(bex.getMessage());
+            throw new MessageCreationException(bex.getMessage(), bex);
         }
         catch (IOException iex) {
-            throw new MessageCreationException(iex.getMessage());
+            throw new MessageCreationException(iex.getMessage(), iex);
         }
         return stream;
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HelpDef.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *
+ */
+
+package com.nokia.helium.core.ant.types;
+
+import java.util.Iterator;
+
+import org.apache.tools.ant.BuildListener;
+import org.apache.tools.ant.BuildLogger;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.DataType;
+
+import com.nokia.helium.core.ant.PostBuildAction;
+
+/**
+ * 
+ */
+public class HelpDef extends DataType implements PostBuildAction {
+
+    /**
+     * 
+     * @param project Object of the project
+     * @param targetNames Array of target names to execute
+     * 
+     */
+    public void executeOnPostBuild(Project project, String[] targetNames) {
+        String firstTarget;
+        // take target
+        if (targetNames != null && targetNames.length > 0) {
+            firstTarget = targetNames[0];
+        }
+        // no target, so set the default one
+        else {
+            firstTarget = "help";
+        }
+
+        // If 'help' target is called, just run that and set other
+        // target names as a property
+        if (firstTarget.equals("help")) {
+            displayHelp(project, targetNames, firstTarget);
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    private void displayHelp(Project project, String[] targetNames, String firstTarget) {
+        if (targetNames.length > 1) {
+            project.setProperty("help.item", targetNames[1]);
+        }
+
+        // Set Emacs mode to true for all listeners, so that help text does
+        // not have [echo] at the start of each line
+        Iterator iter = project.getBuildListeners().iterator();
+        while (iter.hasNext()) {
+            BuildListener listener = (BuildListener) iter.next();
+            if (listener instanceof BuildLogger) {
+                BuildLogger logger = (BuildLogger) listener;
+                logger.setEmacsMode(true);
+            }
+        }
+
+        // Run the 'help' target
+        project.executeTarget(firstTarget);
+    }
+}
--- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmListenerDef.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmListenerDef.java	Wed Oct 13 16:31:27 2010 +0800
@@ -17,7 +17,9 @@
 
 package com.nokia.helium.core.ant.types;
 
-import org.apache.log4j.Logger;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildEvent;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.BuildListener;
 import org.apache.tools.ant.Project;
@@ -33,22 +35,64 @@
 public class HlmListenerDef extends DataType implements PreBuildAction {
 
     private String classname;
-    private Logger log = Logger.getLogger(HlmListenerDef.class);
+    private boolean preappend;
 
+    /**
+     * The classname of the BuildListener to instantiate and register
+     * to the project..
+     * @param preappend
+     */
     public void setClassname(String classname) {
         this.classname = classname;
     }
-
+    
+    /**
+     * Defines if the listener should be added at the end of 
+     * the list or always appended at the beguining of the list
+     * just after the logger.
+     * @param preappend
+     */
+    public void setPreappend(boolean preappend) {
+        this.preappend = preappend;
+    }
+    
     /**
      * Register given listener to the project.
      */
+    @SuppressWarnings("unchecked")
     public void executeOnPreBuild(Project project, String[] targetNames) {
+        if (classname == null) {
+            throw new BuildException("classname attribute has not been defined.");
+        }
         try {
             Class<?> listenerClass = Class.forName(classname);
             BuildListener listener = (BuildListener) listenerClass
                     .newInstance();
-            project.addBuildListener(listener);
-            log.debug(classname + " is registered");
+            
+            if (preappend) {
+                Vector<BuildListener> listeners = (Vector<BuildListener>)project.getBuildListeners();
+                for (BuildListener removeListener : listeners) {
+                    project.removeBuildListener(removeListener);
+                }
+                // Always add the listener as after the first element which should be
+                // the logger.
+                if (listeners.size() > 0) {
+                    listeners.add(1, listener);
+                } else {
+                    // this is really unlikely to happen
+                    listeners.add(listener);
+                }
+                for (BuildListener addListener : listeners) {
+                    project.addBuildListener(addListener);
+                }
+                
+            } else {
+                project.addBuildListener(listener);                
+            }
+            // Trigger that build has started under the listener,
+            // so initialization could happen.
+            listener.buildStarted(new BuildEvent(project));
+            log(classname + " is registered", Project.MSG_DEBUG);
         } catch (ClassNotFoundException ex) {
             throw new BuildException("Class not found exception:"
                     + ex.getMessage(), ex);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/PostBuildQualityCheckAction.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,361 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *
+ */
+
+package com.nokia.helium.core.ant.types;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.DataType;
+
+import com.nokia.helium.ant.data.AntFile;
+import com.nokia.helium.ant.data.Database;
+import com.nokia.helium.ant.data.ProjectMeta;
+import com.nokia.helium.ant.data.PropertyCommentMeta;
+import com.nokia.helium.ant.data.PropertyMeta;
+import com.nokia.helium.ant.data.RootAntObjectMeta;
+import com.nokia.helium.ant.data.TargetMeta;
+import com.nokia.helium.antlint.ant.AntlintException;
+import com.nokia.helium.antlint.ant.Reporter;
+import com.nokia.helium.antlint.ant.Severity;
+import com.nokia.helium.antlint.ant.types.Check;
+import com.nokia.helium.antlint.ant.types.CheckPropertyTypeAndValueMismatch;
+import com.nokia.helium.core.ant.PostBuildAction;
+
+/**
+ * <code>PostBuildQualityCheckAction</code> is run as a post build action to report user
+ * configurations related to Helium targets and properties usage.
+ * 
+ * <p>
+ * This class currently reports following :
+ * <ul>
+ * <li>Use of deprecated Helium targets.</li>
+ * <li>Use of private Helium targets.</li>
+ * <li>Use of deprecated Helium properties.</li>
+ * <li>Override of private Helium properties.</li>
+ * <li>Invalid property types/values set for Helium properties</li>
+ * </ul>
+ * </p>
+ */
+public class PostBuildQualityCheckAction extends DataType implements PostBuildAction, Reporter {
+    private static final String DEPRECATED = "deprecated:";
+    private Set<String> output = new LinkedHashSet<String>();
+    private String heliumPath;
+    private Database publicScopeDb;
+    private Database privateScopeDb;
+
+    /**
+     * Method logs a configuration report about usage of helium targets and
+     * properties.
+     * 
+     * @param project Is the Ant project.
+     * @param targetNames Is an array of target names.
+     */
+    public void executeOnPostBuild(Project project, String[] targetNames) {
+
+        if (project.getProperty("helium.dir") != null) {
+            try {
+                setHeliumPath(new File(project.getProperty("helium.dir")).getCanonicalPath());
+                publicScopeDb = new Database(project);
+                privateScopeDb = new Database(project, "private");
+
+                // Get list of targets which are called either by antcall or
+                // runtarget
+                List<String> antCallTargets = getAntCallTargets(project);
+                checkDeprecatedHeliumTargets(antCallTargets, project);
+                checkPrivateHeliumTargets(antCallTargets, project);
+
+                // Get list of customer defined properties
+                List<String> customerProps = getCustomerProperties(project);
+                checkInvalidProperties(customerProps, project);
+                checkOverriddenProperties(customerProps, project);
+                checkDeprecatedProperties(customerProps, project);
+
+                if (!output.isEmpty()) {
+                    log("*** Configuration report ***", Project.MSG_INFO);
+                    for (String outputStr : output) {
+                        log(outputStr, Project.MSG_INFO);
+                    }
+                }
+            } catch (IOException e) {
+                log(e.getMessage(), Project.MSG_WARN);
+            }
+        } else {
+            log("Configuration report cannot be generated because 'helium.dir' property is not defined.",
+                    Project.MSG_VERBOSE);
+        }
+    }
+
+    /**
+     * Return the Helium path.
+     * 
+     * @return The helium path.
+     */
+    public String getHeliumPath() {
+        return heliumPath;
+    }
+
+    /**
+     * Set helium path.
+     * 
+     * @param heliumPath is the path to set
+     */
+    public void setHeliumPath(String heliumPath) {
+        this.heliumPath = heliumPath;
+    }
+    
+    /**
+     * Method checks for incorrect values, set for boolean/integer type properties.
+     * 
+     * @param customerProps Is a list of customer defined properties
+     * @param project Is the Ant project.
+     */
+    private void checkInvalidProperties(List<String> customerProps, Project project) {
+        Check check = new CheckPropertyTypeAndValueMismatch();
+        check.setReporter(this);
+        check.setSeverity((Severity) Severity.getInstance(Severity.class, "warning"));
+        for (AntFile antFile : privateScopeDb.getAntFiles()) {
+            try {
+                check.setAntFile(antFile);
+                check.run();
+            } catch (AntlintException aex) {
+                log(aex.getMessage(), Project.MSG_WARN);
+            }
+        }
+    }
+
+    /**
+     * Method checks for overridden of private scope helium properties.
+     * 
+     * @param customerProps A list of customer defined properties.
+     * @param project Is the Ant project.
+     */
+    private void checkOverriddenProperties(List<String> customerProps, Project project) {
+        for (PropertyMeta propertyMeta : privateScopeDb.getProperties()) {
+            if (propertyMeta.getLocation().contains(getHeliumPath())
+                    && propertyMeta.getScope().equals("private")
+                    && customerProps.contains(propertyMeta.getName())) {
+                output.add("Warning: " + propertyMeta.getName() + " property has been overridden");
+            }
+        }
+        for (PropertyCommentMeta propertyCommentMeta : privateScopeDb.getCommentProperties()) {
+            if (propertyCommentMeta.getLocation().contains(getHeliumPath())
+                    && propertyCommentMeta.getScope().equals("private")
+                    && customerProps.contains(propertyCommentMeta.getName())) {
+                output.add("Warning: " + propertyCommentMeta.getName()
+                        + " property has been overridden");
+            }
+        }
+    }
+
+    /**
+     * Method checks for use of deprecated helium properties.
+     * 
+     * @param customerProps Is a list of customer defined properties.
+     * @param project Is the Ant project.
+     */
+    private void checkDeprecatedProperties(List<String> customerProps, Project project) {
+        // check for deprecated properties
+        for (PropertyMeta propertyMeta : privateScopeDb.getProperties()) {
+            if (propertyMeta.getLocation().contains(getHeliumPath())
+                    && (!propertyMeta.getDeprecated().equals(""))
+                    && customerProps.contains(propertyMeta.getName())) {
+                output.add("Warning: "
+                        + propertyMeta.getName()
+                        + " property has been deprecated "
+                        + propertyMeta.getDeprecated()
+                        + "."
+                        + propertyMeta.getSummary().substring(
+                                propertyMeta.getSummary().lastIndexOf(DEPRECATED)
+                                        + DEPRECATED.length()));
+            }
+        }
+
+        for (PropertyCommentMeta propertyCommentMeta : privateScopeDb.getCommentProperties()) {
+            if (propertyCommentMeta.getLocation().contains(getHeliumPath())
+                    && (!propertyCommentMeta.getDeprecated().equals(""))
+                    && customerProps.contains(propertyCommentMeta.getName())) {
+                output.add("Warning: "
+                        + propertyCommentMeta.getName()
+                        + " property has been deprecated "
+                        + propertyCommentMeta.getDeprecated()
+                        + "."
+                        + propertyCommentMeta.getSummary().substring(
+                                propertyCommentMeta.getSummary().lastIndexOf(DEPRECATED)
+                                        + DEPRECATED.length()));
+            }
+        }
+    }
+
+    /**
+     * Method checks for use of deprecated helium targets.
+     * 
+     * @param antCallTargets A list of targets referred by antcall/runtarget.
+     * @param project Is the Ant project
+     */
+    private void checkDeprecatedHeliumTargets(List<String> antCallTargets, Project project) {
+        for (String targetName : antCallTargets) {
+            TargetMeta targetMeta = getHeliumTarget(targetName, publicScopeDb);
+            if (targetMeta != null && !targetMeta.getDeprecated().trim().isEmpty()) {
+                output.add("Warning: " + targetMeta.getName() + " target has been deprecated. "
+                        + targetMeta.getDeprecated() + ".");
+            }
+        }
+        // check in dependencies
+        for (TargetMeta targetMeta : publicScopeDb.getTargets()) {
+            if (!targetMeta.getLocation().contains(getHeliumPath())) {
+                List<String> dependencies = targetMeta.getDepends();
+                for (String targetName : dependencies) {
+                    TargetMeta tm = getHeliumTarget(targetName, publicScopeDb);
+                    if (tm != null && !tm.getDeprecated().trim().isEmpty()) {
+                        output.add("Warning: " + tm.getName() + " target has been deprecated. "
+                                + tm.getDeprecated() + ".");
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Method checks for the use of private helium targets.
+     * 
+     * @param antCallTargets A list of targets referred by antcall/runtarget.
+     * @param project Is the Ant project.
+     */
+    private void checkPrivateHeliumTargets(List<String> antCallTargets, Project project) {
+        for (TargetMeta targetMeta : privateScopeDb.getTargets()) {
+            if (targetMeta.getLocation().contains(getHeliumPath())
+                    && targetMeta.getScope().equals("private")
+                    && antCallTargets.contains(targetMeta.getName())) {
+                output.add("Warning: " + targetMeta.getName()
+                        + " is private and should only be called by helium");
+            }
+        }
+        // check in dependencies
+        for (TargetMeta targetMeta : publicScopeDb.getTargets()) {
+            if (!targetMeta.getLocation().contains(getHeliumPath())) {
+                List<String> dependencies = targetMeta.getDepends();
+                for (String targetName : dependencies) {
+                    TargetMeta tm = getHeliumTarget(targetName, privateScopeDb);
+                    if (tm != null && tm.getScope().equals("private")) {
+                        output.add("Warning: " + tm.getName()
+                                + " is private and should only be called by helium");
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Method returns a list of targets referred by antcall/runtarget.
+     * 
+     * @param project Is the Ant project.
+     * @return A list of targets referred by antcall/runtarget
+     */
+    private List<String> getAntCallTargets(Project project) {
+        List<String> antCallTargets = new ArrayList<String>();
+        List<AntFile> customerAntFiles = getCustomerAntFiles(project);
+        for (AntFile antFile : customerAntFiles) {
+            RootAntObjectMeta root = antFile.getRootObjectMeta();
+            if (root instanceof ProjectMeta) {
+                ProjectMeta projectMeta = (ProjectMeta) root;
+                List<TargetMeta> targets = projectMeta.getTargets();
+                for (TargetMeta targetMeta : targets) {
+                    antCallTargets.addAll(targetMeta.getExecTargets());
+                }
+            }
+        }
+        return antCallTargets;
+    }
+
+    /**
+     * Method returns a list of customer ant files.
+     * 
+     * @param project Is the Ant project.
+     * @return A list of customer ant files.
+     */
+    private List<AntFile> getCustomerAntFiles(Project project) {
+        List<AntFile> customerAntFiles = new ArrayList<AntFile>();
+        try {
+            for (AntFile antFile : publicScopeDb.getAntFiles()) {
+                if (!antFile.getFile().getCanonicalPath().contains(getHeliumPath())) {
+                    customerAntFiles.add(antFile);
+                }
+            }
+        } catch (IOException e) {
+            log("Unable to get a list of customer ant files. " + e.getMessage(), Project.MSG_WARN);
+        }
+        return customerAntFiles;
+    }
+
+    /**
+     * Method returns a list of property names defined by customer.
+     * 
+     * @param project Is the Ant project.
+     * @return A list of customer defined property names.
+     */
+    private List<String> getCustomerProperties(Project project) {
+        List<String> customerProps = new ArrayList<String>();
+        List<PropertyMeta> properties = publicScopeDb.getProperties();
+        for (PropertyMeta propertyMeta : properties) {
+            if (!propertyMeta.getLocation().contains(getHeliumPath())) {
+                customerProps.add(propertyMeta.getName());
+            }
+        }
+        return customerProps;
+    }
+
+    /**
+     * Method returns target meta information of the target found in helium.
+     * 
+     * @param targetName Is the name of the target requested.
+     * @param db Is the database to look in for the target information.
+     * @return The requested target meta.
+     */
+    private TargetMeta getHeliumTarget(String targetName, Database db) {
+        List<TargetMeta> targetList = db.getTargets();
+        for (TargetMeta targetMeta : targetList) {
+            if (targetMeta.getLocation().contains(getHeliumPath())
+                    && targetMeta.getName().equals(targetName)) {
+                return targetMeta;
+            }
+        }
+        return null;
+    }
+
+    public void open() {
+        // do nothing
+    }
+
+    public void close() {
+        // do nothing
+    }
+
+    public void report(Severity severity, String message, File filename, int lineNo) {
+        output.add("Warning: " + message);
+    }
+
+    public void setTask(Task task) {
+        // do nothing
+    }
+}
\ No newline at end of file
--- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/ReferenceType.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/ReferenceType.java	Wed Oct 13 16:31:27 2010 +0800
@@ -18,22 +18,31 @@
 
 package com.nokia.helium.core.ant.types;
 
+import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.types.DataType;
 import org.apache.tools.ant.types.Reference;
 
 /**
- * Helper class to force user providing a reference. It doesn't implement any
- * particular Ant interface.
+ * Helper class to force the user providing a reference. 
+ * It doesn't implement any particular Ant interface.
+ * 
+ * @param <T> The type the user should provide.
  */
-public class ReferenceType extends DataType {
+public class ReferenceType<T> extends DataType {
     /**
      * Returns the referenced object.
      * 
      * @return the reference object.
      */
-    public Object getReferencedObject() {
+    @SuppressWarnings("unchecked")
+    public T getReferencedObject() {
         Reference reference = getRefid();
         Object obj = reference.getReferencedObject(getProject());
-        return obj;
+        Class<T> clazz = (Class<T>)getClass().getTypeParameters()[0].getBounds()[0];
+        if (clazz.isInstance(obj)) {
+            return clazz.cast(obj);
+        } else {
+            throw new BuildException("Type referenced by " + reference.getRefId() + " is not a " + clazz.getSimpleName());
+        }
     }
 }
\ No newline at end of file
--- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/Stage.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/Stage.java	Wed Oct 13 16:31:27 2010 +0800
@@ -18,9 +18,11 @@
  
 package com.nokia.helium.core.ant.types;
 
+import java.util.Hashtable;
+import java.util.Map;
+
 import org.apache.tools.ant.types.DataType;
 import org.apache.tools.ant.BuildException;
-import org.apache.log4j.Logger;
     
 /**
  * A <code>Stage</code> is a Data type which stores Stage information.
@@ -41,24 +43,25 @@
  */
 public class Stage extends DataType {
 
-    //Default id is used as the stage name so overriding is possible.
-    private Logger log = Logger.getLogger(Stage.class);
-    private String stageName;
-    
     private String startTarget;
     
     private String endTarget;
-
-    public void setStageName(String name) {
-        log.debug("stage-name:" + name);
-        if (stageName != null) {
-            throw new BuildException("no supported attribute stageName externally");
-        }
-        stageName = name;
-    }
     
     public String getStageName() {
-        return stageName;
+        if (!this.isReference()) {
+            if (getProject() != null && getProject().getReferences() != null &&
+                    getProject().getReferences().containsValue(this)) {
+                @SuppressWarnings("unchecked")
+                Hashtable<String, Object> references = (Hashtable<String, Object>)getProject().getReferences();
+                for (Map.Entry<String, Object> entry : references.entrySet()) {
+                    if (entry.getValue() == this) {
+                        return entry.getKey();
+                    }
+                }
+            }
+            throw new BuildException("stage type can only be used as a reference at " + this.getLocation());
+        }
+        return this.getRefid().getRefId();
     }
     /**
      * Returns the stage start target. 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/filesystem/windows/Subst.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *
+ */
+package com.nokia.helium.core.filesystem.windows;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
+
+import com.nokia.helium.core.plexus.CommandBase;
+
+/**
+ * This class wrap up subst windows utility calls.
+ *
+ */
+public class Subst extends CommandBase<IOException> {
+
+    /**
+     * Get the mapping between drive and the subst folder.
+     * @return
+     * @throws IOException
+     */
+    public Map<File, File> getSubstDrives() throws IOException {
+        String[] args = new String[0];
+        Subst subst = new Subst();
+        SubstStreamConsumer consumer = new SubstStreamConsumer();
+        subst.execute(args, consumer);
+        return consumer.getSubstDrives();
+    }
+
+    /**
+     * Tell if a path is under a subst drive.
+     * @return
+     * @throws IOException
+     */
+    public boolean isUnderSubstDrive(File filename) throws IOException {
+        Map<File, File> substDrives = getSubstDrives();
+        return substDrives.containsKey(new File(filename.getCanonicalPath().substring(0, 2)));
+    }
+    
+    /**
+     * Tell if a path is under a subst drive.
+     * @return
+     * @throws IOException
+     */
+    public File getRealPath(File filename) throws IOException {
+        Map<File, File> substDrives = getSubstDrives();
+        File drive = new File(filename.getAbsolutePath().substring(0, 2));
+        if (substDrives.containsKey(drive)) {
+            return new File(substDrives.get(drive), filename.getAbsolutePath().substring(3)).getAbsoluteFile();
+        } else {
+            return filename.getCanonicalFile();
+        }
+    }
+    
+    
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected String getExecutable() {
+        return "subst";
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void throwException(String message, Throwable t) throws IOException {
+        throw new IOException(message);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/filesystem/windows/SubstStreamConsumer.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *
+ */
+package com.nokia.helium.core.filesystem.windows;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.codehaus.plexus.util.cli.StreamConsumer;
+
+/**
+ * Parse subst output.
+ *
+ */
+public class SubstStreamConsumer implements StreamConsumer {
+    private Map<File, File> substDrives = new HashMap<File, File>();
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void consumeLine(String line) {
+        if (line.trim().length() > 0) {
+            substDrives.put( new File(line.substring(0, 2)), new File(line.substring(8)));
+        }
+    }
+    
+    /**
+     * Get the mapping between subst drive and folder.
+     * @return the mapping.
+     */
+    public Map<File, File> getSubstDrives() {
+        return substDrives;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/tests/antunit/resourceaccess/test_resourceaccess.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : test_serializepath.ant.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test-resource-access" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    <description>Helium antlib core resource access tests.</description>
+
+    <property environment="env"/>
+
+    <dirname property="current.dir" file="${ant.file.test-resource-access}" />
+
+
+    <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium" />
+
+    <property name="base.dir" value="${test.temp.dir}/resourceAccess" />
+    
+    <!-- is called prior to the test -->
+    <target name="setUp">
+        <mkdir dir="${base.dir}" />
+        <mkdir dir="${base.dir}/1" />
+        <mkdir dir="${base.dir}/2" />
+        <condition property="isWindows">
+            <os family="windows" />
+        </condition>
+    </target>
+
+    <!-- is called after the test, even if that caused an error -->
+    <target name="tearDown">
+        <delete dir="${base.dir}" failonerror="false" />
+        <delete dir="${base.dir}/1" failonerror="false" />
+        <delete dir="${base.dir}/2" failonerror="false" />
+    </target>
+
+    <target name="test-resourceaccess-invalid-dir">
+        <au:expectfailure expectedMessage="base directory of resource access task not exists">
+            <hlm:resourceaccess baseDirectory="${base.dir}/invalid-dir" lockName="subst-drive" />
+        </au:expectfailure>
+    </target>
+
+    <target name="test-resourceaccess-valid-subst" if="isWindows">
+        <antcall target="subst-drive" />
+        <au:assertFileExists file="${base.dir}/subst-drive" />
+    </target>
+
+    <target name="subst-drive">
+        <hlm:resourceaccess baseDirectory="${base.dir}" lockName="subst-drive">
+            <hlm:getfreedrive property="build.drive"/>
+            <exec osfamily="windows" executable="subst.exe" failonerror="false">
+                <arg value="${build.drive}"/>
+                <arg value="${current.dir}"/>
+            </exec>
+        </hlm:resourceaccess>
+    </target>
+
+    <target name="resource-access-test-infinite">
+        <hlm:resourceaccess baseDirectory="${base.dir}" lockName="${lock.name}">
+            <!-- tried to write as many times so there would be some delay in doing parallel operation -->
+            <echoproperties destfile="${base.dir}/${lock.name}1" />
+            <echoproperties destfile="${base.dir}/${lock.name}2" />
+            <echoproperties destfile="${base.dir}/${lock.name}3" />
+            <echoproperties destfile="${base.dir}/${lock.name}4" />
+            <echoproperties destfile="${base.dir}/${lock.name}5" />
+            <echoproperties destfile="${base.dir}/${lock.name}6" />
+            <echoproperties destfile="${base.dir}/${lock.name}7" />
+            <echoproperties destfile="${base.dir}/${lock.name}8" />
+            <echoproperties destfile="${base.dir}/${lock.name}9" />
+            <echoproperties destfile="${base.dir}/${lock.name}10" />
+        </hlm:resourceaccess>
+    </target>
+
+    <target name="resource-access-test-three-retry">
+        <hlm:resourceaccess baseDirectory="${base.dir}" lockName="${lock.name}" noOfRetry="3" interval="10">
+            <!-- tried to write as many times so there would be some delay in doing parallel operation -->
+            <echoproperties destfile="${base.dir}/${lock.name}1" />
+            <echoproperties destfile="${base.dir}/${lock.name}2" />
+            <echoproperties destfile="${base.dir}/${lock.name}3" />
+            <echoproperties destfile="${base.dir}/${lock.name}4" />
+            <echoproperties destfile="${base.dir}/${lock.name}5" />
+            <echoproperties destfile="${base.dir}/${lock.name}6" />
+            <echoproperties destfile="${base.dir}/${lock.name}7" />
+            <echoproperties destfile="${base.dir}/${lock.name}8" />
+            <echoproperties destfile="${base.dir}/${lock.name}9" />
+            <echoproperties destfile="${base.dir}/${lock.name}10" />
+        </hlm:resourceaccess>
+    </target>        
+    
+    <target name="test-parallel-infinite" if="isWindows">
+        <parallel>
+            <antcall target="resource-access-test-infinite">
+                <param name="lock.name" value="parallel-test"/>
+                <param name="base.dir" value="${base.dir}/1"/>
+            </antcall>
+            <antcall target="resource-access-test-infinite">
+                <param name="lock.name" value="parallel-test"/>
+                <param name="base.dir" value="${base.dir}/2"/>
+            </antcall>
+        </parallel>
+    </target>
+
+    <target name="test-parallel-three-retry" if="isWindows">
+        <au:expectfailure expectedMessage="lock not acquired">
+            <parallel>
+                <antcall target="resource-access-test-three-retry">
+                    <param name="lock.name" value="parallel-test"/>
+                    <param name="base.dir" value="${base.dir}/1"/>
+                </antcall>
+                <antcall target="resource-access-test-three-retry">
+                    <param name="lock.name" value="parallel-test"/>
+                    <param name="base.dir" value="${base.dir}/2"/>
+                </antcall>
+            </parallel>
+        </au:expectfailure>
+    </target>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/tests/antunit/run-scenario.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : test_signaltask.ant.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="run-scenario" xmlns:ac="antlib:net.sf.antcontrib" xmlns:au="antlib:org.apache.ant.antunit">
+    <description>Helium Antlib feature enabler macro.</description>
+    <property environment="env" />
+    
+    <target name="setUp">    
+        <tempfile property="temp.dir" suffix=".dir" />
+        <mkdir dir="${temp.dir}" />
+    </target>
+    
+    <target name="tearDown">
+        <delete dir="${temp.dir}" />
+    </target>
+    
+    <macrodef name="runScenario">
+        <attribute name="scenario" />
+        <attribute name="target" />
+        <attribute name="cmdline" default=""/>
+        <sequential>
+            <ac:trycatch property="scenario.unittest.error">
+                <try>
+                    <exec osfamily="windows" executable="cmd" dir="${ant.file.run-scenario}/../../scenarii/@{scenario}" failonerror="true" errorproperty="scenario.unittest.error.log">
+                        <env key="ANT_ARGS" value="${env.ANT_ARGS} -logger com.nokia.helium.core.ant.HeliumLogger" />
+                        <arg line="/c ..\build.bat" />
+                        <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor" />
+                        <arg value="-Dtemp.dir=${temp.dir}" />
+                        <arg line="@{target}" />
+                        <arg value="@{cmdline}" />
+                    </exec>
+                    <exec osfamily="unix" executable="bash" dir="${ant.file.run-scenario}/../../scenarii/@{scenario}" failonerror="true" errorproperty="scenario.unittest.error.log">
+                        <env key="ANT_ARGS" value="${env.ANT_ARGS} -logger com.nokia.helium.core.ant.HeliumLogger" />
+                        <arg value="../bld.sh" />
+                        <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor" />
+                        <arg value="-Dtemp.dir=${temp.dir}" />
+                        <arg line="@{target}" />
+                        <arg line="@{cmdline}" />
+                    </exec>
+                </try>
+            </ac:trycatch>
+            <au:assertTrue message="${scenario.unittest.error.log}">
+                <not>
+                    <isset property="scenario.unittest.error" />
+                </not>
+            </au:assertTrue>
+        </sequential>
+    </macrodef>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/tests/antunit/test_buildstatusdef.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : test_buildstatusdef.ant.xml 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test_buildstatusdef" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+	
+	<import file="run-scenario.ant.xml" />
+	
+	
+	<target name="test-properties">
+        <runScenario scenario="config_report" target="run-target-disabled" />
+        <au:assertLogContains text="Warning: enable.feature property has been deprecated since 11.0. Start using feature.enabled property"/>
+        <au:assertLogContains text="Warning: internal.abc.enabled property has been overridden"/>
+        <au:assertLogContains text="Warning: internal.bla.enabled property has been deprecated since 6.0. Start using internal.abc.enabled property"/>
+        <au:assertLogContains text="Warning: feature.enabled property has been overridden"/>
+        <au:assertLogContains text="Warning: Property 'test.prop.bool.val' has invalid boolean value set as 't'. (Valid values: true|false)"/>
+        <au:assertLogContains text="Warning: Property 'test.comment.prop.bool.val' has invalid boolean value set as 'yes'. (Valid values: true|false)"/>
+        <au:assertLogContains text="Warning: Property 'test.build.number' has invalid integer value set as '123aa'."/>
+        <au:assertLogContains text="Warning: Property 'test.prop.int.3' has invalid integer value set as '1.8'."/>
+        <au:assertLogContains text="Warning: Property 'test.prop.float.2' has invalid float value set as '1.5a'."/>
+    </target>
+    
+    <target name="test-deprecated-target-with-antcall">
+        <runScenario scenario="config_report" target="antcall-deprecated-target" />
+        <au:assertLogContains text="Warning: a-deprecated-target target has been deprecated. Implementation of the feature has changed, and the target is not needed anymore."/>
+    </target>
+
+    <target name="test-deprecated-target-with-runtarget">
+        <runScenario scenario="config_report" target="runtarget-deprecated-target" />
+        <au:assertLogContains text="Warning: b-deprecated-target target has been deprecated. Implementation of the feature has changed, and the target is not needed anymore."/>
+    </target>
+
+    <target name="test-deprecated-target-with-depends">
+        <runScenario scenario="config_report" target="depends-deprecated-target" />
+        <au:assertLogContains text="Warning: c-deprecated-target target has been deprecated. Implementation of the feature has changed, and the target is not needed anymore."/>
+    </target>
+
+    <target name="test-private-target-with-antcall">
+        <runScenario scenario="config_report" target="run-private-target-as-antcall" />
+        <au:assertLogContains text="Warning: a-private-target is private and should only be called by helium"/>
+    </target>
+
+    <target name="test-private-target-with-runtarget">
+        <runScenario scenario="config_report" target="run-private-target-as-runtarget" />
+        <au:assertLogContains text="Warning: b-private-target is private and should only be called by helium"/>
+    </target>
+
+    <target name="test-private-target-with-depends">
+        <runScenario scenario="config_report" target="run-private-target-as-depends" />
+        <au:assertLogContains text="Warning: c-private-target is private and should only be called by helium"/>
+    </target>
+
+</project>
\ No newline at end of file
--- a/buildframework/helium/sf/java/core/tests/antunit/test_core.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/core/tests/antunit/test_core.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -25,6 +25,8 @@
         Testing core targets
     </description>
     
+    <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium" />
+
     <target name="test-prettyprintxml-filter">
         <loadfile srcfile="./../data/config_test.cfg.xml" property="xml.test.content">
             <filterchain>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/tests/antunit/test_feature_enabled_flags.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : test_feature_enabled_flags.ant.xml 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test_feature_enabled_flags" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    <description>
+    Testing targets.
+    </description>
+    
+    <property environment="env"/>
+    <import file="run-scenario.ant.xml"/>
+
+    <!-- Target to test a disabled target (if property not set)-->    
+    <target name="test-target-disabled">
+        <runScenario scenario="test" target="run-target-disabled" />
+        <au:assertLogContains text="Skipped because property 'feature.enabled' not set to 'true'"/>
+    </target>
+    
+    <!-- Target to test a enabled target (if property set)-->
+    <target name="test-target-enabled">
+        <runScenario scenario="test" target="run-target-enabled" />
+        <au:assertLogContains text="[echo] Running run-target-enabled"/>
+    </target>
+    
+    <!-- Target to test enabled target with old property -->
+    <target name="test-target-enabled-with-old-flag">
+        <runScenario scenario="test" target="run-with-old-flag-enabled" />
+        <au:assertLogContains text="[echo] Running run-with-old-flag-enabled"/>
+    </target>
+    
+    <!-- Target to test enabled target -->
+    <target name="test-target-enabled-with-new-flag">
+        <runScenario scenario="test" target="run-with-new-flag-enabled" />
+        <au:assertLogContains text="[echo] Running run-with-new-flag-enabled"/>
+    </target>
+    
+    <!-- Target to test enabled target (both old and new properties set) -->
+    <target name="test-target-enabled-with-both">
+        <runScenario scenario="test" target="run-with-both-enabled" />
+        <au:assertLogContains text="[echo] Running run-with-both-enabled"/>
+    </target>
+    
+    <!-- Target to test whether target is run when unless property is set -->
+    <target name="test-target-unless-enabled">
+        <runScenario scenario="test" target="run-with-unless-enabled" />
+        <au:assertLogContains text="Skipped because property 'skip.ats.sending' set"/>        
+    </target>  
+    
+    <!-- Target to test whether target is run when unless internal property is set -->
+    <target name="test-target-unless-internal-enabled">
+        <runScenario scenario="test" target="run-with-unless-internal-enabled" />
+        <au:assertLogContains text="Skipped because property 'old.enabled' is set"/>        
+    </target>  
+
+</project>
+
--- a/buildframework/helium/sf/java/core/tests/antunit/test_getfreedrive.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/core/tests/antunit/test_getfreedrive.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -25,8 +25,8 @@
     <description>
         Testing getFreeDrive targets
     </description>
-
-    <property name="current.dir" value="."/>
+    
+    <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium" />
     
     <condition property="is.windows">
         <os family="windows"/>
@@ -49,10 +49,10 @@
         <hlm:getfreedrive property="build.drive"/>
         <exec osfamily="windows" executable="subst.exe" failonerror="false">
             <arg value="${build.drive}"/>
-            <arg value="${current.dir}"/>
+            <arg value="."/>
         </exec>
         <au:assertTrue>
-           <hasfreespace partition="${build.drive}" needed="1M"/>
+           <available file="${build.drive}" type="dir" />
         </au:assertTrue>
         <exec osfamily="windows" executable="subst.exe" failonerror="false">
             <arg value="${build.drive}"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/tests/antunit/test_helpdef.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : test_helpdef.ant.xml 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test_helpdef" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+	
+	<import file="run-scenario.ant.xml" />
+	
+	
+	<target name="test-help">
+        <runScenario scenario="help" target="help" />
+        <au:assertLogContains text="Help:"/>
+        <au:assertLogContains text="This is the documentation."/>
+        <au:assertLogContains text="help.item: ${help.item}"/>
+    </target>
+
+    
+    <target name="test-target-help">
+        <runScenario scenario="help" target="help" cmdline="custom-target"/>
+        <au:assertLogContains text="Help:"/>
+        <au:assertLogContains text="This is the documentation."/>
+        <au:assertLogContains text="help.item: custom-target"/>
+    </target>
+    
+</project>
\ No newline at end of file
--- a/buildframework/helium/sf/java/core/tests/bld.sh	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/core/tests/bld.sh	Wed Oct 13 16:31:27 2010 +0800
@@ -21,4 +21,4 @@
     . ~/.bashrc
 fi
 
-ant -Dant.executor.class="com.nokia.helium.core.ant.HeliumExecutor" $*
+ant $*
--- a/buildframework/helium/sf/java/core/tests/build.bat	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/core/tests/build.bat	Wed Oct 13 16:31:27 2010 +0800
@@ -21,7 +21,7 @@
 set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02
 ) ELSE  set TESTED_JAVA=%JAVA_6_HOME%
 if exist %TESTED_JAVA% (set JAVA_HOME=%TESTED_JAVA%)
-call ant -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor %*
+call ant %*
 if "%ERRORLEVEL%" neq "0" (goto error)
 endlocal
 goto :eof
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/tests/scenarii/bld.sh	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+if [ -f ~/.bashrc ] ; then
+	. ~/.bashrc
+fi
+ant $*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/tests/scenarii/build.bat	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,32 @@
+@echo off
+
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of the License "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description: 
+rem
+
+setlocal
+if not defined JAVA_6_HOME (
+set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02
+) ELSE  set TESTED_JAVA=%JAVA_6_HOME%
+if exist %TESTED_JAVA% (set JAVA_HOME=%TESTED_JAVA%)
+echo %ANT_ARGS%
+call ant %*
+if "%ERRORLEVEL%" neq "0" (goto error)
+endlocal
+goto :eof
+
+:error
+endlocal
+if "%OS%"=="Windows_NT" color 00
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/tests/scenarii/config_report/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : build.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test-enable-flags" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium" xmlns:ac="antlib:net.sf.antcontrib">
+    <description>Helium Antlib logger unittests.</description>
+    
+    <property name="feature.enabled" value="true"/>
+    <property name="enable.feature" value="true"/>
+    <property name="internal.abc.enabled" value="true"/>
+    <property name="internal.bla.enabled" value="false"/>
+    <property name="skip.ats.sending" value="t"/>
+    <property name="test.prop.bool.val" value="t"/>
+    <property name="test.comment.prop.bool.val" value="yes"/>
+    <property name="test.build.number" value="123aa"/>
+    <property name="test.build.id" value="test-build-id-1"/>
+    <property name="test.bn" value="123"/>
+    <property name="test.prop.float.1" value="6.5"/>
+    <property name="test.prop.float.2" value="1.5a"/>
+    <property name="test.prop.int.3" value="1.8"/>
+    
+    <import file="feature/feature.ant.xml"/>
+    
+    <condition property="internal.old.enabled">
+        <or>
+            <istrue value="${xyz.enabled}"/>
+            <isset property="enable.feature"/>
+        </or>
+    </condition>
+    
+    <condition property="internal.new.enabled">
+        <or>
+            <istrue value="${feature.enabled}"/>
+            <isset property="abc.feature"/>
+        </or>
+    </condition>
+    
+    <condition property="internal.both.enabled">
+        <or>
+            <istrue value="${feature.enabled}"/>
+            <isset property="enable.feature"/>
+        </or>
+    </condition>
+    
+    <target name="run-target-disabled" if="internal.feature.enabled">
+        <echo>Running run-target-disabled</echo>
+    </target>
+    
+    <target name="run-target-enabled" if="feature.enabled">
+        <echo>Running run-target-enabled</echo>
+    </target>
+    
+    <target name="run-with-old-flag-enabled" if="internal.old.enabled">
+        <echo>Running run-with-old-flag-enabled</echo>
+    </target>
+    
+    <target name="run-with-new-flag-enabled" if="internal.new.enabled">
+        <echo>Running run-with-new-flag-enabled</echo>
+    </target>
+    
+    <target name="run-with-both-enabled" if="internal.both.enabled">
+        <echo>Running run-with-both-enabled</echo>
+    </target>
+    
+    <target name="run-with-unless-enabled" unless="skip.ats.sending">
+        <echo>Running run-with-unless-enabled</echo>
+    </target>
+    
+    <target name="run-with-unless-internal-enabled" unless="internal.old.enabled">
+        <echo>Running run-with-unless-internal-enabled</echo>
+    </target>
+    
+    <target name="antcall-deprecated-target" if="test.bool.val">
+        <echo>Running antcall-deprecated-target</echo>
+        <antcall target="a-deprecated-target"/>
+    </target> 
+
+    <target name="runtarget-deprecated-target">
+        <echo>Running runtarget-deprecated-target</echo>
+        <ac:runtarget target="b-deprecated-target"/>
+    </target> 
+
+    <target name="depends-deprecated-target" depends="c-deprecated-target">
+        <echo>Running depends-deprecated-target</echo>
+    </target> 
+
+    <target name="run-private-target-as-antcall">
+        <echo>Running run-private-target-as-antcall</echo>
+        <antcall target="a-private-target"/>
+    </target>
+
+    <target name="run-private-target-as-runtarget">
+        <echo>Running run-private-target-as-runtarget</echo>
+        <ac:runtarget target="b-private-target"/>
+    </target>
+    
+    <target name="run-private-target-as-depends" depends="c-private-target">
+        <echo>Running run-private-target-as-depends</echo>
+    </target>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/tests/scenarii/config_report/feature/feature.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : feature.ant.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="feature" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    <description>Helium Antlib logger unittests.</description>
+    
+    <property name="helium.dir" location="${ant.file.feature}/.." />
+    
+    <!-- Set to true to enable feature
+    @type boolean
+    @editable required
+    @scope private
+    -->
+    <property name="feature.enabled" value="true"/>
+    
+    <!-- Set to true to enable feature - deprecated: Start using feature.enabled property
+    @type boolean
+    @editable required
+    @scope public
+    @deprecated since 11.0 
+    -->
+    <property name="enable.feature" value="true"/>
+    
+    <!--* @property internal.abc.enabled 
+    Set to true to true to run targets.
+    @type boolean
+    @editable required
+    @scope private
+    -->
+    
+    <!--* @property internal.bla.enabled 
+    Set to true to true to run targets - deprecated: Start using internal.abc.enabled property.
+    @type boolean
+    @editable required
+    @scope public
+    @deprecated since 6.0 
+    -->
+
+    <!-- Test Property to check for boolean type
+    @type boolean
+    @editable required
+    @scope public
+    -->
+    <property name="test.prop.bool.val" value="true"/>
+    
+    <!--* @property test.comment.prop.bool.val 
+    Test Property to check for boolean type of comment properties
+    @type boolean
+    @editable required
+    @scope public
+    -->
+    
+    <!--* @property test.build.number 
+    Test Property to check for integer type of comment properties
+    @type integer
+    @editable required
+    @scope public
+    -->
+
+    <!--* @property test.build.id
+    Test Property to check for string type of comment properties
+    @type string
+    @editable required
+    @scope public
+    -->
+
+    <!--* @property test.bn
+    Test Property to check for integer type of properties
+    @type integer
+    @editable required
+    @scope public
+    -->
+    <property name="test.bn" value="abc"/>
+    
+    <!-- Test property to check for valid float property types.
+    @type float
+    @scope public
+    -->
+    <property name="test.prop.float.1" value="1.5"/>
+
+    <!--* @property test.prop.float.2
+    Test property to check for invalid float property types.
+    @type float
+    @scope public
+    -->
+
+    <!-- Test property to check for invalid integer property types.
+    @type integer
+    @scope public
+    -->
+    <property name="test.prop.int.3" value="1"/>
+   
+    <!-- Test target to check for antcall of deprecated target.
+
+	@deprecated Implementation of the feature has changed, and the target is not needed anymore
+    -->
+    <target name="a-deprecated-target">
+        <echo>Warning: this target is deprecated, please remove it from your configuration</echo>
+    </target>        
+    
+    <!-- Test target to check for runtarget of deprecated target.
+
+	@deprecated Implementation of the feature has changed, and the target is not needed anymore
+    -->
+    <target name="b-deprecated-target">
+        <echo>Warning: this target is deprecated, please remove it from your configuration</echo>
+    </target> 
+
+    <!-- Test target to check for dependencies for deprecated target.
+
+	@deprecated Implementation of the feature has changed, and the target is not needed anymore
+    -->
+    <target name="c-deprecated-target">
+        <echo>Warning: this target is deprecated, please remove it from your configuration</echo>
+    </target> 
+    
+    <!-- Test target to check for private target usage with antcall. @scope private -->
+    <target name="a-private-target">
+        <echo>Inside private target a-private-target </echo>
+    </target>
+
+    <!-- Test target to check for private target usage with runtarget. @scope private -->
+    <target name="b-private-target">
+        <echo>Inside private target b-private-target </echo>
+    </target>
+
+    <!-- Test target to check for private target usage as dependent target. @scope private -->
+    <target name="c-private-target">
+        <echo>Inside private target c-private-target </echo>
+    </target>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/tests/scenarii/help/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : build.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test-help" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    <description>Helium Antlib logger unittests.</description>
+    
+	<target name="help">
+	    <echo>
+Help:
+This is the documentation.
+help.item: ${help.item}
+		</echo>
+	</target>
+    
+    <!--
+     This is a custom target.
+     @scope public
+     @since 1.0
+     -->
+    <target name="custom-target" />
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/tests/scenarii/property/feature.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : feature.ant.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test-properties" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    <description>Helium Antlib logger unittests.</description>
+    
+    <!-- Set to true to enable feature
+    @type boolean
+    @editable required
+    @scope private
+    -->
+    <property name="feature.enabled" value="true"/>
+    
+    <!-- Set to true to enable feature - deprecated: Start using feature.enabled property
+    @type boolean
+    @editable required
+    @scope public
+    @deprecated since 11.0 
+    -->
+    <property name="enable.feature" value="true"/>
+    
+    <!--* @property internal.abc.enabled 
+    Set to true to true to run targets.
+    @type boolean
+    @editable required
+    @scope private
+    -->
+    
+    <!--* @property internal.bla.enabled 
+    Set to true to true to run targets - deprecated: Start using internal.abc.enabled property.
+    @type boolean
+    @editable required
+    @scope public
+    @deprecated since 6.0 
+    -->
+    
+        
+    
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/tests/scenarii/test/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : build.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test-enable-flags" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    <description>Helium Antlib logger unittests.</description>
+    
+    <import file="../property/feature.ant.xml"/>
+    <property name="feature.enabled" value="true"/>
+    <property name="enable.feature" value="true"/>
+    <property name="internal.abc.enabled" value="true"/>
+    <property name="internal.bla.enabled" value="false"/>
+    <property name="skip.ats.sending" value="t"/>
+    
+    
+    <condition property="internal.old.enabled">
+        <or>
+            <istrue value="${xyz.enabled}"/>
+            <isset property="enable.feature"/>
+        </or>
+    </condition>
+    
+    <condition property="internal.new.enabled">
+        <or>
+            <istrue value="${feature.enabled}"/>
+            <isset property="abc.feature"/>
+        </or>
+    </condition>
+    
+    <condition property="internal.both.enabled">
+        <or>
+            <istrue value="${feature.enabled}"/>
+            <isset property="enable.feature"/>
+        </or>
+    </condition>
+    
+    <!-- Disabled testing target -->
+    <target name="run-target-disabled" if="internal.feature.enabled">
+        <echo>Running run-target-disabled</echo>
+    </target>
+    
+    <!-- Enabled testing target -->
+    <target name="run-target-enabled" if="feature.enabled">
+        <echo>Running run-target-enabled</echo>
+    </target>
+    
+    <!-- Testing target with old property set -->
+    <target name="run-with-old-flag-enabled" if="internal.old.enabled">
+        <echo>Running run-with-old-flag-enabled</echo>
+    </target>
+    
+    <!-- Testing target with new property set -->
+    <target name="run-with-new-flag-enabled" if="internal.new.enabled">
+        <echo>Running run-with-new-flag-enabled</echo>
+    </target>
+    
+    <!-- Testing target with old and new properties set -->
+    <target name="run-with-both-enabled" if="internal.both.enabled">
+        <echo>Running run-with-both-enabled</echo>
+    </target>
+    
+    <!-- Target with unless property set -->
+    <target name="run-with-unless-enabled" unless="skip.ats.sending">
+        <echo>Running run-with-unless-enabled</echo>
+    </target>
+    
+    <!-- Target with unless propety set -->
+    <target name="run-with-unless-internal-enabled" unless="internal.old.enabled">
+        <echo>Running run-with-unless-internal-enabled</echo>
+    </target>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/tests/src/com/nokia/helium/core/ant/tests/TestResourceCollectionUtils.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.core.ant.tests;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.tools.ant.types.Resource;
+import org.apache.tools.ant.types.ResourceCollection;
+import org.junit.Test;
+
+import com.nokia.helium.core.ant.ResourceCollectionUtils;
+
+/**
+ * Testing the ResourceCollectionUtils utility class
+ *
+ */
+public class TestResourceCollectionUtils {
+    
+    /**
+     * Simplistic ResourceCollection used by unittests.
+     */
+    class ResourceCollectionImpl implements ResourceCollection {
+        
+        private List<Resource> resources = new ArrayList<Resource>(); 
+        
+        private ResourceCollectionImpl(File[] files) {
+            for (File file : files) {
+                Resource res = new Resource();
+                res.setName(file.getAbsolutePath());
+                resources.add(res);
+            }
+        }
+        
+        public boolean isFilesystemOnly() {
+            return true;
+        }
+
+        public Iterator<Resource> iterator() {
+            return resources.iterator();
+        }
+
+        public int size() {
+            // TODO Auto-generated method stub
+            return resources.size();
+        }
+        
+    }
+    
+    @Test
+    public void getFile() {
+        File[] files = new File[3];
+        files[0] = new File("foo.xml");
+        files[1] = new File("foo.html");
+        files[2] = new File("foo.dat");
+        File file = ResourceCollectionUtils.getFile(new ResourceCollectionImpl(files), ".*.xml");
+        assertTrue("must find one file", file != null);
+        assertTrue("must find one file (name check)", file.getName().equals(files[0].getName()));        
+    }
+
+    @Test
+    public void getFileReturnsNull() {
+        File[] files = new File[3];
+        files[0] = new File("foo.xml");
+        files[1] = new File("foo.html");
+        files[2] = new File("foo.dat");
+        File file = ResourceCollectionUtils.getFile(new ResourceCollectionImpl(files), ".*\\.ini$");
+        assertTrue("must not find a file", file == null);
+    }
+
+    @Test
+    public void getFiles() {
+        File[] files = new File[3];
+        files[0] = new File("foo.xml");
+        files[1] = new File("foo.html");
+        files[2] = new File("foo.dat");
+        List<File> outFiles = ResourceCollectionUtils.getFiles(new ResourceCollectionImpl(files));
+        assertTrue("must not return null", outFiles != null);
+        assertTrue("size must be 3", outFiles.size() == 3);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/tests/src/com/nokia/helium/core/filesystem/windows/test/TestSubstStreamConsumer.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.core.filesystem.windows.test;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.util.Locale;
+import java.util.Map;
+
+import org.junit.Test;
+
+import com.nokia.helium.core.filesystem.windows.SubstStreamConsumer;
+
+public class TestSubstStreamConsumer {
+    
+    /**
+     * This test should only run on windows as subst is only
+     * meaningful on that platform.
+     */
+    @Test
+    public void validateSubstOutputParsing() {
+        String osName = System.getProperty("os.name").toLowerCase(Locale.US);
+        if (osName.contains("windows")) {
+            // Setting up an Ant task
+            SubstStreamConsumer consumer = new SubstStreamConsumer();
+            consumer.consumeLine("");
+            consumer.consumeLine("I:\\: => E:\\Build_E\\buildarea\\tb92_201012");
+            consumer.consumeLine("J:\\: => E:\\Build_E\\buildarea\\tb92_201013");
+            Map<File, File> substDrives = consumer.getSubstDrives();
+            assertTrue(substDrives.size() == 2);
+            assertTrue(substDrives.containsKey(new File("I:")));
+            assertTrue(substDrives.containsKey(new File("J:")));
+            assertTrue(substDrives.containsValue(new File("E:\\Build_E\\buildarea\\tb92_201012")));
+            assertTrue(substDrives.containsValue(new File("E:\\Build_E\\buildarea\\tb92_201013")));
+        }
+    }
+
+}
--- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/AllTargetDiamondsListener.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  
- *
- */
-
-package com.nokia.helium.diamonds;
-
-import java.io.BufferedWriter;
-import java.io.FileInputStream;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.Vector;
-import org.apache.log4j.Logger;
-import org.apache.tools.ant.BuildEvent;
-import org.apache.tools.ant.Target;
-
-/**
- * Generate target times
- */
-public class AllTargetDiamondsListener extends DiamondsListenerImpl {
-
-    private static Logger log = Logger.getLogger(DiamondsListenerImpl.class);
-
-    private Vector<AntTarget> antTargets = new Vector<AntTarget>();
-
-
-    
-
-    /**
-     * Function to process logging info during begining of target execution
-     * 
-     * @param event of target execution.
-     */
-    public void targetBegin(BuildEvent buildEvent) {
-        antTargets.add(new AntTarget(buildEvent.getTarget()));
-    }
-
-    /**
-     * Function to process logging info during end of target execution
-     * 
-     * @param event of target execution.
-     */
-    public void targetEnd(BuildEvent buildEvent) {
-        for (AntTarget at : antTargets)
-        {
-            if (at.equals(buildEvent.getTarget())) {
-                at.setEndTime(new Date());
-            }
-        }
-    }
-
-    /**
-     * Function to process logging info during end of build
-     * 
-     * @param event of target execution.
-     */
-    public void buildEnd(BuildEvent buildEvent) throws DiamondsException {
-        try {
-            if (isInitialized()) {
-                File tempFile = File.createTempFile("diamonds-targets", ".xml");
-                FileWriter fstream = new FileWriter(tempFile);
-                BufferedWriter out = new BufferedWriter(fstream);
-                out.write("<targets>\n");
-                
-                for (AntTarget at : antTargets)
-                {
-                    Calendar startcalendar = Calendar.getInstance();
-                    Calendar endcalendar = Calendar.getInstance();
-                    startcalendar.setTime(at.getStartTime());
-                    if (at.getEndTime() != null)
-                    {
-                        endcalendar.setTime(at.getEndTime());
-                        endcalendar.add(Calendar.SECOND, -5);
-                        if (endcalendar.after(startcalendar))
-                        {
-                            out.write("<target>\n");
-                            out.write("<name>" + at.getName() + "</name>\n");
-                            out.write("<started>" + getTimeFormat().format(at.getStartTime()) + "</started>\n");
-                            out.write("<finished>" + getTimeFormat().format(at.getEndTime()) + "</finished>\n");
-                            out.write("</target>\n");
-                        }
-                    }
-                }
-                
-                out.write("</targets>\n");
-                out.close();
-                FileInputStream stream = new FileInputStream(tempFile);
-                log.debug("alltargetdiamondslistener file: " + tempFile);
-                mergeToFullResults(stream);
-                stream.close();
-                stream = new FileInputStream(tempFile); 
-                log.debug("diamondsclient: " + getDiamondsClient());
-                log.debug("diamondsclient: " + DiamondsConfig.getBuildId());
-                getDiamondsClient().sendData(stream, DiamondsConfig.getBuildId());
-            }
-        }
-        catch (IOException e)
-        {
-            e.printStackTrace();
-        }
-    }
-    
-    class AntTarget {
-        private String targetName;
-        private Date startTime;
-        private Date endTime;
-        private int hashCode;
-        
-        public AntTarget(Target target)
-        {
-            targetName = target.getName();
-            hashCode = target.hashCode();
-            startTime = new Date();
-        }
-        public String getName() { return targetName; }
-        public Date getStartTime() { return startTime; }
-        public Date getEndTime() { return endTime; }
-        public void setEndTime(Date e) { endTime = e; }
-        public boolean equals(Object obj) { return obj.hashCode() == hashCode; }
-        public int hashCode() { return hashCode; }
-    }
-}
\ No newline at end of file
--- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsClient.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,309 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  
- *
- */
-
-package com.nokia.helium.diamonds;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.methods.FileRequestEntity;
-import org.apache.commons.httpclient.methods.PostMethod;
-import org.apache.commons.httpclient.methods.RequestEntity;
-import org.apache.commons.httpclient.methods.InputStreamRequestEntity;
-import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
-
-import com.nokia.helium.core.EmailDataSender;
-import com.nokia.helium.core.EmailSendException;
-
-/**
- * Diamonds client used to connect to get build id and also to send the build results
- * 
- */
-public class DiamondsClient {
-
-    private static final int INT_SERV_ERROR = 500;
-
-    private static final int SERV_NOT_FOUND = 404;
-
-    private static final int SERV_OK = 200;
-
-    private boolean isRecordOnly;
-
-    private Logger log = Logger.getLogger(DiamondsClient.class);
-
-    private String host;
-
-    private String port;
-
-    private String path;
-
-    private String emailID;
-
-    private HttpClient httpClient;
-
-    public DiamondsClient(String hst, String prt, String pth, String mailID) {
-        host = hst;
-        port = prt;
-        path = pth;
-        emailID = mailID;
-        httpClient = new HttpClient();
-    }
-
-    private int executeMethod(PostMethod postMethod) throws DiamondsException {
-        int result = 0;
-        try {
-            result = httpClient.executeMethod(postMethod);
-        }
-        catch (IOException e) {
-            isRecordOnly = true;
-            throw new DiamondsException("IOException while sending http request." + e.getMessage());
-            // e.printStackTrace();
-        }
-        return result;
-    }
-
-    private String checkForProtocol(String url) throws DiamondsException {
-        String retURL = url;
-        if (!StringUtils.containsIgnoreCase(url, "http://")) {
-            retURL = "http://" + url;
-        }
-        return retURL;
-    }
-
-    private String getURL() throws DiamondsException {
-        return getURL(null);
-    }
-
-    private String getURL(String subPath) throws DiamondsException {
-        String urlPath = path;
-        if (subPath != null) {
-            urlPath = subPath;
-        }
-        return checkForProtocol("http://" + host + ":" + port + urlPath);
-    }
-
-    private PostMethod getPostMethod(String fileName, String urlPath) {
-
-        // Get the Diamonds XML-file which is to be exported
-        File input = new File(fileName);
-
-        // Prepare HTTP post
-        PostMethod post = new PostMethod(urlPath);
-
-        // Request content will be retrieved directly
-        // from the input stream
-
-        RequestEntity entity = new FileRequestEntity(input, "text/xml; charset=ISO-8859-1");
-        post.setRequestEntity(entity);
-        return post;
-    }
-
-    private int processPostMethodResult(int result) {
-        // Log status code
-        switch (result) {
-            case INT_SERV_ERROR:
-                // log.error("Internal server error");
-                break;
-            case SERV_NOT_FOUND:
-                // log.error("Server not found");
-                break;
-            case SERV_OK:
-                // log.info("Connection to diamonds server - OK");
-                break;
-            default:
-                // log.debug("Response code: " + result);
-        }
-        return result;
-    }
-    
-    public String getBuildId(InputStream stream) throws DiamondsException {
-        String diamondsBuildID = null;
-        PostMethod postMethod = null;
-        try {
-            if (!isRecordOnly) {
-                String strURL = getURL();
-                log.debug("strURL:" + strURL);
-                postMethod = getPostMethod(stream, strURL);
-                log.debug("postmethod:" + postMethod);
-                int postMethodResult = httpClient.executeMethod(postMethod);
-                log.debug("postmethod-result:" + postMethodResult);
-
-                int result = processPostMethodResult(postMethodResult);
-
-                if (result == SERV_OK) {
-                    // Display and save response code which functions as a id for
-                    // the build.
-                    diamondsBuildID = postMethod.getResponseBodyAsString();
-                    log.debug("diamondsBuildID: " + diamondsBuildID);
-                }
-                else {
-                    isRecordOnly = true;
-                    log.error("Diamonds data not sent, because of connection failure.");
-                    // throw new DiamondsException("Connection Failed");
-                }
-            }
-        }
-        catch (HttpException ex) {
-            isRecordOnly = true;
-            log.debug("Diamonds data not sent:s", ex);
-            log.error("Diamonds data not sent: " + ex.getMessage());
-        }
-        catch (IOException ex) {
-            isRecordOnly = true;
-            log.debug("Diamonds data not sent:", ex);
-            log.error("Diamonds data not sent: " + ex.getMessage());
-        }
-        finally {
-            // Release current connection to the connection pool once you are
-            // done
-            if (postMethod != null) {
-                postMethod.releaseConnection();
-            }
-        }
-        return diamondsBuildID;
-    }
-
-    /**
-     * 
-     * @param fileName Filename to export to Diamonds
-     * @return diamonds build id
-     */
-    public String getBuildId(String fileName) throws DiamondsException {
-        String diamondsBuildID = null;
-        PostMethod postMethod = null;
-
-        // Get HTTP client
-        // MyHttpClient httpclient = createHttpClient();
-
-        // Execute post request
-        try {
-            if (!isRecordOnly) {
-                String strURL = getURL();
-                log.debug("strURL:" + strURL);
-                postMethod = getPostMethod(fileName, strURL);
-                log.debug("postmethod:" + postMethod);
-                int postMethodResult = httpClient.executeMethod(postMethod);
-                log.debug("postmethod-result:" + postMethodResult);
-
-                int result = processPostMethodResult(postMethodResult);
-
-                if (result == SERV_OK) {
-                    // Display and save response code which functions as a id for
-                    // the build.
-                    diamondsBuildID = postMethod.getResponseBodyAsString();
-                    log.debug("diamondsBuildID: " + diamondsBuildID);
-                }
-                else {
-                    isRecordOnly = true;
-                    log.error("Diamonds data not sent, because of connection failure.");
-                    // throw new DiamondsException("Connection Failed");
-                }
-            }
-        }
-        catch (HttpException ex) {
-            isRecordOnly = true;
-            log.debug("Diamonds data not sent:s", ex);
-            log.error("Diamonds data not sent: " + ex.getMessage());
-        }
-        catch (IOException ex) {
-            isRecordOnly = true;
-            log.debug("Diamonds data not sent:", ex);
-            log.error("Diamonds data not sent: " + ex.getMessage());
-        }
-        finally {
-            // Release current connection to the connection pool once you are
-            // done
-            if (postMethod != null) {
-                postMethod.releaseConnection();
-            }
-        }
-        return diamondsBuildID;
-    }
-
-    private PostMethod getPostMethod(InputStream stream, String urlPath) {
-
-        // Get the Diamonds XML-file which is to be exported
-        //File input = new File(fileName);
-
-        // Prepare HTTP post
-        PostMethod post = new PostMethod(urlPath);
-
-        RequestEntity entity = new InputStreamRequestEntity(stream, "text/xml");
-        post.setRequestEntity(entity);
-        return post;
-    }
-
-    public int sendData(InputStream stream, String urlPath) {
-        PostMethod postMethod = null;
-        int result = -1;
-        if (urlPath != null && !isRecordOnly) {
-            try {
-                String strURL = getURL(urlPath);
-                postMethod = getPostMethod(stream, strURL);
-                result = processPostMethodResult(httpClient.executeMethod(postMethod));
-            }
-            catch (IllegalArgumentException e) {
-                // Catching this exception is needed because it is raised by httpclient
-                // library if the server is under update.
-                log.error("sendData:The final data via http not sent because errors:IllegalArgumentException ", e);
-            }
-            catch (DiamondsException e) {
-                log.error("sendData:The final data via http not sent because errors:DiamondsException ", e);
-            }
-            catch (IOException e) {
-                log.error("sendData:The final data via http not sent because errors:IOException ", e);
-            }
-        }
-        return result;
-    }
-    
-    public int sendData(String fileName, String urlPath) {
-        PostMethod postMethod = null;
-        int result = -1;
-        if (urlPath != null && !isRecordOnly) {
-            try {
-                String strURL = getURL(urlPath);
-                postMethod = getPostMethod(fileName, strURL);
-                result = processPostMethodResult(httpClient.executeMethod(postMethod));
-            }
-            catch (IllegalArgumentException e) {
-                // Catching this exception is needed because it is raised by httpclient
-                // library if the server is under update.
-                log.error("sendData:The final data via http not sent because errors:IllegalArgumentException ", e);
-            }
-            catch (DiamondsException e) {
-                log.error("sendData:The final data via http not sent because errors:DiamondsException ", e);
-            }
-            catch (IOException e) {
-                log.error("sendData:The final data via http not sent because errors:IOException ", e);
-            }
-        }
-        return result;
-    }
-
-    public int sendDataByMail(String fileName, String smtpServer, String ldapServer) throws EmailSendException {
-        log.debug("DiamondsClient:sendDataByEmail:emailID" + emailID);
-        EmailDataSender emailSender = new EmailDataSender(emailID, smtpServer, ldapServer);
-        log.debug("DiamondsClient:sendDataByEmail: " + fileName);
-        emailSender.sendData("diamonds", new File(fileName), "application/xml", "[DIAMONDS_DATA]", null);
-        log.debug("DiamondsClient:sendDataByEmail:succeeds");
-        return 0;
-    }
-}
\ No newline at end of file
--- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsConfig.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsConfig.java	Wed Oct 13 16:31:27 2010 +0800
@@ -17,27 +17,13 @@
 
 package com.nokia.helium.diamonds;
 
-import java.util.HashMap;
-import java.util.Map;
-import com.nokia.helium.core.ant.types.Stage;
-import com.nokia.helium.core.ant.types.TargetMessageTrigger;
 import org.apache.tools.ant.Project;
-import java.util.Hashtable;
-import org.apache.log4j.Logger;
 
 /**
- * Loads the configuration information from the xml file.
+ * Loads the configuration information from Ant project.
  * 
  */
 public final class DiamondsConfig {
-
-    private static HashMap<String, Stage> stages = new HashMap<String, Stage>();
-
-    private static Logger log = Logger.getLogger(DiamondsConfig.class);
-
-    private static String initialiserTargetName;
-    
-    private static Project project;
     
     private static final String DIAMONDS_HOST_PROPERTY = "diamonds.host";
     private static final String DIAMONDS_PORT_PROPERTY = "diamonds.port";
@@ -48,131 +34,71 @@
     private static final String DIAMONDS_SMTP_PROPERTY = "diamonds.smtp.server";
     private static final String DIAMONDS_INITIALIZER_TARGET_PROPERTY = "diamonds.initializer.targetname";
     private static final String DIAMONDS_CATEGORY_PROPERTY = "diamonds.category";
-    
-    
+    private static final String DIAMONDS_BUILD_ID_PROPERTY = "diamonds.build.id";
     private static final String[] PROPERTY_NAMES = {DIAMONDS_HOST_PROPERTY, DIAMONDS_PORT_PROPERTY, DIAMONDS_PATH_PROPERTY,
         DIAMONDS_TSTAMP_PROPERTY, DIAMONDS_MAIL_PROPERTY,
         DIAMONDS_LDAP_PROPERTY, DIAMONDS_SMTP_PROPERTY,
         DIAMONDS_INITIALIZER_TARGET_PROPERTY, DIAMONDS_CATEGORY_PROPERTY};
-
-    private static HashMap<String, TargetMessageTrigger> targetMessageList = new HashMap<String, TargetMessageTrigger>();
-
-    private DiamondsConfig() {
-    }
-
-
-    @SuppressWarnings("unchecked")
-    private static void initializeMessage(Project prj) {
-        Hashtable<String, Object> references = prj.getReferences();
-        for (String key : references.keySet()) {
-            Object object = references.get(key);
-            log.debug("key: " + key);
-            if (object instanceof TargetMessageTrigger) {
-                log.debug("found message map:" + object);
-                log.debug("found key: " + key);
-                TargetMessageTrigger message = (TargetMessageTrigger)object;
-                targetMessageList.put(message.getTargetName(), (TargetMessageTrigger)object);
-            }
+    
+    private Project project;
+    private Boolean enabled;
+    
+    public DiamondsConfig(Project project) throws DiamondsException {
+        this.project = project;
+        if (this.isDiamondsEnabled()) {
+            initialize();
         }
     }
     
-    @SuppressWarnings("unchecked")
-    public static void initialize(Project prj) throws DiamondsException {
-        project = prj;
-        log.debug("Diamonds config initialization: project: " + project);
-        initializeMessage(prj);
-        for (String property : PROPERTY_NAMES ) {
-            validateProperty(property);
-        }
-        Hashtable<String, Object> references = prj.getReferences();
-        for (String key : references.keySet()) {
-            Object object = references.get(key); 
-            if (object instanceof Stage) {
-                log.debug("stage found: " + key);
-                Stage stageMap = (Stage)object;
-                stageMap.setStageName(key);
-                stages.put(key, (Stage)object);
+    private void initialize() throws DiamondsException {
+        for (String property : PROPERTY_NAMES) {
+            String propertyValue = project.getProperty(property);
+            if (propertyValue == null) {
+                throw new DiamondsException("required property: " + property + " not defined");
             }
         }
-    }
-
-    private static void validateProperty(String propertyName) throws DiamondsException {
-        String propertyValue = project.getProperty(propertyName);
-        if (propertyValue == null) {
-            throw new DiamondsException("required property: " + propertyName + " not defined");
+        try {
+            Integer.parseInt(project.getProperty(DIAMONDS_PORT_PROPERTY));
+        } catch (NumberFormatException e) {
+            throw new DiamondsException("Invalid port number for property " +
+                    DIAMONDS_PORT_PROPERTY + ": " + project.getProperty(DIAMONDS_PORT_PROPERTY));
         }
     }
 
-    /**
-     * Helper function to get the stages
-     * 
-     * @return the stages from config in memory
-     */
-    static Map<String, Stage> getStages() {
-        return stages;
-    }
-
-    /**
-     * Helper function to get the targets
-     * 
-     * @return the targets from config in memory
-     */
-    static HashMap<String, TargetMessageTrigger> getTargetsMap() {
-        return targetMessageList;
-    }
-
-    /**
-     * Returns true if stages exists in config
-     * 
-     * @return the existance of stages in config
-     */
-    public static boolean isStagesInConfig() {
-        return !stages.isEmpty();
-    }
-
-    /**
-     * Returns true if targets exists in config
-     * 
-     * @return the targets from config in memory
-     */
-    public static boolean isTargetsInConfig() {
-        return !targetMessageList.isEmpty();
-    }
-
-    public static String getHost() {
+    public String getHost() {
         return project.getProperty(DIAMONDS_HOST_PROPERTY);
     }
 
-    public static String getPort() {
+    public String getPort() {
         return project.getProperty(DIAMONDS_PORT_PROPERTY);
     }
 
-    public static String getPath() {
+    public String getPath() {
         return project.getProperty(DIAMONDS_PATH_PROPERTY);
     }
 
-    public static String getTimeFormat() {
+    public String getTimeFormat() {
         return project.getProperty(DIAMONDS_TSTAMP_PROPERTY);
     }
 
-    public static String getMailInfo() {
+    public String getMailInfo() {
         return project.getProperty(DIAMONDS_MAIL_PROPERTY);
     }
 
-    public static String getLDAPServer() {
+    public String getLDAPServer() {
         return project.getProperty(DIAMONDS_LDAP_PROPERTY);
     }
 
-    public static String getSMTPServer() {
+    public String getSMTPServer() {
         return project.getProperty(DIAMONDS_SMTP_PROPERTY);
     }
 
-    public static String getBuildIdProperty() {
-        return "diamonds.build.id";
+    public String getBuildIdProperty() {
+        return DIAMONDS_BUILD_ID_PROPERTY;
     }
 
-    public static String getBuildId() {
-        return project.getProperty(getBuildIdProperty());
+    public  String getBuildId() {
+        return project.getProperty(DIAMONDS_BUILD_ID_PROPERTY);
     }
 
     /**
@@ -180,12 +106,32 @@
      * 
      * @return the initialiserTargetName
      */
-    public static String getInitializerTargetProperty() {
-        return DIAMONDS_INITIALIZER_TARGET_PROPERTY;
+    public String getInitializerTargetName() {
+        String targetName = project.getProperty(DIAMONDS_INITIALIZER_TARGET_PROPERTY);
+        if (targetName != null) {
+            if (project.getTargets().containsKey(targetName)) {
+                return targetName;
+            } else {
+                project.log("'" + DIAMONDS_INITIALIZER_TARGET_PROPERTY + "' property reference and unexisting target: " + targetName);
+            }
+        }
+        return null;
     }
 
-    public static String getCategory() {
+    public String getCategory() {
         return project.getProperty(DIAMONDS_CATEGORY_PROPERTY);
     }
+    
+    public boolean isDiamondsEnabled() {
+        if (enabled == null) {
+            String diamondsEnabled = project.getProperty("diamonds.enabled");
+            if (diamondsEnabled != null) {
+                enabled = new Boolean(Project.toBoolean(diamondsEnabled));
+            } else {
+                enabled = Boolean.TRUE;
+            }
+        }
+        return enabled.booleanValue();
+    }
 
 }
\ No newline at end of file
--- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsException.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsException.java	Wed Oct 13 16:31:27 2010 +0800
@@ -27,12 +27,19 @@
     private static final long serialVersionUID = 8743300713686555395L;
 
     /**
-     * Constructor
-     * 
-     * @exception - exception to be processed.
+     * Diamonds exception with error message.
+     * @param message the error message.
      */
+    public DiamondsException(String message) {
+        super(message);
+    }
 
-    public DiamondsException(String exception) {
-        super(exception);
+    /**
+     * Diamonds exception with error message and a root cause
+     * @param message the error message
+     * @param cause the root cause
+     */
+    public DiamondsException(String message, Throwable cause) {
+        super(message, cause);
     }
 }
\ No newline at end of file
--- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsExceptionStatusUpdate.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: To update the build status to Diamonds with signals in case of build exceptions.
- *
- */
-
-package com.nokia.helium.diamonds;
-
-import java.text.SimpleDateFormat;
-import org.apache.tools.ant.types.DataType;
-import java.util.Hashtable;
-import java.util.Vector;
-import org.apache.log4j.Logger;
-import org.apache.tools.ant.Project;
-import com.nokia.helium.core.ant.HlmExceptionHandler;
-import com.nokia.helium.signal.SignalStatus;
-import com.nokia.helium.signal.SignalStatusList;
-
-
-/**
- * Class to store the builds status and check the signal is present in the deferred signal list.
- * if so get the signal informations like signal name, error message and target name.
- * With collected signal information and build status send the generated XML file to diamonds client class
- * to update the information into diamonds
- */
-public class DiamondsExceptionStatusUpdate extends DataType implements HlmExceptionHandler {
-    private Logger log = Logger.getLogger(DiamondsExceptionStatusUpdate.class);
-
-    /* Initiate build status to failed as this method will be invoked in case of exceptions only */
-    private String buildStatus = "failed";
-
-    private SimpleDateFormat timeFormat;
-
-    private Hashtable<String, String> signalInformation = new Hashtable<String, String>();
-
-    private String outputFile,templateFile;
-
-
-    /**
-     * Implements the Exception method to update build status and signal information to diamonds.
-     * @param project
-     * @param module
-     * @param e
-     */
-    @SuppressWarnings("unchecked")
-    public void handleException(Project project, Exception e) {
-        Project prj = DiamondsListenerImpl.getProject();
-
-        try {
-            if (DiamondsListenerImpl.isInitialized()) {
-                if (SignalStatusList.getDeferredSignalList().hasSignalInList()) {
-                    Vector<SignalStatus> signalList = SignalStatusList.getDeferredSignalList().getSignalStatusList();
-                    timeFormat = new SimpleDateFormat(DiamondsConfig.getTimeFormat());
-                    log.debug("Build Status = " + buildStatus);
-                    int i = 0;
-                    for (SignalStatus status : signalList) {
-                        prj.setProperty("diamond.signal.name." + i, status.getName());
-                        prj.setProperty("diamond.error.message." + i, status.getName());
-                        prj.setProperty("diamond.time.stamp." + i, new String(timeFormat.format(status.getTimestamp())));
-                        DiamondsListenerImpl.sendMessage("diamonds-signal");
-                    }
-                }
-                if (SignalStatusList.getNowSignalList().hasSignalInList()) {
-                    Vector<SignalStatus> signalList = SignalStatusList.getNowSignalList().getSignalStatusList();
-                    buildStatus = "failed";
-                    timeFormat = new SimpleDateFormat(DiamondsConfig.getTimeFormat());
-                    log.debug("Build Status = " + buildStatus);
-                    int i = 0;
-                    for (SignalStatus status : signalList) {
-                        prj.setProperty("diamond.signal.name." + i, status.getName());
-                        prj.setProperty("diamond.error.message." + i, status.getMessage());
-                        prj.setProperty("diamond.time.stamp." + i,new String(timeFormat.format(status.getTimestamp())));
-                        i += 1;
-                    }
-                    DiamondsListenerImpl.sendMessage("diamonds.signal.message");
-                }
-                prj.setProperty("build.status", buildStatus);
-                DiamondsListenerImpl.sendMessage("diamonds.status.message");
-            }
-        } catch (DiamondsException dex) {
-            log.debug("exception: ", dex);
-        }
-    }
-}
\ No newline at end of file
--- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsListener.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsListener.java	Wed Oct 13 16:31:27 2010 +0800
@@ -19,18 +19,23 @@
 
 import org.apache.tools.ant.BuildEvent;
 
+import com.nokia.helium.diamonds.ant.Listener;
+
 /**
  * Diamonds specific Listener interface.
  * 
  */
 public interface DiamondsListener {
+    
+    void configure(Listener listener) throws DiamondsException;
+    
     /**
      * Function to process logging info during beginning of target execution
      * 
      * @param event
      *            of target execution.
      */
-    void targetBegin(BuildEvent buildEvent) throws DiamondsException;
+    void targetStarted(BuildEvent buildEvent) throws DiamondsException;
 
     /**
      * Function to process logging info during end of target execution
@@ -38,7 +43,7 @@
      * @param event
      *            of target execution.
      */
-    void targetEnd(BuildEvent buildEvent) throws DiamondsException;
+    void targetFinished(BuildEvent buildEvent) throws DiamondsException;
 
     /**
      * Function to process logging info during beginning of build
@@ -46,7 +51,7 @@
      * @param event
      *            of target execution.
      */
-    void buildBegin(BuildEvent buildEvent) throws DiamondsException;
+    void buildStarted(BuildEvent buildEvent) throws DiamondsException;
 
     /**
      * Function to process logging info during end of build
@@ -54,5 +59,5 @@
      * @param event
      *            of target execution.
      */
-    void buildEnd(BuildEvent buildEvent) throws DiamondsException;
+    void buildFinished(BuildEvent buildEvent) throws DiamondsException;
 }
\ No newline at end of file
--- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsListenerImpl.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,255 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  
- *
- */
-
-package com.nokia.helium.diamonds;
-
-import org.apache.tools.ant.BuildEvent;
-
-import org.apache.tools.ant.Project;
-import java.util.Date;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import org.apache.log4j.Logger;
-import com.nokia.helium.core.EmailSendException;
-import com.nokia.helium.core.ant.Message;
-import com.nokia.helium.core.MessageCreationException;
-import com.nokia.helium.diamonds.XMLMerger.XMLMergerException;
-import java.io.InputStream;
-
-/**
- * Base diamonds logger implementation. The common implementation like initialization done here and
- * used by sub classes.
- */
-public class DiamondsListenerImpl implements DiamondsListener {
-
-    private static ArrayList<InputStream> finalStreamList = new ArrayList<InputStream>();
-
-    private static DiamondsClient diamondsClient;
-
-    private static boolean isInitialized;
-
-    private static ArrayList<String> deferLogList = new ArrayList<String>();
-
-    private static Logger log = Logger.getLogger(DiamondsListenerImpl.class);
-
-    private static Project project;
-
-    private static Object mutexObject = new Object();;
-    
-    private static SimpleDateFormat timeFormat;
-
-    /**
-     * Default constructor
-     */
-    public DiamondsListenerImpl() {
-    }
-    
-    public static void initialize(Project prj) {
-        project = prj;
-        log.debug("buildbegin:" + project);
-        Date date = new Date();
-        timeFormat = new SimpleDateFormat(DiamondsConfig.getTimeFormat());
-        log.debug("build.start.time:" + date);
-        project.setProperty("build.start.time", timeFormat.format(date));
-    }
-
-    /**
-     * Function to process logging info during end of build
-     * 
-     * @param event of target execution.
-     */
-    public final void buildBegin(BuildEvent buildEvent) throws DiamondsException {
-    }
-    
-    /**
-     * Function to process logging info during end of build
-     * 
-     * @param event of target execution.
-     */
-    @SuppressWarnings("unchecked")
-    public void buildEnd(BuildEvent buildEvent) throws DiamondsException {
-        log.debug("build end: " + isInitialized());
-        if (isInitialized()) {
-            project.setProperty("build.end.time", timeFormat.format(new Date()));
-            sendMessage("final.message");
-            isInitialized = false;
-            InputStream first = finalStreamList.remove(0);
-            try {
-                //printStreamContent(first);
-                File fullResultsFile = File.createTempFile("diamonds-full-results", ".xml");
-                XMLMerger merger = new XMLMerger(first, fullResultsFile);
-                String smtpServer = DiamondsConfig.getSMTPServer();
-                String ldapServer = DiamondsConfig.getLDAPServer();
-                for (InputStream stream : finalStreamList) {
-                    try {
-                        merger.merge(stream);
-                    }
-                    catch (XMLMerger.XMLMergerException xe) {
-                        log.debug("Error during the merge: ", xe);
-                    }
-                }
-                diamondsClient.sendDataByMail(fullResultsFile.getAbsolutePath(), smtpServer, ldapServer);
-            } catch (EmailSendException ese) {
-                log.warn("Error occured while sending mail: " + ese.getMessage());
-                
-            } catch (IOException e) {
-                log.error("Error sending diamonds final log: IOException", e);
-            }
-            catch (XMLMergerException e) {
-                log.error("Error sending diamonds final log: XMLMergerException ", e);
-            }
-        }
-    }
-
-    /**
-     * Function to process logging info during begining of target execution
-     * 
-     * @param event of target execution.
-     */
-    public void targetBegin(BuildEvent buildEvent) throws DiamondsException {
-        initDiamondsClient();
-    }
-
-    /**
-     * Function to process logging info during end of target execution
-     * 
-     * @param event of target execution.
-     */
-    public void targetEnd(BuildEvent buildEvent) throws DiamondsException {
-    }
-
-    /**
-     * returns true if diamonds is already initialized for the build.
-     * 
-     * @param true diamonds initialized otherwise false.
-     */
-    public static boolean isInitialized() {
-        return isInitialized;
-    }
-
-    public static void mergeToFullResults(InputStream stream) throws DiamondsException {
-        finalStreamList.add(stream);
-    }
-
-
-    /**
-     * Helper function to return the default project passed to messages.
-     */
-    static Project getProject() {
-        return project;
-    }
-
-
-
-    protected DiamondsClient getDiamondsClient() {
-        return diamondsClient;
-    }
-
-
-    protected boolean getIsInitialized() {
-        return isInitialized;
-    }
-
-    protected static SimpleDateFormat getTimeFormat() {
-        return timeFormat;
-    }
-
-    protected ArrayList<String> getDeferLogList() {
-        return deferLogList;
-    }
-    
-    protected static File streamToTempFile(InputStream stream) throws IOException {
-        File temp = File.createTempFile("diamonds", "xml");
-        FileOutputStream out = new FileOutputStream(temp);
-        int read = 0;
-        byte[] bytes = new byte[1024];
- 
-        while ((read = stream.read(bytes)) != -1) {
-            out.write(bytes, 0, read);
-        }
-        out.flush();
-        out.close();
-        stream.close();
-        return temp;
-    }
-
-    private static void sendMessage(Message message, String buildID) throws DiamondsException {
-        try {
-            File tempFile = streamToTempFile(message.getInputStream());
-            tempFile.deleteOnExit();
-            if (buildID == null) {
-                buildID = diamondsClient.getBuildId(new FileInputStream(tempFile));
-                if (buildID != null) {
-                    project.setProperty(DiamondsConfig.getBuildIdProperty(), buildID);
-                    log.info("got Build ID from diamonds:" + buildID);
-                }
-            } else {
-                diamondsClient.sendData(new FileInputStream(tempFile), buildID);
-            }
-            mergeToFullResults(new FileInputStream(tempFile));
-        } catch (IOException iex) {
-            log.debug("IOException while retriving message:", iex);
-            throw new DiamondsException("IOException while retriving message");
-        } 
-        catch (MessageCreationException mex) {
-            log.debug("IOException while retriving message:", mex);
-            throw new DiamondsException("error during message retrival");
-        }
-    }
-
-    /**
-     * Send message to diamonds.
-     * @param messageId - id to look from in the ant config and to send it to diamonds.
-     *                    id is pointing to an fmpp message.
-     */
-    public static void sendMessage(String messageId) throws DiamondsException {
-        log.debug("send-message:" + messageId);
-        synchronized (mutexObject) {
-            String buildID = project.getProperty(DiamondsConfig.getBuildIdProperty());
-            Object obj = project.getReference(messageId);
-            if (obj != null) {
-                if (obj instanceof Message) {
-                    sendMessage((Message)obj, buildID);
-                }
-            } else {
-                log.debug("Message not sent for message id: " + messageId);
-            }
-        }
-    }
-    
-    /**
-     * Initializes the diamonds client and sends the initial data
-     */
-    @SuppressWarnings("unchecked")
-    protected void initDiamondsClient() throws DiamondsException {
-        if (!isInitialized) {
-            diamondsClient = new DiamondsClient(DiamondsConfig.getHost(), 
-                    DiamondsConfig.getPort(), 
-                    DiamondsConfig.getPath(), 
-                    DiamondsConfig.getMailInfo());
-            String buildID = project.getProperty(DiamondsConfig.getBuildIdProperty());
-            if (buildID == null ) {
-                sendMessage("initial.message");
-            }
-            isInitialized = true;
-        }
-    }
-}
\ No newline at end of file
--- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsPostBuildStatusUpdate.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: To update the build status to Diamonds with signals in case of build exceptions.
- *
- */
-
-package com.nokia.helium.diamonds;
-
-import org.apache.log4j.Logger;
-import org.apache.tools.ant.types.DataType;
-import org.apache.tools.ant.Project;
-import com.nokia.helium.core.ant.PostBuildAction;
-
-/**
- * Class to store the builds status and send the generated XML file to diamonds client class to
- * update the build status into diamonds
- */
-public class DiamondsPostBuildStatusUpdate extends DataType implements PostBuildAction {
-    private Logger log;
-
-    /* Initiate build status to failed as this method will be invoked in case of exceptions only */
-    private String buildStatus = "succeeded";
-
-    private String outputFile, templateFile;
-
-
-    public DiamondsPostBuildStatusUpdate() {
-        log = Logger.getLogger(DiamondsPostBuildStatusUpdate.class);
-    }
-
-    /**
-     * Override execute method to update build status to diamonds.
-     * 
-     * @param prj
-     * @param module
-     * @param targetNames
-     */
-    @SuppressWarnings("unchecked")
-    public void executeOnPostBuild(Project project, String[] targetNames) {
-        try {
-            if (DiamondsListenerImpl.isInitialized()) {
-                Project prj = DiamondsListenerImpl.getProject(); 
-                prj.setProperty("build.status", buildStatus);
-                DiamondsListenerImpl.sendMessage("diamonds-status");
-            }
-        } catch (DiamondsException de) {
-            log.error("Not able to merge into full results XML file " + de.getMessage(), de);
-        }
-    }
-
-}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsSession.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: To update the build status to Diamonds with signals in case of build exceptions.
+ *
+ */
+package com.nokia.helium.diamonds;
+
+import com.nokia.helium.core.ant.Message;
+
+/**
+ * Defines the interface needed to communicated with Diamonds. 
+ *
+ */
+public interface DiamondsSession {
+
+    /**
+     * Open the session, using custom message.
+     * @param message
+     * @throws DiamondsException if the opening failed.
+     */
+    void open(Message message) throws DiamondsException;
+    
+    /**
+     * Close the session using a custom message. 
+     * @param message
+     * @throws DiamondsException if the session is not opened
+     */
+    void close(Message message) throws DiamondsException;
+    
+    /**
+     * Sending a custom message.
+     * 
+     * @param message
+     * @throws DiamondsException if the session is not opened
+     */
+    void send(Message message) throws DiamondsException;
+    
+    /**
+     * Returns true if the session to diamonds has been opened successfully. 
+     * @return 
+     */
+    boolean isOpen();
+  
+    /**
+     * Returns the build id as a string, or null if session is not yet
+     * open, or opening failed.  
+     * @return the build id.
+     */
+    String getBuildId();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsSessionSocket.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,234 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: To update the build status to Diamonds with signals in case of build exceptions.
+ *
+ */
+package com.nokia.helium.diamonds;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpStatus;
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.methods.FileRequestEntity;
+import org.apache.commons.httpclient.methods.PostMethod;
+
+import com.nokia.helium.core.EmailDataSender;
+import com.nokia.helium.core.EmailSendException;
+import com.nokia.helium.core.MessageCreationException;
+import com.nokia.helium.core.ant.Message;
+import com.nokia.helium.diamonds.XMLMerger.XMLMergerException;
+
+/**
+ * This class implements the DiamondsSession interface. The implementation
+ * is based on TCP/IP socket communication.
+ *
+ */
+public class DiamondsSessionSocket implements DiamondsSession {
+
+    private List<File> messages = new ArrayList<File>();
+    private String buildId;
+    private HttpClient httpClient = new HttpClient();
+    private URL url;
+    private String email;
+    private String smtpServer;
+    private String ldapServer;
+    
+    /**
+     * Create a new session instance. The session needs to be opened.
+     * @param url the diamonds base url
+     * @param email the diamonds email address where to send merged results
+     * @param smtpServer the address of the SMTP server.
+     * @param ldapServer the url of the LDAP server.
+     */
+    public DiamondsSessionSocket(URL url, String email, String smtpServer, String ldapServer) {
+        this.url = url;
+        this.email = email;
+        this.smtpServer = smtpServer;
+        this.ldapServer = ldapServer;
+    }
+    
+    /**
+     * Create a new session instance based on an already existing build id  
+     * @param url the diamonds base url
+     * @param email the diamonds email address where to send merged results
+     * @param smtpServer the address of the SMTP server.
+     * @param ldapServer the url of the LDAP server.
+     * @param buildId diamonds build id
+     */
+    public DiamondsSessionSocket(URL url, String email, String smtpServer, String ldapServer, String buildId) {
+        this.url = url;
+        this.email = email;
+        this.smtpServer = smtpServer;
+        this.ldapServer = ldapServer;
+        this.buildId = buildId;
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public synchronized void open(Message message) throws DiamondsException {
+        if (!isOpen()) {
+            buildId = sendInternal(message, false);
+        } else {
+            throw new DiamondsException("Diamonds session is already open.");
+        }
+    }
+
+    /**
+     * Internal method to send data to diamonds.
+     * If ignore result is true, then the method will return null, else the message return by the query
+     * will be returned.
+     * @param message
+     * @param ignoreResult
+     * @return
+     * @throws DiamondsException is thrown in case of message retrieval error, connection error. 
+     */
+    protected synchronized String sendInternal(Message message, boolean ignoreResult) throws DiamondsException {
+        URL destURL = url;
+        if (buildId != null) {
+            try {
+                destURL = new URL(url.getProtocol(), url.getHost(), url.getPort(), buildId);
+            } catch (MalformedURLException e) {
+                throw new DiamondsException("Error generating the url to send the message: " + e.getMessage(), e);
+            }
+        }
+        PostMethod post = new PostMethod(destURL.toExternalForm());
+        try {
+            File tempFile = streamToTempFile(message.getInputStream());
+            tempFile.deleteOnExit();
+            messages.add(tempFile);
+            post.setRequestEntity(new FileRequestEntity(tempFile, "text/xml"));
+        } catch (MessageCreationException e) {
+            throw new DiamondsException("Error retrieving the message: " + e.getMessage(), e);
+        } catch (IOException e) {
+            throw new DiamondsException("Error serializing the message into a temporary file: " + e.getMessage(), e);
+        }
+        try {
+            int result = httpClient.executeMethod(post);
+            if (result != HttpStatus.SC_OK && result != HttpStatus.SC_ACCEPTED) {
+                throw new DiamondsException("Error sending the message: " +  post.getStatusLine() +
+                        "(" + post.getResponseBodyAsString() + ")");
+            }
+            if (!ignoreResult) {
+                return post.getResponseBodyAsString();
+            }
+        } catch (HttpException e) {
+            throw new DiamondsException("Error sending the message: " + e.getMessage(), e);
+        } catch (IOException e) {
+            throw new DiamondsException("Error sending the message: " + e.getMessage(), e);
+        } finally {
+            post.releaseConnection();            
+        }
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public synchronized void send(Message message) throws DiamondsException {
+        if (isOpen()) {
+            sendInternal(message, true);
+        } else {
+            throw new DiamondsException("Diamonds session is not opened.");
+        }
+    }
+        
+    /**
+     * {@inheritDoc}
+     */
+    public synchronized void close(Message message) throws DiamondsException {
+        if (isOpen()) {
+            sendInternal(message, true);
+            buildId = null;
+            
+            if (!messages.isEmpty()) {
+                // Sending the data via email.
+                String mergingErrors = null;
+                File firstFile = messages.remove(0);
+                try {
+                    File fullResultsFile = File.createTempFile("diamonds-full-results", ".xml");
+                    XMLMerger merger = new XMLMerger(new FileInputStream(firstFile), fullResultsFile);
+                    for (File file : messages) {
+                        try {
+                            merger.merge(new FileInputStream(file));
+                        } catch (XMLMerger.XMLMergerException xe) {
+                            mergingErrors = mergingErrors == null ? xe.getMessage() :
+                                mergingErrors + "\n" + xe.getMessage();
+                        }
+                    }
+                    EmailDataSender emailSender = new EmailDataSender(email, smtpServer, ldapServer);
+                    emailSender.sendData("diamonds", fullResultsFile, "application/xml", "[DIAMONDS_DATA]", null);
+                } catch (IOException e) {
+                    throw new DiamondsException("Error while merging the xml files: " + e.getMessage(), e);
+                } catch (XMLMergerException e) {
+                    throw new DiamondsException("Error while merging the xml files: " + e.getMessage(), e);
+                } catch (EmailSendException e) {
+                    throw new DiamondsException("Error occured while sending mail: " + e.getMessage(), e);
+                }
+                if (mergingErrors != null) {
+                    throw new DiamondsException("Error occured while sending mail: " + mergingErrors);                    
+                }
+            }            
+            
+        } else {
+            throw new DiamondsException("Diamonds session is not opened.");
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isOpen() {
+        return getBuildId() != null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBuildId() {
+        return buildId;
+    }
+
+    /**
+     * Write the content of an inputstream into a temp file. Deletion of the file
+     * has to be made by the caller.
+     * @param stream the input stream
+     * @return the temp file created.
+     */
+    protected static File streamToTempFile(InputStream stream) throws IOException {
+        File temp = File.createTempFile("diamonds", "xml");
+        FileOutputStream out = new FileOutputStream(temp);
+        int read = 0;
+        byte[] bytes = new byte[1024];
+ 
+        while ((read = stream.read(bytes)) != -1) {
+            out.write(bytes, 0, read);
+        }
+        out.flush();
+        out.close();
+        stream.close();
+        return temp;
+    }
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsStatusUpdate.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: To update the build status to Diamonds with signals in case of build exceptions.
+ *
+ */
+
+package com.nokia.helium.diamonds;
+
+import java.text.SimpleDateFormat;
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.Project;
+import com.nokia.helium.core.ant.HlmExceptionHandler;
+import com.nokia.helium.core.ant.Message;
+import com.nokia.helium.core.ant.PostBuildAction;
+import com.nokia.helium.diamonds.ant.Listener;
+import com.nokia.helium.signal.ant.SignalStatus;
+import com.nokia.helium.signal.ant.Signals;
+
+
+/**
+ * Class to store the builds status and check the signal is present in the deferred signal list.
+ * if so get the signal informations like signal name, error message and target name.
+ * With collected signal information and build status send the generated XML file to diamonds client class
+ * to update the information into diamonds
+ *
+ * @ant.type name="diamondsStatusUpdate" category="diamonds" 
+ */
+public class DiamondsStatusUpdate extends DataType implements HlmExceptionHandler, PostBuildAction {
+    private static final String BUILD_SIGNAL_MESSAGE_REFERENCE_ID = "diamonds.signal.message";
+    private static final String BUILD_STATUS_MESSAGE_REFERENCE_ID = "diamonds.status.message";
+    private static final String BUILD_STATUS_PROPERTY = "build.status";
+    private String buildStatus = "succedded";
+
+    /**
+     * Implements the Exception method to update build status and signal information to diamonds.
+     * @param project
+     * @param module
+     * @param e
+     */
+    public void handleException(Project project, Exception e) {
+        buildStatus = "failed";
+        Listener listener = Listener.getDiamondsListener(project);
+        if (listener != null && listener.getConfiguration() != null && 
+                listener.getSession() != null && listener.getSession().isOpen()) {
+            try {
+                log("Build Status = " + buildStatus, Project.MSG_DEBUG);
+                project.setProperty(BUILD_STATUS_PROPERTY, buildStatus);
+                sendMessage(listener, BUILD_STATUS_MESSAGE_REFERENCE_ID);
+            } catch (DiamondsException dex) {
+                log(dex.getMessage(), Project.MSG_WARN);
+            }
+        }
+    }
+    
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void executeOnPostBuild(Project project, String[] targetNames) {
+        Listener listener = Listener.getDiamondsListener(project);
+        if (listener != null && listener.getSession() != null && listener.getSession().isOpen()) {
+            try {
+                // Sending the signal data on post build, as they have already been raised.
+                sendSignals(listener);
+                log("Build Status = " + buildStatus, Project.MSG_DEBUG);
+                project.setProperty(BUILD_STATUS_PROPERTY, buildStatus);
+                sendMessage(listener, BUILD_STATUS_MESSAGE_REFERENCE_ID);
+            } catch (DiamondsException de) {
+                log("Not able to merge into full results XML file " + de.getMessage(), Project.MSG_WARN);
+            }
+        }
+    }
+
+    /**
+     * Send a message.
+     * @param listener the diamonds listener
+     * @param the messageId a reference string to a Message instance.
+     */
+    protected void sendMessage(Listener listener, String messageId) throws DiamondsException {
+        Object object = listener.getProject().getReference(messageId);
+        if (object != null
+                && object instanceof Message) {
+            listener.getSession().send((Message)object);
+        }        
+    }
+    
+    /**
+     * Sending signal information to diamonds
+     * @param project the root project instance
+     * @param listener the diamonds listener.
+     * @return
+     */
+    protected void sendSignals(Listener listener) {
+        Project project = listener.getProject();
+        try {
+            SimpleDateFormat timeFormat = new SimpleDateFormat(listener.getConfiguration().getTimeFormat());
+            int i = 0;
+            if (!Signals.getSignals().getDeferredSignalList().isEmpty()) {
+                buildStatus = "failed";
+                for (SignalStatus status : Signals.getSignals().getDeferredSignalList()) {
+                    project.setProperty("diamond.signal.name." + i, status.getName());
+                    project.setProperty("diamond.error.message." + i, status.getMessage());
+                    project.setProperty("diamond.time.stamp." + i, new String(timeFormat.format(status.getTimestamp())));
+                    i += 1;
+                }
+            }
+            if (!Signals.getSignals().getNowSignalList().isEmpty()) {
+                buildStatus = "failed";
+                for (SignalStatus status : Signals.getSignals().getNowSignalList()) {
+                    project.setProperty("diamond.signal.name." + i, status.getName());
+                    project.setProperty("diamond.error.message." + i, status.getMessage());
+                    project.setProperty("diamond.time.stamp." + i,new String(timeFormat.format(status.getTimestamp())));
+                    i += 1;
+                }
+            }
+            // At list one signal has been found, let's send the message.
+            if (i > 0) {
+                sendMessage(listener, BUILD_SIGNAL_MESSAGE_REFERENCE_ID);
+            }
+        } catch (DiamondsException dex) {
+            log(dex.getMessage(), Project.MSG_WARN);
+        }
+    }
+}
\ No newline at end of file
--- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/StageDiamondsListener.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,202 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  
- *
- */
-
-package com.nokia.helium.diamonds;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Vector;
-
-import org.apache.log4j.Logger;
-import org.apache.tools.ant.BuildEvent;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Target;
-import com.nokia.helium.core.ant.types.Stage;
-
-/**
- * Diamonds client used to connect to get build id and also to send the build results
- * 
- */
-public class StageDiamondsListener extends DiamondsListenerImpl {
-
-    private static final Date INVALID_DATE = new Date(-1);
-
-    private static Object mutexObject = new Object();;
-
-    private Logger log = Logger.getLogger(StageDiamondsListener.class);
-
-    private List<Map<String, Date>> stageTargetBeginList = new ArrayList<Map<String, Date>>();
-
-    private Map<String, List<Stage>> stageTargetEndMap = new HashMap<String, List<Stage>>();
-
-    private Map<String, String> stageStartTargetMap = new HashMap<String, String>();
-
-    private Map<String, Date> stageStartTargetTimeMap = new HashMap<String, Date>();
-
-    private boolean isTargetMapInitialized;
-
-    private Map<String, Stage> stages;
-
-
-    public StageDiamondsListener() {
-        stages = DiamondsConfig.getStages();
-    }
-
-    public void targetBegin(BuildEvent buildEvent) throws DiamondsException {
-        initDiamondsClient();
-        Project projectInStage = buildEvent.getProject();
-        int hashCode = projectInStage.hashCode();
-        String targetName = buildEvent.getTarget().getName();
-        if (!isTargetMapInitialized && stages != null) {
-            log.debug("diamonds:StageDiamondsListener: initializing for all stages.");
-            initStageTargetsMap(projectInStage);
-            isTargetMapInitialized = true;
-        }
-        String targetNameWithHashCode = targetName + "-" + hashCode;
-        log.debug("targetBegin: targetNameWithHashCode: " + targetNameWithHashCode);
-        log.debug("targetBegin targetName: " + targetName + " - currentStartTargetName:"
-            + stageStartTargetMap.get(targetNameWithHashCode));
-        if (stageStartTargetMap.get(targetNameWithHashCode) == null) {
-            log.debug("looking for start target match and associating time to it");
-            findAndSetStartTimeForTargetInStageList(targetName, targetNameWithHashCode);
-        }
-    }
-
-    private Date getStartTime(Stage stage) {
-        String startTargetName = stage.getStartTarget();
-        for (Iterator<Map<String, Date>> listIter = stageTargetBeginList.iterator(); listIter.hasNext();) {
-            Map<String, Date> stageMap = listIter.next();
-            if (stageMap.get(startTargetName) != null) {
-                Set<String> targetSet = stageMap.keySet();
-                for (String key : targetSet) {
-                    log.debug("key: " + key);
-                    Date time = stageMap.get(key);
-                    log.debug("time: " + time);
-                    if (time != INVALID_DATE) {
-                        return time;
-                    }
-                }
-            }
-        }
-        throw new BuildException("No time recorded " + "for stage:" + stage.getStageName());
-    }
-
-    private void sendStageInfo(String targetName, int hashCode) throws DiamondsException {
-        List<Stage> stageList = stageTargetEndMap.get(targetName);
-        synchronized (mutexObject) {
-            if (stageList != null) {
-                for (Stage stage : stageList) {
-                    if (stage != null) {
-                        log.debug("stage.name: " + stage.getStageName());
-                        log.debug("stage.start target name: " + stage.getStartTarget());
-                        String currentStageTargetName = stageStartTargetMap.get(stage.getStartTarget()
-                            + "-" + hashCode);
-                        log.debug("getStageBasedOnEndTarget: currentStargetTargetName" + currentStageTargetName);
-                        if (currentStageTargetName != null) {
-                            log.debug("stage in targetend: " + stage);
-                            if (stage != null && getIsInitialized()) {
-                                //initDiamondsClient();
-                                String stageName = stage.getStageName();
-                                log.debug("stageName in targetend: " + stageName);
-                                String stageMessage =  stageName + ".id";
-                                sendMessage(stageMessage);
-                                Date startTime = getStartTime(stage);
-                                getProject().setProperty("logical.stage", stageName);
-                                getProject().setProperty("stage.start.time", getTimeFormat().format(startTime));
-                                getProject().setProperty("stage.end.time", getTimeFormat().format(new Date()));
-                                sendMessage("stage.time.message");
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    public void targetEnd(BuildEvent buildEvent) throws DiamondsException {
-        String targetName = buildEvent.getTarget().getName();
-        Project prj = buildEvent.getProject();
-        int hashCode = prj.hashCode();
-        String targetNameWithHashCode = targetName + "-" + hashCode;
-        log.debug("targetEnd: targetNamewith-hashcode: " + targetNameWithHashCode);
-        sendStageInfo(targetName, hashCode);
-    }
-
-    private void findAndSetStartTimeForTargetInStageList(String targetName,
-        String targetNameWithHashCode) throws DiamondsException {
-        for (Iterator<Map<String, Date>> listIter = stageTargetBeginList.iterator(); listIter.hasNext();) {
-            Map<String, Date> stageMap = listIter.next();
-            Date targetTime = stageMap.get(targetName);
-            if (targetTime != null && targetTime.equals(INVALID_DATE)) {
-                log.debug("diamonds:StageDiamondsListener: started recording for stage-target-----: "
-                    + targetName);
-                log.debug("findtime: targetNamewith-hashcode: " + targetNameWithHashCode);
-                log.debug("findtime: time: " + new Date());
-                stageMap.put(targetName, new Date());
-                stageStartTargetMap.put(targetNameWithHashCode, targetName);
-                stageStartTargetTimeMap.put(targetNameWithHashCode, new Date());
-            }
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    private void initStageTargetsMap(Project projectInStage) {
-        for (String key : stages.keySet()) {
-            Stage stage = stages.get(key);
-            String startTargetName = stage.getStartTarget();
-            Map<String, Date> stageMap = new LinkedHashMap<String, Date>();
-            Vector<Target> arrayList = null;
-            try {
-                arrayList = projectInStage.topoSort(startTargetName, projectInStage.getTargets(), false);
-            }
-            catch (BuildException be) {
-                log.debug("Diamonds target missing: ", be);
-            }
-            if (arrayList != null) {
-                log.debug(" + Stage definition: " + stage.getStageName());
-                Enumeration<Target> targetEnum = arrayList.elements();
-                while (targetEnum.hasMoreElements()) {
-                    // fast lookup
-                    Target target = targetEnum.nextElement();
-                    stageMap.put(target.getName(), INVALID_DATE);
-                    log.debug("   - Start target: " + target.getName());
-                }
-                stageTargetBeginList.add(stageMap);
-
-                // stage end process
-                String endTargetName = stage.getEndTarget();
-                // fast lookup
-                List<Stage> existingStageList = stageTargetEndMap.get(endTargetName);
-                if (existingStageList == null) {
-                    existingStageList = new ArrayList<Stage>();
-                    stageTargetEndMap.put(endTargetName, existingStageList);
-                }
-                existingStageList.add(stage);
-                log.debug("   - End target: " + endTargetName);
-            }
-        }
-    }
-}
\ No newline at end of file
--- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/TargetDiamondsListener.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  
- *
- */
-
-package com.nokia.helium.diamonds;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-import java.util.Map;
-import org.apache.log4j.Logger;
-import org.apache.tools.ant.BuildEvent;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Target;
-import com.nokia.helium.core.ant.types.TargetMessageTrigger;
-import com.nokia.helium.core.ant.Message;
-
-/**
- * Listener sending data based on target configuration to diamonds.
- */
-public class TargetDiamondsListener extends DiamondsListenerImpl {
-
-
-    private Logger log = Logger.getLogger(TargetDiamondsListener.class);
-
-    private Map<String, TargetMessageTrigger> targetsMap;
-
-    private String currentTarget;
-
-    /**
-     * Default constructor
-     */
-    public TargetDiamondsListener() {
-        targetsMap = DiamondsConfig.getTargetsMap();
-        for (String key : targetsMap.keySet()) {
-            log.debug("target name: " + key);
-        }
-    }
-
-    private boolean isTargetsToExecute(BuildEvent buildEvent) {
-        Project projectInTarget = buildEvent.getProject();
-        Target target = buildEvent.getTarget();
-        boolean retValue = false;
-        log.debug("isTargetsToExecute: target:" + target.getName() );
-        TargetMessageTrigger targetInMap = targetsMap.get(target.getName());
-        log.debug("isTargetsToExecute: targetInMap:" + targetInMap );
-        if (targetInMap != null) {
-            log.debug("target: " + target.getName());
-            log.debug("targetInMap: " + targetInMap);
-            String targetNameInMap = targetInMap.getTargetName();
-            log.debug("targetNameInMap: " + targetInMap.getTargetName());
-            if (targetNameInMap != null) {
-                retValue = true;
-                String ifCondition = target.getIf();
-                if ((ifCondition != null) && (projectInTarget.getProperty(
-                        projectInTarget.replaceProperties(ifCondition)) == null)) {
-                    retValue = false;
-                }
-                String unlessCondition = target.getUnless();
-                if (unlessCondition != null && (projectInTarget.getProperty(
-                        projectInTarget.replaceProperties(unlessCondition)) != null)) {
-                    retValue = false;
-                }
-            }
-        }
-        return retValue;
-    }
-
-    /**
-     * Function to process logging info during beginning of target execution. This checks that the
-     * current target execution is in config and requires some data to be send it to diamonds.
-     * 
-     * @param event of target execution.
-     */
-    public void targetBegin(BuildEvent buildEvent) throws DiamondsException {
-        initDiamondsClient();
-        String targetName = buildEvent.getTarget().getName();
-        if (isTargetsToExecute(buildEvent)) {
-            currentTarget = targetName;
-        }
-    }
-
-    /**
-     * Function to process logging info during end of build. If the target in config, sends the data
-     * to diamonds (uses the template conversion if needed).
-     * 
-     * @param event of target execution.
-     */
-    public void targetEnd(BuildEvent buildEvent) throws DiamondsException {
-        String targetName = buildEvent.getTarget().getName();
-        if (isTargetsToExecute(buildEvent)) {
-            if (currentTarget != null && currentTarget.equals(targetName)) {
-                log.debug("targetEnd: " + targetName);
-                if (getIsInitialized()) {
-                    log.debug("diamonds:TargetDiamondsListener:finished recording, sending data to diamonds for target: "
-                        + buildEvent.getTarget().getName());
-                    sendTargetData(buildEvent, buildEvent.getTarget().getProject());
-                }
-                currentTarget = null;
-            }
-        }
-    }
-
-    private void sendData(InputStream stream) throws DiamondsException {
-        String urlPath = DiamondsConfig.getBuildId();
-        getDiamondsClient().sendData(stream, urlPath);
-        log.debug("urlPath:" + urlPath);
-    }
-    /**
-     * Sends the data to diamonds. First it looks if the template with target name exists, then it
-     * looks for input source file from config, if ant properties required from config, it uses it
-     * for template conversion. If no template file exists, sends the data directly.
-     * 
-     * @param event of target execution.
-     */
-    private void sendTargetData(BuildEvent buildEvent, Project project) throws DiamondsException {
-        TargetMessageTrigger targetMap = targetsMap.get(currentTarget);
-        if (targetMap != null) {
-            
-            List<Message> messageList = targetMap.getMessageList();
-            for ( Message message : messageList ) {
-                try {
-                    File tempFile = streamToTempFile(message.getInputStream());
-                    tempFile.deleteOnExit();
-                    sendData(new FileInputStream(tempFile));
-                    mergeToFullResults(new FileInputStream(tempFile));
-                } catch (IOException iex) {
-                    throw new DiamondsException("error closing the stream while sending data");
-                }
-                catch (com.nokia.helium.core.MessageCreationException mex) {
-                    log.debug("IOException while retriving message:", mex);
-                    throw new DiamondsException("error during message retrival");
-                }
-            }
-        }
-    }
-}
\ No newline at end of file
--- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/ant/HeliumListener.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,248 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-package com.nokia.helium.diamonds.ant;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.apache.tools.ant.BuildEvent;
-import org.apache.tools.ant.BuildListener;
-import org.apache.tools.ant.Project;
-
-import com.nokia.helium.diamonds.AllTargetDiamondsListener;
-import com.nokia.helium.diamonds.DiamondsConfig;
-import com.nokia.helium.diamonds.DiamondsException;
-import com.nokia.helium.diamonds.DiamondsListener;
-import com.nokia.helium.diamonds.DiamondsListenerImpl;
-import com.nokia.helium.diamonds.StageDiamondsListener;
-import com.nokia.helium.diamonds.TargetDiamondsListener;
-
-/**
- * Listener class that can connect to Ant and log information regarding to build
- * times, number of errors and such. Data is sent to Diamonds server, where it
- * is processed further.
- * 
- * This class is listening all build related events. It catches the build
- * start-finish, target start-finish events of Ant and gather build start-end
- * time, errors/warnings and store in BuildData class. Stored data will be
- * exported to XML and uploaded to Diamonds server after each specific target.
- * For example after target "create-bom" this class will upload all BOM data to
- * Diamonds.
- * 
- * 
- */
-public class HeliumListener implements BuildListener {
-
-    private Logger log = Logger.getLogger(HeliumListener.class);
-
-    private List<DiamondsListener> diamondsListeners;
-
-    private Project project;
-
-    private boolean isInitialized;
-
-    private boolean skipDiamonds ;
-    private boolean skipDiamondsSet;
-
-    /**
-     * Default constructor.
-     */
-    public HeliumListener() {
-        diamondsListeners = new ArrayList<DiamondsListener>();
-    }
-
-    /**
-     * Ant call this function when build start.
-     */
-    public void buildStarted(BuildEvent event) {
-        project = event.getProject();
-    }
-
-    /**
-     * Triggered when a target starts.
-     */
-    @SuppressWarnings("unchecked") 
-    public void targetStarted(BuildEvent event) {
-        Project prj = event.getProject();
-        String targetName = event.getTarget().getName();
-
-        String diamondsEnabled = prj.getProperty("diamonds.enabled");
-        String skip = prj.getProperty("skip.diamonds");
-        log.debug("diamondsenabled: " + diamondsEnabled);
-        log.debug("skip: " + skip);
-        if (!isInitialized) {
-            if (diamondsEnabled != null && !Project.toBoolean(diamondsEnabled)) {
-                log.info("'diamonds.enabled' is not true, to use diamonds set 'diamonds.enabled' to 'true'.");
-                skipDiamonds = true;
-                isInitialized = true;
-            } else if (skip != null && Project.toBoolean(skip)) {
-                log.info("'skip.diamonds' is deprecated. Please consider using 'diamonds.enabled'.");
-                skipDiamonds = true;
-                isInitialized = true;
-            }
-        }
-        
-        try {
-            if (!skipDiamonds) {
-                if (!isInitialized) {
-                    /**
-                     * Initialize Diamonds if and only if initializer-target-name has been called
-                     */
-                    String buildID = prj.getProperty(DiamondsConfig.getBuildIdProperty());
-                    log.debug("targetStarted:buildid:" + buildID);
-                    String initializerTargetName = prj.getProperty(DiamondsConfig.getInitializerTargetProperty());
-                    log.debug("initializerTargetName:" + initializerTargetName);
-                    log.debug("targetName:" + targetName);
-                    if ( buildID != null || (initializerTargetName != null && targetName.equals(initializerTargetName))) {
-                        isInitialized = true;
-                        project = prj;
-                        log.debug("trying to initialize diamonds config");
-                        DiamondsConfig.initialize(project);
-                        DiamondsListenerImpl.initialize(project);
-                        String category = DiamondsConfig.getCategory();
-                        log.debug("category:" + category);
-                        if (category != null && diamondsListeners.isEmpty()) {
-                            addListeners(event);
-                            log.info("Diamonds enabled");
-                        }
-                    }
-                }
-            } else {
-                if (!skipDiamondsSet && skipDiamonds)
-                {
-                    skipDiamondsSet = true;
-                }
-            }
-        } catch (DiamondsException ex) {
-            log.debug("Diamonds error: ", ex);
-            String errorMessage = ex.getMessage();
-            if (errorMessage == null) {
-                errorMessage = "";
-            }
-            log.error("Diamonds Error, might not be logged properly, see debug log. "
-                            + errorMessage);
-        }
-        if (diamondsListeners != null) {
-            for (DiamondsListener diamondsListener : diamondsListeners) {
-                try {
-                    diamondsListener.targetBegin(event);
-                } catch (DiamondsException e) {
-                    e.printStackTrace();
-                    log.debug("Error:", e);
-                    String errorMessage = e.getMessage();
-                    if (errorMessage == null) {
-                        errorMessage = "";
-                    }
-                    log.error("Diamonds Error, might not be logged properly, see debug log. "
-                                    + errorMessage);
-                }
-            }
-        }
-    }
-
-    private void addListeners(BuildEvent event) throws DiamondsException {
-        if (DiamondsConfig.isStagesInConfig()) {
-            StageDiamondsListener stageListener = new StageDiamondsListener();
-            diamondsListeners.add(stageListener);
-            stageListener.buildBegin(event);
-        }
-        if (DiamondsConfig.isTargetsInConfig()) {
-            TargetDiamondsListener targetListener = new TargetDiamondsListener();
-            diamondsListeners.add(targetListener);
-            targetListener.buildBegin(event);
-        }
-        
-        AllTargetDiamondsListener allTargetListener = new AllTargetDiamondsListener();
-        diamondsListeners.add(allTargetListener);
-        allTargetListener.buildBegin(event);
-    }
-
-    /**
-     * Triggered when a target finishes.
-     */
-    public void targetFinished(BuildEvent event) {
-        if (diamondsListeners != null) {
-            for (DiamondsListener diamondsListener : diamondsListeners) {
-                try {
-                    diamondsListener.targetEnd(event);
-                } catch (DiamondsException e) {
-                    log.debug("Error:", e);
-                    String errorMessage = e.getMessage();
-                    if (errorMessage == null) {
-                        errorMessage = "";
-                    }
-                    log.error("Diamonds Error, might not be logged properly, see debug log. "
-                                    + errorMessage);
-                }
-
-            }
-        }
-    }
-
-    /**
-     * Triggered when the build finishes.
-     */
-    public void buildFinished(BuildEvent event) {
-        if (diamondsListeners != null) {
-            for (DiamondsListener diamondsListener : diamondsListeners) {
-                try {
-                    diamondsListener.buildEnd(event);
-                } catch (DiamondsException e) {
-                    log.error("Failed to log in diamonds: " + e);
-                }
-
-            }
-        }
-        project = event.getProject();
-        cleanup();
-    }
-
-    /**
-     * See if build needs a final cleanup target to be called.
-     */
-    private void cleanup() {
-        String loggingoutputfile = project.getProperty("logging.output.file");
-        if (loggingoutputfile != null) {
-            File file = new File(loggingoutputfile);
-            if (file.exists()) {
-                file.delete();
-            }
-        }
-    }
-
-    /**
-     * Triggered when a task starts.
-     */
-    public void taskStarted(BuildEvent event) {
-    }
-
-    /**
-     * Triggered when a task finishes.
-     */
-    public void taskFinished(BuildEvent event) {
-    }
-
-    /**
-     * Triggered when a build message is logged.
-     */
-    public void messageLogged(BuildEvent event) {
-    }
-}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/ant/Listener.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,250 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+package com.nokia.helium.diamonds.ant;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.BuildListener;
+import org.apache.tools.ant.Project;
+
+
+import com.nokia.helium.core.ant.Message;
+import com.nokia.helium.diamonds.DiamondsConfig;
+import com.nokia.helium.diamonds.DiamondsException;
+import com.nokia.helium.diamonds.DiamondsListener;
+import com.nokia.helium.diamonds.DiamondsSession;
+import com.nokia.helium.diamonds.DiamondsSessionSocket;
+
+/**
+ * Listener class that can connect to Ant and log information regarding to build
+ * times, number of errors and such. Data is sent to Diamonds server, where it
+ * is processed further.
+ * 
+ * This class is listening all build related events. It catches the build
+ * start-finish, target start-finish events of Ant and gather build start-end
+ * time, errors/warnings and store in BuildData class. Stored data will be
+ * exported to XML and uploaded to Diamonds server after each specific target.
+ * For example after target "create-bom" this class will upload all BOM data to
+ * Diamonds.
+ * 
+ * 
+ */
+public class Listener implements BuildListener {
+
+    private static final String INITIAL_MESSAGE = "initial.message";
+    private static final String FINAL_MESSAGE = "final.message";
+    private static final String BUILD_START_TIME_PROPERTY = "build.start.time";
+    private static final String BUILD_END_TIME_PROPERTY = "build.end.time";
+    private Project project;
+    private DiamondsConfig config;
+    private DiamondsSession session;
+    private List<DiamondsListener> diamondsListeners = new ArrayList<DiamondsListener>();
+    private Date startTime = new Date();
+
+    public DiamondsConfig getConfiguration() {
+        return config;
+    }
+    
+    public DiamondsSession getSession() {
+        return session;
+    }
+
+    public Project getProject() {
+        return project;
+    }
+    
+    /**
+     * Ant call this function when build start.
+     */
+    public void buildStarted(BuildEvent event) {
+    }
+
+    private Message getMessage(String messageId) throws DiamondsException {
+        Object obj = project.getReference(messageId);
+        if (obj != null && obj instanceof Message) {
+            return (Message)obj;
+        }
+        throw new DiamondsException("Could not find message '" + messageId + "'");
+    }
+    
+    /**
+     * Triggered when a target starts.
+     */
+    public void targetStarted(BuildEvent event) {
+        if (project == null) {
+            project = event.getProject(); 
+            try {
+                config = new DiamondsConfig(project);
+                
+                // Set initial start time property.
+                SimpleDateFormat timeFormat = new SimpleDateFormat(config.getTimeFormat());
+                project.setProperty(BUILD_START_TIME_PROPERTY, timeFormat.format(startTime));                
+            } catch (DiamondsException e) {
+                config = null;
+                project.log("Diamonds reporting is disabled, because the listener is not configured properly: " + e.getMessage(), Project.MSG_ERR);
+            }
+            if (config == null || !config.isDiamondsEnabled()) {
+                project.log("'diamonds.enabled' is not true, to use diamonds set 'diamonds.enabled' to 'true'.");
+            } else {
+                try {
+                    for (Object object : project.getReferences().values()) {
+                        if (object instanceof DiamondsListener) {
+                            DiamondsListener diamondsListener = (DiamondsListener)object;
+                            diamondsListener.configure(this);
+                            project.log("Adding DiamondsListener: " + diamondsListener.getClass(), Project.MSG_DEBUG);
+                            diamondsListeners.add(diamondsListener);
+                        }
+                    }
+                } catch (DiamondsException e) {
+                    throw new BuildException("Diamonds listener is not configured properly: " + e.getMessage(), e);
+                }
+            }
+            for (DiamondsListener diamondsListener : diamondsListeners) {
+                try {
+                    diamondsListener.buildStarted(new BuildEvent(project));
+                } catch (DiamondsException e) {
+                    // Voluntarily ignoring errors happening.
+                    project.log(e.getMessage(), Project.MSG_ERR);
+                }
+            }            
+        }
+        
+        if (config != null && config.isDiamondsEnabled() && session == null) {
+            String buildId = project.getProperty(config.getBuildIdProperty());
+            try {
+                if (session == null && buildId != null) {
+                    project.log("Reusing diamonds session with the following build id: " + buildId);
+                    // we have a pre-configured build id.
+                    session = new DiamondsSessionSocket(new URL("http", config.getHost(),
+                            Integer.parseInt(config.getPort()), config.getPath()),
+                            config.getMailInfo(), config.getSMTPServer(), config.getLDAPServer(), buildId);
+                } else if (session == null && event.getTarget().getName().equals(config.getInitializerTargetName())) {
+                    session = new DiamondsSessionSocket(new URL("http", config.getHost(), 
+                            Integer.parseInt(config.getPort()), config.getPath()),
+                            config.getMailInfo(), config.getSMTPServer(), config.getLDAPServer());
+                    session.open(getMessage(INITIAL_MESSAGE));
+                    // defining build id on the both root project, and current target project. 
+                    event.getTarget().getProject().setProperty(config.getBuildIdProperty(), session.getBuildId());
+                    project.setProperty(config.getBuildIdProperty(), session.getBuildId());
+                    project.log("Diamonds build id: " + project.getProperty(config.getBuildIdProperty()));
+                }
+            } catch (NumberFormatException e) {
+                project.log(e.getMessage(), Project.MSG_ERR);
+                project.log("Diamonds reporting will be disabled.", Project.MSG_ERR);
+                session = null;
+            } catch (MalformedURLException e) {
+                project.log(e.getMessage(), Project.MSG_ERR);
+                project.log("Diamonds reporting will be disabled.", Project.MSG_ERR);
+                session = null;
+            } catch (DiamondsException e) {
+                project.log(e.getMessage(), Project.MSG_ERR);
+                project.log("Diamonds reporting will be disabled.", Project.MSG_ERR);
+                session = null;
+            }
+        } else if (session != null && session.isOpen()) {
+            for (DiamondsListener diamondsListener : diamondsListeners) {
+                try {
+                    diamondsListener.targetStarted(event);
+                } catch (DiamondsException e) {
+                    // Voluntarily ignoring errors happening.
+                    project.log(e.getMessage(), Project.MSG_ERR);
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Triggered when a target finishes.
+     */
+    public void targetFinished(BuildEvent event) {
+        if (config != null && config.isDiamondsEnabled() && session != null && session.isOpen()) {
+            for (DiamondsListener diamondsListener : diamondsListeners) {
+                try {
+                    diamondsListener.targetFinished(event);
+                } catch (DiamondsException e) {
+                    // Voluntarily ignoring errors happening.
+                    project.log(e.getMessage(), Project.MSG_ERR);
+                }
+            }            
+        }
+    }
+
+    /**
+     * Triggered when the build finishes.
+     */
+    public void buildFinished(BuildEvent event) {
+        if (config != null && config.isDiamondsEnabled() && session != null && session.isOpen()) {            
+            // Setting the final timestamp
+            SimpleDateFormat timeFormat = new SimpleDateFormat(config.getTimeFormat());
+            project.setProperty(BUILD_END_TIME_PROPERTY, timeFormat.format(new Date()));
+            for (DiamondsListener diamondsListener : diamondsListeners) {
+                try {
+                    diamondsListener.buildFinished(event);
+                } catch (DiamondsException e) {
+                    // Voluntarily ignoring errors happening.
+                    project.log(e.getMessage(), Project.MSG_ERR);
+                }
+            }            
+            try {
+                // Sending the message
+                Message message = getMessage(FINAL_MESSAGE);
+                session.close(message);
+            } catch (DiamondsException e) {
+                project.log(e.getMessage(), Project.MSG_ERR);
+            }
+        }
+    }
+
+
+    /**
+     * Triggered when a task starts.
+     */
+    public void taskStarted(BuildEvent event) {
+    }
+
+    /**
+     * Triggered when a task finishes.
+     */
+    public void taskFinished(BuildEvent event) {
+    }
+
+    /**
+     * Triggered when a build message is logged.
+     */
+    public void messageLogged(BuildEvent event) {
+    }
+    
+    
+    public static Listener getDiamondsListener(Project project) {
+        for (Object bl : project.getBuildListeners()) {
+            if (bl instanceof Listener) {
+                return (Listener)bl;
+            }
+        }
+        return null;
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/ant/antlib.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : antlib.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<antlib>
+    <!-- Task definition -->
+    <!-- Type definition -->
+    <typedef name="targetTimingMessageListener" classname="com.nokia.helium.diamonds.ant.types.AllTargetDiamondsListener"/>
+    <typedef name="targetMessageListener" classname="com.nokia.helium.diamonds.ant.types.TargetDiamondsListener" />
+    <typedef name="stageMessageListener" classname="com.nokia.helium.diamonds.ant.types.StageDiamondsListener" />
+    
+</antlib>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/ant/types/AllTargetDiamondsListener.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+
+package com.nokia.helium.diamonds.ant.types;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Vector;
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Target;
+import org.apache.tools.ant.types.DataType;
+
+import com.nokia.helium.core.ant.types.FileMessage;
+import com.nokia.helium.diamonds.DiamondsException;
+import com.nokia.helium.diamonds.DiamondsListener;
+import com.nokia.helium.diamonds.ant.Listener;
+
+/**
+ * The targetTimingMessageListener should be used as a reference in a build
+ * file so the message listener can detect it an record target execution time 
+ * before sending it.
+ * 
+ * <pre>
+ *      &lt;hlm:targetTimingMessageListener id=&quot;target.time.message.listener&quot; /&gt;
+ * </pre>
+ * 
+ * @ant.type name="targetTimingMessageListener" category="Diamonds"
+ */
+public class AllTargetDiamondsListener extends DataType implements DiamondsListener {
+
+    private List<AntTarget> antTargets = new Vector<AntTarget>();
+    private List<AntTarget> completedTargets = new Vector<AntTarget>();
+    private Listener diamondsListener;
+    private int minTime = 5000; // in ms
+    
+    /**
+     * Function to process logging info during end of build
+     * 
+     * @param event of target execution.
+     */
+    class AntTarget {
+        private String targetName;
+        private Date startTime;
+        private Date endTime;
+        private int hashCode;
+        
+        public AntTarget(Target target) {
+            targetName = target.getName();
+            this.hashCode = target.hashCode();
+            startTime = new Date();
+        }
+        
+        public String getName() { return targetName; }
+        public Date getStartTime() { return startTime; }
+        public Date getEndTime() { return endTime; }
+        public void setEndTime(Date e) { endTime = e; }
+        public boolean equals(Object obj) { return obj.hashCode() == hashCode; }
+        public int hashCode() { return hashCode; }
+    }
+    
+    public synchronized void buildFinished(BuildEvent buildEvent) throws DiamondsException {
+        try {
+            SimpleDateFormat timeFormat = new SimpleDateFormat(diamondsListener.getConfiguration().getTimeFormat());
+            File tempFile = File.createTempFile("diamonds-targets", ".xml");
+            tempFile.deleteOnExit();
+            BufferedWriter out = new BufferedWriter(new FileWriter(tempFile));
+            out.write("<?xml version=\"1.0\" ?>\n");
+            out.write("<diamonds-build>\n");
+            out.write("<schema>24</schema>\n");
+            out.write("<targets>\n");
+            
+            for (AntTarget at : completedTargets) {
+                if (at.getEndTime() != null) {
+                    out.write("<target>\n");
+                    out.write("<name>" + at.getName() + "</name>\n");
+                    out.write("<started>" + timeFormat.format(at.getStartTime()) + "</started>\n");
+                    out.write("<finished>" + timeFormat.format(at.getEndTime()) + "</finished>\n");
+                    out.write("</target>\n");
+                }
+            }
+                
+            out.write("</targets>\n");
+            out.write("</diamonds-build>\n");
+            out.close();
+            FileMessage message = new FileMessage();
+            message.setProject(getProject());
+            message.setFile(tempFile);
+            diamondsListener.getSession().send(message);
+        } catch (IOException e) {
+            throw new DiamondsException(e.getMessage(), e);
+        }
+    }
+
+    public void buildStarted(BuildEvent buildEvent) throws DiamondsException {
+    }
+
+    public void configure(Listener listener) throws DiamondsException {
+        diamondsListener = listener;        
+    }
+
+    public synchronized void targetFinished(BuildEvent buildEvent) throws DiamondsException {
+        for (AntTarget at : antTargets) {
+            if (at.equals(buildEvent.getTarget())) {
+                at.setEndTime(new Date());
+                if (at.getEndTime().getTime() - at.getStartTime().getTime() >= minTime) {
+                    completedTargets.add(at);
+                }
+                antTargets.remove(at);
+                break;
+            }
+        }
+    }
+
+    public synchronized void targetStarted(BuildEvent buildEvent) throws DiamondsException {
+        antTargets.add(new AntTarget(buildEvent.getTarget()));
+    }
+    
+    /**
+     * Defines the minimum execution time for a target to be recorded. Time is in millisecond.
+     * If set to 0 then all target are recorded. 
+     * @param minTime
+     * @ant.not-required Default is 5000ms
+     */
+    public void setMinTime(Integer minTime) {
+        if (minTime.intValue() < 0) {
+            throw new BuildException("Invalid value for minTime attribute: " +
+                    minTime.intValue() + ", value must be >=0. At " + this.getLocation());
+        }
+        this.minTime = minTime.intValue();
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/ant/types/StageDiamondsListener.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,203 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+
+package com.nokia.helium.diamonds.ant.types;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.DataType;
+
+import com.nokia.helium.core.ant.Message;
+import com.nokia.helium.core.ant.types.Stage;
+import com.nokia.helium.diamonds.DiamondsException;
+import com.nokia.helium.diamonds.DiamondsListener;
+import com.nokia.helium.diamonds.ant.Listener;
+
+/**
+ * The targetTimingMessageListener should be used as a reference in a build
+ * file so the message listener can detect it an record target execution time 
+ * before sending it.
+ * 
+ * <pre>
+ *      &lt;hlm:stageMessageListener id=&quot;stage.message.listener&quot;&gt;
+ *          &lt;hlm:fmppMessage sourceFile="tool.xml.ftl"&gt;
+ *              &lt;data expandProperties="yes"&gt;
+ *                  ant: antProperties()
+ *              &lt;/data&gt;
+ *          &lt;/hlm:fmppMessage&gt;
+ *      &lt;/hlm:stageMessageListener&gt; 
+ * </pre>
+ * 
+ * @ant.type name="stageMessageListener" category="Diamonds"
+ */
+public class StageDiamondsListener extends DataType implements DiamondsListener {
+    private Listener diamondsListener;
+    private List<DiamondsStage> stages = new ArrayList<DiamondsStage>();
+    private List<DiamondsStage> completedStages = new ArrayList<DiamondsStage>();
+    private DiamondsStage currentStage;
+    private Message message;
+    
+    class DiamondsStage extends Stage {
+        private Date startTime;
+        private Date endTime;
+        private String stageName;
+            
+        public DiamondsStage(Stage stage) {
+            this.setEndTarget(stage.getEndTarget());
+            this.setStartTarget(stage.getStartTarget());
+            stageName = stage.getStageName();
+        }
+        
+        public void setStartTime(Date startTime) {
+            this.startTime = startTime;
+        }
+        
+        public void setEndTime(Date endTime) {
+            this.endTime = endTime;
+        }
+
+        public void setProperties(Project project, String timeFormatString) {
+            SimpleDateFormat timeFormat = new SimpleDateFormat(timeFormatString);
+            project.setProperty("logical.stage", this.getStageName());
+            project.setProperty("stage.start.time", timeFormat.format(startTime));
+            project.setProperty("stage.end.time", timeFormat.format(endTime));
+        }
+
+        public String getStageName() {
+            return stageName;
+        }        
+    }
+
+    @SuppressWarnings("unchecked")
+    public void configure(Listener listener) throws DiamondsException {
+        diamondsListener = listener;
+        if (message == null) {
+            throw new BuildException(this.getDataTypeName() + " must have one nested message at " + this.getLocation());
+        }
+        Map<String, String> startStageName = new Hashtable<String, String>();
+        for (Map.Entry<String, Object> entry : ((Map<String, Object>)listener.getProject().getReferences()).entrySet()) {
+            if (entry.getValue() instanceof Stage) {
+                Stage stage = (Stage)entry.getValue();
+                if (stage.getStartTarget() != null && stage.getEndTarget() != null) {
+                    if (startStageName.containsKey(stage.getStartTarget())) {
+                        log("Stage " + entry.getKey() + " uses the start target named '" + stage.getStartTarget() +
+                                "' which is already used by stage " + startStageName.get(stage.getStartTarget()) +
+                                ". Stage " + entry.getKey() + " will be ignored.", Project.MSG_WARN);
+                    } else {
+                        if (!getProject().getTargets().containsKey(stage.getStartTarget())) {
+                            log("Stage " + entry.getKey() + " refer to an inexistant start target: " + stage.getStartTarget()
+                                    + ". Stage will be ignored", Project.MSG_ERR);
+                        } else if (!getProject().getTargets().containsKey(stage.getEndTarget())) {
+                            log("Stage " + entry.getKey() + " refer to an inexistant end target: " + stage.getEndTarget()
+                                    + ". Stage will be ignored", Project.MSG_ERR);
+                        } else {
+                            startStageName.put(stage.getStartTarget(), entry.getKey());
+                            DiamondsStage diamondsStage = new DiamondsStage(stage);
+                            stages.add(diamondsStage);
+                        }
+                    }
+                }
+            }
+        }        
+    }
+
+    
+    public void buildFinished(BuildEvent buildEvent) throws DiamondsException {
+        if (currentStage != null) {
+            currentStage.setEndTime(new Date());
+            completedStages.add(currentStage);
+            currentStage = null;
+        }
+    }
+    
+    public void buildStarted(BuildEvent buildEvent) throws DiamondsException {
+    }
+    
+    public synchronized void targetFinished(BuildEvent buildEvent) throws DiamondsException {
+        if (currentStage != null) {
+            if (buildEvent.getTarget().getName().equals(currentStage.getEndTarget())) {
+                getProject().log("Stage ending - " + currentStage.getStageName(), Project.MSG_DEBUG);
+                currentStage.setEndTime(new Date());
+                completedStages.add(currentStage);
+                try {
+                    sendCompletedStage(currentStage);
+                } finally {
+                    currentStage = null;
+                }
+            }
+        }
+    }
+
+    protected void sendCompletedStage(DiamondsStage stage) throws DiamondsException {
+        if (message != null) {
+            stage.setProperties(diamondsListener.getProject(), diamondsListener.getConfiguration().getTimeFormat());
+            diamondsListener.getSession().send(message);
+        }
+    }
+    
+    public synchronized void targetStarted(BuildEvent buildEvent) throws DiamondsException {
+        if (currentStage == null) {
+            currentStage = geStageByStartTarget(buildEvent.getTarget().getName());
+            if (currentStage != null) {
+                getProject().log("Stage starting - " + currentStage.getStageName(), Project.MSG_DEBUG);
+                currentStage.setStartTime(new Date());
+            }
+        } else {
+            // In this case we have an overlap...
+            DiamondsStage newStage = geStageByStartTarget(buildEvent.getTarget().getName());
+            if (newStage != null) {
+                getProject().log("Stage " + currentStage.getStageName() + " and stage " + newStage.getStageName() + " are overlapping.", Project.MSG_WARN);
+                getProject().log("Stage ending - " + currentStage.getStageName(), Project.MSG_DEBUG);
+                currentStage.setEndTime(new Date());
+                newStage.setStartTime(new Date());
+                completedStages.add(currentStage);
+                try {
+                    sendCompletedStage(currentStage);
+                } finally {
+                    currentStage = newStage;
+                    getProject().log("Stage starting - " + currentStage.getStageName(), Project.MSG_DEBUG);
+                }
+                
+            }
+        }
+    }
+    
+    private DiamondsStage geStageByStartTarget(String targetName) {
+        for (DiamondsStage stage : stages) {
+            if (targetName.equals(stage.getStartTarget())) {
+                return stage;
+            }
+        }
+        return null;
+    }
+    
+    
+    public void add(Message message) {
+        if (this.message != null) {
+            throw new BuildException(this.getDataTypeName() + " cannot accept more than one nested message at " + this.getLocation());
+        }
+        this.message = message;
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/ant/types/TargetDiamondsListener.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+
+package com.nokia.helium.diamonds.ant.types;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Target;
+
+import com.nokia.helium.core.ant.Message;
+import com.nokia.helium.core.MessageCreationException;
+import com.nokia.helium.core.ant.types.TargetMessageTrigger;
+import com.nokia.helium.diamonds.DiamondsException;
+import com.nokia.helium.diamonds.DiamondsListener;
+import com.nokia.helium.diamonds.DiamondsSession;
+import com.nokia.helium.diamonds.ant.Listener;
+
+/**
+ * Listener sending data based on target configuration to diamonds.
+ */
+public class TargetDiamondsListener implements DiamondsListener {
+    private static final int READ_ARRAY_SIZE = 1000;
+    
+    private Listener  diamondsListener;
+    private Map<String, TargetMessageTrigger> targetTriggers = new HashMap<String, TargetMessageTrigger>();
+ 
+    
+    public void configure(Listener diamondsListener) throws DiamondsException {
+        this.diamondsListener = diamondsListener;
+        for (Object entry : diamondsListener.getProject().getReferences().values()) {
+            if (entry instanceof TargetMessageTrigger) {
+                TargetMessageTrigger targetMessageTrigger = (TargetMessageTrigger)entry;
+                targetTriggers.put(targetMessageTrigger.getTargetName(), targetMessageTrigger);
+            }
+        }
+    }
+
+    public void buildFinished(BuildEvent buildEvent) throws DiamondsException {
+    }
+
+    public void buildStarted(BuildEvent buildEvent) throws DiamondsException {
+    }
+
+    public void targetFinished(BuildEvent buildEvent) throws DiamondsException {
+        String targetName = buildEvent.getTarget().getName();
+        if (testIfCondition(buildEvent.getTarget()) && testUnlessCondition(buildEvent.getTarget()) &&
+                targetTriggers.containsKey(buildEvent.getTarget().getName())) {
+            DiamondsSession session = diamondsListener.getSession();
+            if (session != null && session.isOpen()) {
+                for (Message message : targetTriggers.get(targetName).getMessageList()) {
+                    buildEvent.getProject().log("Sending message to Diamonds:\n" + dumpMessage(message), Project.MSG_DEBUG);
+                    session.send(message);
+                }
+            }
+        }
+    }
+
+    /**
+     * Check if the target should be skipped because of the if attribute.
+     * @param target the target instance to be tested.
+     * @return Returns true if the target should be executed, false otherwise.
+     */
+    private boolean testIfCondition(Target target) {
+        if (target.getIf() == null) {
+            return true;
+        }
+        String test = target.getProject().replaceProperties(target.getIf());
+        return target.getProject().getProperty(test) != null;
+    }
+
+    /**
+     * Check if the target should be skipped because of the unless attribute.
+     * @param target the target instance to be tested.
+     * @return Returns true if the target should be executed, false otherwise.
+     */
+    private boolean testUnlessCondition(Target target) {
+        if (target.getUnless() == null) {
+            return true;
+        }
+        String test = target.getProject().replaceProperties(target.getUnless());
+        return target.getProject().getProperty(test) == null;
+    }
+    
+    /**
+     * Dump the content of a Message and return a String.
+     * @param message The message.
+     * @return String of contents.
+     * @throws DiamondsException If any IO errors.
+     */
+    private String dumpMessage(Message message) throws DiamondsException {
+        StringBuilder builder;
+        try {
+            InputStream in = message.getInputStream();
+            builder = new StringBuilder();
+            byte[] data = new byte[READ_ARRAY_SIZE];
+            int length = in.read(data);
+            while (length > 0) {
+                builder.append(new String(data, 0, length));
+                length = in.read(data);
+            }
+        }
+        catch (IOException e) {
+            throw new DiamondsException(e.toString());
+        } catch (MessageCreationException e) {
+            throw new DiamondsException(e.toString());
+        }
+        return builder.toString();
+    }
+
+    public void targetStarted(BuildEvent buildEvent) throws DiamondsException {
+    }
+}
+
+
--- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/helium.antlib.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/helium.antlib.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -25,11 +25,9 @@
         Ant task definition declarations.
     </description>
     <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium" />
-    <typedef name="diamondsExceptionStatusUpdate" classname="com.nokia.helium.diamonds.DiamondsExceptionStatusUpdate" uri="http://www.nokia.com/helium"/>    
-    <typedef name="diamondsPostBuildStatusUpdate" classname="com.nokia.helium.diamonds.DiamondsPostBuildStatusUpdate" uri="http://www.nokia.com/helium"/>
+    <typedef name="diamondsStatusUpdate" classname="com.nokia.helium.diamonds.DiamondsStatusUpdate" uri="http://www.nokia.com/helium"/>
     <hlm:deflist id="helium-diamonds.list">
-        <hlm:listenerdef classname="com.nokia.helium.diamonds.ant.HeliumListener"/>
-        <hlm:diamondsExceptionStatusUpdate/>
-        <hlm:diamondsPostBuildStatusUpdate/>
+        <hlm:listenerdef classname="com.nokia.helium.diamonds.ant.Listener" preappend="true" />
+        <hlm:diamondsStatusUpdate/>
     </hlm:deflist>    
 </project>
\ No newline at end of file
--- a/buildframework/helium/sf/java/diamonds/tests/antunit/run-scenario.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/diamonds/tests/antunit/run-scenario.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -25,12 +25,11 @@
     <property environment="env" />
     
     <target name="setUp">
-        <tempfile property="temp.dir" suffix=".dir" />
-        <mkdir dir="${temp.dir}" />
+        <mkdir dir="${test.temp.dir}" />
     </target>
     
     <target name="tearDown">
-        <delete dir="${temp.dir}" />
+        <delete dir="${test.temp.dir}" />
     </target>
     
     <macrodef name="runScenario">
@@ -43,13 +42,13 @@
                 <arg line="/c ..\build.bat" />
                 <arg line="@{target}" />
                 <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor" />
-                <arg value="-Dtemp.dir=${temp.dir}" />
+                <arg value="-Dtemp.dir=${test.temp.dir}" />
             </exec>
             <exec osfamily="unix" executable="../bld.sh" dir="${ant.file.run-scenario}/../../scenarii/@{scenario}" failonerror="@{failonerror}">
                 <env key="ANT_ARGS" value="${env.ANT_ARGS}" />
                 <arg line="@{target}" />
                 <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor" />
-                <arg value="-Dtemp.dir=${temp.dir}" />
+                <arg value="-Dtemp.dir=${test.temp.dir}" />
             </exec>
         </sequential>
     </macrodef>
--- a/buildframework/helium/sf/java/diamonds/tests/antunit/test_diamonds.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/diamonds/tests/antunit/test_diamonds.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -23,24 +23,102 @@
 <project name="test-diamonds" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
     <description>Helium Antlib diamonds unittests.</description>
 
-    
+    <taskdef name="xpathtest" classname="se.jtech.ant.xpath.XPathEvaluatorTask" onerror="ignore"/>    
+
     <import file="run-scenario.ant.xml" />
 
     <target name="test-build">
         <runScenario scenario="build" target="unittest-diamonds" />
+        <au:assertLogContains text="Diamonds build id:" />
     </target>
 
     <target name="test-build-with-invalid-address">
         <runScenario scenario="invalid-address" target="unittest-diamonds" />
-        <au:assertLogContains text="Error occured while sending mail" />
+        <au:assertLogContains text="Error sending the message: invalid.server.local" />
+        <au:assertLogContains text="Diamonds reporting will be disabled." />
     </target>
     
     <target name="test-build-with-invalid-templates">
         <runScenario scenario="invalid-templates" target="unittest-diamonds" />
+        <au:assertLogContains text="Error with invalid-ant-properties-input-file.ftl" />
+        <au:assertLogContains text="Diamonds build id:" />
     </target>
 
     <target name="test-build-with-invalid-templates-1">
-        <runScenario scenario="invalid-templates-1" failonerror="false" target="unittest-diamonds" />
+        <runScenario scenario="invalid-templates-1" target="unittest-diamonds" />
+        <au:assertLogContains text="Diamonds build id:" />
+    </target>
+    
+    <target name="test-build-without-config">
+        <runScenario scenario="build-without-config" target="unittest-diamonds" />
+        <au:assertLogContains text="Diamonds reporting is disabled, because the listener is not configured properly: required property: diamonds.host not defined" />
+    </target>
+
+    <target name="test-failing-build">
+        <au:expectfailure>
+            <runScenario scenario="failing-build" target="build" />
+        </au:expectfailure>
+        <au:assertLogContains text="BUILD FAILED" />
+        <au:assertLogContains text="diamonds:" />
+        <au:assertLogContains text="failing-target:" />
+        <property file="${test.temp.dir}/diamonds.ini" />
+        <get src="http://${diamonds.host}:${diamonds.port}${diamonds.build.id}?fmt=xml"
+             dest="${test.temp.dir}/diamonds_data.xml" 
+             usetimestamp="true" />
+        <xpathtest xmlfile="${test.temp.dir}/diamonds_data.xml">
+            <namespace uri="" prefix=""/>
+            <xpath expression="/diamonds-build/build[status='failed']"/>
+         </xpathtest>        
+        <xpathtest xmlfile="${test.temp.dir}/diamonds_data.xml">
+            <namespace uri="" prefix=""/>
+            <xpath expression="/diamonds-build/build/finished"/>
+         </xpathtest>        
+    </target>
+
+    <target name="test-signal-build">
+        <au:expectfailure>
+            <runScenario scenario="signal-build" target="build" />
+        </au:expectfailure>
+        <au:assertLogContains text="BUILD FAILED" />
+        <au:assertLogContains text="diamonds:" />
+        <au:assertLogContains text="failing-target:" />
+        <property file="${test.temp.dir}/diamonds.ini" />
+        <get src="http://${diamonds.host}:${diamonds.port}${diamonds.build.id}?fmt=xml"
+             dest="${test.temp.dir}/diamonds_data.xml" 
+             usetimestamp="true" />
+        <xpathtest xmlfile="${test.temp.dir}/diamonds_data.xml">
+            <namespace uri="" prefix=""/>
+            <xpath expression="/diamonds-build/build[status='failed']"/>
+         </xpathtest>        
+        <xpathtest xmlfile="${test.temp.dir}/diamonds_data.xml">
+            <namespace uri="" prefix=""/>
+            <xpath expression="/diamonds-build/build/finished"/>
+         </xpathtest>        
+        <xpathtest xmlfile="${test.temp.dir}/diamonds_data.xml">
+            <namespace uri="" prefix=""/>
+            <xpath expression="/diamonds-build/signals/signal[position()=1 and name='testDeferredSignalInput']"/>
+         </xpathtest>        
+        <xpathtest xmlfile="${test.temp.dir}/diamonds_data.xml">
+            <namespace uri="" prefix=""/>
+            <xpath expression="/diamonds-build/signals/signal[position()=2 and name='testNowSignalInput']"/>
+         </xpathtest>        
+    </target>
+    
+    <target name="test-target-recording">
+        <runScenario scenario="target-recording" target="build" />
+        <au:assertLogContains text="BUILD SUCCESSFUL" />
+        <au:assertLogContains text="diamonds:" />
+        <property file="${test.temp.dir}/diamonds.ini" />
+        <get src="http://${diamonds.host}:${diamonds.port}${diamonds.build.id}?fmt=xml"
+             dest="${test.temp.dir}/diamonds_data.xml" 
+             usetimestamp="true" />
+        <xpathtest xmlfile="${test.temp.dir}/diamonds_data.xml">
+            <namespace uri="" prefix=""/>
+            <xpath expression="/diamonds-build/targets/target[name='target-recording']"/>
+            <xpath expression="/diamonds-build/targets/target[name='sub-target2']"/>
+            <xpath expression="/diamonds-build/targets/target[name='sub-target3']"/>
+            <xpath expression="/diamonds-build/targets[count(target)=3]"/>
+         </xpathtest>        
     </target>
     
 </project>
\ No newline at end of file
--- a/buildframework/helium/sf/java/diamonds/tests/config/diamonds_config_default.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/diamonds/tests/config/diamonds_config_default.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -29,29 +29,17 @@
     <property name="diamonds.tstamp.format" value="yyyy-MM-dd'T'HH:mm:ss" />
     <property name="diamonds.category" value="${build.family}" />
 
-    <hlm:stage id="test-echo-operation" 
-        startTarget="test-echo-operation" endTarget="test-echo-operation" />
-    <hlm:stage id="test-echo-operation1" 
-        startTarget="test-echo-operation1" endTarget="test-echo-operation1" />
-    <hlm:stage id="test-echo-operation2" 
-        startTarget="test-echo-operation2" endTarget="test-echo-operation2" />
-    <hlm:stage id="test-echo-operation3" 
-        startTarget="test-echo-operation3" endTarget="test-echo-operation3" />
-    <hlm:stage id="test-echo-operation4" 
-        startTarget="test-echo-operation4" endTarget="test-echo-operation4" />
-    <hlm:stage id="test-echo-operation5" 
-        startTarget="test-echo-operation5" endTarget="test-echo-operation5" />
+    <!-- those stages should be ignored -->
+    <hlm:stage id="inexistant-start-target" 
+        startTarget="inexistant-start-target" endTarget="diamonds" />
+    <hlm:stage id="inexistant-end-target" 
+        startTarget="diamonds" endTarget="inexistant-end-target" />
 
-<!--
-    <stage name="build" start="compile-target" end="compile-target"
-        logfile="${ant['compile.log.input']}"/>
-        -->
-    <hlm:stage id="stage-sequence-1" startTarget="test-buildid-set" endTarget="test-version"
-        />
-    <hlm:stage id="stage-sequence-2" startTarget="test-buildid-set" endTarget="test-defer-type"
-        />
-
-    <hlm:stage id="invalid-template-sequence" startTarget="test-buildid-set" endTarget="test-invalid-template-file"/>
+    <!-- stage 2 should be ignored. -->
+    <hlm:stage id="stage-sequence-1" startTarget="test-buildid-set" endTarget="test-version" />
+    <hlm:stage id="stage-sequence-2" startTarget="test-buildid-set" endTarget="test-defer-type" />
+    <hlm:stage id="stage-sequence-3" startTarget="test-defer-type" endTarget="test-version" />
+    
 
     <hlm:fmppMessage id="initial.message" sourceFile="${diamonds.template-dir}/diamonds_start.xml.ftl">
         <data expandProperties="yes">
@@ -77,11 +65,6 @@
         </data>
     </hlm:fmppMessage>
 
-    <hlm:fmppMessage id="stage.time.message" sourceFile="${diamonds.template-dir}/diamonds_stage.xml.ftl">
-        <data expandProperties="yes">
-            ant: antProperties()
-        </data>
-    </hlm:fmppMessage>
 
 
     <hlm:targetMessageTrigger id="codescanner.id" target="codescanner">
@@ -115,5 +98,23 @@
             </data>
         </hlm:fmppMessage>
     </hlm:targetMessageTrigger>
+
+    <hlm:targetMessageTrigger id="skipped-target.id" target="skipped-target">
+        <hlm:fmppMessage sourceFile="${diamonds.template-dir}${file.separator}skipped-target.xml.ftl">
+            <data expandProperties="yes">
+                ant: antProperties()
+            </data>
+        </hlm:fmppMessage>
+    </hlm:targetMessageTrigger>
+    
+    <hlm:targetTimingMessageListener id="target.timing.message.listener" minTime="1500" />
+    <hlm:targetMessageListener id="target.message.listener" />
+    <hlm:stageMessageListener id="stage.message.listener">
+        <hlm:fmppMessage sourceFile="${diamonds.template-dir}/diamonds_stage.xml.ftl">
+            <data expandProperties="yes">
+                ant: antProperties()
+            </data>
+        </hlm:fmppMessage>
+    </hlm:stageMessageListener>
     
 </project>
\ No newline at end of file
--- a/buildframework/helium/sf/java/diamonds/tests/data/templates/diamonds_signal.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/diamonds/tests/data/templates/diamonds_signal.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -1,6 +1,6 @@
 <#--
 ============================================================================ 
-Name        : finish.xml.ftl 
+Name        : diamonds_signal.xml.ftl 
 Part of     : Helium 
 
 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -21,21 +21,14 @@
 -->
 <#include "header.ftl"> 
   <signals>
-      <#assign diamondsignalname = ""/>
-      <#assign diamondkeys = ant?keys>
-      <#list diamondkeys as diamondkey>
-      <#if diamondkey?contains("diamond.signal.name")>
-      <#list diamondkey?split(".") as index>
-      <#assign signalIndex = index/>
-      </#list>
+      <#list ant?keys as diamondskey>
+      <#if diamondskey?starts_with("diamond.signal.name.")>
+      <#assign signalIndex = diamondskey?split(".")?last />
       <signal>
-      <#list diamondkeys as diamondkey>
-      <#if diamondkey?contains("${signalIndex}")>
-          <#if ant?contains("diamond.signal.name.${signalIndex}")><name>${ant["diamond.signal.name.${signalIndex}"]}</name></#if>
-          <#if ant?contains("diamond.error.message.${signalIndex}")><message>${ant["diamond.error.message.${signalIndex}"]}</message></#if>
-          <#if ant?contains("diamond.time.stamp.${signalIndex}")><timestamp>${ant["diamond.time.stamp.${signalIndex}"]}</timestamp></#if>
-      </#if>
-      </#list>
+          <id>${signalIndex}</id>
+          <#if ant?keys?seq_contains("diamond.signal.name.${signalIndex}")><name>${ant["diamond.signal.name.${signalIndex}"]?xml}</name></#if>
+          <#if ant?keys?seq_contains("diamond.error.message.${signalIndex}")><message>${ant["diamond.error.message.${signalIndex}"]?xml}</message></#if>
+          <#if ant?keys?seq_contains("diamond.time.stamp.${signalIndex}")><timestamp>${ant["diamond.time.stamp.${signalIndex}"]?xml}</timestamp></#if>
       </signal>
       </#if>
       </#list>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/diamonds/tests/data/templates/skipped-target.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,29 @@
+<#--
+============================================================================ 
+Name        : skipped-target.xml.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<#include "header.ftl">
+       <tools>
+         <tool>
+           <name>invalid_target</name>
+           <version>0.0</version>
+         </tool>
+       </tools>
+<#include "footer.ftl">
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/diamonds/tests/scenarii/build-without-config/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,167 @@
+<?xml version="1.0"?>
+<!-- 
+============================================================================ 
+Name        : test_diamonds.ant.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test-diamonds" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    <description>Helium Antlib diamonds unittests.</description>
+    <property environment="env" />
+    <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    <taskdef resource="com/nokia/helium/diamonds/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    <taskdef name="xpathtest" classname="se.jtech.ant.xpath.XPathEvaluatorTask" onerror="ignore"/>    
+    <property name="diamonds.enabled" value="true" />
+    <property name="diamonds.unitest.dir" location="${ant.file.test-diamonds}/../../../" />
+    <property name="diamonds.output.dir" location="${temp.dir}" />
+    <property name="diamonds.template.dir" location="${diamonds.unitest.dir}/data/templates" />
+    <property name="build.family" value="test_new_hlm"/>
+    <property name="id" value="123"/>
+    <property name="name" value="${build.family}_${id}"/>
+    <property name="build.system" value="ec-helium"/>
+    <property name="compile.log.input" location="${diamonds.unitest.dir}/data/compile.log.xml" />
+    <property name="codescanner.log.input" location="${diamonds.unitest.dir}/data/problemIndex.xml" />
+    <property name="policy.log.input" location="${diamonds.unitest.dir}/data/policy.log.xml" />
+    <property name="invalid.target.input.file" location="${diamonds.unitest.dir}/data/invalid.target.input.log.xml" />
+    <property name="symsee.version" value="9.1.0" />
+
+    <import file="${diamonds.unitest.dir}/config/diamonds_config_default.ant.xml" />
+
+
+    <target name="unittest" depends="unittest-diamonds" />
+    
+    <target name="unittest-diamonds" depends="test-all" />
+    
+    <dirname property="project.dir" file="${ant.file.test-diamonds}" />
+    <target name="version">
+        <echo message="version target for diamonds to verify sending data to diamonds" />
+    </target>
+
+    <target name="diamonds" />
+
+    <target name="compile-target">
+        <echo message="verify the build stage with input source xml file" />
+    </target>
+
+    <target name="codescanner">
+        <echo message="target verification with input source xml file" />
+    </target>
+
+    <target name="create-bom-log">
+        <echo message="target without input file and just to send the data" />
+    </target>
+
+
+    <target name="defer-type">
+        <echo message="version target for diamonds to verify sending data to diamonds" />
+    </target>
+
+    <target name="test-defer-type">
+        <antcall target="defer-type" />
+    </target>
+
+    <target name="test-create-bom-log">
+        <antcall target="create-bom-log" />
+    </target>
+
+    <target name="test-codescanner">
+        <antcall target="codescanner" />
+    </target>
+
+
+
+
+    <target name="test-compile-target">
+        <antcall target="compile-target" />
+    </target>
+
+    <target name="test-version">
+        <antcall target="version" />
+    </target>
+
+    <target name="test-buildid-set">
+    </target>
+
+    <target name="test-buildid-notset">
+    </target>
+
+    <target name="test-echo-operation">
+        <echo message="echo operation: test" />
+    </target>
+
+    <target name="test-echo-operation1">
+        <echo message="echo operation1: test" />
+    </target>
+
+    <target name="test-echo-operation2">
+        <echo message="echo operation2: test" />
+    </target>
+
+    <target name="test-echo-operation3">
+        <echo message="echo operation3: test" />
+    </target>
+
+    <target name="test-echo-operation4">
+        <echo message="echo operation4: test" />
+    </target>
+
+    <target name="test-echo-operation5">
+        <echo message="echo operation5: test" />
+    </target>
+
+    <target name="test-depend-target" depends="test-echo-operation" />
+
+    <target name="test-ant-call">
+        <echo message="test-ant-call" />
+        <delete file="${diamonds.output.dir}/diamonds_stage.xml" failonerror="false" />
+        <antcall target="test-echo-operation1" />
+    </target>
+
+    <target name="test-ant-call-multiple">
+        <echo message="test-ant-call" />
+        <delete file="${diamonds.output.dir}/diamonds_stage.xml" failonerror="false" />
+        <antcall target="test-echo-operation2" />
+        <antcall target="test-echo-operation3" />
+    </target>
+
+    <target name="test-ant-call-multiple-parallel">
+        <echo message="test-ant-call" />
+        <delete file="${diamonds.output.dir}/diamonds_stage.xml" failonerror="false" />
+        <parallel>
+            <antcall target="test-echo-operation4" />
+            <antcall target="test-echo-operation5" />
+        </parallel>
+    </target>
+
+    <target name="sequence-config-test-target-1">
+    </target>
+
+    <target name="sequence-config-test-target-2">
+    </target>
+
+    <target name="test-verify-targets">
+     </target>
+
+    <target name="test-verify-stages">
+    </target>        
+
+    <target name="test-all" depends="test-buildid-notset, diamonds, test-buildid-set, test-defer-type, test-version,
+        test-create-bom-log,test-codescanner,test-compile-target, test-depend-target,
+        test-ant-call, test-ant-call-multiple, test-ant-call-multiple-parallel, 
+        sequence-config-test-target-1,sequence-config-test-target-2, test-verify-stages, test-verify-targets" />
+</project>
\ No newline at end of file
--- a/buildframework/helium/sf/java/diamonds/tests/scenarii/build/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/diamonds/tests/scenarii/build/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -24,6 +24,7 @@
     <description>Helium Antlib diamonds unittests.</description>
     <property environment="env" />
     <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    <taskdef resource="com/nokia/helium/diamonds/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
     <taskdef name="xpathtest" classname="se.jtech.ant.xpath.XPathEvaluatorTask" onerror="ignore"/>    
     <property name="diamonds.enabled" value="true" />
     <property name="diamonds.unitest.dir" location="${ant.file.test-diamonds}/../../../" />
@@ -31,7 +32,7 @@
     <import file="../../config/diamonds_config_default.ant.xml" />
     <property name="diamonds.output.dir" location="${temp.dir}/output" />
     <property name="diamonds.template.dir" location="${diamonds.unitest.dir}/data/templates" />
-    <property name="build.family" value="test_new_hlm"/>
+    <property name="build.family" value="test_helium_diamonds_unitest_build"/>
     <property name="id" value="123"/>
     <property name="name" value="${build.family}_${id}"/>
     <property name="build.system" value="ec-helium"/>
@@ -88,9 +89,6 @@
         <antcall target="codescanner" />
     </target>
 
-
-
-
     <target name="test-compile-target">
         <antcall target="compile-target" />
     </target>
@@ -112,7 +110,7 @@
              usetimestamp="true" />
         <xpathtest xmlfile="${temp.dir}/test-buildid-set_output.xml">
             <namespace uri="" prefix=""/>
-            <xpath expression="/diamonds-build[schema='23']"/>
+            <xpath expression="/diamonds-build/schema"/>
         </xpathtest>
     </target>
 
@@ -179,6 +177,8 @@
     <target name="sequence-config-test-target-2">
     </target>
 
+    <target name="skipped-target" if="property.not.defined.so.target.is.skipped" />
+        
     <target name="test-verify-targets">
         <get src="http://${diamonds.host}:${diamonds.port}${diamonds.build.id}?fmt=xml"
              dest="${temp.dir}/test-verify-targets.xml" 
@@ -186,8 +186,14 @@
         <xpathtest xmlfile="${temp.dir}/test-verify-targets.xml">
             <namespace uri="" prefix=""/>
             <xpath expression="/diamonds-build/tools/tool[name='SymSEE']"/>
-         </xpathtest>
-     </target>
+        </xpathtest>
+        <au:expectfailure>
+            <xpathtest xmlfile="${temp.dir}/test-verify-targets.xml">
+                <namespace uri="" prefix=""/>
+                <xpath expression="/diamonds-build/tools/tool[name='invalid_target']"/>
+            </xpathtest>
+        </au:expectfailure>
+    </target>
 
     <target name="test-verify-stages">
         <get src="http://${diamonds.host}:${diamonds.port}${diamonds.build.id}?fmt=xml"
@@ -195,19 +201,13 @@
              usetimestamp="true" />
         <xpathtest xmlfile="${temp.dir}/test-verify-stages.xml">
             <namespace uri="" prefix=""/>
-            <xpath expression="/diamonds-build/stages/stage[name='test-echo-operation']"/>
-            <xpath expression="/diamonds-build/stages/stage[name='test-echo-operation1']"/>
-            <xpath expression="/diamonds-build/stages/stage[name='test-echo-operation2']"/>
-            <xpath expression="/diamonds-build/stages/stage[name='test-echo-operation3']"/>
-            <xpath expression="/diamonds-build/stages/stage[name='test-echo-operation4']"/>
-            <xpath expression="/diamonds-build/stages/stage[name='test-echo-operation5']"/>
-            <xpath expression="/diamonds-build/stages/stage[name='stage-sequence-1']"/>
             <xpath expression="/diamonds-build/stages/stage[name='stage-sequence-2']"/>
+            <xpath expression="/diamonds-build/stages/stage[name='stage-sequence-3']"/>
         </xpathtest>
     </target>        
 
     <target name="test-all" depends="test-buildid-notset, diamonds, test-buildid-set, test-defer-type, test-version,
-        test-create-bom-log,test-codescanner,test-compile-target, test-depend-target,
+        test-create-bom-log,test-codescanner,test-compile-target, test-depend-target, skipped-target,
         test-ant-call, test-ant-call-multiple, test-ant-call-multiple-parallel, 
         sequence-config-test-target-1,sequence-config-test-target-2, test-verify-stages, test-verify-targets" />
 </project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/diamonds/tests/scenarii/failing-build/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<!-- 
+============================================================================ 
+Name        : test_diamonds.ant.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test-diamonds" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    <description>Helium Antlib diamonds unittests.</description>
+    <property environment="env" />
+    <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    <taskdef resource="com/nokia/helium/diamonds/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    
+    <property name="diamonds.enabled" value="true" />
+    <property name="diamonds.unitest.dir" location="${ant.file.test-diamonds}/../../../" />
+    <import file="../../../../../../nokia/companyproperties.ant.xml" optional="true"/>
+    <import file="../../config/diamonds_config_default.ant.xml" />
+    <property name="diamonds.output.dir" location="${temp.dir}/output" />
+    <property name="diamonds.template.dir" location="${diamonds.unitest.dir}/data/templates" />
+    <property name="build.family" value="test_helium_diamonds_unitest_failing_build"/>
+    <property name="id" value="123"/>
+    <property name="name" value="${build.family}_${id}"/>
+    <property name="build.system" value="ec-helium"/>
+    <import file="${diamonds.unitest.dir}/config/diamonds_config_default.ant.xml" />
+
+
+    <target name="build" depends="diamonds,backup-diamonds-id,failing-target" />
+    
+    <target name="diamonds" />
+    
+    <target name="backup-diamonds-id">
+        <echoproperties destfile="${temp.dir}/diamonds.ini">
+            <propertyset>
+                <propertyref prefix="diamonds.host"/>
+                <propertyref prefix="diamonds.port"/>
+                <propertyref prefix="diamonds.build.id"/>
+            </propertyset>
+        </echoproperties>
+    </target>
+    
+    <target name="failing-target">
+        <fail message="some error in the build." />
+    </target>
+
+</project>
\ No newline at end of file
--- a/buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-address/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-address/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -24,6 +24,7 @@
     <description>Helium Antlib diamonds unittests.</description>
     <property environment="env" />
     <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    <taskdef resource="com/nokia/helium/diamonds/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
     <property name="diamonds.enabled" value="true" />
     <property name="diamonds.host" value="invalid.server.local" />
     <property name="diamonds.port" value="80" />
--- a/buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-templates-1/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-templates-1/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -24,6 +24,7 @@
     <description>Helium Antlib diamonds unittests.</description>
     <property environment="env" />
     <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    <taskdef resource="com/nokia/helium/diamonds/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
     <property name="diamonds.enabled" value="true" />
     <property name="diamonds.unitest.dir" location="${ant.file.test-diamonds-invalid-template}/../../../" />
     <import file="../../../../../../nokia/companyproperties.ant.xml" optional="true"/>
--- a/buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-templates/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-templates/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -24,6 +24,7 @@
     <description>Helium Antlib diamonds unittests.</description>
     <property environment="env" />
     <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    <taskdef resource="com/nokia/helium/diamonds/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
     <taskdef name="xpathtest" classname="se.jtech.ant.xpath.XPathEvaluatorTask" onerror="ignore"/>    
     <property name="diamonds.enabled" value="true" />
     <property name="diamonds.unitest.dir" location="${ant.file.test-diamonds-invalid-template}/../../../" />
@@ -121,10 +122,12 @@
         <get src="http://${diamonds.host}:${diamonds.port}${diamonds.build.id}?fmt=xml"
              dest="${temp.dir}/test-verify-stages.xml" 
              usetimestamp="true" />
-        <xpathtest xmlfile="${temp.dir}/test-verify-stages.xml">
-            <namespace uri="" prefix=""/>
-            <xpath expression="/diamonds-build/stages/stage[name='invalid-template-sequence']"/>
-        </xpathtest>
+        <au:expectfailure>
+            <xpathtest xmlfile="${temp.dir}/test-verify-stages.xml">
+                <namespace uri="" prefix=""/>
+                <xpath expression="/diamonds-build/stages/stage"/>
+            </xpathtest>
+        </au:expectfailure>
     </target>        
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/diamonds/tests/scenarii/signal-build/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<!-- 
+============================================================================ 
+Name        : test_diamonds.ant.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test-diamonds" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    <description>Helium Antlib diamonds unittests.</description>
+    <property environment="env" />
+    <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    <taskdef resource="com/nokia/helium/signal/ant/antlib.xml" uri="http://www.nokia.com/helium" />
+    <taskdef resource="com/nokia/helium/diamonds/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    
+    <property name="diamonds.enabled" value="true" />
+    <property name="diamonds.unitest.dir" location="${ant.file.test-diamonds}/../../../" />
+    <import file="../../../../../../nokia/companyproperties.ant.xml" optional="true"/>
+    <import file="../../config/diamonds_config_default.ant.xml" />
+    <property name="diamonds.output.dir" location="${temp.dir}/output" />
+    <property name="diamonds.template.dir" location="${diamonds.unitest.dir}/data/templates" />
+    <property name="build.family" value="test_helium_diamonds_unitest_signal_build"/>
+    <property name="id" value="123"/>
+    <property name="name" value="${build.family}_${id}"/>
+    <property name="build.system" value="ec-helium"/>
+    <import file="${diamonds.unitest.dir}/config/diamonds_config_default.ant.xml" />
+
+    <!-- Deferred signal -->
+    <hlm:notifierList id="testDeferredSignalNotifiers">
+        <hlm:executeTaskNotifier>
+            <echo>Signal: ${signal.name}</echo>
+        </hlm:executeTaskNotifier>
+    </hlm:notifierList>
+
+    <hlm:signalInput id="testDeferredSignalInput" failBuild="defer">
+        <hlm:notifierListRef refid="testDeferredSignalNotifiers" />
+    </hlm:signalInput>
+
+    <hlm:signalInput id="testNowSignalInput" failBuild="now">
+        <hlm:notifierListRef refid="testDeferredSignalNotifiers" />
+    </hlm:signalInput>
+
+
+    <target name="build" depends="diamonds,backup-diamonds-id,defer-failing-target,failing-target" />
+    
+    <target name="diamonds" />
+    
+    <target name="backup-diamonds-id">
+        <echoproperties destfile="${temp.dir}/diamonds.ini">
+            <propertyset>
+                <propertyref prefix="diamonds.host"/>
+                <propertyref prefix="diamonds.port"/>
+                <propertyref prefix="diamonds.build.id"/>
+            </propertyset>
+        </echoproperties>
+    </target>
+    
+    <target name="defer-failing-target">
+        <echo message="Executing defer-failing-target." />
+        <hlm:signal name="testDeferredSignalInput" result="1" message="Failure under defer-failing-target." />
+    </target>
+
+    <target name="failing-target">
+        <echo message="Executing failing-target." />
+        <hlm:signal name="testNowSignalInput" result="1" message="Failure under failing-target." />
+    </target>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/diamonds/tests/scenarii/target-recording/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+<!-- 
+============================================================================ 
+Name        : test_diamonds.ant.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test-diamonds" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    <description>Helium Antlib diamonds unittests.</description>
+    <property environment="env" />
+    <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    <taskdef resource="com/nokia/helium/diamonds/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    
+    <property name="diamonds.enabled" value="true" />
+    <property name="diamonds.unitest.dir" location="${ant.file.test-diamonds}/../../../" />
+    <import file="../../../../../../nokia/companyproperties.ant.xml" optional="true"/>
+    <import file="../../config/diamonds_config_default.ant.xml" />
+    <property name="diamonds.output.dir" location="${temp.dir}/output" />
+    <property name="diamonds.template.dir" location="${diamonds.unitest.dir}/data/templates" />
+    <property name="build.family" value="test_helium_diamonds_unitest_target_recording_build"/>
+    <property name="id" value="123"/>
+    <property name="name" value="${build.family}_${id}"/>
+    <property name="build.system" value="ec-helium"/>
+    <import file="${diamonds.unitest.dir}/config/diamonds_config_default.ant.xml" />
+
+
+    <target name="build" depends="diamonds,backup-diamonds-id,target-recording" />
+    
+    <target name="diamonds" />
+    
+    <target name="backup-diamonds-id">
+        <echoproperties destfile="${temp.dir}/diamonds.ini">
+            <propertyset>
+                <propertyref prefix="diamonds.host"/>
+                <propertyref prefix="diamonds.port"/>
+                <propertyref prefix="diamonds.build.id"/>
+            </propertyset>
+        </echoproperties>
+    </target>
+    
+    <target name="target-recording">
+        <parallel>
+            <antcall target="sub-target1" />
+            <antcall target="sub-target2" />
+            <antcall target="sub-target3" />
+        </parallel>
+    </target>
+
+    <target name="sub-target1">
+        <sleep seconds="1"/>
+    </target>
+    
+    <target name="sub-target2">
+        <sleep seconds="2"/>
+    </target>
+
+    <target name="sub-target3">
+        <sleep seconds="2"/>
+    </target>
+
+</project>
\ No newline at end of file
--- a/buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/Environment.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/Environment.java	Wed Oct 13 16:31:27 2010 +0800
@@ -44,7 +44,6 @@
  */
 public class Environment {
     private static final String[] WINDOWS_EXE_EXTENSIONS = { ".exe", ".bat", ".cmd" };
-    private static final String STDERR_OUTPUT = "stderr";
     private static final String[] DEFAULT_EXECUTABLES = { "java", "ant" };
 
     private Project project;
@@ -79,7 +78,6 @@
      * Adds default executables to the list that must have been run because Ant is running.
      */
     private void addDefaultExecutables() {
-
         for (int i = 0; i < DEFAULT_EXECUTABLES.length; i++) {
             Executable exe = new Executable(DEFAULT_EXECUTABLES[i]);
             exe.setExecuted(true);
@@ -188,6 +186,7 @@
                 if (executableFiles != null && executableFiles.length > 0) {
                     executableFile = executableFiles[0];
                     exec.setPath(executableFile.getCanonicalPath());
+                    break;
                 }
             }
         }
@@ -226,46 +225,94 @@
         return pathDirs;
     }
 
-    private boolean findVersion(Executable exec) throws IOException {
-        // Get the executable additional data for this execution
-        ExecutableInfo def = defs.get(exec.getNameNoExt());
-        if (def != null && def.getVersionArgs() != null) {
-            String path = exec.getPath();
-            if (path == null) {
-                path = "";
-            }
-            String[] versionArgs = def.getVersionArgs().split(" ");
-            String[] commands = new String[versionArgs.length + 1];
-            commands[0] = path;
-            for (int i = 0; i < versionArgs.length; i++) {
-                commands[i + 1] = versionArgs[i].trim();
-            }
-            Process commandProcess = Runtime.getRuntime().exec(commands);
+    private class ExecutableVersionReader implements Runnable {
+        private static final int VERSION_TEXT_READ_TIMEOUT = 5000;
+        private static final int CHAR_ARRAY_SIZE = 1000;
+        
+        private String[] commands;
+        private InputStream in;
+        private StringBuilder text = new StringBuilder();
+        private char[] chars = new char[CHAR_ARRAY_SIZE];
+        private IOException exception;
 
-            String output = def.getOutput();
-            StringBuilder text = new StringBuilder();
-            int dataRead = 0;
-            char[] chars = new char[1000];
-            if (output == null || !output.equals(STDERR_OUTPUT)) {
-                InputStream in = commandProcess.getInputStream();
+        ExecutableVersionReader(String[] commands) {
+            this.commands = commands;
+        }
+
+        public void run() {
+            try {
+                int dataRead = 0;
                 InputStreamReader textIn = new InputStreamReader(in);
                 while (dataRead != -1) {
+
                     dataRead = textIn.read(chars, 0, chars.length);
+
                     if (dataRead != -1) {
                         text.append(chars, 0, dataRead);
                     }
                 }
             }
-            InputStream err = commandProcess.getErrorStream();
-            InputStreamReader textErr = new InputStreamReader(err);
-            dataRead = 0;
-            while (dataRead != -1) {
-                dataRead = textErr.read(chars, 0, chars.length);
-                if (dataRead != -1) {
-                    text.append(chars, 0, dataRead);
+            catch (IOException e) {
+                exception = e;
+            }
+            synchronized (this) {
+                notify();
+            }
+        }
+
+        /**
+         * Read output data from both stdout and stderr streams.
+         * 
+         * @return Text data.
+         * @throws IOException
+         * @throws InterruptedException
+         */
+        public String readData() throws IOException {
+            try {
+                Process commandProcess = Runtime.getRuntime().exec(commands);
+                // Try to read from stdout
+                in = commandProcess.getInputStream();
+                new Thread(this).start();
+                synchronized (this) {
+                    wait(VERSION_TEXT_READ_TIMEOUT);
+                }
+
+                // If no data available after timeout, try reading from stderr
+                if (text.length() == 0) {
+                    in = commandProcess.getErrorStream();
+                    new Thread(this).start();
+                    synchronized (this) {
+                        wait(VERSION_TEXT_READ_TIMEOUT);
+                    }
                 }
             }
-            String versionText = text.toString();
+            catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+            if (exception != null) {
+                throw exception;
+            }
+            return text.toString();
+        }
+    }
+
+    private boolean findVersion(Executable exec) throws IOException {
+        // Get the executable additional data for this execution
+        ExecutableInfo def = defs.get(exec.getNameNoExt());
+        if (def != null && def.getVersionArgs() != null) {
+            String exePath = exec.getPath();
+            if (exePath == null) {
+                exePath = "";
+            }
+            String[] versionArgs = def.getVersionArgs().split(" ");
+            String[] commands = new String[versionArgs.length + 1];
+            commands[0] = exePath;
+            for (int i = 0; i < versionArgs.length; i++) {
+                commands[i + 1] = versionArgs[i].trim();
+            }
+
+            ExecutableVersionReader reader = new ExecutableVersionReader(commands);
+            String versionText = reader.readData();
             if (def.getVersionRegex() != null) {
                 Pattern versionPattern = Pattern.compile(def.getVersionRegex());
                 Matcher versionMatch = versionPattern.matcher(versionText);
@@ -291,7 +338,7 @@
         exec.setLastModified(file.lastModified());
         exec.setLength(file.length());
     }
-    
+
     /**
      * Calculate a hash value for the executable file.
      * 
--- a/buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/ant/listener/ExecListener.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/ant/listener/ExecListener.java	Wed Oct 13 16:31:27 2010 +0800
@@ -31,6 +31,7 @@
 import org.apache.tools.ant.RuntimeConfigurable;
 import org.apache.tools.ant.Task;
 import org.apache.tools.ant.UnknownElement;
+import org.apache.tools.ant.taskdefs.condition.Os;
 
 /**
  * Checks for uses of the <exec> task and logs them to a CSV file.
@@ -102,6 +103,10 @@
                 Project project = event.getProject();
                 executable = project.replaceProperties(executable);
                 logger.debug("ExecListener: executable is run: " + executable);
+                String osFamily = (String) map.get("osfamily");
+                if (osFamily != null && !Os.isOs(osFamily, null, null, null)) {
+                    return;
+                }    
                 execCalls.add(executable);
             }
         }
--- a/buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/ant/taskdefs/EnvironmentTask.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/ant/taskdefs/EnvironmentTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -75,6 +75,7 @@
         try {
             if (outputFile != null) {
                 out = new FileOutputStream(outputFile);
+                project.log("Writing output to " + outputFile.toString(), Project.MSG_INFO);
             }
             List<ExecutableInfo> executableDefs = new ArrayList<ExecutableInfo>();
             for (Iterator<EnvData> iterator = envDataList.iterator(); iterator.hasNext();) {
@@ -85,6 +86,7 @@
             Environment environment = new Environment(project);
             environment.setExecutableDefs(executableDefs);
             environment.scan(ExecListener.getExecCalls());
+            
             EnvironmentXMLWriter writer = new EnvironmentXMLWriter(out);
             writer.write(environment);
         }
--- a/buildframework/helium/sf/java/environment/tests/antunit/listener/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/environment/tests/antunit/listener/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -46,6 +46,7 @@
                 <hlm:executable name="ant" versionArgs="-version" versionRegex="Apache Ant version (\S+)"/>
                 <hlm:executable name="perl" versionArgs="-v" versionRegex="This is perl, v(\S+)"/>
                 <hlm:executable name="python" versionArgs="--version" versionRegex="Python (\S+)"/>
+                <hlm:executable name="armcc" versionArgs="" versionRegex="RVCT(.+)"/>
             </hlm:envdata>
         </hlm:environment>
     </target>
--- a/buildframework/helium/sf/java/environment/tests/antunit/test_listener.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/environment/tests/antunit/test_listener.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- 
 ============================================================================ 
-Name        : test_signaltask.ant.xml 
+Name        : test_listener.ant.xml 
 Part of     : Helium AntLib
 
 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
--- a/buildframework/helium/sf/java/imaker/imaker.rst	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/imaker/imaker.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -23,16 +23,16 @@
 .. csv-table:: Attributes to modify
    :header: "Attribute", "Description", "Values"
 
-   ":hlm-p:`regionalVariation`", "Enable regional variation switching. - Deprecated (always false)", "false"
+   "``regionalVariation``", "Enable regional variation switching. - Deprecated (always false)", "false"
 
 The imakerconfiguration supports three sub-types:
 
 .. csv-table:: Attributes to modify
    :header: "Sub-type", "Description"
 
-   ":hlm-p:`makefileset`", "Defines the list of iMaker configuration to run image creation on."
-   ":hlm-p:`targetset`", "List of regular expression used to match which target need to be executed."
-   ":hlm-p:`variableset`", "List of variable to set when executing iMaker."
+   "``makefileset``", "Defines the list of iMaker configuration to run image creation on."
+   "``targetset``", "List of regular expression used to match which target need to be executed."
+   "``variableset``", "List of variable to set when executing iMaker."
 
 
 Example of configuration:
--- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/BuildStatusDef.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,420 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *
- */
-
-package com.nokia.ant;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Target;
-import org.apache.tools.ant.types.DataType;
-import org.dom4j.Comment;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.Node;
-import org.dom4j.Visitor;
-import org.dom4j.VisitorSupport;
-import org.dom4j.io.SAXReader;
-
-import com.nokia.helium.ant.data.PropertyCommentMeta;
-import com.nokia.helium.ant.data.PropertyMeta;
-import com.nokia.helium.core.ant.PostBuildAction;
-
-/**
- * Class to store the status of the signal of a particular target.
- */
-public class BuildStatusDef extends DataType implements PostBuildAction {
-    private static final String DEPRECATED = "deprecated:";
-    private HashSet<String> output = new HashSet<String>();
-
-    @Override
-    public void executeOnPostBuild(Project project, String[] targetNames) {
-        // Run after targets execute so dynamic target names are resolved
-        for (int i = 0; i < targetNames.length; i++) {
-            String[] array = { targetNames[i] };
-            Target target = findTarget(targetNames[i], getProject(), array);
-            targetCallsHeliumTarget(target, getProject());
-        }
-        checkTargetsProperties(getProject());
-        checkDeprecatedProperties(getProject());
-
-        if (!output.isEmpty()) {
-            log("*** Configuration report ***", Project.MSG_INFO);
-            for (String outputStr : output) {
-                log(outputStr, Project.MSG_INFO);
-            }
-        }
-    }
-
-    /**
-     * @param desiredTarget
-     *            Target name to search
-     * @param project
-     *            Object of the project
-     * @param targetNames
-     *            Array of target names
-     * 
-     */
-    @SuppressWarnings("unchecked")
-    public Target findTarget(String desiredTarget, Project project,
-            String[] targetNames) {
-        Hashtable<String, Target> targets;
-        Vector<Target> sorted;
-
-        // get all targets of the current project
-        targets = project.getTargets();
-
-        // sort all targets of the current project
-        sorted = project.topoSort(targetNames[0], targets);
-
-        // Find the desiredTarget Target object
-        for (Target target : sorted) {
-            if (target.getName().equals(desiredTarget)) {
-                return target;
-            }
-        }
-        throw new BuildException("Could not find target matching "
-                + desiredTarget + "\n");
-    }
-
-    /**
-     * If a target defined outside helium are calling a private Helium target
-     * then print warning
-     * 
-     */
-    @SuppressWarnings("unchecked")
-    public void targetCallsHeliumTarget(Target target, Project project) {
-        String location = target.getLocation().getFileName();
-
-        try {
-            String heliumpath = new File(project.getProperty("helium.dir"))
-                    .getCanonicalPath();
-            String targetpath = new File(location).getCanonicalPath();
-
-            if (!targetpath.contains(heliumpath)) {
-                ArrayList<String> antcallTargets = new ArrayList<String>();
-                Visitor visitorTarget = new AntTargetVisitor(antcallTargets,
-                        project);
-
-                Element element = findTargetElement(target, project);
-                if (element != null) {
-                    element.accept(visitorTarget);
-                }
-                for (String depTargetString : antcallTargets) {
-                    String[] array = { depTargetString };
-                    try {
-                        Target depTarget = findTarget(depTargetString, project,
-                                array);
-                        targetCallsHeliumTarget(depTarget, project);
-                    } catch (BuildException x) {
-                        // We are Ignoring the errors as no need to fail the
-                        // build.
-                        log(
-                                "Exception occured while target defined outside helium are calling a private Helium target "
-                                        + x.toString(), Project.MSG_DEBUG);
-                        x = null;
-                    }
-                }
-
-                for (Enumeration<String> depsEnum = target.getDependencies(); depsEnum
-                        .hasMoreElements();) {
-                    String depTargetString = depsEnum.nextElement();
-                    String[] array = { depTargetString };
-                    try {
-                        Target depTarget = findTarget(depTargetString, project,
-                                array);
-                        targetCallsHeliumTarget(depTarget, project);
-                    } catch (BuildException x) {
-                        // We are Ignoring the errors as no need to fail the
-                        // build.
-                        log(
-                                "Exception occured while target defined outside helium are calling a private Helium target "
-                                        + x.toString(), Project.MSG_DEBUG);
-                        x = null;
-                    }
-                }
-            } else {
-                checkIfTargetPrivate(target, project);
-            }
-
-        } catch (IOException e) {
-            // We are Ignoring the errors as no need to fail the build.
-            log(
-                    "IOException occured while target defined outside helium are calling a private Helium target "
-                            + e.getMessage(), Project.MSG_DEBUG);
-            e.printStackTrace();
-        }
-    }
-
-    private class AntTargetVisitor extends VisitorSupport {
-        private List<String> targetList;
-        private Project project;
-
-        public AntTargetVisitor(List<String> targetList, Project project) {
-            this.targetList = targetList;
-            this.project = project;
-        }
-
-        public void visit(Element node) {
-            String name = node.getName();
-            if (name.equals("antcall") || name.equals("runtarget")) {
-                String text = node.attributeValue("target");
-                extractTarget(text);
-            }
-        }
-
-        private void extractTarget(String text) {
-            String iText = project.replaceProperties(text);
-            targetList.add(iText);
-        }
-
-    }
-
-    /**
-     * Find the xml Element for the target
-     * 
-     */
-    @SuppressWarnings("unchecked")
-    public Element findTargetElement(Target target, Project project) {
-        SAXReader xmlReader = new SAXReader();
-
-        Document antDoc = null;
-
-        String location = target.getLocation().getFileName();
-
-        try {
-            File file = new File(location);
-            antDoc = xmlReader.read(file);
-        } catch (DocumentException e) {
-            // We are Ignoring the errors as no need to fail the build.
-            log("Not able read the XML file. " + e.getMessage(),
-                    Project.MSG_WARN);
-        }
-
-        String projectName = antDoc.valueOf("/project/@name");
-        for (Iterator<Element> iterator = antDoc.selectNodes("//target")
-                .iterator(); iterator.hasNext();) {
-            Element element = iterator.next();
-
-            String targetName = element.attributeValue("name");
-            if (targetName.equals(target.getName())
-                    || (projectName + "." + targetName)
-                            .equals(target.getName())) {
-                return element;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * If target has comment that says it is private them print warning
-     * 
-     */
-    @SuppressWarnings("unchecked")
-    public void checkIfTargetPrivate(Target target, Project project) {
-        Element targetElement = findTargetElement(target, project);
-        if (targetElement != null) {
-            List<Node> children = targetElement
-                    .selectNodes("preceding-sibling::node()");
-            if (children.size() > 0) {
-                // Scan past the text nodes, which are most likely whitespace
-                int index = children.size() - 1;
-                Node child = children.get(index);
-                while (index > 0 && child.getNodeType() == Node.TEXT_NODE) {
-                    index--;
-                    child = (Node) children.get(index);
-                }
-
-                // Check if there is a comment node
-                String commentText = null;
-                if (child.getNodeType() == Node.COMMENT_NODE) {
-                    Comment macroComment = (Comment) child;
-                    commentText = macroComment.getStringValue().trim();
-                    // log(macroName + " comment: " + commentText,
-                    // Project.MSG_DEBUG);
-                }
-
-                if (commentText != null) {
-                    if (commentText.contains("Private:")) {
-                        output
-                                .add("Warning: "
-                                        + target.getName()
-                                        + " is private and should only be called by helium");
-                    }
-                    if (commentText.contains("<deprecated>")) {
-                        output.add("Warning: " + target.getName() + "\n"
-                                + commentText);
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * To check, is the private properties are overridden by customers.
-     * 
-     * @param project
-     */
-    public void checkTargetsProperties(Project project) {
-        try {
-            String heliumpath = new File(project.getProperty("helium.dir"))
-                    .getCanonicalPath();
-            com.nokia.helium.ant.data.Database db = new com.nokia.helium.ant.data.Database(
-                    project, "private");
-            ArrayList<String> customerProps = getCustomerProperties(project);
-
-            for (PropertyMeta propertyMeta : db.getProperties()) {
-                if (propertyMeta.getType().equals("boolean"))
-                {
-                    String value = project.getProperty(propertyMeta.getName());
-                    if (value != null && !value.equals("true") && !value.equals("false"))
-                    {
-                        output.add("Warning: " + propertyMeta.getName() + " property is boolean type and not set to true or false, value is " + value);
-                    }
-                }
-            }
-            for (PropertyCommentMeta propertyMeta : db.getCommentProperties()) {
-                if (propertyMeta.getType().equals("boolean"))
-                {
-                    String value = project.getProperty(propertyMeta.getName());
-                    if (value != null && !value.equals("true") && !value.equals("false"))
-                    {
-                        output.add("Warning: " + propertyMeta.getName() + " property is boolean type and not set to true or false, value is " + value);
-                    }
-                }
-            }
-            for (PropertyMeta propertyMeta : db.getProperties()) {
-                if (propertyMeta.getLocation().contains(heliumpath)
-                        && propertyMeta.getScope().equals("private")
-                        && customerProps.contains(propertyMeta.getName())) {
-                    output.add("Warning: " + propertyMeta.getName()
-                            + " property has been overridden");
-                }
-            }
-
-            for (PropertyCommentMeta propertyCommentMeta : db.getCommentProperties()) {
-                if (propertyCommentMeta.getLocation().contains(heliumpath)
-                        && propertyCommentMeta.getScope().equals("private")
-                        && customerProps
-                                .contains(propertyCommentMeta.getName())) {
-                    output.add("Warning: " + propertyCommentMeta.getName()
-                            + " property has been overridden");
-                }
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-    /**
-     * To display the warnings for deprecated properties.
-     * 
-     * @param project
-     */
-    public void checkDeprecatedProperties(Project project) {
-        try {
-            String heliumpath = new File(project.getProperty("helium.dir"))
-                    .getCanonicalPath();
-            com.nokia.helium.ant.data.Database db = new com.nokia.helium.ant.data.Database(
-                    project, "private");
-            ArrayList<String> customerProps = getCustomerProperties(project);
-
-            for (PropertyMeta propertyMeta : db.getProperties()) {
-                if (propertyMeta.getLocation().contains(heliumpath)
-                        && (!propertyMeta.getDeprecated().equals(""))
-                        && customerProps.contains(propertyMeta.getName())) {
-                    output.add("Warning: "
-                            + propertyMeta.getName()
-                            + " property has been deprecated "
-                            + propertyMeta.getDeprecated()
-                            + "."
-                            + propertyMeta.getSummary().substring(
-                                    propertyMeta.getSummary().lastIndexOf(
-                                            DEPRECATED)
-                                            + DEPRECATED.length()));
-                }
-            }
-
-            for (PropertyCommentMeta propertyCommentMeta : db
-                    .getCommentProperties()) {
-                if (propertyCommentMeta.getLocation().contains(heliumpath)
-                        && (!propertyCommentMeta.getDeprecated().equals(""))
-                        && customerProps
-                                .contains(propertyCommentMeta.getName())) {
-                    output.add("Warning: "
-                            + propertyCommentMeta.getName()
-                            + " property has been deprecated "
-                            + propertyCommentMeta.getDeprecated()
-                            + "."
-                            + propertyCommentMeta.getSummary().substring(
-                                    propertyCommentMeta.getSummary()
-                                            .lastIndexOf(DEPRECATED)
-                                            + DEPRECATED.length()));
-                }
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    public ArrayList<String> getCustomerProperties(Project project) {
-        ArrayList<String> props = new ArrayList<String>();
-        Database db = new Database(null, null, null);
-        try {
-            String heliumpath = new File(project.getProperty("helium.dir"))
-                    .getCanonicalPath();
-
-            for (Object object : db.getAntFiles(project)) {
-                String antFile = (String) object;
-                antFile = new File(antFile).getCanonicalPath();
-
-                if (!antFile.contains(heliumpath)) {
-                    SAXReader xmlReader = new SAXReader();
-                    Document antDoc = xmlReader.read(new File(antFile));
-
-                    List<Element> propertyNodes = antDoc
-                            .selectNodes("//property | //param");
-                    for (Element propertyNode : propertyNodes) {
-                        props.add(propertyNode.attributeValue("name"));
-                    }
-                }
-            }
-        } catch (IOException e) {
-            // We are Ignoring the errors as no need to fail the build.
-            log("IOException: Not able read the Customer Properties "
-                    + e.getMessage(), Project.MSG_WARN);
-        } catch (DocumentException e) {
-            // We are Ignoring the errors as no need to fail the build.
-            log("DocumentException: Not able read the Customer Properties "
-                    + e.getMessage(), Project.MSG_WARN);
-        }
-
-        return props;
-    }
-
-}
\ No newline at end of file
--- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/Database.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,859 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *
- */
-
-package com.nokia.ant;
-
-import info.bliki.wiki.model.WikiModel;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Target;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.Reference;
-import org.apache.tools.ant.types.ResourceCollection;
-import org.apache.tools.ant.types.resources.FileResource;
-import org.dom4j.Attribute;
-import org.dom4j.CDATA;
-import org.dom4j.Comment;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.DocumentHelper;
-import org.dom4j.Element;
-import org.dom4j.Node;
-import org.dom4j.Text;
-import org.dom4j.Visitor;
-import org.dom4j.VisitorSupport;
-import org.dom4j.XPath;
-import org.dom4j.io.OutputFormat;
-import org.dom4j.io.SAXReader;
-import org.dom4j.io.XMLWriter;
-
-/**
- * Reads the current ant project and a fileset and generates a xml file with a summary of targets,
- * macros and properties.
- */
-public class Database {
-    private Project project;
-    private ResourceCollection rc;
-    private Task task;
-    private boolean debug;
-    private boolean homeFilesOnly = true;
-    private HashMap<String, List<String>> globalSignalList = new HashMap<String, List<String>>();
-    private HashMap<String, String> map = new HashMap<String, String>();
-    private Document signaldoc;
-
-    public Database(Project project, ResourceCollection rc, Task task) {
-        this.project = project;
-        this.rc = rc;
-        this.task = task;
-        map.put("hlm", "http://www.nokia.com/helium");
-    }
-
-    public Project getProject() {
-        return project;
-    }
-
-    public void setDebug(boolean debug) {
-        this.debug = debug;
-    }
-
-    public void setHomeFilesOnly(boolean homeFilesOnly) {
-        this.homeFilesOnly = homeFilesOnly;
-    }
-
-    public void log(String msg, int level) {
-        if (task != null) {
-            task.log(msg, level);
-        }
-        else if (debug) {
-            project.log(msg, level);
-        }
-    }
-
-    public void setRefid(Reference r) {
-        Object object = r.getReferencedObject();
-        if (!(object instanceof ResourceCollection)) {
-            throw new BuildException(r.getRefId() + " doesn\'t denote a ResourceCollection");
-        }
-        rc = (ResourceCollection) object;
-    }
-
-    public Document createDOM() throws DocumentException, IOException {
-        // log("Building Ant project database", Project.MSG_DEBUG);
-        Element root = DocumentHelper.createElement("antDatabase");
-        Document outDoc = DocumentHelper.createDocument(root);
-        ArrayList<String> antFiles = getAntFiles(getProject(), homeFilesOnly);
-        for (String antFile : antFiles) {
-            readSignals(antFile);
-        }
-        for (String antFile : antFiles) {
-            parseAntFile(root, antFile);
-        }
-
-        buildTaskDefs(root);
-
-        return outDoc;
-    }
-
-    public void createXMLFile(File outputFile) {
-        try {
-            Document outDoc = createDOM();
-            OutputStream outStream = System.out;
-            if (outputFile != null) {
-                outStream = new FileOutputStream(outputFile);
-            }
-            XMLWriter out = new XMLWriter(outStream, OutputFormat.createPrettyPrint());
-            out.write(outDoc);
-        }
-        catch (DocumentException e) {
-            throw new BuildException(e.getMessage());
-        }
-        catch (IOException e) {
-            throw new BuildException(e.getMessage());
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    private void readSignals(String antFile) throws DocumentException, IOException {
-        SAXReader xmlReader = new SAXReader();
-        Document antDoc = xmlReader.read(new File(antFile));
-
-        XPath xpath = DocumentHelper.createXPath("//hlm:signalListenerConfig");
-        xpath.setNamespaceURIs(map);
-        List<Element> signalNodes = xpath.selectNodes(antDoc);
-        for (Element propertyNode : signalNodes) {
-            signaldoc = antDoc;
-            String signalid = propertyNode.attributeValue("id");
-
-            String signaltarget = propertyNode.attributeValue("target");
-            List<String> existinglist = globalSignalList.get(signaltarget);
-            String failbuild = signalType(signalid, signaldoc);
-            if (existinglist == null) {
-                existinglist = new ArrayList<String>();
-            }
-            existinglist.add(signalid + "," + failbuild);
-            globalSignalList.put(signaltarget, existinglist);
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    private String signalType(String signalid, Document antDoc) {
-        XPath xpath2 = DocumentHelper.createXPath("//hlm:signalListenerConfig[@id='" + signalid
-            + "']/signalNotifierInput/signalInput");
-        xpath2.setNamespaceURIs(map);
-        List<Element> signalNodes3 = xpath2.selectNodes(antDoc);
-
-        for (Element propertyNode3 : signalNodes3) {
-            String signalinputid = propertyNode3.attributeValue("refid");
-
-            XPath xpath3 = DocumentHelper.createXPath("//hlm:signalInput[@id='" + signalinputid
-                + "']");
-            xpath3.setNamespaceURIs(map);
-            List<Element> signalNodes4 = xpath3.selectNodes(antDoc);
-            for (Element propertyNode4 : signalNodes4) {
-                return propertyNode4.attributeValue("failbuild");
-            }
-        }
-        return null;
-    }
-
-    /**
-     * @param root
-     * @param antFile
-     * @throws DocumentException
-     * @throws IOException
-     */
-    @SuppressWarnings("unchecked")
-    private void parseAntFile(Element root, String antFile) throws DocumentException, IOException {
-        log("Processing Ant file: " + antFile, Project.MSG_DEBUG);
-        SAXReader xmlReader = new SAXReader();
-        Document antDoc = xmlReader.read(new File(antFile));
-
-        // Element targetElement =
-        // DocumentHelper.createElement("target");
-        Element projectElement = root.addElement("project");
-        Element nameElement = projectElement.addElement("name");
-        String projectName = antDoc.valueOf("/project/@name");
-
-        nameElement.setText(projectName);
-        // Element descriptionElement =
-        // projectElement.addElement("description");
-
-        String description = antDoc.valueOf("/project/description");
-        insertDocumentation(projectElement, description);
-
-        // descriptionElement.setText(description);
-
-        if (!antFile.contains("antlib.xml") && description.equals("")) {
-            log("Project has no comment: " + projectName, Project.MSG_WARN);
-        }
-
-        Element defaultElement = projectElement.addElement("default");
-        defaultElement.setText(antDoc.valueOf("/project/@default"));
-
-        // Project import statements
-        List importNodes = antDoc.selectNodes("//import");
-        for (Iterator iterator = importNodes.iterator(); iterator.hasNext();) {
-            Element importCurrentNode = (Element) iterator.next();
-            addTextElement(projectElement, "fileDependency", importCurrentNode.attributeValue("file"));
-        }
-
-        projectElement.addElement("pythonDependency");
-
-        // Project exec statements
-        List<Element> execNodes = antDoc.selectNodes("//exec//arg");
-        for (Element argNode : execNodes) {
-            String argValue = argNode.attributeValue("value");
-
-            if (argValue == null) {
-                argValue = argNode.attributeValue("line");
-            }
-
-            if (argValue != null) {
-                Pattern filePattern = Pattern.compile(".pl|.py|.bat|.xml|.txt");
-                Matcher fileMatcher = filePattern.matcher(argValue);
-                if (fileMatcher.find()) {
-                    addTextElement(projectElement, "fileDependency", argValue);
-                }
-            }
-        }
-
-        List<Element> targetNodes = antDoc.selectNodes("//target");
-        for (Element targetNode : targetNodes) {
-            processTarget(targetNode, projectElement);
-        }
-
-        // Process macrodef and scriptdef tasks
-        // TODO - maybe scriptdefs should be separate?
-        List macroNodes = antDoc.selectNodes("//macrodef | //scriptdef");
-        for (Iterator iterator = macroNodes.iterator(); iterator.hasNext();) {
-            Element macroNode = (Element) iterator.next();
-            processMacro(macroNode, projectElement, antFile);
-        }
-
-        // Project properties
-        List propertyNodes = antDoc.selectNodes("//property");
-        for (Iterator iterator = propertyNodes.iterator(); iterator.hasNext();) {
-            Element propertyNode = (Element) iterator.next();
-            processProperty(propertyNode, projectElement);
-        }
-    }
-
-    public ArrayList<String> getAntFiles() {
-        return getAntFiles(getProject(), true);
-    }
-
-    public ArrayList<String> getAntFiles(Project project) {
-        return getAntFiles(project, true);
-    }
-
-    /**
-     * Get the list of all Ant files we want to process. These can be project and antlib files.
-     * 
-     * @return antFiles a list of ant files to be processed
-     */
-    @SuppressWarnings("unchecked")
-    public ArrayList<String> getAntFiles(Project project, boolean homeOnly) {
-        ArrayList<String> antFiles = new ArrayList<String>();
-
-        Map<String, Target> targets = project.getTargets();
-        Iterator<Target> targetsIter = targets.values().iterator();
-
-        String projectHome = null;
-        try {
-            projectHome = new File(project.getProperty("helium.dir")).getCanonicalPath();
-
-            while (targetsIter.hasNext()) {
-                Target target = targetsIter.next();
-                String projectPath = new File(target.getLocation().getFileName()).getCanonicalPath();
-
-                if (!antFiles.contains(projectPath)) {
-                    if (homeOnly) {
-                        if (!projectPath.contains(projectHome)) {
-                            antFiles.add(projectPath);
-                        }
-                    } else {
-                        antFiles.add(projectPath);
-                    }
-                }
-            }
-
-            if (rc != null) {
-                Iterator extraFilesIter = rc.iterator();
-                while (extraFilesIter.hasNext()) {
-                    FileResource fileResource = (FileResource) extraFilesIter.next();
-                    String extrafile = fileResource.getFile().getCanonicalPath();
-
-                    if (!antFiles.contains(fileResource.toString())
-                        && !fileResource.getFile().getName().startsWith("test_")) {
-                        if (homeOnly) {
-                            if (!extrafile.contains(projectHome)) {
-                                antFiles.add(extrafile);
-                            }
-                        }
-                        else {
-                            antFiles.add(extrafile);
-                        }
-                    }
-                }
-            }
-
-        }
-        catch (IOException e) {
-            log(e.getMessage(), Project.MSG_ERR);
-            e.printStackTrace();
-        }
-        return antFiles;
-    }
-
-    // --------------------------------- PRIVATE METHODS ------------------------------------------
-
-    @SuppressWarnings("unchecked")
-    private void processMacro(Element macroNode, Element outProjectNode, String antFile)
-        throws IOException, DocumentException {
-        String macroName = macroNode.attributeValue("name");
-        log("Processing macro: " + macroName, Project.MSG_DEBUG);
-
-        Element outmacroNode = outProjectNode.addElement("macro");
-        addTextElement(outmacroNode, "name", macroNode.attributeValue("name"));
-        addTextElement(outmacroNode, "description", macroNode.attributeValue("description"));
-
-        // Add location
-        // Project project = getProject();
-        // Macro antmacro = (Macro) project.getTargets().get(macroName);
-        // System.out.println(project.getMacroDefinitions());
-        // System.out.println(macroName);
-        // MacroInstance antmacro = (MacroInstance)
-        // project.getMacroDefinitions().get("http://www.nokia.com/helium:" +
-        // macroName);
-
-        // Add the location with just the file path for now and a dummy line
-        // number.
-        // TODO - Later we should find the line number from the XML input.
-        addTextElement(outmacroNode, "location", antFile + ":1:");
-
-        List<Node> statements = macroNode.selectNodes("//scriptdef[@name='" + macroName
-            + "']/attribute | //macrodef[@name='" + macroName + "']/attribute");
-        String usage = "";
-        for (Node statement : statements) {
-            String defaultval = statement.valueOf("@default");
-            if (defaultval.equals("")) {
-                defaultval = "value";
-            } else {
-                defaultval = "<i>" + defaultval + "</i>";
-            }
-            usage = usage + " " + statement.valueOf("@name") + "=\"" + defaultval + "\"";
-        }
-
-        String macroElements = "";
-        statements = macroNode.selectNodes("//scriptdef[@name='" + macroName
-            + "']/element | //macrodef[@name='" + macroName + "']/element");
-        for (Node statement : statements) {
-            macroElements = "&lt;" + statement.valueOf("@name") + "/&gt;\n" + macroElements;
-        }
-        if (macroElements.equals("")) {
-            addTextElement(outmacroNode, "usage", "&lt;hlm:" + macroName + " " + usage + "/&gt;");
-        } else {
-            addTextElement(outmacroNode, "usage", "&lt;hlm:" + macroName + " " + usage + "&gt;\n"
-                + macroElements + "&lt;/hlm:" + macroName + "&gt;");
-        }
-
-        // Add dependencies
-        // Enumeration dependencies = antmacro.getDependencies();
-        // while (dependencies.hasMoreElements())
-        // {
-        // String dependency = (String) dependencies.nextElement();
-        // Element dependencyElement = addTextElement(outmacroNode,
-        // "dependency", dependency);
-        // dependencyElement.addAttribute("type","direct");
-        // }
-
-        callAntTargetVisitor(macroNode, outmacroNode);
-
-        // Add documentation
-        // Get comment element before the macro element to extract macro doc
-        List<Node> children = macroNode.selectNodes("preceding-sibling::node()");
-        if (children.size() > 0) {
-            // Scan past the text nodes, which are most likely whitespace
-            int index = children.size() - 1;
-            Node child = (Node) children.get(index);
-            while (index > 0 && child.getNodeType() == Node.TEXT_NODE) {
-                index--;
-                child = (Node) children.get(index);
-            }
-
-            // Check if there is a comment node
-            String commentText = null;
-            if (child.getNodeType() == Node.COMMENT_NODE) {
-                Comment macroComment = (Comment) child;
-                commentText = macroComment.getStringValue().trim();
-                log(macroName + " comment: " + commentText, Project.MSG_DEBUG);
-            }
-            else {
-                log("Macro has no comment: " + macroName, Project.MSG_WARN);
-            }
-
-            insertDocumentation(outmacroNode, commentText);
-        }
-
-        // Get names of all properties used in this macro
-        ArrayList properties = new ArrayList();
-        Visitor visitor = new AntPropertyVisitor(properties);
-        macroNode.accept(visitor);
-        for (Iterator iterator = properties.iterator(); iterator.hasNext();) {
-            String property = (String) iterator.next();
-            addTextElement(outmacroNode, "propertyDependency", property);
-        }
-    }
-
-    private void callAntTargetVisitor(Element targetNode, Element outTargetNode) {
-        // Add antcall/runtarget dependencies
-        ArrayList<String> antcallTargets = new ArrayList<String>();
-        ArrayList<String> logs = new ArrayList<String>();
-        ArrayList<String> signals = new ArrayList<String>();
-        ArrayList<String> executables = new ArrayList<String>();
-        Visitor visitorTarget = new AntTargetVisitor(antcallTargets, logs, signals, executables);
-        targetNode.accept(visitorTarget);
-        for (String antcallTarget : antcallTargets) {
-            Element dependencyElement = addTextElement(outTargetNode, "dependency", antcallTarget);
-            dependencyElement.addAttribute("type", "exec");
-        }
-
-        for (String log : logs) {
-            addTextElement(outTargetNode, "log", log);
-        }
-
-        if (globalSignalList.get(targetNode.attributeValue("name")) != null) {
-            signals.addAll(globalSignalList.get(targetNode.attributeValue("name")));
-        }
-
-        for (String signal : signals) {
-            addTextElement(outTargetNode, "signal", signal);
-        }
-
-        for (String executable : executables) {
-            addTextElement(outTargetNode, "executable", executable);
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    private void processTarget(Element targetNode, Element outProjectNode) throws IOException,
-        DocumentException {
-        String targetName = targetNode.attributeValue("name");
-        log("Processing target: " + targetName, Project.MSG_DEBUG);
-
-        // Add documentation
-        // Get comment element before the target element to extract target doc
-        String commentText = "";
-        List<Node> children = targetNode.selectNodes("preceding-sibling::node()");
-        if (children.size() > 0) {
-            // Scan past the text nodes, which are most likely whitespace
-            int index = children.size() - 1;
-            Node child = children.get(index);
-            while (index > 0 && child.getNodeType() == Node.TEXT_NODE) {
-                index--;
-                child = (Node) children.get(index);
-            }
-
-            // Check if there is a comment node
-            if (child.getNodeType() == Node.COMMENT_NODE) {
-                Comment targetComment = (Comment) child;
-                commentText = targetComment.getStringValue().trim();
-
-                log(targetName + " comment: " + commentText, Project.MSG_DEBUG);
-            }
-            else {
-                log("Target has no comment: " + targetName, Project.MSG_WARN);
-            }
-        }
-
-        if (!commentText.contains("Private:")) {
-            Element outTargetNode = outProjectNode.addElement("target");
-
-            addTextElement(outTargetNode, "name", targetNode.attributeValue("name"));
-            addTextElement(outTargetNode, "ifDependency", targetNode.attributeValue("if"));
-            addTextElement(outTargetNode, "unlessDependency", targetNode.attributeValue("unless"));
-            addTextElement(outTargetNode, "description", targetNode.attributeValue("description"));
-            addTextElement(outTargetNode, "tasks", String.valueOf(targetNode.elements().size()));
-
-            // Add location
-            Project project = getProject();
-            Target antTarget = (Target) project.getTargets().get(targetName);
-
-            if (antTarget == null) {
-                return;
-            }
-
-            addTextElement(outTargetNode, "location", antTarget.getLocation().toString());
-
-            // Add dependencies
-            Enumeration dependencies = antTarget.getDependencies();
-            while (dependencies.hasMoreElements()) {
-                String dependency = (String) dependencies.nextElement();
-                Element dependencyElement = addTextElement(outTargetNode, "dependency", dependency);
-                dependencyElement.addAttribute("type", "direct");
-            }
-
-            callAntTargetVisitor(targetNode, outTargetNode);
-
-            // Process the comment text as MediaWiki syntax and convert to HTML
-            insertDocumentation(outTargetNode, commentText);
-
-            // Get names of all properties used in this target
-            ArrayList properties = new ArrayList();
-            Visitor visitor = new AntPropertyVisitor(properties);
-            targetNode.accept(visitor);
-            for (Iterator iterator = properties.iterator(); iterator.hasNext();) {
-                String property = (String) iterator.next();
-                addTextElement(outTargetNode, "propertyDependency", property);
-            }
-
-            // Add the raw XML content of the element
-            String targetXml = targetNode.asXML();
-            // Replace the CDATA end notation to avoid nested CDATA sections
-            targetXml = targetXml.replace("]]>", "] ]>");
-
-            addTextElement(outTargetNode, "source", targetXml, true);
-        }
-    }
-
-    private void processProperty(Element propertyNode, Element outProjectNode) throws IOException {
-        String propertyName = propertyNode.attributeValue("name");
-        log("Processing Property: " + propertyName, Project.MSG_DEBUG);
-
-        Element outPropertyNode = outProjectNode.addElement("property");
-        addTextElement(outPropertyNode, "name", propertyNode.attributeValue("name"));
-        if (propertyNode.attributeValue("value") == null) {
-            addTextElement(outPropertyNode, "defaultValue", propertyNode.attributeValue("location"));
-        }
-        else {
-            addTextElement(outPropertyNode, "defaultValue", propertyNode.attributeValue("value"));
-        }
-    }
-
-    private void insertDocumentation(Element outNode, String commentText) throws IOException,
-        DocumentException {
-        if (commentText != null) {
-            WikiModel wikiModel = new WikiModel("", "");
-            if (!commentText.contains("</pre>")
-                && (commentText.contains("**") || commentText.contains("==") || commentText.contains("- -"))) {
-                commentText = commentText.replace("**", "").replace("==", "").replace("- -", "").trim();
-                log("Warning: Comment code has invalid syntax: " + commentText, Project.MSG_WARN);
-            }
-            if (commentText.startsWith("-")) {
-                commentText = commentText.replace("-", "");
-            }
-            commentText = commentText.trim();
-
-            String commentTextCheck = commentText.replace("deprecated>", "").replace("tt>", "").replace("todo>", "");
-            if (commentTextCheck.contains(">") && !commentTextCheck.contains("</pre>")) {
-                log("Warning: Comment code needs <pre> tags around it: " + commentText, Project.MSG_WARN);
-            }
-
-            commentText = filterTextNewlines(commentText);
-            commentText = wikiModel.render(commentText);
-
-            // If <deprecated> tag exists in the comment, then parse the
-            // deprecated message.
-            if (commentText.indexOf("&#60;deprecated&#62;") != -1) {
-                int deprecatedMsgStart = commentText.indexOf("&#60;deprecated&#62;") + 20;
-                int deprecatedMsgEnd = commentText.indexOf("&#60;/deprecated&#62;");
-
-                // Add deprecated element.
-                String deprecatedMsg = commentText.substring(deprecatedMsgStart, deprecatedMsgEnd);
-                addTextElement(outNode, "deprecated", deprecatedMsg);
-
-                // remove <deprecated> part from description field.
-                int commentTextLength = commentText.length();
-                String documentationMsgStart = commentText.substring(1, deprecatedMsgStart - 20);
-                String documentationMsgEnd = commentText.substring(deprecatedMsgEnd + 21, commentTextLength);
-                String documentationMsg = documentationMsgStart.concat(documentationMsgEnd);
-                commentText = documentationMsg.trim();
-            }
-        }
-        else {
-            commentText = "";
-        }
-        // Get the documentation element as a document
-        String documentationText = "<documentation>" + commentText + "</documentation>";
-        Document docDoc = DocumentHelper.parseText(documentationText);
-        outNode.add(docDoc.getRootElement());
-        log("HTML comment: " + commentText, Project.MSG_DEBUG);
-    }
-
-    private Element addTextElement(Element parent, String name, String text) {
-        Element element = addTextElement(parent, name, text, false);
-
-        return element;
-    }
-
-    private Element addTextElement(Element parent, String name, String text, boolean escape) {
-        Element element = parent.addElement(name);
-        if (text != null) {
-            if (escape) {
-                element.addCDATA(text);
-            }
-            else {
-                element.setText(text);
-            }
-        }
-        return element;
-    }
-
-    private String filterTextNewlines(String text) throws IOException {
-        BufferedReader in = new BufferedReader(new StringReader(text));
-        StringBuilder out = new StringBuilder();
-        String line = in.readLine();
-        while (line != null) {
-            out.append(line.trim());
-            out.append("\n");
-            line = in.readLine();
-        }
-        return out.toString();
-    }
-
-    /**
-     * Method adds taskdef nodes to the specified project.
-     * 
-     * @param outProjectNode
-     * @throws IOException
-     */
-    private void buildTaskDefs(Element root) throws DocumentException, IOException {
-        Element projectElement = root.addElement("project");
-        projectElement.addElement("name");
-        insertDocumentation(projectElement, "");
-        HashMap<String, String> tasks = getHeliumAntTasks();
-
-        for (String taskName : tasks.keySet()) {
-            String className = tasks.get(taskName);
-            log("Processing TaskDef: " + taskName, Project.MSG_DEBUG);
-
-            Element outTaskDefNode = projectElement.addElement("taskdef");
-            addTextElement(outTaskDefNode, "name", taskName);
-            addTextElement(outTaskDefNode, "classname", className);
-        }
-    }
-
-    /**
-     * Method returns all the helium ant tasks in the project.
-     * 
-     * @return
-     */
-    @SuppressWarnings("unchecked")
-    private HashMap<String, String> getHeliumAntTasks() {
-
-        // 1. Get all the task definitions from the project
-        Hashtable<String, Class<?>> allTaskdefs = getProject().getTaskDefinitions();
-        // 2. Filter the list by applying criteria
-        return filterTasks(allTaskdefs);
-    }
-
-    /**
-     * Method is used to filter tasks.
-     * 
-     * @param allTaskdefs
-     * @param criteria
-     */
-    private HashMap<String, String> filterTasks(Hashtable<String, Class<?>> allTaskdefs) {
-        HashMap<String, String> tasks = new HashMap<String, String>();
-
-        Enumeration<String> taskdefsenum = allTaskdefs.keys();
-        while (taskdefsenum.hasMoreElements()) {
-            String key = taskdefsenum.nextElement();
-            Class<?> clazz = allTaskdefs.get(key);
-            String className = clazz.getName();
-            if (key.contains("nokia.com") && className.startsWith("com.nokia")
-                && className.contains("ant.taskdefs")) {
-                tasks.put(getTaskName(key), clazz.getName());
-            }
-        }
-        return tasks;
-    }
-
-    /**
-     * Returns the task name delimiting the helium namespace.
-     * 
-     * @param text
-     * @return
-     */
-    private String getTaskName(String text) {
-        int lastIndex = text.lastIndexOf(':');
-        return text.substring(lastIndex + 1);
-    }
-
-    // ----------------------------------- PRIVATE CLASSES -----------------------------------------
-
-    private class AntPropertyVisitor extends VisitorSupport {
-        private List<String> propertyList;
-
-        public AntPropertyVisitor(List<String> propertyList) {
-            this.propertyList = propertyList;
-        }
-
-        public void visit(Attribute node) {
-            String text = node.getStringValue();
-            extractUsedProperties(text);
-        }
-
-        public void visit(CDATA node) {
-            String text = node.getText();
-            extractUsedProperties(text);
-        }
-
-        public void visit(Text node) {
-            String text = node.getText();
-            extractUsedProperties(text);
-        }
-
-        public void visit(Element node) {
-            if (node.getName().equals("property")) {
-                String propertyName = node.attributeValue("name");
-                if (!propertyList.contains(propertyName)) {
-                    propertyList.add(propertyName);
-                    log("property matches :" + propertyName, Project.MSG_DEBUG);
-                }
-            }
-        }
-
-        private void extractUsedProperties(String text) {
-            Pattern p1 = Pattern.compile("\\$\\{([^@$}]*)\\}");
-            Matcher m1 = p1.matcher(text);
-            log(text, Project.MSG_DEBUG);
-            while (m1.find()) {
-                String group = m1.group(1);
-                if (!propertyList.contains(group)) {
-                    propertyList.add(group);
-                }
-                log("property matches: " + group, Project.MSG_DEBUG);
-            }
-
-            Pattern p2 = Pattern.compile("\\$\\{([^\n]*\\})\\}");
-            Matcher m2 = p2.matcher(text);
-            log(text, Project.MSG_DEBUG);
-            while (m2.find()) {
-                String group = m2.group(1);
-                if (!propertyList.contains(group)) {
-                    propertyList.add(group);
-                }
-                log("property matches: " + group, Project.MSG_DEBUG);
-            }
-
-            Pattern p3 = Pattern.compile("\\$\\{(\\@\\{[^\n]*)\\}");
-            Matcher m3 = p3.matcher(text);
-            log(text, Project.MSG_DEBUG);
-            while (m3.find()) {
-                String group = m3.group(1);
-                if (!propertyList.contains(group)) {
-                    propertyList.add(group);
-                }
-                log("property matches: " + group, Project.MSG_DEBUG);
-            }
-        }
-    }
-
-    private class AntTargetVisitor extends VisitorSupport {
-        private List<String> targetList;
-        private List<String> logList;
-        private List<String> signalList;
-        private List<String> executableList;
-
-        public AntTargetVisitor(List<String> targetList, List<String> logList,
-            List<String> signalList, List<String> executableList) {
-            this.targetList = targetList;
-            this.logList = logList;
-            this.signalList = signalList;
-            this.executableList = executableList;
-        }
-
-        public void visit(Element node) {
-            String name = node.getName();
-            if (name.equals("antcall") || name.equals("runtarget")) {
-                String text = node.attributeValue("target");
-                extractTarget(text);
-            }
-
-            if (!name.equals("include") && !name.equals("exclude")) {
-                String text = node.attributeValue("name");
-                addLog(text);
-                text = node.attributeValue("output");
-                addLog(text);
-                text = node.attributeValue("value");
-                addLog(text);
-                text = node.attributeValue("log");
-                addLog(text);
-                text = node.attributeValue("line");
-                addLog(text);
-                text = node.attributeValue("file");
-                addLog(text);
-            }
-
-            if (name.equals("signal") || name.equals("execSignal")) {
-                String signalid = getProject().replaceProperties(node.attributeValue("name"));
-                String failbuild = signalType(signalid, signaldoc);
-
-                if (signalList != null) {
-                    if (failbuild != null) {
-                        signalList.add(signalid + "," + failbuild);
-                    } else {
-                        signalList.add(signalid);
-                    }
-                }
-            }
-
-            if (name.equals("exec") || name.equals("preset.exec")) {
-                String text = node.attributeValue("executable");
-                executableList.add(text);
-                log("Executable: " + text, Project.MSG_DEBUG);
-            }
-        }
-
-        private void addLog(String text) {
-            if (text != null && logList != null) {
-                for (String log : text.split(" ")) {
-                    String fulllogname = getProject().replaceProperties(log);
-                    if (!logList.contains(log)
-                        && (fulllogname.endsWith(".log") || fulllogname.endsWith(".html"))) {
-                        log = log.replace("--log=", "");
-                        logList.add(log);
-                    }
-                }
-            }
-        }
-
-        private void extractTarget(String text) {
-            String iText = getProject().replaceProperties(text);
-            targetList.add(iText);
-        }
-
-    }
-}
--- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/HeliumLogger.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,218 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *
- */
-
-package com.nokia.ant;
-
-import java.io.File;
-import java.io.PrintStream;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-
-import org.apache.log4j.Logger;
-import org.apache.tools.ant.BuildEvent;
-import org.apache.tools.ant.DefaultLogger;
-import org.apache.tools.ant.Project;
-
-/**
- * Logger class that can connect to Ant and log information regarding to build
- * times, number of errors and such. Data is sent to Diamonds server, where it
- * is processed further.
- * 
- * This class is listening all build related events. It catches the build
- * start-finish, target start-finish events of Ant and gather build start-end
- * time, errors/warnings and store in BuildData class. Stored data will be
- * exported to XML and uploaded to Diamonds server after each specific target.
- * For example after target "create-bom" this class will upload all BOM data to
- * Diamonds.
- * 
- * 
- */
-public class HeliumLogger extends DefaultLogger {
-
-    private static boolean stopLogToConsole;
-    private static final String INTERNALPROPERTY = "internal.";
-
-    private Project project;
-    private Logger log = Logger.getLogger(this.getClass());
-    
-
-
-    /**
-     * Ant call this function when build start.
-     */
-    public void buildStarted(BuildEvent event) {
-        project = event.getProject();
-        super.buildStarted(event);
-    }
-
-    /**
-     * Triggered when a target starts.
-     */
-    public void targetStarted(BuildEvent event) {
-        /** The "if" condition to test on execution. */
-        String ifCondition = "";
-        /** The "unless" condition to test on execution. */
-        String unlessCondition = "";
-        String targetName = event.getTarget().getName();
-        logTargetEvent(targetName, "start");
-
-        /**get the values needed from the event **/
-        ifCondition = event.getTarget().getIf();
-        unlessCondition = event.getTarget().getUnless();
-        project = event.getProject();
-
-        super.targetStarted(event);
-
-        /**if the target is not going to execute (due to 'if' or 'unless' conditions) 
-        print a message telling the user why it is not going to execute**/
-        if (!testIfCondition(ifCondition) && ifCondition != null) {
-            if (ifCondition.startsWith(INTERNALPROPERTY)) {
-                String enableProperty = ifCondition.substring(INTERNALPROPERTY.length());
-                project.log("Skipped because property '"
-                        + enableProperty
-                        + "' not set to 'true'.", Project.MSG_INFO);
-            } else {
-                project.log("Skipped because property '"
-                        + project.replaceProperties(ifCondition)
-                        + "' is not set.", Project.MSG_INFO);
-            }
-            
-        } else if (!testUnlessCondition(unlessCondition) && unlessCondition != null) {
-            if (unlessCondition.startsWith(INTERNALPROPERTY)) {
-                String enableProperty = unlessCondition.substring(INTERNALPROPERTY.length());
-                project.log("Skipped because property '"
-                        + enableProperty
-                        + "' is set.", Project.MSG_INFO);
-            } else {
-                project.log("Skipped because property '"
-                        + project.replaceProperties(unlessCondition)
-                        + "' set.", Project.MSG_INFO);
-            }
-        }
-    }
-
-    /**
-     * Log the start or end of the build as a event.
-     * 
-     * @param targetName
-     *            The name of the current target.
-     * @param event
-     *            A string description of the event.
-     */
-    private void logTargetEvent(String targetName, String event) {
-        String logTargetProperty = project.getProperty("log.target");
-        if ((logTargetProperty != null) && (logTargetProperty.equals("yes"))) {
-            log.info("Target #### " + targetName + " ####: " + event);
-        }
-    }
-
-    /**
-     * Triggered when a target finishes.
-     */
-    public void targetFinished(BuildEvent event) {
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        String time = sdf.format(Calendar.getInstance().getTime());
-        
-        String targetName = time + "," + event.getTarget().getName();
-
-        logTargetEvent(targetName, "finish");
-    }
-
-    /**
-     * Triggered when the build finishes.
-     */
-    public void buildFinished(BuildEvent event) {
-        // re-enabling output of messages at the end of the build
-        stopLogToConsole = false;
-        cleanup();
-        super.buildFinished(event);
-    }
-
-    /**
-     * See if build needs a final cleanup target to be called.
-     */
-    private void cleanup() {
-        if (project != null) {
-            String loggingoutputfile = project.getProperty("logging.output.file");
-            if (loggingoutputfile != null) {
-                File file = new File(loggingoutputfile);
-                if (file.exists()) {
-                    file.delete();
-                }
-            }
-            if ((project.getProperty("call.cleanup") != null)
-                    && (project.getProperty("call.cleanup").equals("yes"))) {
-                project.executeTarget("cleanup-all");
-            }
-        }
-    }
-
-    /**
-     * Get log to console status
-     */
-    public static boolean getStopLogToConsole() {
-        return stopLogToConsole;
-    }
-
-    /**
-     * Set log to console status
-     */
-    public static void setStopLogToConsole(boolean stop) {
-        stopLogToConsole = stop;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    protected void printMessage(final String message, final PrintStream stream,
-            final int priority) {
-        if (!stopLogToConsole) {
-            stream.println(message);
-        }
-    }
-    
-    /**
-     * Tests whether or not the "if" condition is satisfied.
-     *
-     * @return whether or not the "if" condition is satisfied. If no
-     *         condition (or an empty condition) has been set,
-     *         <code>true</code> is returned.
-     */
-    private boolean testIfCondition(String ifCondition) {
-        if ("".equals(ifCondition)) {
-            return true;
-        }
-
-        String test = project.replaceProperties(ifCondition);
-        return project.getProperty(test) != null;
-    }
-
-    /**
-     * Tests whether or not the "unless" condition is satisfied.
-     *
-     * @return whether or not the "unless" condition is satisfied. If no
-     *         condition (or an empty condition) has been set,
-     *         <code>true</code> is returned.
-     */
-    private boolean testUnlessCondition(String unlessCondition) {
-        if ("".equals(unlessCondition)) {
-            return true;
-        }
-        String test = project.replaceProperties(unlessCondition);
-        return project.getProperty(test) == null;
-    }
-}
--- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/HelpDef.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *
- */
-
-package com.nokia.ant;
-
-import java.util.Iterator;
-
-import org.apache.tools.ant.BuildListener;
-import org.apache.tools.ant.BuildLogger;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.types.DataType;
-
-import com.nokia.helium.core.ant.PostBuildAction;
-
-/**
- * 
- */
-public class HelpDef extends DataType implements PostBuildAction {
-
-    /**
-     * 
-     * @param project Object of the project
-     * @param targetNames Array of target names to execute
-     * 
-     */
-    public void executeOnPostBuild(Project project, String[] targetNames) {
-        String firstTarget;
-        // take target
-        if (targetNames != null && targetNames.length > 0) {
-            firstTarget = targetNames[0];
-        }
-        // no target, so set the default one
-        else {
-            firstTarget = "help";
-        }
-
-        // If 'help' target is called, just run that and set other
-        // target names as a property
-        if (firstTarget.equals("help")) {
-            displayHelp(project, targetNames, firstTarget);
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    private void displayHelp(Project project, String[] targetNames, String firstTarget) {
-        if (targetNames.length > 1) {
-            project.setProperty("help.item", targetNames[1]);
-        }
-
-        // Set Emacs mode to true for all listeners, so that help text does
-        // not have [echo] at the start of each line
-        Iterator iter = project.getBuildListeners().iterator();
-        while (iter.hasNext()) {
-            BuildListener listener = (BuildListener) iter.next();
-            if (listener instanceof BuildLogger) {
-                BuildLogger logger = (BuildLogger) listener;
-                logger.setEmacsMode(true);
-            }
-        }
-
-        // Run the 'help' target
-        project.executeTarget(firstTarget);
-    }
-}
--- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/Signal.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-package com.nokia.ant;
-
-/**
- * This class stores a signal while being deferred. 
- *
- */
-public class Signal {
-
-    private String name;
-    private String message;
-
-    public String getMessage() {
-        return message;
-    }
-    
-    public void setMessage(String message) {
-        this.message = message;
-    }
-
-    public String getName() {
-        return name;
-    }
-    
-    public void setName(String name) {
-        this.name = name;
-    }
-}
--- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/antlib.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/antlib.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -26,7 +26,6 @@
     <taskdef name="configuration" classname="com.nokia.ant.taskdefs.AntConfigurationTask"/>
     <taskdef name="coveragerecord" classname="com.nokia.ant.taskdefs.CoverageRecorderTask"/>
     <taskdef name="fastcopy" classname="com.nokia.ant.taskdefs.CopyParallelTask"/>
-    <taskdef name="logtoconsole" classname="com.nokia.ant.taskdefs.StopLogToConsoleTask"/>
     <taskdef name="parsemodel" classname="com.nokia.ant.taskdefs.ModelPropertiesTask"/>
     
     <typedef name="typedef" classname="com.nokia.ant.TypedefURIFix"/>
--- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/helium.antlib.xml	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-============================================================================ 
-Name        : libs.ant.xml 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
--->
-<project name="libs-mains" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
-    <description>
-        Ant task definition declarations.
-    </description>
-    <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium" />
-    <typedef name="buildstatusdef" classname="com.nokia.ant.BuildStatusDef" uri="http://www.nokia.com/helium"/>
-    <typedef name="helpdef" classname="com.nokia.ant.HelpDef" uri="http://www.nokia.com/helium"/>
-    <hlm:deflist id="helium-legacy.list">
-        <hlm:buildstatusdef/>
-        <hlm:helpdef/>
-    </hlm:deflist>
-</project>
\ No newline at end of file
--- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/StopLogToConsoleTask.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-package com.nokia.ant.taskdefs;
-
-import org.apache.tools.ant.Task;
-
-import com.nokia.ant.HeliumLogger;
-
-/**
- * This task is deprecated, please consider using the 
- * hlm:taskRecorder task from the logging framework.
- * 
- * This task will control the outputing of the Helium logger.
- * 
- * Example of usage, to stop logging to console:
- * <pre>
- * &lt;hlm:logtoconsole action="stop"/&gt;
- * </pre>
- *  
- * To resume logging to console:
- * <pre>
- * &lt;hlm:logtoconsole action="start"/&gt;
- * </pre> 
- * 
- * @ant.task name="logtoconsole" category="Logging"
- * @deprecated This task is deprecated, please consider using the 
- * hlm:taskRecorder task from the logging framework.
- */ 
-@Deprecated
-public class StopLogToConsoleTask extends Task 
-{   
-    private boolean stopLogToConsole;
-    
-    /**
-     * Action to perform, stop/start logging.
-     * @ant.not-required Default value is start.
-     */
-    public void setAction(String msg)
-    {
-        if ( msg.equalsIgnoreCase("stop") )
-        {
-            stopLogToConsole = true;
-        }
-        else
-        {
-            stopLogToConsole = false;
-        }       
-    }
-
-    @Override
-    public void execute()
-    {
-        super.execute();
-        if (HeliumLogger.getStopLogToConsole() != stopLogToConsole)
-        {
-            if (stopLogToConsole) {
-                log("Logging to console suspended.");
-            }
-            HeliumLogger.setStopLogToConsole(stopLogToConsole);   
-            if (!stopLogToConsole) {
-                log("Logging to console resumed.");
-            }
-        }       
-    }   
-}
--- a/buildframework/helium/sf/java/legacy/src/com/nokia/log4j.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/legacy/src/com/nokia/log4j.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- 
 ============================================================================ 
-Name        : libs.ant.xml 
+Name        : log4j.xml 
 Part of     : Helium 
 
 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -42,7 +42,7 @@
 
     <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
         <param name="File" value="${log4j.cache.dir}/hlm_debug.log"/>
-        <param name="append" value="false"/>
+        <param name="append" value="true"/>
         <layout class="org.apache.log4j.PatternLayout">
                <param name="ConversionPattern" 
                             value="%d{HH:mm:ss,SSS}  %-2p - %-20c{1} - %m  %n "/>
--- a/buildframework/helium/sf/java/legacy/tests/antunit/run-scenario.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-============================================================================ 
-Name        : test_signaltask.ant.xml 
-Part of     : Helium AntLib
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
--->
-<project name="run-scenario" xmlns:ac="antlib:net.sf.antcontrib" xmlns:au="antlib:org.apache.ant.antunit">
-    <description>Helium Antlib feature enabler macro.</description>
-
-    <target name="setUp">    
-        <tempfile property="temp.dir" suffix=".dir" />
-        <mkdir dir="${temp.dir}" />
-    </target>
-    
-    <target name="tearDown">
-        <delete dir="${temp.dir}" />
-    </target>
-    
-    <macrodef name="runScenario">
-        <attribute name="scenario" />
-        <attribute name="target" />
-        <attribute name="cmdline" default=""/>
-        <sequential>
-            <ac:trycatch property="scenario.unittest.error">
-                <try>
-                    <exec osfamily="windows" executable="cmd" dir="${ant.file.run-scenario}/../../scenarii/@{scenario}" failonerror="true" errorproperty="scenario.unittest.error.log">
-                        <env key="ANT_ARGS" value="${env.ANT_ARGS} -logger com.nokia.ant.HeliumLogger" />
-                        <arg line="/c ..\build.bat @{target}" />
-                        <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor" />
-                        <arg value="-Dtemp.dir=${temp.dir}" />
-                        <arg value="-Dhelium.dir=${ant.file.run-scenario}/../../scenarii/property" />
-                    </exec>
-                    <exec osfamily="unix" executable="../bld.sh" dir="${ant.file.run-scenario}/../../scenarii/@{scenario}" failonerror="true" errorproperty="scenario.unittest.error.log">
-                        <env key="ANT_ARGS" value="${env.ANT_ARGS} -logger com.nokia.ant.HeliumLogger" />
-                        <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor" />
-                        <arg line="@{target}" />
-                        <arg value="-Dtemp.dir=${temp.dir}" />
-                        <arg line="@{cmdline}" />
-                        <arg value="-Dhelium.dir=${ant.file.run-scenario}/../../scenarii/property" />
-                    </exec>
-                </try>
-            </ac:trycatch>
-            <!--<loadfile property="scenario.unittest.error.log" srcFile="${temp.dir}/scenario.log" />-->
-            <au:assertTrue message="${scenario.unittest.error.log}">
-                <not>
-                    <isset property="scenario.unittest.error" />
-                </not>
-            </au:assertTrue>
-        </sequential>
-    </macrodef>
-
-</project>
--- a/buildframework/helium/sf/java/legacy/tests/antunit/test_feature_enabled_flags.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-============================================================================ 
-Name        : test_feature_enabled_flags.ant.xml 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
--->
-<project name="test_feature_enabled_flags" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
-    <description>
-    Testing targets.
-    </description>
-    
-    <property environment="env"/>
-    <import file="run-scenario.ant.xml"/>
-    
-    <target name="test-target-disabled">
-        <runScenario scenario="test" target="run-target-disabled" />
-        <au:assertLogContains text="Skipped because property 'feature.enabled' not set to 'true'"/>
-        <au:assertLogContains text="Warning: enable.feature property has been deprecated since 11.0. Start using feature.enabled property"/>
-        <au:assertLogContains text="Warning: internal.abc.enabled property has been overridden"/>
-        <au:assertLogContains text="Warning: internal.bla.enabled property has been deprecated since 6.0. Start using internal.abc.enabled property"/>
-        <au:assertLogContains text="Warning: feature.enabled property has been overridden"/>
-    </target>
-    
-    <target name="test-target-enabled">
-        <runScenario scenario="test" target="run-target-enabled" />
-        <au:assertLogContains text="[echo] Running run-target-enabled"/>
-    </target>
-    
-    <target name="test-target-enabled-with-old-flag">
-        <runScenario scenario="test" target="run-with-old-flag-enabled" />
-        <au:assertLogContains text="[echo] Running run-with-old-flag-enabled"/>
-    </target>
-    
-    <target name="test-target-enabled-with-new-flag">
-        <runScenario scenario="test" target="run-with-new-flag-enabled" />
-        <au:assertLogContains text="[echo] Running run-with-new-flag-enabled"/>
-    </target>
-    
-    <target name="test-target-enabled-with-both">
-        <runScenario scenario="test" target="run-with-both-enabled" />
-        <au:assertLogContains text="[echo] Running run-with-both-enabled"/>
-    </target>
-    
-    <target name="test-target-unless-enabled">
-        <runScenario scenario="test" target="run-with-unless-enabled" />
-        <au:assertLogContains text="Skipped because property 'skip.ats.sending' set"/>        
-    </target>  
-    
-    <target name="test-target-unless-internal-enabled">
-        <runScenario scenario="test" target="run-with-unless-internal-enabled" />
-        <au:assertLogContains text="Skipped because property 'old.enabled' is set"/>        
-    </target>  
-    
-    
-
-</project>
-
--- a/buildframework/helium/sf/java/legacy/tests/scenarii/bld.sh	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-#!/bin/bash
-
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-if [ -f ~/.bashrc ] ; then
-	. ~/.bashrc
-fi
-ant $*
--- a/buildframework/helium/sf/java/legacy/tests/scenarii/build.bat	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-@echo off
-
-rem
-rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-rem All rights reserved.
-rem This component and the accompanying materials are made available
-rem under the terms of the License "Eclipse Public License v1.0"
-rem which accompanies this distribution, and is available
-rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-rem
-rem Initial Contributors:
-rem Nokia Corporation - initial contribution.
-rem
-rem Contributors:
-rem
-rem Description: 
-rem
-
-setlocal
-if not defined JAVA_6_HOME (
-set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02
-) ELSE  set TESTED_JAVA=%JAVA_6_HOME%
-if exist %TESTED_JAVA% (set JAVA_HOME=%TESTED_JAVA%)
-call ant %*
-if "%ERRORLEVEL%" neq "0" (goto error)
-endlocal
-goto :eof
-
-:error
-endlocal
-if "%OS%"=="Windows_NT" color 00
--- a/buildframework/helium/sf/java/legacy/tests/scenarii/property/feature.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-============================================================================ 
-Name        : feature.ant.xml 
-Part of     : Helium AntLib
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
--->
-<project name="test-properties" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
-    <description>Helium Antlib logger unittests.</description>
-    
-    <!-- Set to true to enable feature
-    @type boolean
-    @editable required
-    @scope private
-    -->
-    <property name="feature.enabled" value="true"/>
-    
-    <!-- Set to true to enable feature - deprecated: Start using feature.enabled property
-    @type boolean
-    @editable required
-    @scope public
-    @deprecated since 11.0 
-    -->
-    <property name="enable.feature" value="true"/>
-    
-    <!--* @property internal.abc.enabled 
-    Set to true to true to run targets.
-    @type boolean
-    @editable required
-    @scope private
-    -->
-    
-    <!--* @property internal.bla.enabled 
-    Set to true to true to run targets - deprecated: Start using internal.abc.enabled property.
-    @type boolean
-    @editable required
-    @scope public
-    @deprecated since 6.0 
-    -->
-    
-    <target name="temp">
-        <echo>Inside the temp target</echo>
-    </target>
-        
-    
-
-</project>
--- a/buildframework/helium/sf/java/legacy/tests/scenarii/test/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-============================================================================ 
-Name        : build.xml 
-Part of     : Helium AntLib
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
--->
-<project name="test-enable-flags" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
-    <description>Helium Antlib logger unittests.</description>
-    
-    <import file="../property/feature.ant.xml"/>
-    <property name="feature.enabled" value="true"/>
-    <property name="enable.feature" value="true"/>
-    <property name="internal.abc.enabled" value="true"/>
-    <property name="internal.bla.enabled" value="false"/>
-    <property name="skip.ats.sending" value="t"/>
-    
-    
-    <condition property="internal.old.enabled">
-        <or>
-            <istrue value="${xyz.enabled}"/>
-            <isset property="enable.feature"/>
-        </or>
-    </condition>
-    
-    <condition property="internal.new.enabled">
-        <or>
-            <istrue value="${feature.enabled}"/>
-            <isset property="abc.feature"/>
-        </or>
-    </condition>
-    
-    <condition property="internal.both.enabled">
-        <or>
-            <istrue value="${feature.enabled}"/>
-            <isset property="enable.feature"/>
-        </or>
-    </condition>
-    
-    <target name="run-target-disabled" if="internal.feature.enabled">
-        <echo>Running run-target-disabled</echo>
-    </target>
-    
-    <target name="run-target-enabled" if="feature.enabled">
-        <echo>Running run-target-enabled</echo>
-    </target>
-    
-    <target name="run-with-old-flag-enabled" if="internal.old.enabled">
-        <echo>Running run-with-old-flag-enabled</echo>
-    </target>
-    
-    <target name="run-with-new-flag-enabled" if="internal.new.enabled">
-        <echo>Running run-with-new-flag-enabled</echo>
-    </target>
-    
-    <target name="run-with-both-enabled" if="internal.both.enabled">
-        <echo>Running run-with-both-enabled</echo>
-    </target>
-    
-    <target name="run-with-unless-enabled" unless="skip.ats.sending">
-        <echo>Running run-with-unless-enabled</echo>
-    </target>
-    
-    <target name="run-with-unless-internal-enabled" unless="internal.old.enabled">
-        <echo>Running run-with-unless-internal-enabled</echo>
-    </target>
-    
-    
-
-</project>
--- a/buildframework/helium/sf/java/legacy/tests/src/com/nokia/ant/HeliumLoggerTest.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *
- */
-
-package com.nokia.ant;
-
-import junit.framework.TestCase;
-
-/**
- * Test class for Helium Logger.
- * 
- */
-public class HeliumLoggerTest extends TestCase {
-    
-    /**
-     * Basic test to check if the property
-     * is set correctly. 
-     */
-    public void testSetStopLogToConsole() {
-        HeliumLogger logger = new HeliumLogger();
-        logger.setStopLogToConsole(true);
-        assert logger.getStopLogToConsole();
-    }
-}
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/antlib.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/antlib.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -28,8 +28,9 @@
     <taskdef name="taskRecorder" classname="com.nokia.helium.logger.ant.taskdefs.TaskRecorder"/>
     
     <!-- Type definition -->
-    <typedef name="stagerecord" classname="com.nokia.helium.logger.ant.types.StageLogging"/>
+    <typedef name="stagerecord" classname="com.nokia.helium.logger.ant.types.StageRecord"/>
     <typedef name="stagesummary" classname="com.nokia.helium.logger.ant.types.StageSummary"/>
     <typedef name="recordfilterset" classname="com.nokia.helium.logger.ant.types.RecordFilterSet"/>
+    <typedef name="stagerecorderlistener" classname="com.nokia.helium.logger.ant.listener.AntLoggingHandler"/>
     
 </antlib>
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/AntLoggingHandler.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/AntLoggingHandler.java	Wed Oct 13 16:31:27 2010 +0800
@@ -19,198 +19,303 @@
 import java.io.File;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.Date;
-import java.util.HashMap;
 import java.util.Hashtable;
+import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Vector;
-import java.util.Map.Entry;
+import java.util.regex.Pattern;
 
-import org.apache.log4j.Logger;
 import org.apache.tools.ant.BuildEvent;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.Target;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.LogLevel;
+import org.apache.tools.ant.types.DataType;
 
 import com.nokia.helium.core.ant.types.Stage;
-import com.nokia.helium.logger.ant.types.StageLogging;
+import com.nokia.helium.logger.ant.types.StageRecord;
+
 
 /**
  * Ant logging class for each Stage.
  * 
  * 
  */
-public class AntLoggingHandler implements Handler {
-    private static Hashtable<File, RecorderEntry> recorderEntries = new Hashtable<File, RecorderEntry>();
-    private static HashMap<File, Boolean> fileCreatedMap = new HashMap<File, Boolean>();
-    private static boolean isDefaultStageStarted;
-    private Map<String, Stage> stagesMapping;
-    private Map<String, StageLogging> stageRecordMap;
-    private HashMap<String, Vector<Target>> depStartTargetMap;
-    private HashMap<String, Target> stageStartTargetMap;
-    private boolean isStageRecordingHappening;
-    private boolean loggingStarted;
-    private int loglevel = -1;
-    private VerbosityLevelChoices antLogLevel;
-    private Logger log = Logger.getLogger(AntLoggingHandler.class);
-    private String currentStageName;
-    private Project project;
+public class AntLoggingHandler extends DataType implements BuildEventHandler, TargetEventHandler, SubBuildEventHandler, CommonListenerRegister {
+    private Map<String, RecorderEntry> recorderEntries = new Hashtable<String, RecorderEntry>();
+    private Map<String, Stage> stageStartTargets = new Hashtable<String, Stage>();
+    private Map<String, Stage> stageEndTargets = new Hashtable<String, Stage>();
+    private RecorderEntry defaultRecorderEntry;
+    private RecorderEntry currentRecorderEntry;
+    private Stage currentStage;
+    private CommonListener commonListener;
+    private boolean record;
+    private List<Project> recordExclusions = new ArrayList<Project>();
+    
+    @SuppressWarnings("unchecked")
+    public void register(CommonListener commonListener) {
+        this.commonListener = commonListener;
+        Map<String, Object> references = (Map<String, Object>)commonListener.getProject().getReferences();
+        for (Map.Entry<String, Object> entry : references.entrySet()) {
+            if (entry.getValue() instanceof StageRecord) {
+                StageRecord stageRecord = (StageRecord)entry.getValue();
+                if (stageRecord.getDefaultOutput() != null) {
+                    if (defaultRecorderEntry == null) {
+                        RecorderEntry recorderEntry = new RecorderEntry(stageRecord.getDefaultOutput());
+                        recorderEntry.setMessageOutputLevel(stageRecord.getLogLevel());
+                        recorderEntry.setEmacsMode(false);
+                        recorderEntry.setRecordState(false);
+                        defaultRecorderEntry = recorderEntry;
+                    } else {
+                        log("There must be only one default stagerecord datatype.");
+                    }
+                } else if (stageRecord.getStageRefID() != null) {
+                    if (references.containsKey(stageRecord.getStageRefID())) {
+                        if (references.get(stageRecord.getStageRefID()) instanceof Stage) {
+                            // Check the stage
+                            Stage stage = (Stage)references.get(stageRecord.getStageRefID());
+                            validateStageInformation(stageRecord.getStageRefID(), stage);
+                            log("Found  stage [" + stageRecord.getStageRefID() + "] for recording", Project.MSG_DEBUG);
+                            //  check the stage logging.
+                            validateStageRecorder(entry.getKey(), stageRecord);
+                            String startTarget = stage.getStartTarget();
+                            if (getProject().getTargets().containsKey(stage.getStartTarget())) {
+                                Vector<Target> targets = getProject().topoSort(stage.getStartTarget(), getProject().getTargets(), false);
+                                if (targets.size() != 0) {
+                                    startTarget = targets.firstElement().getName();
+                                }
+                            }
 
-    /**
-     * AntLoggingHandler constructor.
-     * 
-     * @param proj
-     */
-    public AntLoggingHandler(Project proj) {
-        project = proj;
-        antLogLevel = new VerbosityLevelChoices();
-        stagesMapping = new HashMap<String, Stage>();
-        stageRecordMap = new HashMap<String, StageLogging>();
-        depStartTargetMap = new HashMap<String, Vector<Target>>();
-        stageStartTargetMap = new HashMap<String, Target>();
-        initialize(project);
+                            if (stageRecord.getOutput().exists()) {
+                                long timestamp = System.currentTimeMillis();
+                                log("Backing up of " + stageRecord.getOutput() + " into " + stageRecord.getOutput() + "."
+                                        + timestamp);
+                                stageRecord.getOutput().renameTo(new File(stageRecord.getOutput().getAbsoluteFile() + "." + timestamp));
+                            }
+                            
+                            RecorderEntry recorderEntry = new RecorderEntry(stageRecord.getOutput());
+                            recorderEntry.setMessageOutputLevel(stageRecord.getLogLevel());
+                            recorderEntry.setEmacsMode(false);
+                            recorderEntry.setRecordState(false);
+
+                            // Make sure we cleanup the file now if needed.
+                            if (stageRecord.getOutput().exists()) {
+                                recorderEntry.openFile(stageRecord.getAppend());                            
+                                recorderEntry.closeFile();
+                            }
+                            
+                            // Then add everything to the internal configuration
+                            stageStartTargets.put(startTarget, stage);
+                            stageEndTargets.put(stage.getEndTarget(), stage);
+                            recorderEntries.put(stageRecord.getStageRefID(), recorderEntry);
+                        } else {
+                            throw new BuildException("Invalid stagerecord stageRefId attribute value, " + 
+                                    "the '" + stageRecord.getStageRefID() + "' id doesn't refer to a stage type at " + 
+                                    stageRecord.getLocation().toString());
+                            
+                        }
+                    } else {
+                        throw new BuildException("Invalid stagerecord stageRefId attribute value, " + 
+                                "the '" + stageRecord.getStageRefID() + "' id doesn't exist at " + 
+                                    stageRecord.getLocation().toString());
+                    }
+                } else {
+                    throw new BuildException("Invalid stagerecord configuration, " + 
+                            "the stageRefId attribute is not defined at " +
+                            stageRecord.getLocation().toString());
+                }
+            }
+        }
+        if (defaultRecorderEntry != null) {
+            log("Registering the logging framework.", Project.MSG_DEBUG);
+            currentRecorderEntry = defaultRecorderEntry;
+            commonListener.register(this);
+        } else {
+            log("There must be one default stagerecord datatype. Logging framework will be disabled.");
+        }
+    }
+
+    private void validateStageInformation(String stageKey, Stage stage) {
+        if (stage.getStartTarget() == null) {
+            throw new BuildException("'starttarget' for stage '" + stageKey
+                + "' should not be null.");
+        }
+        if (stage.getEndTarget() == null) {
+            throw new BuildException("'endtarget' for stage '" + stageKey + "' should not be null.");
+        }        
     }
 
     /**
-     * Return the project associated to this Handler.
+     * To validate each stagelogging data type.
      * 
-     * @return a project instance
+     * @param stagerefid
+     * @param stageLogging
+     */
+    private void validateStageRecorder(String stagerefid, StageRecord stageRecorder) {
+        if (stageRecorder.getOutput() == null) {
+            throw new BuildException("'output' attribute for stagelogging '" + stagerefid
+                + "' should not be null.");
+        }
+    }    
+
+    /**
+     * A new stage is starting. Stop current log, then start stage specific log recording.
+     * @param target
+     * @param stage
      */
-    public Project getProject() {
-        return project;
+    protected void startStage(Target target, Stage stage) {
+        if (record && currentRecorderEntry != null) {
+            currentRecorderEntry.addLogMessage("Stop logging into " + currentRecorderEntry.getFilename() + " at " + getDateTime());            
+            currentRecorderEntry.setRecordState(false);
+            currentRecorderEntry.closeFile();            
+            commonListener.unRegister(currentRecorderEntry);
+        }
+        currentRecorderEntry = recorderEntries.get(stage.getStageName());
+        if (currentRecorderEntry == null) {
+            currentRecorderEntry = this.defaultRecorderEntry;
+        }
+        if (record) {
+            defaultRecorderEntry.reopenFile();
+            defaultRecorderEntry.addLogMessage("Start logging stage " + stage.getStageName() + " into " + currentRecorderEntry.getFilename() + " at " + getDateTime());
+            defaultRecorderEntry.closeFile();
+            
+            currentRecorderEntry.reopenFile();
+            currentRecorderEntry.setRecordState(true);
+            currentRecorderEntry.addLogMessage("Start logging into " + currentRecorderEntry.getFilename() + " at " + getDateTime());
+            commonListener.register(currentRecorderEntry);
+        }        
     }
-
+    
+    /**
+     * Current stage is ending. Stop recording current stage, and then switch to
+     * default log.
+     * @param target
+     * @param stage
+     */
+    protected void endStage(Target target, Stage stage) {
+        if (record && currentRecorderEntry != null) {
+            currentRecorderEntry.addLogMessage("Stop logging into " + currentRecorderEntry.getFilename() + " at " + getDateTime());            
+            currentRecorderEntry.setRecordState(false);
+            currentRecorderEntry.closeFile();
+            commonListener.unRegister(currentRecorderEntry);
+        }
+        currentRecorderEntry = defaultRecorderEntry;
+        if (record) {
+            currentRecorderEntry.reopenFile();
+            currentRecorderEntry.setRecordState(true);
+            currentRecorderEntry.addLogMessage("Start logging into " + currentRecorderEntry.getFilename() + " at " + getDateTime());            
+            commonListener.register(currentRecorderEntry);
+        }        
+    }
+    
     /**
      * {@inheritDoc}
      */
-    public void handleTargetFinished(BuildEvent event) {
-        // log.debug("Finished target [" + event.getTarget().getName() + "]");
-        if (isEndTarget(event.getTarget().getName()) && getIsStageRecordingHappening()
-            && (getLoggingStarted())) {
-            log.debug("Stopping stage logging for  [" + currentStageName + "] for target ["
-                + event.getTarget().getName() + "]");
-            stopLog(currentStageName, "default");
-            if (!isDefaultStageStarted) {
-                startLog("default");
-                isDefaultStageStarted = true;
+    @Override
+    public synchronized void targetStarted(BuildEvent event) {
+        if (stageStartTargets.containsKey(event.getTarget().getName())) {
+            if (this.currentStage != null) {
+                endStage(event.getTarget(), currentStage);
             }
-            currentStageName = null;
+            currentStage = stageStartTargets.get(event.getTarget().getName()); 
+            startStage(event.getTarget(), currentStage);
         }
     }
 
     /**
      * {@inheritDoc}
      */
-    public void handleTargetStarted(BuildEvent event) {
-
-        // log.debug("Started target [" + event.getTarget().getName() + "]");
-
-        if (getLoggingStarted() && !isDefaultStageStarted) {
-            startLog("default");
-            isDefaultStageStarted = true;
-        }
-
-        if (currentStageName == null && !getIsStageRecordingHappening() && getLoggingStarted()) {
-            String stageName = isStageValid(event.getTarget(), event.getProject());
-            if (stageName != null) {
-                log.debug("Started stage logging for  [" + stageName + "] for target ["
-                    + event.getTarget().getName() + "]");
-
-                if (isDefaultStageStarted) {
-                    stopLog("default", stageName);
-                    isDefaultStageStarted = false;
-                }
-                startLog(stageName);
-                currentStageName = stageName;
-            }
+    @Override
+    public synchronized void targetFinished(BuildEvent event) {
+        if (currentStage != null && currentStage.getEndTarget().equals(event.getTarget().getName())) {
+            endStage(event.getTarget(), currentStage);
+            currentStage = null;
         }
     }
 
     /**
      * {@inheritDoc}
      */
-    public void handleBuildStarted(BuildEvent event) {
-        // Nothing to do
+    @Override
+    public void buildStarted(BuildEvent event) {
     }
 
     /**
      * {@inheritDoc}
      */
-    public void handleBuildFinished(BuildEvent event) {
-
-        /*
-         * If any stage logging is happening stop logging into stage log file and switch to
-         * main/default ant log file.
-         */
-        if (getLoggingStarted() && getIsStageRecordingHappening()) {
-            stopLog(currentStageName, "default");
-            if (!isDefaultStageStarted) {
-                startLog("default");
-                isDefaultStageStarted = true;
-            }
-            currentStageName = null;
+    @Override
+    public synchronized void buildFinished(BuildEvent event) {
+        if (currentRecorderEntry != defaultRecorderEntry) {
+            currentRecorderEntry.addLogMessage("Stop logging into " + currentRecorderEntry.getFilename() + " at " + getDateTime());            
+            currentRecorderEntry.setRecordState(false);
+            currentRecorderEntry.closeFile();
+            commonListener.unRegister(currentRecorderEntry);
+            currentRecorderEntry = defaultRecorderEntry;
         }
-
-        /*
-         * If default stage logging happening stop logging into default ant log file.
-         */
-        if (isDefaultStageStarted && getLoggingStarted()) {
-            stopLog("default", null, event);
-            isDefaultStageStarted = false;
-        }
-        this.cleanup();
+        defaultRecorderEntry.reopenFile();
+        defaultRecorderEntry.setRecordState(true);
+        defaultRecorderEntry.addLogMessage("Start logging into " + defaultRecorderEntry.getFilename() + " at " + getDateTime());            
+        defaultRecorderEntry.buildFinished(event);
+        defaultRecorderEntry.setRecordState(false);
+        defaultRecorderEntry.closeFile();
+        record = false;
     }
 
     /**
-     * Returns recorder entry for logging current build process.
-     * 
-     * @param name
-     * @param proj
-     * @return
+     * Define if the stage logging should be recording of not.
+     * @param record
      */
-    protected RecorderEntry getRecorder(File name) {
-        RecorderEntry entry = recorderEntries.get(name);
-        if (entry == null) {
-            // create a recorder entry
-            entry = new RecorderEntry(name);
-            recorderEntries.put(name, entry);
+    public synchronized void setRecordState(boolean record) {
+        this.record = record;
+        if (record) {
+            currentRecorderEntry.reopenFile();
+            currentRecorderEntry.setRecordState(true);
+            this.commonListener.register(this.currentRecorderEntry);
+        } else {
+            currentRecorderEntry.setRecordState(false);
+            this.commonListener.unRegister(this.currentRecorderEntry);
+            currentRecorderEntry.closeFile();
         }
-        return entry;
+    }
+    
+    /**
+     * Adding a regular expression 
+     * @param pattern
+     */
+    public void addRegexp(Pattern pattern) {
+        if (pattern != null) {
+            for (Entry<String, RecorderEntry> entry : recorderEntries.entrySet()) {
+                RecorderEntry recorderEntry = entry.getValue();
+                recorderEntry.addRegexp(pattern);
+            }
+        }
     }
 
     /**
-     * Sets the level to which this recorder entry should log to.
-     * 
-     * @param level the level to set.
-     * @see VerbosityLevelChoices
+     * Prunning a project/subproject from stage logger recording scope. 
+     * @param project
      */
-    public void setLoglevel(VerbosityLevelChoices level) {
-        loglevel = level.getLevel();
+    public synchronized void addRecordExclusion(Project project) {
+        if (!recordExclusions.contains(project)) {
+            recordExclusions.add(project);
+            if (currentRecorderEntry != null) {
+                currentRecorderEntry.setExcludedProject(recordExclusions);
+            }
+        }
     }
 
     /**
-     * A list of possible values for the <code>setLoglevel()</code> method. Possible values include:
-     * error, warn, info, verbose, debug.
-     */
-    public static class VerbosityLevelChoices extends LogLevel {
-    }
-
-    /**
-     * To clean recorder entries.
+     * Allow an external task to add again a project into recording scope.
+     * @param project
      */
-    private void cleanup() {
-        log.debug("Cleaning up recorder entries of stagerecord");
-        recorderEntries.clear();
-        fileCreatedMap.clear();
-
+    public synchronized void removeRecordExclusion(Project project) {
+        recordExclusions.remove(project);        
     }
-
+    
     /**
-     * To get current date and time.
-     * 
-     * @return
+     * Get formated date and time
      */
     private String getDateTime() {
         DateFormat dateFormat = new SimpleDateFormat("EE yyyy/MM/dd HH:mm:ss:SS aaa");
@@ -219,446 +324,17 @@
     }
 
     /**
-     * To get the current stage running.
-     * 
-     * @return
-     */
-    public String getCurrentStageName() {
-        return this.currentStageName;
-    }
-
-    /**
-     * To do the logging actions depending on hlm:record actions.
-     * 
-     * @param stageName
-     * @param action
-     * @param message
-     * @param task
-     */
-    public void doLoggingAction(String stageName, boolean action, String message, Task task,
-        Target target) {
-        String time = getDateTime();
-        File fileName;
-        if (stageName.equalsIgnoreCase("default")) {
-            if (stageRecordMap.get("default") == null) {
-                throw new BuildException("stageRecordMap.get('default') is null");
-            }
-            fileName = stageRecordMap.get("default").getDefaultOutput();
-        } else {
-            fileName = stageRecordMap.get(stageName).getOutput();
-        }
-
-        if (fileName.exists()) {
-            for (Map.Entry<File, RecorderEntry> entry : recorderEntries.entrySet()) {
-                if (fileName.equals(entry.getKey()) && (getRecorderEntry(fileName) != null)
-                    && (fileCreatedMap.get(fileName))) {
-                    RecorderEntry recorderEntry = getRecorderEntry(fileName);
-                    recorderEntry.addLogMessage(message + " logging into " + fileName + " from "
-                        + task.getTaskName() + " task at " + time);
-                    log.debug(message + " logging into " + fileName + " from " + task.getTaskName()
-                        + " task at " + time);
-                    recorderEntry.setRecordState(action);
-                    break;
-                }
-            }
-        }
-    }
-
-    /**
-     * Called by LogReplace task to find and replace any property values which are not updated.
-     * 
-     * @param regExp
-     */
-    public void addRegExp(String regExp) {
-        if (!regExp.equals("")) {
-            for (Map.Entry<File, RecorderEntry> entry : recorderEntries.entrySet()) {
-                RecorderEntry recorderEntry = entry.getValue();
-                recorderEntry.addRegexp(regExp);
-            }
-        }
-    }
-
-    /**
-     * Initializing stage logging data.
-     * Gathering all stagerecord.
-     * 
-     * @param project
+     * {@inheritDoc}
      */
-    @SuppressWarnings("unchecked")
-    private void initialize(Project project) {
-        Map<String, Object> references = (Hashtable<String, Object>)project.getReferences();
-        //matchStageName(references, stageKey);
-        for (Entry<String, Object> entry : references.entrySet()) {
-            if (entry.getValue() instanceof StageLogging) {
-                StageLogging tempStageLogging = (StageLogging)entry.getValue();
-                // Is the stagerecord having a defaultoutput attribute,
-                // if yes, it is the default recorder.
-                if (tempStageLogging.getDefaultOutput() != null) {
-                    stageRecordMap.put("default", tempStageLogging);                    
-                    registerRecorderEntry(tempStageLogging.getDefaultOutput(), tempStageLogging, StatusAndLogListener.getStatusAndLogListener().getProject());
-                } else if (tempStageLogging.getStageRefID() != null) {
-                    if (references.containsKey(tempStageLogging.getStageRefID())) {
-                        if (references.get(tempStageLogging.getStageRefID()) instanceof Stage) {
-                            // Check the stage
-                            Stage stage = (Stage)references.get(tempStageLogging.getStageRefID());
-                            validateStageInformation(tempStageLogging.getStageRefID(), stage);
-                            log.debug("Found  stage [" + tempStageLogging.getStageRefID() + "] for recording");
-                            stagesMapping.put(tempStageLogging.getStageRefID(), stage);
-                            //  check the stage logging.
-                            validateStageLogging(entry.getKey(), tempStageLogging);
-                            stageRecordMap.put(tempStageLogging.getStageRefID(), tempStageLogging);
-                        } else {
-                            throw new BuildException("Invalid stagerecord stageRefId attribute value, " + 
-                                    "the '" + tempStageLogging.getStageRefID() + "' id doesn't refer to a stage type at " + 
-                                    tempStageLogging.getLocation().toString());
-                            
-                        }
-                    } else {
-                        throw new BuildException("Invalid stagerecord stageRefId attribute value, " + 
-                                "the '" + tempStageLogging.getStageRefID() + "' id doesn't exist at " + 
-                                tempStageLogging.getLocation().toString());
-                    }
-                } else {
-                    throw new BuildException("Invalid stagerecord configuration, " + 
-                            "the stageRefId attribute is not defined at " +
-                            tempStageLogging.getLocation().toString());
-                }
-            }
-        }
-        if (!stageRecordMap.containsKey("default")) {
-            throw new BuildException("There must be one default stagerecord datatype.");
-        }
-    }
-    
-    /**
-     * To start logging for respective stage.
-     * 
-     * @param stageName
-     */
-    private void startLog(String stageName) {
-        File fileName;
-        String message;
-        String time = getDateTime();
-        StageLogging stageLogging = null;
-        log.debug("Starting logging for [" + stageName + "]");
-        if (stageName.equals("default")) {
-            fileName = stageRecordMap.get("default").getDefaultOutput();
-            stageLogging = stageRecordMap.get("default");
-            message = "Starting logging into " + fileName + " at " + time;
-        }
-        else {
-            fileName = stageRecordMap.get(stageName).getOutput();
-            stageLogging = stageRecordMap.get(stageName);
-            this.isStageRecordingHappening = true;
-            message = "Starting logging for " + stageName + " into " + fileName + " at " + time;
-        }
-        if (getRecorderEntry(fileName) != null) {
-            RecorderEntry recorderEntry = getRecorderEntry(fileName);
-            if (isFilePresent(recorderEntry, fileName, stageLogging)) {
-                recorderEntry.setRecordState(true);
-                recorderEntry.addLogMessage(message);
-            }
-        }
-    }
-
-    /**
-     * To check is the file created.
-     * 
-     * @param recorderEntry
-     * @param fileName
-     * @param stageLogging
-     * @return
-     */
-    private boolean isFilePresent(RecorderEntry recorderEntry, File fileName,
-        StageLogging stageLogging) {
-        log.debug("isFilePresent? " + fileName);
-        if (!fileCreatedMap.get(fileName)) {
-            if (!fileName.getParentFile().exists()) {
-                log.debug("Creating dir: " + fileName.getParentFile());
-                fileName.getParentFile().mkdirs();
-            }
-            if (fileName.exists()) {
-                long timestamp = System.currentTimeMillis();
-                getProject().log("Backing up of " + fileName + " into " + fileName + "."
-                    + timestamp);
-                fileName.renameTo(new File(fileName.getAbsoluteFile() + "." + timestamp));
-            }
-            recorderEntry.openFile(stageLogging.getAppend());
-            fileCreatedMap.put(fileName, true);
-            return true;
-        }
-        else {
-            return true;
-        }
-
-    }
-
-    /**
-     * To stop logging for respective stage.
-     * 
-     * @param stopStageName
-     * @param startStageName
-     */
-    private void stopLog(String stopStageName, String startStageName) {
-        stopLog(stopStageName, startStageName, null);
+    @Override
+    public void subBuildFinished(BuildEvent event) {
+        removeRecordExclusion(event.getProject());
     }
 
     /**
-     * To stop logging for respective stage.
-     * 
-     * @param stopStageName
-     * @param startStageName
-     * @param event
-     */
-    private void stopLog(String stopStageName, String startStageName, BuildEvent event) {
-        File fileName;
-        String message;
-        String time = getDateTime();
-        log.debug("Stopping logging for [" + stopStageName + "]");
-        if (stopStageName.equals("default")) {
-            fileName = stageRecordMap.get("default").getDefaultOutput();
-            message = "Stopping logging into " + fileName + " at " + time;
-            if (startStageName != null) {
-                message = message + "\nStarting logging into "
-                    + stageRecordMap.get(startStageName).getOutput();
-            }
-        }
-        else {
-            fileName = stageRecordMap.get(stopStageName).getOutput();
-            this.isStageRecordingHappening = false;
-            message = "Stopping logging for " + stopStageName + " into " + fileName + " at " + time;
-            if (startStageName != null) {
-                message = message + "\nResuming logging into "
-                    + stageRecordMap.get("default").getDefaultOutput();
-            }
-        }
-        if (getRecorderEntry(fileName) != null) {
-            RecorderEntry recorderEntry = getRecorderEntry(fileName);
-            if (event != null) {
-                recorderEntry.handleBuildFinished(event);
-            } else {
-                recorderEntry.addLogMessage(message);
-                recorderEntry.setRecordState(false);
-            }
-        }
-    }
-
-    /**
-     * To register into recorder entry.
-     * 
-     * @param fileName
-     * @param stageLogging
-     * @param proj
+     * {@inheritDoc}
      */
-    private void registerRecorderEntry(File fileName, StageLogging stageLogging, Project proj) {
-        log.debug("Registering recorderentry for log file [" + fileName + "]");
-        RecorderEntry recorderEntry = getRecorder(fileName);
-        antLogLevel.setValue(stageLogging.getLogLevel());
-        this.setLoglevel(antLogLevel);
-        recorderEntry.setMessageOutputLevel(loglevel);
-        recorderEntry.setEmacsMode(false);
-        recorderEntry.setRecordState(false);
-        if (fileCreatedMap.get(fileName) == null) {
-            fileCreatedMap.put(fileName, false);
-        }
-    }
-
-    /**
-     * To check is the stage valid for given start and end targets.
-     * 
-     * @param target
-     * @param proj
-     * @return
-     */
-    private String isStageValid(Target target, Project proj) {
-        // if
-        // (!proj.getName().equals(StatusAndLogListener.getStatusAndLogListener().getProject().getName())
-        // && (StatusAndLogListener.getStatusAndLogListener().getProject().getName() != null)) {
-        initSubProjectDependentTarget(proj);
-        // }
-        for (Map.Entry<String, Stage> entry : stagesMapping.entrySet()) {
-            Stage stage = entry.getValue();
-            if (stage.getStartTarget().equals(target.getName())
-                && validateStageTargets(proj, stage.getStartTarget(), stage.getEndTarget())) {
-                log.debug("Found stage [" + entry.getKey() + "] for target [" + target.getName()
-                    + "]");
-                return entry.getKey();
-            }
-            if (stageStartTargetMap.get(entry.getKey()) != null) {
-                if (stageStartTargetMap.get(entry.getKey()).getName().equals(target.getName())) {
-                    log.debug("Found stage [" + entry.getKey() + "] for dependent target ["
-                        + target.getName() + "]");
-                    return entry.getKey();
-                }
-            }
-            else if (isDependentTarget(target, entry.getKey())) {
-                log.debug("Found stage [" + entry.getKey() + "] for dependent target ["
-                    + target.getName() + "]");
-                return entry.getKey();
-            }
-        }
-        return null;
-    }
-
-    /**
-     * To check, is the given target is end target for any stages.
-     * 
-     * @param targetName
-     * @return
-     */
-
-    private boolean isEndTarget(String targetName) {
-        if (stagesMapping.get(currentStageName) != null) {
-            return stagesMapping.get(currentStageName).getEndTarget().equals(targetName);
-        }
-        return false;
-    }
-
-    /**
-     * To validate is the endtarget and starttarget are present in the current project.
-     * 
-     * @param proj
-     * @param startTarget
-     * @param endTarget
-     * @return
-     */
-
-    @SuppressWarnings("unchecked")
-    private boolean validateStageTargets(Project proj, String startTarget, String endTarget) {
-
-        Hashtable<String, String> antTargets = proj.getTargets();
-        return antTargets.containsKey(startTarget) && antTargets.containsKey(endTarget);
+    @Override
+    public void subBuildStarted(BuildEvent event) {
     }
-
-    /**
-     * To check is recording is happening for any stages.
-     * 
-     * @return
-     */
-    private boolean getIsStageRecordingHappening() {
-        return this.isStageRecordingHappening;
-    }
-
-    /**
-     * Is the given target is dependent target to start the stage.
-     * 
-     * @param target
-     * @param stageName
-     * @return
-     */
-    private boolean isDependentTarget(Target target, String stageName) {
-
-        if (depStartTargetMap.get(stageName) != null) {
-            for (Target depTarget : depStartTargetMap.get(stageName)) {
-                if (depTarget.getName().equals(target.getName())) {
-                    depStartTargetMap.remove(stageName);
-                    stageStartTargetMap.put(stageName, depTarget);
-                    return true;
-                }
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * To initialize the dependent target and stages mapping.
-     * 
-     * @param proj
-     * @param stageKey
-     * @param startTarget
-     * @param endTarget
-     */
-    @SuppressWarnings("unchecked")
-    private void initDependentTargetMap(Project proj, String stageKey, String startTarget,
-        String endTarget) {
-        Vector<Target> arrayList = null;
-        if (validateStageTargets(proj, startTarget, endTarget)) {
-            arrayList = proj.topoSort(startTarget, proj.getTargets(), false);
-            log.debug("Target dependency for " + startTarget);
-            for (Target target : arrayList) {
-                log.debug("       Start Target : " + target.getName());
-            }
-            if (arrayList != null && arrayList.size() > 1) {
-                depStartTargetMap.put(stageKey, arrayList);
-            }
-        }
-
-    }
-
-    /**
-     * To init dependent targets for subproject.
-     * 
-     * @param proj
-     */
-    private void initSubProjectDependentTarget(Project proj) {
-
-        for (Map.Entry<String, Stage> entry : stagesMapping.entrySet()) {
-            if (depStartTargetMap.get(entry.getKey()) == null) {
-                initDependentTargetMap(proj, entry.getKey(), entry.getValue().getStartTarget(), entry.getValue().getEndTarget());
-            }
-        }
-    }
-
-    /**
-     * To validate stage information.
-     * 
-     * @param stageKey
-     * @param stage
-     */
-    private void validateStageInformation(String stageKey, Stage stage) {
-
-        if (stage.getStartTarget() == null) {
-            throw new BuildException("'starttarget' for stage '" + stageKey
-                + "' should not be null.");
-        }
-
-        if (stage.getEndTarget() == null) {
-            throw new BuildException("'endtarget' for stage '" + stageKey + "' should not be null.");
-        }
-    }
-
-    /**
-     * To validate each stagelogging data type.
-     * 
-     * @param stagerefid
-     * @param stageLogging
-     */
-    private void validateStageLogging(String stagerefid, StageLogging stageLogging) {
-
-        if (stageLogging.getOutput() == null) {
-            throw new BuildException("'output' attribute for stagelogging '" + stagerefid
-                + "' should not be null.");
-        }
-        registerRecorderEntry(stageLogging.getOutput(), stageLogging, StatusAndLogListener.getStatusAndLogListener().getProject());
-    }
-
-    /**
-     * To retrun recorderEntry of respective file.
-     * 
-     * @param filename
-     * @return
-     */
-    private RecorderEntry getRecorderEntry(File filename) {
-        return recorderEntries.get(filename);
-    }
-
-    /**
-     * Is recording started.
-     * 
-     * @return
-     */
-    public boolean getLoggingStarted() {
-        return loggingStarted;
-    }
-
-    /**
-     * Set to recording started.
-     * 
-     * @param loggingStarted
-     */
-    public void setLoggingStarted(boolean loggingStarted) {
-        this.loggingStarted = loggingStarted;
-    }
-
-}
+}
\ No newline at end of file
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/BuildEventHandler.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/BuildEventHandler.java	Wed Oct 13 16:31:27 2010 +0800
@@ -31,13 +31,13 @@
     * 
     * @param event is the build event to be handled. 
     */
-    void handleBuildStarted( BuildEvent event );
+    void buildStarted( BuildEvent event );
 
    /**
     * Method to handle build finish events.
     * 
     * @param event is the build event to be handled. 
     */
-    void handleBuildFinished( BuildEvent event );
+    void buildFinished( BuildEvent event );
     
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/CommonListener.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,294 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+package com.nokia.helium.logger.ant.listener;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildListener;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.SubBuildListener;
+
+/**
+ * <code>CommonListener</code> implements {@link BuildListener} and listens to build events in
+ * particularly for activities such as ant logging and displaying build stage summary at the end of
+ * build process.
+ * 
+ */
+public class CommonListener implements BuildListener, SubBuildListener {
+    private static CommonListener self;
+    private boolean initialized;
+
+    private List<BuildEventHandler> buildHandlers = new ArrayList<BuildEventHandler>();
+    private List<TargetEventHandler> targetHandlers = new ArrayList<TargetEventHandler>();
+    private List<TaskEventHandler> taskHandlers = new ArrayList<TaskEventHandler>();
+    private List<MessageEventHandler> messageHandlers = new ArrayList<MessageEventHandler>();
+    private List<SubBuildEventHandler> subBuildHandlers = new ArrayList<SubBuildEventHandler>();
+    private Project project;
+
+    /**
+     * Default constructor
+     */
+    public CommonListener() {
+        // Declaring ourself globally.
+        self = this;
+    }
+
+    /**
+     * Signals that the last target has finished. This event will still be fired if an error
+     * occurred during the build.
+     * 
+     * @param event An event with any relevant extra information. Must not be <code>null</code>.
+     * 
+     * @see BuildEvent#getException()
+     */
+    public synchronized void buildStarted(BuildEvent event) {
+        project = event.getProject();
+        for (BuildEventHandler handler : buildHandlers) {
+            handler.buildStarted(event);
+        }
+    }
+
+    /**
+     * Signals that a build has started. This event is fired before any targets have started.
+     * 
+     * @param event An event with any relevant extra information. Must not be <code>null</code>.
+     */
+    public synchronized void buildFinished(BuildEvent event) {
+        for (BuildEventHandler handler : buildHandlers) {
+            handler.buildFinished(event);
+        }
+    }
+
+    /**
+     * Signals that a target is starting.
+     * 
+     * @param event An event with any relevant extra information. Must not be <code>null</code>.
+     * 
+     * @see BuildEvent#getTarget()
+     */
+    public synchronized void targetStarted(BuildEvent event) {
+        if (!initialized) {
+            // Let's introspect current project for registarable objects
+            for (Object entry : getProject().getReferences().values()) {
+                if (entry instanceof CommonListenerRegister) {
+                    ((CommonListenerRegister) entry).register(this);
+                    if (entry instanceof BuildEventHandler) {
+                        ((BuildEventHandler)entry).buildStarted(new BuildEvent(getProject()));
+                    }
+                }
+            }
+            initialized = true;
+        }
+        for (TargetEventHandler handler : targetHandlers) {
+            handler.targetStarted(event);
+        }
+    }
+
+    /**
+     * Signals that a target has finished. This event will still be fired if an error occurred
+     * during the build.
+     * 
+     * @param event An event with any relevant extra information. Must not be <code>null</code>.
+     * 
+     * @see BuildEvent#getException()
+     */
+    public synchronized void targetFinished(BuildEvent event) {
+        for (TargetEventHandler handler : targetHandlers) {
+            handler.targetFinished(event);
+        }
+    }
+
+    /**
+     * Signals that a task is starting.
+     * 
+     * @param event An event with any relevant extra information. Must not be <code>null</code>.
+     * 
+     * @see BuildEvent#getTask()
+     */
+    public synchronized void taskStarted(BuildEvent event) {
+        for (TaskEventHandler handler : taskHandlers) {
+            handler.taskStarted(event);
+        }
+    }
+
+    /**
+     * Signals that a task has finished. This event will still be fired if an error occurred during
+     * the build.
+     * 
+     * @param event An event with any relevant extra information. Must not be <code>null</code>.
+     * 
+     * @see BuildEvent#getException()
+     */
+    public synchronized void taskFinished(BuildEvent event) {
+        for (TaskEventHandler handler : taskHandlers) {
+            handler.taskFinished(event);
+        }
+    }
+
+    /**
+     * Signals that a subbuild has started. This event is fired before any targets have started.
+     * 
+     * @param event
+     */
+    public synchronized void subBuildStarted(BuildEvent event) {
+        for (SubBuildEventHandler handler : subBuildHandlers) {
+            handler.subBuildStarted(event);
+        }
+    }
+
+    /**
+     * Signals that the last target has finished. This event will still be fired if an error
+     * occurred during the build.
+     * 
+     * @param event
+     */
+
+    public synchronized void subBuildFinished(BuildEvent event) {
+        for (SubBuildEventHandler handler : subBuildHandlers) {
+            handler.subBuildStarted(event);
+        }
+    }
+
+    /**
+     * Signals a message logging event.
+     * 
+     * @param event An event with any relevant extra information. Must not be <code>null</code>.
+     * 
+     * @see BuildEvent#getMessage()
+     * @see BuildEvent#getException()
+     * @see BuildEvent#getPriority()
+     */
+    public synchronized void messageLogged(BuildEvent event) {
+        for (MessageEventHandler handler : messageHandlers) {
+            handler.messageLogged(event);
+        }
+    }
+
+    /**
+     * Register the given handler.
+     * 
+     * @param handler is the handler to register
+     */
+    public synchronized void register(Object handler) {
+        if (handler instanceof BuildEventHandler) {
+            // The duplication of the list prevents concurrent modification exception.
+            List<BuildEventHandler> temp = new ArrayList<BuildEventHandler>(buildHandlers); 
+            temp.add((BuildEventHandler)handler);
+            buildHandlers = temp;
+        }
+        if (handler instanceof TargetEventHandler) {
+            List<TargetEventHandler> temp = new ArrayList<TargetEventHandler>(targetHandlers); 
+            temp.add((TargetEventHandler)handler);
+            targetHandlers = temp;
+        }
+        if (handler instanceof TaskEventHandler) {
+            List<TaskEventHandler> temp = new ArrayList<TaskEventHandler>(taskHandlers); 
+            temp.add((TaskEventHandler)handler);
+            taskHandlers = temp;
+        }
+        if (handler instanceof MessageEventHandler) {
+            List<MessageEventHandler> temp = new ArrayList<MessageEventHandler>(messageHandlers); 
+            temp.add((MessageEventHandler)handler);
+            messageHandlers = temp;
+        }
+    }
+
+    /**
+     * Register the given handler.
+     * 
+     * @param handler is the handler to register
+     */
+    public synchronized void unRegister(Object handler) {
+        if (handler instanceof BuildEventHandler) {
+            List<BuildEventHandler> temp = new ArrayList<BuildEventHandler>(buildHandlers); 
+            temp.remove((BuildEventHandler)handler);
+            buildHandlers = temp;
+        }
+        if (handler instanceof TargetEventHandler) {
+            List<TargetEventHandler> temp = new ArrayList<TargetEventHandler>(targetHandlers); 
+            temp.remove((TargetEventHandler)handler);
+            targetHandlers = temp;
+        }
+        if (handler instanceof TaskEventHandler) {
+            List<TaskEventHandler> temp = new ArrayList<TaskEventHandler>(taskHandlers); 
+            temp.remove((TaskEventHandler)handler);
+            taskHandlers = temp;
+        }
+        if (handler instanceof MessageEventHandler) {
+            List<MessageEventHandler> temp = new ArrayList<MessageEventHandler>(messageHandlers); 
+            temp.remove((MessageEventHandler)handler);
+            messageHandlers = temp;
+        }
+    }
+    
+    /**
+     * Return root project.
+     * 
+     * @return
+     */
+    public Project getProject() {
+        return project;
+    }
+
+    /**
+     * Get the main StatusAndLogListener.
+     * 
+     * @return
+     */
+    public static CommonListener getCommonListener() {
+        return self;
+    }
+
+    /**
+     * Check and return required type handler.
+     * 
+     * @param handlerType
+     * @return
+     */
+    @SuppressWarnings("unchecked")
+    public synchronized <T> T getHandler(Class<T> handlerType) {
+        for (BuildEventHandler handler : buildHandlers) {
+            if (handlerType.isInstance(handler)) {
+                return (T)handler;
+            }
+        }
+        for (TargetEventHandler handler : targetHandlers) {
+            if (handlerType.isInstance(handler)) {
+                return (T)handler;
+            }
+        }
+        for (TaskEventHandler handler : taskHandlers) {
+            if (handlerType.isInstance(handler)) {
+                return (T)handler;
+            }
+        }
+        for (MessageEventHandler handler : messageHandlers) {
+            if (handlerType.isInstance(handler)) {
+                return (T)handler;
+            }
+        }
+        for (SubBuildEventHandler handler : subBuildHandlers) {
+            if (handlerType.isInstance(handler)) {
+                return (T)handler;
+            }
+        }
+        return null;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/CommonListenerRegister.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+package com.nokia.helium.logger.ant.listener;
+
+/**
+ * This interface defines an Ant type to be 
+ * able automatically registered by the CommonListener. 
+ *
+ */
+public interface CommonListenerRegister {
+ 
+    /**
+     * This method is call by the CommonListener while discovering
+     * reference implementing this interface.
+     * 
+     * @param commonListener the commonListener to register to.
+     */
+    void register(CommonListener commonListener);    
+}
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/Handler.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-package com.nokia.helium.logger.ant.listener;
-
-
-/**
- * <code>Handler</code> is an interface which is used to handle the build events
- * which are of importance for ant logging and build stage summary display.
- * 
- *
- */
-public interface Handler extends BuildEventHandler, TargetEventHandler {
-
-   
-    
-}
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/MessageEventHandler.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/MessageEventHandler.java	Wed Oct 13 16:31:27 2010 +0800
@@ -29,6 +29,6 @@
      * Method to handle SubBuild Started  events.
      * @param event
      */
-    void handleMessageLogged( BuildEvent event );
+    void messageLogged(BuildEvent event);
 
 }
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/RecorderEntry.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/RecorderEntry.java	Wed Oct 13 16:31:27 2010 +0800
@@ -1,30 +1,33 @@
 /*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
  *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * Contributors:
- *
- * Description:  
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
  *
  */
+/* * Portion Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.*/
+
 package com.nokia.helium.logger.ant.listener;
 
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.PrintStream;
-import java.util.Vector;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.apache.log4j.Logger;
 import org.apache.tools.ant.BuildEvent;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.DefaultLogger;
@@ -37,7 +40,7 @@
  * @since Ant 1.4
  */
 public class RecorderEntry implements BuildEventHandler, TargetEventHandler, TaskEventHandler,
-    MessageEventHandler {
+    MessageEventHandler, SubBuildEventHandler {
 
     /** The name of the file associated with this recorder entry. */
     private File filename;
@@ -52,13 +55,16 @@
     /** Strip task banners if true. */
     private boolean emacsMode;
 
-    private Pattern pattern;
+    // defines if this recorder entry should notify the stage logger about project to exclude from recording.
+    private boolean excludeSubProject;
+    private List<Project> excludedProjects = new ArrayList<Project>();
+    private List<Project> includedProjects = new ArrayList<Project>();
 
-    private Vector<String> logRegExps = new Vector<String>();
-    private Logger log = Logger.getLogger(getClass());
+    private List<Pattern> logRegExps = new ArrayList<Pattern>();
 
     /**
-     * @param name The name of this recorder (used as the filename).
+     * Create a RecorderEntry using a filename. 
+     * @param name the filename of the log file.
      */
     public RecorderEntry(File name) {
         targetStartTime = System.currentTimeMillis();
@@ -66,6 +72,20 @@
     }
 
     /**
+     * New RecorderEntry using a filename and allow sub project exclusion.
+     * @param name the log filename
+     * @param excludeSubProject If true this recorder entry will notify 
+     *                          the stage logger about projects to exclude 
+     *                          from recording. If false, then only non-excluded
+     *                          project message will be handled.
+     */
+    public RecorderEntry(File name, boolean excludeSubProject) {
+        targetStartTime = System.currentTimeMillis();
+        filename = name;
+        this.excludeSubProject = true;
+    }
+
+    /**
      * @return the name of the file the output is sent to.
      */
     public File getFilename() {
@@ -96,8 +116,8 @@
      * 
      * @param regexp
      */
-    public void addRegexp(String regexp) {
-        logRegExps.add(regexp);
+    public void addRegexp(Pattern pattern) {
+        logRegExps.add(pattern);
     }
 
     /**
@@ -111,7 +131,7 @@
      * @see org.apache.tools.ant.BuildListener#buildStarted(BuildEvent)
      */
     /** {@inheritDoc}. */
-    public void handleBuildStarted(BuildEvent event) {
+    public void buildStarted(BuildEvent event) {
         log("> BUILD STARTED", Project.MSG_DEBUG);
     }
 
@@ -119,8 +139,8 @@
      * @see org.apache.tools.ant.BuildListener#buildFinished(BuildEvent)
      */
     /** {@inheritDoc}. */
-    public void handleBuildFinished(BuildEvent event) {
-        log.debug("< BUILD FINISHED");
+    public void buildFinished(BuildEvent event) {        
+        log("< BUILD FINISHED", Project.MSG_DEBUG);
 
         if (record && out != null) {
             Throwable error = event.getException();
@@ -144,9 +164,16 @@
      * 
      * @since Ant 1.6.2
      */
-    public void handleSubBuildFinished(BuildEvent event) {
+    public void subBuildFinished(BuildEvent event) {
         log("< SUBBUILD FINISHED", Project.MSG_DEBUG);
-        // let's keep the logging ongoing, even if sub-build finishes.
+        if (excludeSubProject && CommonListener.getCommonListener() != null) {
+            AntLoggingHandler antLogger = CommonListener.getCommonListener().getHandler(AntLoggingHandler.class);
+            if (antLogger != null) {
+                antLogger.removeRecordExclusion(event.getProject());
+            }
+        }
+        excludedProjects.remove(event.getProject());
+        includedProjects.remove(event.getProject());
     }
 
     /**
@@ -156,73 +183,102 @@
      * 
      * @since Ant 1.6.2
      */
-    public void handleSubBuildStarted(BuildEvent event) {
+    public void subBuildStarted(BuildEvent event) {
         log("< SUBBUILD STARTED", Project.MSG_DEBUG);
+        includedProjects.add(event.getProject());
+        if (excludeSubProject && CommonListener.getCommonListener() != null) {
+            AntLoggingHandler antLogger = CommonListener.getCommonListener().getHandler(AntLoggingHandler.class);
+            if (antLogger != null) {
+                antLogger.addRecordExclusion(event.getProject());
+            }
+        }
     }
 
     /**
      * {@inheritDoc}
      */
-    public void handleTargetStarted(BuildEvent event) {
-        log(">> TARGET STARTED -- " + event.getTarget(), Project.MSG_DEBUG);
-        log(StringUtils.LINE_SEP + event.getTarget().getName() + ":", Project.MSG_INFO);
+    public void targetStarted(BuildEvent event) {
+        if ((!excludeSubProject && !excludedProjects.contains(event.getTarget().getProject())) ||
+                (this.excludeSubProject && this.includedProjects.contains(event.getTarget().getProject()))) {
+            log(">> TARGET STARTED -- " + event.getTarget(), Project.MSG_DEBUG);
+            log(StringUtils.LINE_SEP + event.getTarget().getName() + ":", Project.MSG_INFO);
+        }
         targetStartTime = System.currentTimeMillis();
     }
 
     /**
      * {@inheritDoc}
      */
-    public void handleTargetFinished(BuildEvent event) {
-        log("<< TARGET FINISHED -- " + event.getTarget(), Project.MSG_DEBUG);
+    public void targetFinished(BuildEvent event) {
+        if ((!excludeSubProject && !excludedProjects.contains(event.getTarget().getProject())) || 
+            (this.excludeSubProject && this.includedProjects.contains(event.getTarget().getProject()))) {
+            log("<< TARGET FINISHED -- " + event.getTarget(), Project.MSG_DEBUG);
 
-        String time = formatTime(System.currentTimeMillis() - targetStartTime);
+            String time = formatTime(System.currentTimeMillis() - targetStartTime);
 
-        log(event.getTarget() + ":  duration " + time, Project.MSG_VERBOSE);
-        flush();
+            log(event.getTarget() + ":  duration " + time, Project.MSG_VERBOSE);
+            flush();
+        }
     }
 
     /**
      * @see org.apache.tools.ant.BuildListener#taskStarted(BuildEvent)
      */
     /** {@inheritDoc}. */
-    public void handleTaskStarted(BuildEvent event) {
-        log(">>> TASK STARTED -- " + event.getTask(), Project.MSG_DEBUG);
+    public void taskStarted(BuildEvent event) {
+        if ((!excludeSubProject && !excludedProjects.contains(event.getTask().getProject())) ||
+            (this.excludeSubProject && this.includedProjects.contains(event.getTask().getProject()))) {
+            log(">>> TASK STARTED -- " + event.getTask(), Project.MSG_DEBUG);
+        }
     }
 
     /**
      * @see org.apache.tools.ant.BuildListener#taskFinished(BuildEvent)
      */
     /** {@inheritDoc}. */
-    public void handleTaskFinished(BuildEvent event) {
-        log("<<< TASK FINISHED -- " + event.getTask(), Project.MSG_DEBUG);
-        flush();
+    public void taskFinished(BuildEvent event) {
+        if ((!excludeSubProject && !excludedProjects.contains(event.getTask().getProject())) ||
+            (this.excludeSubProject && this.includedProjects.contains(event.getTask().getProject()))) {
+            log("<<< TASK FINISHED -- " + event.getTask(), Project.MSG_DEBUG);
+            flush();
+        }
     }
 
     /**
      * @see org.apache.tools.ant.BuildListener#messageLogged(BuildEvent)
      */
     /** {@inheritDoc}. */
-    public void handleMessageLogged(BuildEvent event) {
-        log("--- MESSAGE LOGGED", Project.MSG_DEBUG);
+    public void messageLogged(BuildEvent event) {
+        Project project = event.getProject();
+        if (project == null && event.getTask() != null) {
+            project = event.getTask().getProject();
+        }
+        if (project == null && event.getTarget() != null) {
+            project = event.getTarget().getProject();
+        }
+        if ((!excludeSubProject && !excludedProjects.contains(project))
+            || (excludeSubProject && includedProjects.contains(project))) {
+            log("--- MESSAGE LOGGED", Project.MSG_DEBUG);
 
-        StringBuffer buf = new StringBuffer();
-
-        if (event.getTask() != null) {
-            String name = event.getTask().getTaskName();
+            StringBuilder buf = new StringBuilder();
 
-            if (!emacsMode) {
-                String label = "[" + name + "] ";
-                int size = DefaultLogger.LEFT_COLUMN_SIZE - label.length();
+            if (event.getTask() != null) {
+                String name = event.getTask().getTaskName();
 
-                for (int i = 0; i < size; i++) {
-                    buf.append(" ");
+                if (!emacsMode) {
+                    String label = "[" + name + "] ";
+                    int size = DefaultLogger.LEFT_COLUMN_SIZE - label.length();
+
+                    for (int i = 0; i < size; i++) {
+                        buf.append(" ");
+                    }
+                    buf.append(label);
                 }
-                buf.append(label);
             }
+            String messgeToUpdate = filterMessage(event.getMessage());
+            buf.append(messgeToUpdate);
+            log(buf.toString(), event.getPriority());
         }
-        String messgeToUpdate = filterMessage(event.getMessage());
-        buf.append(messgeToUpdate);
-        log(buf.toString(), event.getPriority());
     }
 
     /**
@@ -232,12 +288,9 @@
      * @return
      */
     private String filterMessage(String message) {
-        for (String regExp : logRegExps) {
-            pattern = Pattern.compile(regExp);
-            if (pattern != null) {
-                Matcher match = pattern.matcher(message);
-                message = match.replaceAll("********");
-            }
+        for (Pattern pattern : logRegExps) {
+            Matcher match = pattern.matcher(message);
+            message = match.replaceAll("********");
         }
         return message;
     }
@@ -311,38 +364,6 @@
     }
 
     /**
-     * Registering ourselves to the StatusAndLogListener.
-     */
-    public void register() {
-        StatusAndLogListener listener = StatusAndLogListener.getStatusAndLogListener();
-        if (listener != null) {
-            this.log.debug("register");
-            synchronized (listener) {
-                listener.register((BuildEventHandler) this);
-                listener.register((TargetEventHandler) this);
-                listener.register((TaskEventHandler) this);
-                listener.register((MessageEventHandler) this);
-            }
-        }
-    }
-
-    /**
-     * Unregistering ourselves from the StatusAndLogListener.
-     */
-    public void unregister() {
-        StatusAndLogListener listener = StatusAndLogListener.getStatusAndLogListener();
-        if (listener != null) {
-            this.log.debug("unregister");
-            synchronized (listener) {
-                listener.remove((MessageEventHandler) this);
-                listener.remove((TaskEventHandler) this);
-                listener.remove((TargetEventHandler) this);
-                listener.remove((BuildEventHandler) this);
-            }
-        }
-    }
-
-    /**
      * @since 1.6.2
      */
     public void cleanup() {
@@ -355,11 +376,9 @@
      * @since 1.6.3
      */
     public void closeFile() {
-        this.log.debug("closeFile.");
         if (out != null) {
             out.close();
             out = null;
-            unregister();
         }
     }
 
@@ -387,10 +406,11 @@
 
     private void openFileImpl(boolean append) {
         if (out == null) {
-            this.log.debug("openFileImpl: " + filename);
             try {
+                if (!filename.getParentFile().exists()) {
+                    filename.getParentFile().mkdirs();
+                }
                 out = new PrintStream(new FileOutputStream(filename, append));
-                register();
             }
             catch (IOException ioe) {
                 throw new BuildException("Problems opening file using a " + "recorder entry: "
@@ -405,8 +425,30 @@
      * @param message
      */
     public void addLogMessage(String message) {
-        out.println(StringUtils.LINE_SEP + message);
+        if (out != null) {
+            out.println(StringUtils.LINE_SEP + message);
+        }
+    }
 
+    /**
+     * 
+     * @param excludedProjects
+     */
+    public void setExcludedProject(List<Project> excludedProjects) {
+        this.excludedProjects = new ArrayList<Project>(excludedProjects);
     }
 
+    /**
+     * Defines the root project a recorder entry should record 
+     * from. (this one and sub-project). List will be cleared
+     * if the project is null. 
+     * @param project
+     */
+    public void setRecorderProject(Project project) {
+        if (project != null) {
+            this.includedProjects.add(project);
+        } else {
+            this.includedProjects.clear();
+        }
+    }
 }
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/StageSummaryHandler.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/StageSummaryHandler.java	Wed Oct 13 16:31:27 2010 +0800
@@ -29,7 +29,6 @@
 import java.util.Map;
 import java.util.Vector;
 
-import org.apache.log4j.Logger;
 import org.apache.tools.ant.BuildEvent;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
@@ -37,7 +36,6 @@
 import org.apache.tools.ant.util.DateUtils;
 
 import com.nokia.helium.core.ant.types.Stage;
-import com.nokia.helium.logger.ant.types.StageSummary;
 
 import freemarker.cache.FileTemplateLoader;
 import freemarker.template.Configuration;
@@ -49,72 +47,60 @@
  * build process.
  * 
  */
-public class StageSummaryHandler implements Handler {
+public class StageSummaryHandler implements BuildEventHandler, TargetEventHandler {
 
     public static final String PASSED = "PASSED";
     public static final String FAILED = "FAILED";
 
-    private Logger log = Logger.getLogger(getClass());
-    private boolean lookup4Stages;
     private boolean summarize;
+    private boolean initialized;
+    
 
-    private Map<String, StageWrapper> completedStages;
+    private Map<String, StageWrapper> completedStages = new LinkedHashMap<String, StageWrapper>();;
     private StageWrapper currentStage;
     private Hashtable<String, Stage> stages;
     private File template;
 
-    /**
-     * Create an instance of {@link StageSummaryHandler}
-     * 
-     */
-    public StageSummaryHandler() {
-        completedStages = new LinkedHashMap<String, StageWrapper>();
-        log.debug("StageStatusHandler instantiated");
+    public StageSummaryHandler(File template) {
+        this.template = template;
     }
 
     /**
      * {@inheritDoc}
      */
-    public void handleBuildStarted(BuildEvent event) {
+    public void buildStarted(BuildEvent event) {
 
     }
 
     /**
      * {@inheritDoc}
      */
-    public void handleBuildFinished(BuildEvent event) {
+    public void buildFinished(BuildEvent event) {
         if (summarize && currentStage != null) {
             endCurrentStage();
         }
         if (summarize && !completedStages.isEmpty()) {
             generateSummary(event.getProject());
-            log.debug("Stage Summary generation completed");
+            CommonListener.getCommonListener().getProject().log("Stage Summary generation completed", Project.MSG_DEBUG);
         }
     }
 
     /**
      * {@inheritDoc}
      */
-    public void handleTargetStarted(BuildEvent event) {
-        Project project = event.getProject();
-        if (!summarize) {
-            StageSummary stageSummary = getStageSummary(project);
-            summarize = stageSummary != null
-                    && stageSummary.getTemplate() != null;
-            lookup4Stages = summarize;
-            template = stageSummary.getTemplate();
-            log.debug("Is Project configured to display Stage Summary ? "
-                    + summarize);
+    public void targetStarted(BuildEvent event) {
+        if (!initialized) {
+            if (template != null) {
+                parseStages(event.getProject());
+                CommonListener.getCommonListener().getProject().log("Stage summary enabled...", Project.MSG_DEBUG);
+                summarize = true;
+            } else {
+                
+                CommonListener.getCommonListener().getProject().log("Stage summary disabled because template is missing.", Project.MSG_DEBUG);
+            }
+            initialized = true;
         }
 
-        if (lookup4Stages) {
-            log.debug("Loading stages....");
-            parseStages(event.getProject());
-            log.debug("Total no of stages loaded = " + stages.size());
-            lookup4Stages = false;
-        }
-
-        log.debug("Handling target - " + event.getTarget().getName());
         if (summarize && doRunTarget(event)) {
             StageWrapper stage = searchNewStage(event);
             if (stage != null) {
@@ -126,7 +112,7 @@
     /**
      * {@inheritDoc}
      */
-    public void handleTargetFinished(BuildEvent event) {
+    public void targetFinished(BuildEvent event) {
         if (summarize && isCurrentStageToEnd(event)) {
             endCurrentStage();
         }
@@ -155,32 +141,6 @@
     }
 
     /**
-     * Method returns the configured {@link StageSummary}.
-     * 
-     * @param project
-     *            is the project to lookup for stageSummary.
-     * @return the {@link StageSummary}.
-     */
-    @SuppressWarnings("unchecked")
-    private StageSummary getStageSummary(Project project) {
-        StageSummary stageSummary = null;
-        int count = 0;
-        Hashtable<String, Object> references = project.getReferences();
-        for (Enumeration<String> en = references.keys(); en.hasMoreElements();) {
-            Object object = references.get(en.nextElement());
-            if (object instanceof StageSummary) {
-                count++;
-                if (count > 1) {
-                    throw new BuildException("Multiple entries of 'hlm:stagesummary' found in "
-                            + "stages_config.ant.xml.");
-                }
-                stageSummary = (StageSummary) object;
-            }
-        }
-        return stageSummary;
-    }
-
-    /**
      * Start the given stage as a new build stage.
      * 
      * @param newStage
@@ -194,8 +154,8 @@
         }
         newStage.setStartTime(currTime);
         this.currentStage = newStage;
-        log.debug("New stage [" + newStage.stageName + "] started at "
-                + getTimestamp(currTime));
+        CommonListener.getCommonListener().getProject().log("New stage [" + newStage.stageName + "] started at "
+                + getTimestamp(currTime), Project.MSG_DEBUG);
     }
 
     /**
@@ -214,8 +174,8 @@
                         currTime));
                 completedStages.put(currentStage.stageName, currentStage);
             }
-            log.debug("Stage [" + currentStage.stageName + "] finished at "
-                    + getTimestamp(currTime));
+            CommonListener.getCommonListener().getProject().log("Stage [" + currentStage.stageName + "] finished at "
+                    + getTimestamp(currTime), Project.MSG_DEBUG);
             currentStage = null;
         }
     }
@@ -333,7 +293,7 @@
         if (template != null) {
             try {
                 Configuration cfg = new Configuration();
-                log.debug("Basedir: " + template.getParentFile());
+                CommonListener.getCommonListener().getProject().log("Basedir: " + template.getParentFile(), Project.MSG_DEBUG);
                 cfg.setTemplateLoader(new FileTemplateLoader(template
                         .getParentFile()));
                 Template templ = cfg.getTemplate(template.getName());
@@ -412,13 +372,13 @@
     private void validateStageInformation(String stageKey, Stage stage) {
 
         if (stage.getStartTarget() == null) {
-            throw new BuildException("'starttarget' for stage '" + stageKey
-                    + "' should not be null.");
+            throw new BuildException("'starttarget' attribute for stage '" + stageKey
+                    + "' is not defined.");
         }
 
         if (stage.getEndTarget() == null) {
-            throw new BuildException("'endtarget' for stage '" + stageKey
-                    + "' should not be null.");
+            throw new BuildException("'endtarget' attribute for stage '" + stageKey
+                    + "' is not defined.");
         }
     }
 
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/StatusAndLogListener.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,342 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  
- *
- */
-package com.nokia.helium.logger.ant.listener;
-
-import java.util.Vector;
-
-import org.apache.log4j.Logger;
-import org.apache.tools.ant.BuildEvent;
-import org.apache.tools.ant.BuildListener;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.SubBuildListener;
-
-/**
- * <code>StatusAndLogListener</code> implements {@link BuildListener} and listens to build events in
- * particularly for activities such as ant logging and displaying build stage summary at the end of
- * build process.
- * 
- */
-public class StatusAndLogListener implements BuildListener, SubBuildListener {
-    private static StatusAndLogListener self;
-
-    private Vector<BuildEventHandler> buildHandlers = new Vector<BuildEventHandler>();
-    private Vector<TargetEventHandler> targetHandlers = new Vector<TargetEventHandler>();
-    private Vector<TaskEventHandler> taskHandlers = new Vector<TaskEventHandler>();
-    private Vector<MessageEventHandler> messageHandlers = new Vector<MessageEventHandler>();
-    private Vector<SubBuildEventHandler> subBuildHandlers = new Vector<SubBuildEventHandler>();
-    private Project project;
-    private Logger log = Logger.getLogger(getClass());
-
-    /**
-     * Default constructor
-     */
-    public StatusAndLogListener() {
-        self = this;
-    }
-
-    /**
-     * Signals that the last target has finished. This event will still be fired if an error
-     * occurred during the build.
-     * 
-     * @param event An event with any relevant extra information. Must not be <code>null</code>.
-     * 
-     * @see BuildEvent#getException()
-     */
-    public synchronized void buildStarted(BuildEvent event) {
-        project = event.getProject();
-        for (BuildEventHandler handler : buildHandlers) {
-            handler.handleBuildStarted(event);
-        }
-
-    }
-
-    /**
-     * Signals that a build has started. This event is fired before any targets have started.
-     * 
-     * @param event An event with any relevant extra information. Must not be <code>null</code>.
-     */
-    public synchronized void buildFinished(BuildEvent event) {
-        for (BuildEventHandler handler : buildHandlers) {
-            handler.handleBuildFinished(event);
-        }
-    }
-
-    /**
-     * Signals that a target is starting.
-     * 
-     * @param event An event with any relevant extra information. Must not be <code>null</code>.
-     * 
-     * @see BuildEvent#getTarget()
-     */
-    public synchronized void targetStarted(BuildEvent event) {
-        for (TargetEventHandler handler : targetHandlers) {
-            handler.handleTargetStarted(event);
-        }
-    }
-
-    /**
-     * Signals that a target has finished. This event will still be fired if an error occurred
-     * during the build.
-     * 
-     * @param event An event with any relevant extra information. Must not be <code>null</code>.
-     * 
-     * @see BuildEvent#getException()
-     */
-    public synchronized void targetFinished(BuildEvent event) {
-        for (TargetEventHandler handler : targetHandlers) {
-            handler.handleTargetFinished(event);
-        }
-    }
-
-    /**
-     * Signals that a task is starting.
-     * 
-     * @param event An event with any relevant extra information. Must not be <code>null</code>.
-     * 
-     * @see BuildEvent#getTask()
-     */
-    public synchronized void taskStarted(BuildEvent event) {
-        for (TaskEventHandler handler : taskHandlers) {
-            handler.handleTaskStarted(event);
-        }
-    }
-
-    /**
-     * Signals that a task has finished. This event will still be fired if an error occurred during
-     * the build.
-     * 
-     * @param event An event with any relevant extra information. Must not be <code>null</code>.
-     * 
-     * @see BuildEvent#getException()
-     */
-    public synchronized void taskFinished(BuildEvent event) {
-        for (TaskEventHandler handler : taskHandlers) {
-            handler.handleTaskFinished(event);
-        }
-    }
-
-    /**
-     * Signals that a subbuild has started. This event is fired before any targets have started.
-     * 
-     * @param event
-     */
-    public synchronized void subBuildStarted(BuildEvent event) {
-        for (SubBuildEventHandler handler : subBuildHandlers) {
-            handler.handleSubBuildStarted(event);
-        }
-    }
-
-    /**
-     * Signals that the last target has finished. This event will still be fired if an error
-     * occurred during the build.
-     * 
-     * @param event
-     */
-
-    public synchronized void subBuildFinished(BuildEvent event) {
-        for (SubBuildEventHandler handler : subBuildHandlers) {
-            handler.handleSubBuildStarted(event);
-        }
-    }
-
-    /**
-     * Signals a message logging event.
-     * 
-     * @param event An event with any relevant extra information. Must not be <code>null</code>.
-     * 
-     * @see BuildEvent#getMessage()
-     * @see BuildEvent#getException()
-     * @see BuildEvent#getPriority()
-     */
-    public synchronized void messageLogged(BuildEvent event) {
-        for (MessageEventHandler handler : messageHandlers) {
-            handler.handleMessageLogged(event);
-        }
-    }
-
-    /**
-     * Register the given handler.
-     * 
-     * @param handler is the handler to register
-     */
-    public synchronized void register(Handler handler) {
-        Vector<BuildEventHandler> tmpBuildHandlers = new Vector<BuildEventHandler>(buildHandlers);
-        tmpBuildHandlers.add(handler);
-        buildHandlers = tmpBuildHandlers;
-        Vector<TargetEventHandler> tmpTargetHandlers = new Vector<TargetEventHandler>(targetHandlers);
-        tmpTargetHandlers.add(handler);
-        targetHandlers = tmpTargetHandlers;
-    }
-
-    /**
-     * Register the given handler.
-     * 
-     * @param handler is the handler to register
-     */
-    public synchronized void remove(Handler handler) {
-        Vector<BuildEventHandler> tmpBuildHandlers = new Vector<BuildEventHandler>(buildHandlers);
-        tmpBuildHandlers.remove(handler);
-        buildHandlers = tmpBuildHandlers;
-        Vector<TargetEventHandler> tmpTargetHandlers = new Vector<TargetEventHandler>(targetHandlers);
-        tmpTargetHandlers.remove(handler);
-        targetHandlers = tmpTargetHandlers;
-    }
-
-    /**
-     * Register the given handler.
-     * 
-     * @param handler is the handler to register
-     */
-    public synchronized void register(BuildEventHandler handler) {
-        Vector<BuildEventHandler> tmp = new Vector<BuildEventHandler>(buildHandlers);
-        tmp.add(handler);
-        buildHandlers = tmp;
-    }
-
-    /**
-     * Remove the given handler.
-     * 
-     * @param handler is the handler to register
-     */
-    public synchronized void remove(BuildEventHandler handler) {
-        Vector<BuildEventHandler> tmp = new Vector<BuildEventHandler>(buildHandlers);
-        tmp.remove(handler);
-        buildHandlers = tmp;
-    }
-
-    /**
-     * Register the given handler.
-     * 
-     * @param handler is the handler to register
-     */
-    public synchronized void register(TargetEventHandler handler) {
-        Vector<TargetEventHandler> tmp = new Vector<TargetEventHandler>(targetHandlers);
-        tmp.add(handler);
-        targetHandlers = tmp;
-    }
-
-    /**
-     * Remove the given handler.
-     * 
-     * @param handler is the handler to register
-     */
-    public synchronized void remove(TargetEventHandler handler) {
-        Vector<TargetEventHandler> tmp = new Vector<TargetEventHandler>(targetHandlers);
-        tmp.remove(handler);
-        targetHandlers = tmp;
-    }
-
-    /**
-     * Register the given SubBuildEventHandler.
-     * 
-     * @param handler is the handler to register
-     */
-    public synchronized void register(SubBuildEventHandler handler) {
-        Vector<SubBuildEventHandler> tmp = new Vector<SubBuildEventHandler>(subBuildHandlers);
-        tmp.add(handler);
-        subBuildHandlers = tmp;
-    }
-
-    /**
-     * Remove the given SubBuildEventHandler.
-     * 
-     * @param handler is the handler to register
-     */
-    public synchronized void remove(SubBuildEventHandler handler) {
-        Vector<SubBuildEventHandler> tmp = new Vector<SubBuildEventHandler>(subBuildHandlers);
-        tmp.remove(handler);
-        subBuildHandlers = tmp;
-    }
-
-    /**
-     * Register the given MessageEventHandler.
-     * 
-     * @param handler is the handler to register
-     */
-    public synchronized void register(MessageEventHandler handler) {
-        Vector<MessageEventHandler> tmp = new Vector<MessageEventHandler>(messageHandlers);
-        tmp.add(handler);
-        messageHandlers = tmp;
-    }
-
-    /**
-     * Remove the given MessageEventHandler.
-     * 
-     * @param handler is the handler to register
-     */
-    public synchronized void remove(MessageEventHandler handler) {
-        Vector<MessageEventHandler> tmp = new Vector<MessageEventHandler>(messageHandlers);
-        tmp.remove(handler);
-        messageHandlers = tmp;
-    }
-
-    /**
-     * Register the given TaskEventHandler.
-     * 
-     * @param handler is the handler to register
-     */
-    public synchronized void register(TaskEventHandler handler) {
-        Vector<TaskEventHandler> tmp = new Vector<TaskEventHandler>(taskHandlers);
-        tmp.add(handler);
-        taskHandlers = tmp;
-    }
-
-    /**
-     * Remove the given TaskEventHandler.
-     * 
-     * @param handler is the handler to register
-     */
-    public synchronized void remove(TaskEventHandler handler) {
-        Vector<TaskEventHandler> tmp = new Vector<TaskEventHandler>(taskHandlers);
-        tmp.remove(handler);
-        taskHandlers = tmp;
-    }
-
-    /**
-     * Return root project.
-     * 
-     * @return
-     */
-    public Project getProject() {
-        return project;
-    }
-
-    /**
-     * Get the main StatusAndLogListener.
-     * 
-     * @return
-     */
-    public static StatusAndLogListener getStatusAndLogListener() {
-        return self;
-    }
-
-    /**
-     * Check and return required type handler.
-     * 
-     * @param handlerType
-     * @return
-     */
-    public synchronized Handler getHandler(Class<?> handlerType) {
-        for (BuildEventHandler handler : buildHandlers) {
-            if (handlerType.isInstance(handler)) {
-                return (Handler) handler;
-            }
-        }
-        return null;
-    }
-
-}
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/SubBuildEventHandler.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/SubBuildEventHandler.java	Wed Oct 13 16:31:27 2010 +0800
@@ -30,12 +30,12 @@
      * Method to handle SubBuild Started  events.
      * @param event
      */
-    void handleSubBuildStarted( BuildEvent event );
+    void subBuildStarted( BuildEvent event );
     
     /**
      * Method to handle SubBuild Finished  events.
      * @param event
      */
-    void handleSubBuildFinished( BuildEvent event );
+    void subBuildFinished( BuildEvent event );
     
 }
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/TargetEventHandler.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/TargetEventHandler.java	Wed Oct 13 16:31:27 2010 +0800
@@ -32,13 +32,13 @@
      * @param event
      */
     
-    void handleTargetStarted( BuildEvent event );
+    void targetStarted( BuildEvent event );
   
    /**
     * Method to handle target finish events.
     * 
     * @param event is the build event to be handled. 
     */
-    void handleTargetFinished( BuildEvent event );
+    void targetFinished( BuildEvent event );
    
 }
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/TaskEventHandler.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/TaskEventHandler.java	Wed Oct 13 16:31:27 2010 +0800
@@ -31,13 +31,13 @@
     * 
     * @param event is the build event to be handled. 
     */
-    void handleTaskFinished( BuildEvent event );
+    void taskFinished( BuildEvent event );
 
    /**
     * Method to handle Task Started( events.
     * 
     * @param event is the build event to be handled. 
     */
-    void handleTaskStarted( BuildEvent event );
+    void taskStarted( BuildEvent event );
     
 }
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/taskdefs/LogRecorderTask.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/taskdefs/LogRecorderTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -30,13 +30,12 @@
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.Recorder.VerbosityLevelChoices;
 import org.apache.tools.ant.types.EnumeratedAttribute;
-import org.apache.tools.ant.types.LogLevel;
 
 import com.nokia.helium.logger.ant.listener.AntLoggingHandler;
-import com.nokia.helium.logger.ant.listener.Handler;
 import com.nokia.helium.logger.ant.listener.RecorderEntry;
-import com.nokia.helium.logger.ant.listener.StatusAndLogListener;
+import com.nokia.helium.logger.ant.listener.CommonListener;
 import com.nokia.helium.logger.ant.types.RecordFilter;
 import com.nokia.helium.logger.ant.types.RecordFilterSet;
 
@@ -51,11 +50,11 @@
  *      
  * </pre>
  * 
- * @ant.task name="Record" category="Logging".
+ * @ant.task name="Record" category="Logging"
  *
  */
 
-public class LogRecorderTask extends Task implements Handler {
+public class LogRecorderTask extends Task {
     
     private static Hashtable<File, RecorderEntry> recorderEntries = new Hashtable<File, RecorderEntry>();
     private File fileName;
@@ -74,18 +73,15 @@
      * Run by the task.
      */
     public void execute() {
-        StatusAndLogListener statusAndLogListener = new StatusAndLogListener();
-        AntLoggingHandler antLoggingHandler = new AntLoggingHandler(getProject());
-        antLoggingHandler.setLoggingStarted(true);
-        statusAndLogListener.register(antLoggingHandler);
+        CommonListener commonListener = CommonListener.getCommonListener();
             
-        /* To validate attributes passed. */
+        // To validate attributes passed.
         validateAttributes();
         
-        /* to add regular filters */
+        // to add regular filters
         addAllRecordFilters();
         
-        /* Init password/record filter and replace any unset properties */
+        // Init password/record filter and replace any unset properties
         initAndReplaceProperties();
         
         //Create the root folder path.
@@ -117,30 +113,25 @@
         recorder.setEmacsMode(emacsMode);
         if (start != null) {
             if (start.booleanValue()) {
-                getProject().addBuildListener(statusAndLogListener);
-                if (antLoggingHandler != null) {
-                    if (antLoggingHandler.getCurrentStageName() != null) {
-                        antLoggingHandler.doLoggingAction(antLoggingHandler.getCurrentStageName(), false, "Stopping", this, getOwningTarget());
-                    } else {
-                        antLoggingHandler.doLoggingAction("default", false, "Stopping", this, getOwningTarget());
-                    }
+                recorder.reopenFile();
+                commonListener.register(recorder);
+                recorder.setRecordState(start.booleanValue());
+                recorder.setRecorderProject(getProject());
+                AntLoggingHandler handler = commonListener.getHandler(AntLoggingHandler.class);
+                if (handler != null) {
+                    handler.addRecordExclusion(getProject());
                 }
-                recorder.reopenFile();
-                recorder.setRecordState(start.booleanValue());
             } else {
                 recorder.setRecordState(start.booleanValue());
                 recorder.closeFile();
-                getProject().removeBuildListener(statusAndLogListener);
-                if (antLoggingHandler != null) {
-                    if (antLoggingHandler.getCurrentStageName() != null) {
-                        antLoggingHandler.doLoggingAction(antLoggingHandler.getCurrentStageName(), true, "Starting", this, getOwningTarget());
-                    } else {
-                        antLoggingHandler.doLoggingAction("default", true, "Starting", this, getOwningTarget());
-                    }
+                commonListener.unRegister(recorder);
+                recorder.setRecorderProject(null);
+                AntLoggingHandler handler = commonListener.getHandler(AntLoggingHandler.class);
+                if (handler != null) {
+                    handler.removeRecordExclusion(getProject());
                 }
             }
         }
-        
     }
     /**
      * To Validate is the fileName set for recording.
@@ -281,16 +272,7 @@
             return VALUES;
         }
     }
-    
-    /**
-     * To set the verbosity levels
-     * 
-     *
-     */
-    public static class VerbosityLevelChoices extends LogLevel {
-    }
-    
-    
+        
     /**
      * To register the recorder entry
      */
@@ -298,11 +280,10 @@
         RecorderEntry entry = recorderEntries.get(name);
         if (entry == null) {
             // create a recorder entry
-            entry = new RecorderEntry(name);
+            entry = new RecorderEntry(name, true);
             for (String regExp : regExpList) {
                 if (!regExp.equals("")) {
-                    String pattern = Pattern.quote(regExp);
-                    entry.addRegexp(pattern);
+                    entry.addRegexp(Pattern.compile(Pattern.quote(regExp)));
                 }
             }
             entry.openFile(append);
@@ -320,23 +301,10 @@
         }
     }
     
-    public void handleBuildFinished(BuildEvent event) {
-        // TODO Auto-generated method stub
-
+    public void buildFinished(BuildEvent event) {
     }
 
-    public void handleBuildStarted(BuildEvent event) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void handleTargetFinished(BuildEvent event) {
-        // TODO Auto-generated method stub
-    }
-
-    public void handleTargetStarted(BuildEvent event) {
-        // TODO Auto-generated method stub
-
+    public void buildStarted(BuildEvent event) {
     }
     
     /**
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/taskdefs/LogReplaceTask.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/taskdefs/LogReplaceTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -23,7 +23,7 @@
 import org.apache.tools.ant.Task;
 
 import com.nokia.helium.logger.ant.listener.AntLoggingHandler;
-import com.nokia.helium.logger.ant.listener.StatusAndLogListener;
+import com.nokia.helium.logger.ant.listener.CommonListener;
 
 /**
  * To replace the property values with real values if the properties are not set at the begining of the build.
@@ -32,7 +32,7 @@
  *      &lt;hlm:logreplace regexp="${property.not.set}"/&gt;
  * </pre>
  * 
- * @ant.task name="logreplace" category="Logging".
+ * @ant.task name="logreplace" category="Logging"
  */
 public class LogReplaceTask extends Task {
     
@@ -43,20 +43,20 @@
      */
     
     public void execute() {
-        if (StatusAndLogListener.getStatusAndLogListener() == null) {
-            this.log("The StatusAndLogListener is not available.", Project.MSG_WARN);
+        if (regExp == null ) {
+            throw new BuildException("'regexp' attribute should not be null.");
+        }
+
+        if (CommonListener.getCommonListener() == null) {
+            this.log("The common listener is not available.", Project.MSG_WARN);
             return;
         }
 
-        AntLoggingHandler antLoggingHandler  = (AntLoggingHandler)StatusAndLogListener.getStatusAndLogListener().getHandler(AntLoggingHandler.class);
-        
-        if (regExp == null ) {
-            throw new BuildException("'regexp' attribute should not be null.");
-        }
-        
+        AntLoggingHandler antLoggingHandler  = CommonListener.getCommonListener().getHandler(AntLoggingHandler.class);
         if (antLoggingHandler != null) {
-            String pattern = Pattern.quote(regExp);
-            antLoggingHandler.addRegExp(pattern);
+            antLoggingHandler.addRegexp(Pattern.compile(Pattern.quote(regExp)));
+        } else {
+            log("Could not find the logging framework.", Project.MSG_WARN);
         }
     }
 
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/taskdefs/TriggerLoggerTask.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/taskdefs/TriggerLoggerTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -16,12 +16,11 @@
 */
 package com.nokia.helium.logger.ant.taskdefs;
 
-import org.apache.log4j.Logger;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.Task;
 
 import com.nokia.helium.logger.ant.listener.AntLoggingHandler;
-import com.nokia.helium.logger.ant.listener.StatusAndLogListener;
+import com.nokia.helium.logger.ant.listener.CommonListener;
 
 /**
  * This task is used to start the helium logging listener.
@@ -29,25 +28,19 @@
  */
 public class TriggerLoggerTask extends Task {
     
-    private Logger log = Logger.getLogger(TriggerLoggerTask.class);
     
     public void execute() {
-        log.debug("Registering Ant logging to StatusAndLogListener listener");
-        if (StatusAndLogListener.getStatusAndLogListener() == null) {
-            this.log("The StatusAndLogListener is not available.", Project.MSG_WARN);
+        log("Registering Ant logging to StatusAndLogListener listener", Project.MSG_DEBUG);
+        if (CommonListener.getCommonListener() == null) {
+            this.log("The CommonListener is not available.", Project.MSG_WARN);
             return;
         }
-        AntLoggingHandler antLoggingHandler = new AntLoggingHandler(getProject());
-        StatusAndLogListener.getStatusAndLogListener().register(antLoggingHandler);
-        if (antLoggingHandler != null ) {
-            if (!antLoggingHandler.getLoggingStarted()) {
-                log.debug("Starting Logging using 'AntLoggingHandler' first time.");
-                antLoggingHandler.setLoggingStarted(true);
-            } else {
-                log.debug("'AntLoggingHandler' is already started logging.");
-            }
+        AntLoggingHandler handler = CommonListener.getCommonListener().getHandler(AntLoggingHandler.class);
+        if (handler != null) {
+            log("Starting logging framework.", Project.MSG_DEBUG);
+            handler.setRecordState(true);
         } else {
-            log.debug("Could not find the AntLoggingHandler instance.");
+            log("Could not find the logging listener.", Project.MSG_WARN);
         }
     }
 
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/RecordFilter.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/RecordFilter.java	Wed Oct 13 16:31:27 2010 +0800
@@ -28,7 +28,7 @@
  *      &lt;hlm:recordfilter category="warn" regexp="^WARN"/&gt;
  * </pre>
  * 
- * @ant.task name="Recordfilter" category="Logging".
+ * @ant.task name="Recordfilter" category="Logging"
  *
  */
 
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/RecordFilterSet.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/RecordFilterSet.java	Wed Oct 13 16:31:27 2010 +0800
@@ -35,7 +35,7 @@
  *      
  * </pre>
  * 
- * @ant.task name="Recordfilterset" category="Logging".
+ * @ant.task name="Recordfilterset" category="Logging"
  *
  */
 
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/StageLogging.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-package com.nokia.helium.logger.ant.types;
-
-import java.io.File;
-
-import org.apache.log4j.Logger;
-import org.apache.tools.ant.types.DataType;
-
-/**
- * A 'StageRecord' is a Data type which stores attributes for stage recording/logging.
- * 
- * 
- * Usage:
- * <pre>
- * &lt;hlm:stagerecord id="record.default" defaultoutput="${build.log.dir}/${build.id}_main.ant.log" loglevel="info" append="false"/&gt;
- *      
- *                  
- * &lt;hlm:stagerecord id="record.prep"  
- *                  stagerefid="preparation" 
- *                  output="${build.log.dir}/${build.id}_prep.ant.log" 
- *                  loglevel="info"
- *                  append="false"/&gt;
- *                                  
- * </pre>
- * 
- * 
- * @ant.task name="stagerecord" category="Logging"
- */
-public class StageLogging extends DataType {
-    
-    private static boolean isAntLoggerRegistered;
-    private String logLevel = "info";
-    private File logFile;
-    private File defaultLogFile;
-    private boolean append = true;
-    private String stageRefId;
-    private Logger log = Logger.getLogger(getClass());
-    
-    
-    /**
-     * Sets output log file name.
-     * @param output the file to log into
-     * @ant.required
-     */
-    
-    public void setOutput(File output) {
-        this.logFile = output;
-    }
-    
-    /**
-     * Returns output log file name.
-     * @return
-     */
-    
-    public File getOutput() {
-        return this.logFile;
-    }
-    
-    /**
-     * Sets log level for respective stage.
-     * @param logLevel
-     * @ant.not-required
-     */
-    
-    public void setLogLevel(String logLevel) {
-        this.logLevel = logLevel;
-    }
-    
-    /**
-     * Returns log level of respective stage.
-     * @return
-     */
-    
-    public String getLogLevel() {
-        return this.logLevel;
-    }
-    
-    /**
-     * Get the name of this StageRefID.
-     * 
-     * @return name of the Phase.
-     */
-    public String getStageRefID() {
-        return this.stageRefId;
-    }
-
-    /**
-     * Set the name of the StageRefID.
-     * 
-     * @param name
-     *            is the name to set.
-     * @ant.required
-     */
-    public void setStageRefId(String name) {
-        this.stageRefId = name;
-    }
-    
-    /**
-     * Return default ant log file name.
-     * @return
-     */
-    public File getDefaultOutput() {
-        return this.defaultLogFile;
-    }
-
-   /**
-    * Set the default ant log name.
-    * @param name
-    * @ant.required
-    */
-    public void setDefaultOutput(File name) {
-        this.defaultLogFile = name;
-    }
-    
-    /**
-     * Set append value.
-     * @param append
-     * @ant.not-required Default is true
-     */
-    public void setAppend(boolean append) {
-        this.append = append;
-    }
-    
-    /**
-     * Return the append value.
-     * @param append
-     * @return
-     */
-    public boolean getAppend() {
-        return this.append;
-    }
-    
-     
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/StageRecord.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,147 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.logger.ant.types;
+
+import java.io.File;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Recorder.VerbosityLevelChoices;
+import org.apache.tools.ant.types.DataType;
+
+/**
+ * A 'StageRecord' is a Data type which stores attributes for stage recording/logging.
+ * 
+ * 
+ * Usage:
+ * <pre>
+ * &lt;hlm:stagerecord id="record.default" defaultoutput="${build.log.dir}/${build.id}_main.ant.log" loglevel="info" append="false"/&gt;
+ *      
+ *                  
+ * &lt;hlm:stagerecord id="record.prep"  
+ *                  stagerefid="preparation" 
+ *                  output="${build.log.dir}/${build.id}_prep.ant.log" 
+ *                  loglevel="info"
+ *                  append="false"/&gt;
+ *                                  
+ * </pre>
+ * 
+ * 
+ * @ant.task name="stagerecord" category="Logging"
+ */
+public class StageRecord extends DataType {
+    
+    private int logLevel = Project.MSG_INFO;
+    private File logFile;
+    private File defaultLogFile;
+    private boolean append = true;
+    private String stageRefId;
+    
+    /**
+     * Sets output log file name.
+     * @param output the file to log into
+     * @ant.required
+     */
+    
+    public void setOutput(File output) {
+        this.logFile = output;
+    }
+    
+    /**
+     * Returns output log file name.
+     * @return
+     */
+    
+    public File getOutput() {
+        return this.logFile;
+    }
+    
+    /**
+     * Sets log level for respective stage.
+     * @param logLevel
+     * @ant.not-required
+     */
+    
+    public void setLogLevel(VerbosityLevelChoices logLevel) {
+        this.logLevel = logLevel.getLevel();
+    }
+    
+    /**
+     * Returns log level of respective stage.
+     * @return
+     */
+    
+    public int getLogLevel() {
+        return this.logLevel;
+    }
+    
+    /**
+     * Get the name of this StageRefID.
+     * 
+     * @return name of the Phase.
+     */
+    public String getStageRefID() {
+        return this.stageRefId;
+    }
+
+    /**
+     * Set the name of the StageRefID.
+     * 
+     * @param name
+     *            is the name to set.
+     * @ant.required
+     */
+    public void setStageRefId(String name) {
+        this.stageRefId = name;
+    }
+    
+    /**
+     * Return default ant log file name.
+     * @return
+     */
+    public File getDefaultOutput() {
+        return this.defaultLogFile;
+    }
+
+   /**
+    * Set the default ant log name.
+    * @param name
+    * @ant.required
+    */
+    public void setDefaultOutput(File name) {
+        this.defaultLogFile = name;
+    }
+    
+    /**
+     * Set append value.
+     * @param append
+     * @ant.not-required Default is true
+     */
+    public void setAppend(boolean append) {
+        this.append = append;
+    }
+    
+    /**
+     * Return the append value.
+     * @param append
+     * @return
+     */
+    public boolean getAppend() {
+        return this.append;
+    }
+    
+     
+}
--- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/StageSummary.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/StageSummary.java	Wed Oct 13 16:31:27 2010 +0800
@@ -18,12 +18,11 @@
 
 import java.io.File;
 
-import org.apache.log4j.Logger;
-import org.apache.tools.ant.Project;
 import org.apache.tools.ant.types.DataType;
 
+import com.nokia.helium.logger.ant.listener.CommonListenerRegister;
 import com.nokia.helium.logger.ant.listener.StageSummaryHandler;
-import com.nokia.helium.logger.ant.listener.StatusAndLogListener;
+import com.nokia.helium.logger.ant.listener.CommonListener;
 
 /**
  * <code>StageSummary</code> is a Data type when set a build summary is 
@@ -38,21 +37,9 @@
  * @ant.task name="stagesummary" category="Logging"
  * 
  */
-public class StageSummary extends DataType {
-
-    private static boolean isStageSummaryHandlerRegistered;
-    private File template;
-    private Logger log = Logger.getLogger(getClass());
+public class StageSummary extends DataType implements CommonListenerRegister {
 
-    public void setProject(Project project)
-    {
-        super.setProject(project);
-        if ( !isStageSummaryHandlerRegistered && StatusAndLogListener.getStatusAndLogListener() != null) {
-            log.debug("Registering stage summary to the StatusAndLogListener listener");
-            StatusAndLogListener.getStatusAndLogListener().register( new StageSummaryHandler() );
-            isStageSummaryHandlerRegistered = true;
-        }
-    }
+    private File template;
     
     /**
      * Get the template used for displaying build stage summary.
@@ -73,4 +60,13 @@
     public void setTemplate( File template ) {
         this.template = template;
     }
+
+    @Override
+    public void register(CommonListener commonListener) {
+        if (commonListener.getHandler(StageSummaryHandler.class) != null) {
+            log("Only one stageSummary configuration element should be used. Ignoring type at " + this.getLocation());
+        } else {
+            commonListener.register(new StageSummaryHandler(getTemplate()));
+        }
+    }
 }
--- a/buildframework/helium/sf/java/logging/tests/antunit/run-scenario.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/tests/antunit/run-scenario.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -21,36 +21,36 @@
 ============================================================================
 -->
 <project name="run-scenario" xmlns:ac="antlib:net.sf.antcontrib" xmlns:au="antlib:org.apache.ant.antunit">
-    <description>Helium Antlib logger macro.</description>
+   <description>Helium Antlib logger macro.</description>
 
-    <target name="setUp">
-        <tempfile property="temp.dir" suffix=".dir" />
-        <mkdir dir="${temp.dir}" />
-        <echo>--------------------------------------------</echo>
-    </target>
+   <target name="setUp">
+       <tempfile property="temp.dir" suffix=".dir" />
+       <mkdir dir="${temp.dir}" />
+       <echo>--------------------------------------------</echo>
+   </target>
     
-    <target name="tearDown">
-        <echo>--------------------------------------------</echo>
-        <delete dir="${temp.dir}" />
-    </target>
+   <target name="tearDown">
+       <echo>--------------------------------------------</echo>
+       <delete dir="${temp.dir}" />
+   </target>
     
-    <macrodef name="runScenario">
-        <attribute name="scenario" />
-        <attribute name="target" />
-        <sequential>
-            <exec osfamily="windows" executable="cmd" dir="${ant.file.run-scenario}/../../scenarii/@{scenario}" failonerror="true">
-                 <env key="ANT_ARGS" value="${env.ANT_ARGS} -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener" />
-                 <arg line="/c ..\build.bat @{target}" />
-                 <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor" />
-                 <arg value="-Dtemp.dir=${temp.dir}" />
-            </exec>
-            <exec osfamily="unix" executable="../bld.sh" dir="${ant.file.run-scenario}/../../scenarii/@{scenario}" failonerror="true">
-                 <env key="ANT_ARGS" value="${env.ANT_ARGS} -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener" />
-                 <arg line="@{target}" />
-                 <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor" />
-                 <arg value="-Dtemp.dir=${temp.dir}" />
-            </exec>
-        </sequential>
-    </macrodef>
+   <macrodef name="runScenario">
+       <attribute name="scenario" />
+       <attribute name="target" />
+       <sequential>
+           <exec osfamily="windows" executable="cmd" dir="${ant.file.run-scenario}/../../scenarii/@{scenario}" failonerror="true">
+               <env key="ANT_ARGS" value="${env.ANT_ARGS} -listener com.nokia.helium.logger.ant.listener.CommonListener" />
+               <arg line="/c ..\build.bat @{target}" />
+               <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor" />
+               <arg value="-Dtemp.dir=${temp.dir}" />
+           </exec>
+           <exec osfamily="unix" executable="../bld.sh" dir="${ant.file.run-scenario}/../../scenarii/@{scenario}" failonerror="true">
+               <env key="ANT_ARGS" value="${env.ANT_ARGS} -listener com.nokia.helium.logger.ant.listener.CommonListener" />
+               <arg line="@{target}" />
+               <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor" />
+               <arg value="-Dtemp.dir=${temp.dir}" />
+           </exec>
+       </sequential>
+   </macrodef>
 
 </project>
--- a/buildframework/helium/sf/java/logging/tests/antunit/test_recorder.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/tests/antunit/test_recorder.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -45,4 +45,19 @@
         <runScenario scenario="logger" target="test-recorder-filtering" />
     </target>
     
+    <target name="test-mainlog">
+        <runScenario scenario="logger" target="test-mainlog" />
+        
+        <loadfile srcfile="${temp.dir}/logs/1_main.ant.log" property="message"/>
+        <au:assertTrue message="test1 missing">
+            <contains string="${message}" substring="test1"/>
+        </au:assertTrue>
+        <au:assertTrue message="BUILD SUCCESSFUL missing">
+            <contains string="${message}" substring="BUILD SUCCESSFUL"/>
+        </au:assertTrue>
+        <au:assertFalse message="Not in mainlog found">
+            <contains string="${message}" substring="Not in mainlog"/>
+        </au:assertFalse>
+    </target>
+    
 </project>
--- a/buildframework/helium/sf/java/logging/tests/antunit/test_stageslogging.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/tests/antunit/test_stageslogging.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -27,6 +27,10 @@
      
     <target name="test-scenario-valid-build">
         <runScenario scenario="valid_build" target="build" />
+        <loadfile property="main.log" srcFile="${temp.dir}/logs/ant-logging-test_main.ant.log" />
+        <au:assertTrue message="Target name are not recorded properly.">
+            <contains string="${main.log}" substring="test-stages:" />
+        </au:assertTrue>
     </target>
 
     <target name="test-override-scenario">
--- a/buildframework/helium/sf/java/logging/tests/scenarii/build_failure/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/tests/scenarii/build_failure/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -28,6 +28,7 @@
         
     <taskdef resource="com/nokia/helium/logger/ant/antlib.xml" uri="http://www.nokia.com/helium" />
     <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    <hlm:stagerecorderlistener id="stage.recorder.listener.id" />
     
     <hlm:stage id="stage1" starttarget="stage1" endtarget="stage1" />
     <hlm:stage id="stage2" starttarget="stage2" endtarget="stage2" />
--- a/buildframework/helium/sf/java/logging/tests/scenarii/build_status/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/tests/scenarii/build_status/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -28,7 +28,8 @@
         
     <taskdef resource="com/nokia/helium/logger/ant/antlib.xml" uri="http://www.nokia.com/helium" />
     <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
-    
+    <hlm:stagerecorderlistener id="stage.recorder.listener.id" />
+
     <hlm:stage id="stage1" starttarget="stage1" endtarget="stage1" />
     <hlm:stage id="stage2" starttarget="stage2" endtarget="stage3" />
     
--- a/buildframework/helium/sf/java/logging/tests/scenarii/inavlid_stage_refid_object/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/tests/scenarii/inavlid_stage_refid_object/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -28,6 +28,7 @@
         
     <taskdef resource="com/nokia/helium/logger/ant/antlib.xml" uri="http://www.nokia.com/helium" />
     <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    <hlm:stagerecorderlistener id="stage.recorder.listener.id" />
     
     <hlm:stage id="stage1" starttarget="stage1" endtarget="stage1" />
     <hlm:stage id="stage2" starttarget="stage2" endtarget="stage2" />
--- a/buildframework/helium/sf/java/logging/tests/scenarii/invalid_stage_refid/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/tests/scenarii/invalid_stage_refid/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -28,6 +28,7 @@
         
     <taskdef resource="com/nokia/helium/logger/ant/antlib.xml" uri="http://www.nokia.com/helium" />
     <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    <hlm:stagerecorderlistener id="stage.recorder.listener.id" />
     
     <hlm:stage id="stage1" starttarget="stage1" endtarget="stage1" />
     <hlm:stage id="stage2" starttarget="stage2" endtarget="stage2" />
--- a/buildframework/helium/sf/java/logging/tests/scenarii/logger/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/tests/scenarii/logger/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -127,5 +127,17 @@
             <contains string="${message}" substring="Some sensitive test output ********"/>
         </au:assertTrue>
     </target>
+    
+    <target name="test-mainlog">
+        <hlm:triggerlogger/>
+        <antcall target="print-target"/>
+    </target>
+    
+    <target name="print-target">
+        <echo>test1</echo>
+        <hlm:record name="${temp.dir}/record1.log" action="start"/>
+        <echo>Not in mainlog</echo>
+        <hlm:record name="${temp.dir}/record1.log" action="stop"/>
+    </target>
 
 </project>
--- a/buildframework/helium/sf/java/logging/tests/scenarii/missing_default_config/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/tests/scenarii/missing_default_config/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -28,6 +28,7 @@
         
     <taskdef resource="com/nokia/helium/logger/ant/antlib.xml" uri="http://www.nokia.com/helium" />
     <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    <hlm:stagerecorderlistener id="stage.recorder.listener.id" />
     
     <hlm:stage id="stage1" starttarget="stage1" endtarget="stage1" />
     <hlm:stage id="stage2" starttarget="stage2" endtarget="stage2" />
--- a/buildframework/helium/sf/java/logging/tests/scenarii/missing_stage_refid/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/tests/scenarii/missing_stage_refid/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -28,6 +28,7 @@
         
     <taskdef resource="com/nokia/helium/logger/ant/antlib.xml" uri="http://www.nokia.com/helium" />
     <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    <hlm:stagerecorderlistener id="stage.recorder.listener.id" />
     
     <hlm:stage id="stage1" starttarget="stage1" endtarget="stage1" />
     <hlm:stage id="stage2" starttarget="stage2" endtarget="stage2" />
--- a/buildframework/helium/sf/java/logging/tests/scenarii/override_scenario/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/tests/scenarii/override_scenario/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -28,6 +28,7 @@
         
     <taskdef resource="com/nokia/helium/logger/ant/antlib.xml" uri="http://www.nokia.com/helium" />
     <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    <hlm:stagerecorderlistener id="stage.recorder.listener.id" />
     
     <hlm:stage id="stage1" starttarget="stage1" endtarget="stage1" />
     <hlm:stage id="stage2" starttarget="stage2" endtarget="stage2" />
--- a/buildframework/helium/sf/java/logging/tests/scenarii/valid_build/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/tests/scenarii/valid_build/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -39,8 +39,7 @@
     </target>
     
     
-    <target name="run-stages">
-        <antcall target="start-ant-log"/>
+    <target name="run-stages" depends="start-ant-log">
         <antcall target="para-test7"/>
         <hlm:record name="${build.log.dir}/${build.id}_recorder.log" action="start" loglevel="info" backup="false">
             <hlm:recordfilterset refid="recordfilter.config"/>
--- a/buildframework/helium/sf/java/logging/tests/scenarii/valid_build/stages_config.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/tests/scenarii/valid_build/stages_config.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -27,7 +27,8 @@
     
     <taskdef resource="com/nokia/helium/logger/ant/antlib.xml" uri="http://www.nokia.com/helium" />
     <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
-    
+    <hlm:stagerecorderlistener id="stage.recorder.listener.id" />
+
     <dirname property="logging.test.project.dir" file="${ant.file.stages-config}" />
     
     <hlm:stagesummary id="stage.summary" template="build_stages_summary.txt.ftl" />
--- a/buildframework/helium/sf/java/logging/tests/stages_config.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/logging/tests/stages_config.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -27,7 +27,8 @@
     
     <taskdef resource="com/nokia/helium/logger/ant/antlib.xml" uri="http://www.nokia.com/helium" />
     <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
-    
+    <hlm:stagerecorderlistener id="stage.recorder.listener.id" />
+
     <dirname property="logging.test.project.dir" file="${ant.file.stages-config}" />
     
     <hlm:stagesummary id="stage.summary" template="${logging.test.project.dir}\build_stages_summary.txt.ftl" />
@@ -38,6 +39,9 @@
     <hlm:stage id="startend" starttarget="start" endtarget="end"/>
     <hlm:stage id="paralleltest" starttarget="paratest" endtarget="paratest"/>
     
+    <property name="build.log.dir" location="${temp.dir}/logs"/>
+    <property name="build.id" value="1"/>
+    
     <hlm:stagerecord id="record.default" defaultoutput="${build.log.dir}/${build.id}_main.ant.log" loglevel="info" append="false"/>
     
     <hlm:stagerecord id="record.prep"  stagerefid="preparation" output="${build.log.dir}/${build.id}_prep.ant.log" loglevel="info" append="false"/>
--- a/buildframework/helium/sf/java/metadata/doc/metadata.rst	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/metadata/doc/metadata.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -49,8 +49,8 @@
 Overview
 --------
 
-Metadata filters are set of regular expressions used to match the text of the build output and process the errors, categorize it,
-and used to generate the output for diamonds, summary file, email output. Predefined set of ids are defined for each stage of the
+Metadata filters are a set of regular expressions used to match the text of the build output and process the errors, categorize it,
+and used to generate the output for diamonds, summary file, email output. A predefined set of ids are defined for each stage of the
 build. For example for raptor compilation filter is defined as below,
 
 The default definition of filterset.sbs is
@@ -71,11 +71,11 @@
     </hlm:metadatafilterset>
 
 
-The complete list of predefined ids for various stages of the build are defined in this file,
+The complete list of predefined ids for various stages of the build are defined in the file,
 
 helium/config/metadata_filter_config_default.xml
 
-Each ID can be overridden to provide additional regular expression to control the results of the build for different stages.
+Each ID can be overridden to provide additional regular expressions to control the results of the build for different stages.
 
 Two ways to add the regular expressions
 ---------------------------------------
@@ -104,9 +104,9 @@
 Note
 ----
 
-1. The order of metadatafilter / metadatafilterset is important, so the first one takes precedence than the second one.
+1. The order of metadatafilter / metadatafilterset is important, so the first one takes precedence over the second one.
 
-2. Order is also preserved in the csv file, the expressions which are defined first get precedence than the later one.
+2. Order is also preserved in the csv file, the expressions which are defined first has precedence over the later one.
 
 3. All the regular expressions are JAVA patterns.
          
@@ -181,14 +181,14 @@
 Using the Metadata framework with FMPP
 ======================================
 
-The Metadata framework gives an efficient opportunity to record huge amount or data in a fast and reliable way (timewise and memory consumption-wise).
-Thanks to the ORMFMPPLoader database loader it is really simple to access those data and render then in any other format: HTML for easy to read build summary,
-XML to communicated with other tools, text file...
+The Metadata framework gives an efficient opportunity to record huge amounts of data in a fast and reliable way (timewise and memory consumption-wise).
+Thanks to the ORMFMPPLoader database loader it is really simple to access those data and render them in  another format: HTML for easy to read build summary,
+XML to communicate with other tools, text file...
 
 Loading a database
 ------------------
 
-A database can be load and assigned to a template variable using the pp.loadData functionnality from the FMPP task. The 'com.nokia.helium.metadata.ORMFMPPLoader'
+A database can be loaded and assigned to a template variable using the pp.loadData functionnality from the FMPP task. The 'com.nokia.helium.metadata.ORMFMPPLoader'
 accept one argument which is the path to the database.
 
 Example::
@@ -206,7 +206,7 @@
 ---------------------------------------
 
 The 'jpasingle' is the best way to access results from single values like count of entities. The jpasingle queries must be written in JPQL, 
-please check the valid database schema in the previous section (case matter!).
+please check the valid database schema in the previous section (case matters!).
 
 Example of a template that will return the number of log files recorded in the database::
    
@@ -217,7 +217,7 @@
 --------------------------------
  
 The JPA query allows you to perform query and directly use JPA entity object directly inside the template. The jpa queries must be written in JPQL, 
-please check the valid database schema in the previous section (case matter!).
+please check the valid database schema in the previous section (case matters!).
 
 In the following example the query loop through the available log files::
     
--- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/antlib.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/antlib.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -26,6 +26,7 @@
     <taskdef name="metadatadelete" classname="com.nokia.helium.metadata.ant.taskdefs.MetaDataDeleteTask"/>
     <!-- Type definition -->
     <typedef name="textmetadatainput" classname="com.nokia.helium.metadata.ant.types.TextLogMetaDataInput"/>
+    <typedef name="coveritymetadatainput" classname="com.nokia.helium.metadata.ant.types.CoverityLogMetaDataInput"/>
     <typedef name="antmetadatainput" classname="com.nokia.helium.metadata.ant.types.AntLogMetaDataInput"/>
     <typedef name="abldmetadatainput" classname="com.nokia.helium.metadata.ant.types.AbldLogMetaDataInput"/>
     <typedef name="sbsmetadatainput" classname="com.nokia.helium.metadata.ant.types.sbs.SBSLogMetaDataInput"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/CoverityLogMetaDataInput.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,103 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+package com.nokia.helium.metadata.ant.types;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Map;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+
+import com.nokia.helium.metadata.AutoCommitEntityManager;
+import com.nokia.helium.metadata.MetadataException;
+import com.nokia.helium.metadata.model.metadata.LogFile;
+import com.nokia.helium.metadata.model.metadata.MetadataEntry;
+import com.nokia.helium.metadata.model.metadata.Severity;
+import com.nokia.helium.metadata.model.metadata.SeverityDAO;
+
+/**
+ * This Type is to specify and use the text logparser type to parse and store the data.
+ * This type will not replace any string of format [ababa] with ""
+ * <pre>
+ * &lt;hlm:metadatafilterset id="text_log_metadata_input"&gt;
+ *    &lt;metadatafilterset filterfile="${project.dir}/../data/common.csv" /&gt;
+ * &lt;/hlm:metadatafilterset&gt;
+ * 
+ * &lt;hlm:coveritymetadatainput&gt;
+ *    &lt;fileset dir="${project.dir}/../data/"&gt;
+ *        &lt;include name="*_fixslashes*.log"/&gt;
+ *    &lt;/fileset&gt;
+ *    &lt;metadatafilterset refid="text_log_metadata_input" /&gt;
+ * &lt;/hlm:coveritymetadatainput&gt;
+ * </pre>
+ * 
+ * @ant.task name="coveritymetadatainput" category="Metadata"
+ */
+public class CoverityLogMetaDataInput extends TextLogMetaDataInput {
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void extract(EntityManagerFactory factory, File file) throws MetadataException {
+        EntityManager em = factory.createEntityManager();
+        AutoCommitEntityManager autoCommitEM = new AutoCommitEntityManager(factory);
+        try {
+            // Get the severities
+            SeverityDAO severityDao = new SeverityDAO();
+            severityDao.setEntityManager(em);
+            Map<String, Severity> priorities = severityDao.getSeverities();
+            
+            // Add a logfile entry into the database.
+            LogFile logFile = getLogFile(em, file);
+
+            // Start parsing
+            BufferedReader reader = new BufferedReader(new FileReader(file));
+            String logText = null;
+            int lineNumber = 0;
+            while ((logText = reader.readLine()) != null) {
+                lineNumber++;                    
+                SeverityEnum.Severity severity = getSeverity(logText);
+                if (severity != SeverityEnum.Severity.NONE) {
+                    MetadataEntry entry = new MetadataEntry();
+                    entry.setLogFile(autoCommitEM.merge(logFile));
+                    entry.setLineNumber(lineNumber);
+                    entry.setSeverity(autoCommitEM.merge(priorities.get(severity.toString())));
+                    entry.setText(logText);
+                    autoCommitEM.persist(entry);
+                }
+            }
+            reader.close();
+        } catch (FileNotFoundException ex) {
+            throw new MetadataException(ex.getMessage(), ex);
+        } catch (IOException ex) {
+            throw new MetadataException(ex.getMessage(), ex);
+        } finally {
+            if (autoCommitEM != null) {
+                autoCommitEM.close();
+            }
+            if (em != null) {
+                em.close();
+            }
+        }
+    }
+
+}
--- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/IMakerLogMetaDataInput.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/IMakerLogMetaDataInput.java	Wed Oct 13 16:31:27 2010 +0800
@@ -62,7 +62,7 @@
  */
 public class IMakerLogMetaDataInput extends AbstractComponentBaseMetadataInput {
     public static final String DEFAULT_COMPONENT_NAME = "General";
-    private Pattern iMakerFpsxPattern = Pattern.compile("/([^/]*?\\.fpsx)");
+    private Pattern iMakerFpsxPattern = Pattern.compile("/([^/]*?\\.(?:fpsx|bin))");
     private EntityManager entityManager;
 
     /**
--- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/PolicyLogMetaDataInput.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/PolicyLogMetaDataInput.java	Wed Oct 13 16:31:27 2010 +0800
@@ -124,23 +124,32 @@
         public void startElement(String uri, String localName, String qName,
                 Attributes attributes) throws SAXException {
             if (qName.equalsIgnoreCase("error")) {
-                String errorType = attributes.getValue("", "type");
+                String errorType = attributes.getValue("type");
                 MetadataEntry me = new MetadataEntry();
                 me.setLogFile(autoCommitEM.merge(logFile));
                 me.setLineNumber(locator.getLineNumber());
                 me.setSeverity(severity);
                 if (errorType.equals("unknownstatus")) {
-                    me.setText(attributes.getValue("", "message") + attributes.getValue("", "value"));
+                    me.setText(attributes.getValue("message") + attributes.getValue("value"));
                 } else if (errorType.equals("A") || errorType.equals("B") 
                         || errorType.equals("C") || errorType.equals("D")) {
                     int flags = Pattern.CASE_INSENSITIVE | Pattern.DOTALL ;
                     Pattern pattern = Pattern.compile("([\\\\/][^\\\\/]+?)$", flags);
                     me.setText(pattern.matcher(errorType + "Found incorrect value for " 
-                            + attributes.getValue("", "message")).replaceAll(""));
+                            + attributes.getValue("message")).replaceAll(""));
                 } else if (errorType.equals("missing")) {
-                    me.setText(attributes.getValue("", "message"));
+                    me.setText(attributes.getValue("message"));
                 } else if (errorType.equals("invalidencoding")) {
-                    me.setText(attributes.getValue("", "message"));
+                    me.setText(attributes.getValue("message"));
+                } else {
+                    String message = errorType;
+                    if (attributes.getValue("message") != null) {
+                        message += " : " + attributes.getValue("message"); 
+                    }
+                    if (attributes.getValue("value") != null) {
+                        message += ", " + attributes.getValue("value"); 
+                    }
+                    me.setText(message);                    
                 }
                 autoCommitEM.persist(me);
             }
--- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefCollection.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefCollection.java	Wed Oct 13 16:31:27 2010 +0800
@@ -44,7 +44,7 @@
     @Column(name = "ID", nullable = false, unique = true, length = 255)
     private String collectionId;
 
-    @Column(name = "NAME", nullable = false, length = 255)
+    @Column(name = "NAME", length = 255)
     private String name;
 
     @Column(name = "PACKAGE_ID", insertable = false, updatable = false, nullable = false)
--- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefComponent.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefComponent.java	Wed Oct 13 16:31:27 2010 +0800
@@ -43,7 +43,7 @@
     @Column(name = "ID", nullable = false, unique = true, length = 255)
     private String componentId;
 
-    @Column(name = "NAME", nullable = false, length = 255)
+    @Column(name = "NAME", length = 255)
     private String name;
     
     @Column(name = "COLLECTION_ID", insertable = false, updatable = false, nullable = false)
--- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefPackage.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefPackage.java	Wed Oct 13 16:31:27 2010 +0800
@@ -44,7 +44,7 @@
     @Column(name = "ID", nullable = false, unique = true, length = 255)
     private String packageId;
 
-    @Column(name = "NAME", nullable = false, length = 255)
+    @Column(name = "NAME", length = 255)
     private String name;
     
     @OneToMany
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefPackage.java.orig	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+package com.nokia.helium.metadata.model.metadata;
+
+import java.util.List;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.OneToMany;
+
+/**
+ * This class represent the PACKAGE table in the
+ * database.
+ * Each package name will be unique across the build
+ * that is why it is not link to any specific logFile. 
+ */
+@Entity
+public class SysdefPackage {
+    
+    @Id
+    @GeneratedValue(strategy = GenerationType.SEQUENCE)
+    @Column(name = "PACKAGE_ID")
+    private int id;
+
+    @Column(name = "ID", nullable = false, unique = true, length = 255)
+    private String packageId;
+
+    @Column(name = "NAME", nullable = false, length = 255)
+    private String name;
+    
+    @Column(name = "LOCATION", nullable = false, length = 4096)
+    private String location;
+
+    @OneToMany(cascade = CascadeType.REMOVE)
+    @JoinColumn(name = "PACKAGE_ID", referencedColumnName = "PACKAGE_ID")
+    private List<Component> components;
+
+    /**
+     * Set the id of the row.
+     * @param id
+     */
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    /**
+     * Get the id of the row.
+     * @return the id
+     */
+    public int getId() {
+        return id;
+    }
+
+    public void setPackageId(String packageId) {
+        this.packageId = packageId;
+    }
+
+    public String getPackageId() {
+        return packageId;
+    }
+}
--- a/buildframework/helium/sf/java/metadata/tests/antunit/test_sysdef_input.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/metadata/tests/antunit/test_sysdef_input.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -94,4 +94,36 @@
             </hlm:metadatarecord>
         </au:expectfailure>
     </target>
+
+    <target name="test-sysdef-metadata-input-without-names">
+        <echo message="test-sysdef-metadata-input-without-names" />
+        <hlm:metadatarecord database="${test.temp.dir}/metadata_1_db">
+            <hlm:sysdefmetadatainput file="../data/sysdef/sysdef3_without_name.xml" epocroot="../" />
+        </hlm:metadatarecord>
+        <fmpp sourceFile="../data/sysdef/sysdef_data.ini.ftl"
+                     outputfile="${test.temp.dir}/sysdef_data.ini">
+            <data expandProperties="yes">
+                dbPath: ${test.temp.dir}/metadata_1_db
+                ant: antProperties()
+            </data>
+        </fmpp>
+        <property file="${test.temp.dir}/sysdef_data.ini" />
+        <echo>package.count: ${package.count}</echo>
+        <echo>collection.count: ${collection.count}</echo>
+        <echo>component.count: ${component.count}</echo>
+        <echo>unit.count: ${unit.count}</echo>
+        <au:assertTrue message="Invalid number of packages">
+            <equals arg1="${package.count}" arg2="2" />
+        </au:assertTrue>
+        <au:assertTrue message="Invalid number of collection">
+            <equals arg1="${collection.count}" arg2="2" />
+        </au:assertTrue>
+        <au:assertTrue message="Invalid number of components">
+            <equals arg1="${component.count}" arg2="2" />
+        </au:assertTrue>
+        <au:assertTrue message="Invalid number of units">
+            <equals arg1="${unit.count}" arg2="2" />
+        </au:assertTrue>
+    </target>
+    
 </project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/metadata/tests/data/sysdef/sysdef3_without_name.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : sysdef3.xml 
+Part of     : Helium
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<SystemDefinition schema="3.0.0" id-namespace="http://www.symbian.org/system-definition" xmlns:qt="http://www.nokia.com/qt">
+<systemModel name="sf_">
+<layer id="app" name="app">
+<package id="helloworldcons" levels="demo">
+<collection id="helloworldcons_apps" level="demo">
+<component id="helloworldcons_app" purpose="development">
+<unit bldFile="sf/app/helloworldcons/group" mrp="sf/app/helloworldcons/" qt:proFile="helloworld.pro" />
+</component>
+</collection>
+</package>
+</layer>
+<layer id="mw" name="mw">
+<package id="helloworldapi" levels="demo">
+<collection id="helloworld_apis" level="demo">
+<component id="helloworld_api" purpose="development">
+<unit bldFile="sf/mw/helloworldapi/group" mrp="sf/mw/helloworldapi/" qt:proFile="helloworldapi.pro" qt:qmakeArgs="-nomoc" />
+</component>
+</collection>
+</package>
+</layer>
+</systemModel>
+</SystemDefinition>
\ No newline at end of file
--- a/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CASummaryTask.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CASummaryTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -24,10 +24,6 @@
 import java.io.IOException;
 import java.io.OutputStreamWriter;
 import java.io.UnsupportedEncodingException;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.SortedSet;
-import java.util.TreeSet;
 
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.Task;
@@ -43,6 +39,7 @@
 import javax.xml.xpath.XPathConstants;
 import javax.xml.xpath.XPathExpressionException;
 import org.xml.sax.SAXException;
+import org.apache.tools.ant.BuildException;
 
 
 /**
@@ -65,10 +62,53 @@
 public class CASummaryTask extends Task {
 
     /** String used to look for the tag values in the header xml file **/
-    private static String headerExpression = "//issuelist/headerfile/issue/typeid/text()";
+    private static final String HEADER_EXPRESSION = "//issuelist/headerfile/issue/typeid/text()";
 
     /** String used to look for the tag values in the library xml file **/
-    private static String libraryExpression = "//issuelist/library/issue/typeid/text()";
+    private static final String LIBRARY_EXPRESSION = "//issuelist/library/issue/typeid/text()";
+
+    /**maximum number of typeIDs available for the library compare file*/
+    private static final int MAX_NUM_TYPE_IDS = 15;
+    
+    /** 0 to 14 typeID modes, supplied by Satarupa Pal. Add this i=to the output information to diamonds*/
+    private static final String[] TYPE_MODE = {
+        "unknown",
+        "removed",
+        "added",
+        "moved",
+        "deleted",
+        "inserted",
+        "modified",
+        "added",
+        "modified",
+        "modified",
+        "modified",
+        "modified",
+        "modified",
+        "removed",
+        "not available"};
+
+    /** 
+    the BC library output file: xml paths required to retrieve the additional textual information.
+    */
+    private static final String[] SEARCH_PATHS = {
+        "//issuelist/library/issue[typeid = \"0\"]/bc_severity/text()",
+        "//issuelist/library/issue[typeid = \"1\"]/bc_severity/text()",
+        "//issuelist/library/issue[typeid = \"2\"]/bc_severity/text()",
+        "//issuelist/library/issue[typeid = \"3\"]/bc_severity/text()",
+        "//issuelist/library/issue[typeid = \"4\"]/bc_severity/text()",
+        "//issuelist/library/issue[typeid = \"5\"]/bc_severity/text()",
+        "//issuelist/library/issue[typeid = \"6\"]/bc_severity/text()",
+        "//issuelist/library/issue[typeid = \"7\"]/bc_severity/text()",
+        "//issuelist/library/issue[typeid = \"8\"]/typeinfo/text()",
+        "//issuelist/library/issue[typeid = \"9\"]/typeinfo/text()",
+        "//issuelist/library/issue[typeid = \"10\"]/typeinfo/text()",
+        "//issuelist/library/issue[typeid = \"11\"]/typeinfo/text()",
+        "//issuelist/library/issue[typeid = \"12\"]/typeinfo/text()",
+        "//issuelist/library/issue[typeid = \"13\"]/typeinfo/text()",
+        "//issuelist/library/issue[typeid = \"14\"]/typeinfo/text()"};
+
+    private boolean failOnError;            //init to default value false
 
     /** The file containing the CA summary data */
     private String inputFile;
@@ -172,6 +212,24 @@
         return header;
     }
 
+    /**
+     * Defines if the task should fail in case of error. 
+     * @param failOnError
+     * @ant.not-required Default true
+     */
+    public void setFailOnError(boolean failOnError) {
+        this.failOnError = failOnError;
+    }
+    
+    /**
+     * Shall we fail in case of issue.
+     * @return
+     */
+    public boolean shouldFailOnError() {
+        System.out.println(" failOnError = " + failOnError);
+        return failOnError;
+    }
+
     /** the main part of the code - the method that is called */
     public void execute() {
         log("CASummaryTask execute method with input file : " + inputFile, Project.MSG_ERR);
@@ -189,25 +247,35 @@
             log("FileNotFoundException while getting the input file.  : " + inputFile + "  "
                 + exc.getMessage(), Project.MSG_ERR);
             inputFileFound = false; // stops an empty output file being created.
+            if (shouldFailOnError()) {
+                throw new BuildException(exc.getMessage(), exc);
+            }
         }
+        
         if (inputFileFound) {
             try {
                 // write the title stuff for the XML diamonds schema
                 output = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(getoutputFile()), "UTF8"));
-            }
-            catch (FileNotFoundException exc) {
+            } catch (FileNotFoundException exc) {
                 log("FileNotFoundException while getting the output file.  : " + getoutputFile()
                     + "   " + exc.getMessage(), Project.MSG_ERR);
-            }
-            catch (UnsupportedEncodingException exc) {
+                if (shouldFailOnError()) {
+                    throw new BuildException(exc.getMessage(), exc);
+                }
+            } catch (UnsupportedEncodingException exc) {
                 // We are Ignoring the errors as no need to fail the build.
                 log("UnsupportedEncodingException while creating the output file : "
                     + getoutputFile() + "   " + exc.getMessage(), Project.MSG_ERR);
-            }
-            catch (SecurityException exc) {
+                if (shouldFailOnError()) {
+                    throw new BuildException(exc.getMessage(), exc);
+                }
+            } catch (SecurityException exc) {
                 // We are Ignoring the errors as no need to fail the build.
                 log("SecurityException while creating the output file : " + getoutputFile() + "   "
                     + exc.getMessage(), Project.MSG_ERR);
+                if (shouldFailOnError()) {
+                    throw new BuildException(exc.getMessage(), exc);
+                }
             }
 
             if (output != null) {
@@ -226,11 +294,11 @@
                     if (tempheader) {
                         output.write("    <quality aspect=\"compatibility-headers\"> \r\n");
                         // process each line
-                        findTextAndOutput(headerExpression); // read input file and write the output
+                        findHeaderTextAndOutput(HEADER_EXPRESSION); // read input file and write the output
                     } else {
                         output.write("    <quality aspect=\"compatibility-libs\"> \r\n");
                         // process each line
-                        findTextAndOutput(libraryExpression); // read input file and write the output
+                        findLibTextAndOutput(LIBRARY_EXPRESSION); // read input file and write the output
                     }
 
                     // write the end of file text
@@ -249,17 +317,26 @@
                 catch (FileNotFoundException exc) {
                     log("FileNotFoundException while getting the diamonds header file : "
                         + getdiamondsHeaderFileName() + "   " + exc.getMessage(), Project.MSG_ERR);
+                    if (shouldFailOnError()) {
+                        throw new BuildException(exc.getMessage(), exc);
+                    }
                 }
                 catch (IOException exc) {
                     // We are Ignoring the errors as no need to fail the build.
                     log("IOException : " + getdiamondsHeaderFileName() + " output file =  "
                         + getoutputFile() + "  " + exc.getMessage(), Project.MSG_ERR);
+                    if (shouldFailOnError()) {
+                        throw new BuildException(exc.getMessage(), exc);
+                    }
                 }
                 catch (IllegalArgumentException exc) {
                     // We are Ignoring the errors as no need to fail the build.
                     log("IllegalArgumentException : " + getdiamondsHeaderFileName()
                         + " output file =  " + getoutputFile() + "  " + exc.getMessage(), Project.MSG_ERR);
-                }
+                    if (shouldFailOnError()) {
+                        throw new BuildException(exc.getMessage(), exc);
+                    }
+                } 
             }
             else {
                 log("Error: no output File available ", Project.MSG_ERR);
@@ -270,17 +347,187 @@
         }
     }
 
+    /** 
+    class for recording the number of occurances of a typeID for the library comparison output.
+    */
+    private class HeaderInfo {
+        private int typeId;
+        private long numOccurances;
+
+        /**
+         * @param typeId the type ID of the issue
+         * @ant.required
+         */
+        private void settypeId(int typeId) {
+            this.typeId = typeId;
+        }
+    
+        /**
+         * @return the typeID
+         */
+        private int gettypeId() {
+            return typeId;
+        }
+
+        /**
+         * @param numOccurances the number of times the type ID appears in the output file
+         * @ant.required
+         */
+        public void setnumOccurances(long numOccurances) {
+            this.numOccurances = numOccurances;
+        }
+    
+        /**
+         * @return the number of occurrance of the typeID
+         */
+        public long getnumOccurances() {
+            return numOccurances;
+        }
+    }
+
+
     /**
      * This is the function that performs the actual file searches and writes the number of occurances
      * of each typeID to the output xml file
      */
-    private void findTextAndOutput(String expression) {
+    private void findHeaderTextAndOutput(String expression) {
         String value;
-        Integer count;
+         
         /** place to store the number of typeids found */
-        Hashtable<Integer, Integer> typeIds = new Hashtable<Integer, Integer>();
+        HeaderInfo[] headerinf = new HeaderInfo[MAX_NUM_TYPE_IDS];
         int tempKey;
-        int tempVal;
+
+        //initialise the array of typeIDs
+        int sizevar = headerinf.length;
+        for (int i = 0; i < MAX_NUM_TYPE_IDS; i++) {
+            headerinf[i] = new HeaderInfo();
+            headerinf[i].typeId = i;
+            headerinf[i].numOccurances = 0;
+        }
+        try {
+            DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+            DocumentBuilder builder = docFactory.newDocumentBuilder();
+            Document doc = builder.parse(getinputFile());
+    
+            //creating an XPathFactory:
+            XPathFactory factory = XPathFactory.newInstance();
+            //using this factory to create an XPath object: 
+            XPath xpath = factory.newXPath();
+            //XPath object created compiles the XPath expression: 
+            XPathExpression expr = xpath.compile(expression);
+    
+            //expression is evaluated with respect to a certain context node which is doc.
+            Object result = expr.evaluate(doc, XPathConstants.NODESET);
+            NodeList nodeList = (NodeList) result;
+            //and scan through the list
+            for (int i = 0; i < nodeList.getLength(); i++) {
+                value = nodeList.item(i).getNodeValue();      //get the value as a string from the xml file
+                tempKey = Integer.parseInt(value);            //convert it to an integer
+                if (tempKey < MAX_NUM_TYPE_IDS) {
+                    headerinf[tempKey].numOccurances++;       //increase the number of occurances
+                } else {
+                    log("tempKey out of range");
+                }
+            }
+    
+            boolean noErrors = true;                        //so we print something when no data present
+            for (int i = 0; i < MAX_NUM_TYPE_IDS; i++)         //typeIDS 1 to 14
+            {
+                if (headerinf[i].numOccurances != 0) {
+                    noErrors = false;
+                    String headSearchPath = "//issuelist/headerfile/issue[typeid = \"" + i + "\"]/typestring/text()";
+                    //XPath object created compiles the XPath expression: 
+                    XPathExpression typeInfoExpr = xpath.compile(headSearchPath);
+                    //expression is evaluated with respect to a certain context node which is doc.
+                    Object typeInfoResult = typeInfoExpr.evaluate(doc, XPathConstants.NODESET);
+                    NodeList typeInfoNodeList = (NodeList) typeInfoResult;
+                    output.write("        <summary message=\"typeID:" + headerinf[i].typeId + 
+                        ":" + typeInfoNodeList.item(0).getNodeValue() + ":occurs \" value=\"" + headerinf[i].numOccurances + "\"/> \r\n");
+                }
+            }
+            if (noErrors) {
+                output.write("        <summary message=\"number of errors present \" value=\"0\"/> \r\n");
+            }
+        } catch (ParserConfigurationException err) {
+            log("Error: ParserConfigurationException: trying to parse xml file ", Project.MSG_ERR);
+            if (shouldFailOnError()) {
+                throw new BuildException(err.getMessage(), err);
+            }
+        } catch (SAXException err) {
+            log("Error: SAXException: trying to parse xml file ", Project.MSG_ERR);
+            if (shouldFailOnError()) {
+                throw new BuildException(err.getMessage(), err);
+            }
+        } catch (XPathExpressionException err) {
+            log("Error: XPathExpressionException: trying to parse xml file ", Project.MSG_ERR);
+            if (shouldFailOnError()) {
+                throw new BuildException(err.getMessage(), err);
+            }
+        } catch (IOException err) {
+            log("Error: IOException: trying to parse xml file ", Project.MSG_ERR);
+            if (shouldFailOnError()) {
+                throw new BuildException(err.getMessage(), err);
+            }
+        }
+    }
+    
+    /** 
+    class for recording the number of occurances of a typeID for the library comparison output.
+    */
+    private class LibraryInfo {
+        private int typeId;
+        private long numOccurances;
+
+        /**
+         * @param typeId the type ID of the issue
+         * @ant.required
+         */
+        private void settypeId(int typeId) {
+            this.typeId = typeId;
+        }
+    
+        /**
+         * @return the typeID
+         */
+        private int gettypeId() {
+            return typeId;
+        }
+
+        /**
+         * @param numOccurances the number of times the type ID appears in the output file
+         * @ant.required
+         */
+        public void setnumOccurances(long numOccurances) {
+            this.numOccurances = numOccurances;
+        }
+    
+        /**
+         * @return the number of occurrance of the typeID
+         */
+        public long getnumOccurances() {
+            return numOccurances;
+        }
+    }
+
+    /**
+     * This is the function that performs the actual file searches and writes the number of occurances
+     * of each typeID to the output xml file
+     */
+    private void findLibTextAndOutput(String expression) {
+
+        String value;
+         
+        /** place to store the number of typeids found */
+        LibraryInfo[] libraryinf = new LibraryInfo[MAX_NUM_TYPE_IDS];
+        int tempKey;
+
+        //initialise the array of typeIDs
+        int sizevar = libraryinf.length;
+        for (int i = 0; i < MAX_NUM_TYPE_IDS; i++) {
+            libraryinf[i] = new LibraryInfo();
+            libraryinf[i].typeId = i;
+            libraryinf[i].numOccurances = 0;
+        }
         
         try {
             DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
@@ -296,33 +543,55 @@
     
             //expression is evaluated with respect to a certain context node which is doc.
             Object result = expr.evaluate(doc, XPathConstants.NODESET);
+            //create a node list
             NodeList nodeList = (NodeList) result;
+            //and scan through the list
             for (int i = 0; i < nodeList.getLength(); i++) {
-                value = nodeList.item(i).getNodeValue();    //get the value as a string from the xml file
-                tempKey = Integer.parseInt(value);          //convert it to an integer so they can be sorted
-                if (!typeIds.containsKey(tempKey)) {        //see if the typeID is already present in the hashtable
-                    typeIds.put(tempKey, 0);                //it's not so create it (stops null pointer exceptions)
+                value = nodeList.item(i).getNodeValue();      //get the value as a string from the xml file
+                tempKey = Integer.parseInt(value);            //convert it to an integer
+                if (tempKey < MAX_NUM_TYPE_IDS) {
+                    libraryinf[tempKey].numOccurances++;         //increase the number of occurances
+                } else {
+                    log("tempKey out of range");
                 }
-                count = typeIds.get(tempKey);               //get the current count of this typeID
-                count++;                                    //inc the count
-                typeIds.put(tempKey, count);                //write it back to the hashtable
             }
-            
-            //now sort and write to xml file
-            SortedSet<Integer> sortedset = new TreeSet<Integer>(typeIds.keySet());
-            Iterator<Integer> sorted = sortedset.iterator();
-            while (sorted.hasNext()) {      //go through each one on the file and write to xml output file
-                tempVal = sorted.next();
-                output.write("        <summary message=\"type ID " + tempVal + " occurs \" value=\"" + typeIds.get(tempVal) + "\"/> \r\n");
+    
+            boolean noErrors = true;                      //so we print something when no data present
+            for (int i = 1; i < MAX_NUM_TYPE_IDS; i++) {        //typeIDS 1 to 14
+                if (libraryinf[i].numOccurances != 0) {
+                    noErrors = false;
+                    //XPath object created compiles the XPath expression: 
+                    XPathExpression typeInfoExpr = xpath.compile(SEARCH_PATHS[i]);
+                    //expression is evaluated with respect to a certain context node which is doc.
+                    Object typeInfoResult = typeInfoExpr.evaluate(doc, XPathConstants.NODESET);
+                    NodeList typeInfoNodeList = (NodeList) typeInfoResult;
+                    output.write("        <summary message=\"typeID:" + libraryinf[i].typeId + ":mode:" + TYPE_MODE[i] + 
+                        ":" + typeInfoNodeList.item(0).getNodeValue() + ":occurs \" value=\"" + libraryinf[i].numOccurances + "\"/> \r\n");
+                }
+            }
+            if (noErrors) {
+                output.write("        <summary message=\"number of errors present \" value=\"0\"/> \r\n");
+            }
+        } catch (XPathExpressionException err) {
+            log("Error: XPathExpressionException: trying to parse xml file ", Project.MSG_ERR);
+            if (shouldFailOnError()) {
+                throw new BuildException(err.getMessage(), err);
             }
         } catch (ParserConfigurationException err) {
             log("Error: ParserConfigurationException: trying to parse xml file ", Project.MSG_ERR);
+            if (shouldFailOnError()) {
+                throw new BuildException(err.getMessage(), err);
+            }
         } catch (SAXException err) {
             log("Error: SAXException: trying to parse xml file ", Project.MSG_ERR);
-        } catch (XPathExpressionException err) {
-            log("Error: XPathExpressionException: trying to parse xml file ", Project.MSG_ERR);
+            if (shouldFailOnError()) {
+                throw new BuildException(err.getMessage(), err);
+            }
         } catch (IOException err) {
             log("Error: IOException: trying to parse xml file ", Project.MSG_ERR);
+            if (shouldFailOnError()) {
+                throw new BuildException(err.getMessage(), err);
+            }
         }
     }
 
--- a/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CMTSummaryTask.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CMTSummaryTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -304,7 +304,6 @@
                             lineLen = 0;
                         }
                         else {
-                            log("can't find the '=' at end of line  ", Project.MSG_ERR);
                             lineLen = 0;
                         }
                     }
@@ -322,7 +321,6 @@
                     }
                     else {
                         lineLen = 0;
-                        log("can't find the digits at beg of line ", Project.MSG_ERR);
                     }
                 }
                 else {
--- a/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CMTToolTask.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CMTToolTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -49,7 +49,7 @@
  * fileset: Location of the source files whose complexity is to be measured.
  * </pre>
  * 
- * @ant.task name="cmt" category="Quality".
+ * @ant.task name="cmt" category="Quality"
  */
 public class CMTToolTask extends Task {
 
--- a/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CodeScannerTask.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CodeScannerTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -21,6 +21,7 @@
 import java.util.Vector;
 
 import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
 import org.apache.tools.ant.Task;
 import org.apache.tools.ant.taskdefs.ExecTask;
 import org.apache.tools.ant.types.Path;
@@ -57,11 +58,13 @@
 public class CodeScannerTask extends Task {
     private Vector<Path> paths = new Vector<Path>();
     private File configuration;
-    private String dest;
+    private File dest;
     private String format = "xml,html";
     private boolean auto;
     private File log;
-    private boolean failonerror;
+    private boolean failonerror = true;
+    private String lxrURL;
+    private File sourceDir;
 
     /**
      * This defines if the task should fails in case of error while executing codescanner.
@@ -86,7 +89,7 @@
      * Get dest attribute.
      * 
      */
-    public String getDest() {
+    public File getDest() {
         return this.dest;
     }
 
@@ -96,7 +99,7 @@
      * @param dest
      * @ant.required
      */
-    public void setDest(String dest) {
+    public void setDest(File dest) {
         this.dest = dest;
     }
 
@@ -157,17 +160,33 @@
     }
 
     /**
+     * Set lxr URL to update the codescanner html output files.
+     * @param lxrURL the lxrURL to set
+     */
+    public void setLxrURL(String lxrURL) {
+        this.lxrURL = lxrURL;
+    }
+
+    /**
+     * Set the source folder path in case lxr URL property is set. 
+     * @param sourceDir the sourceDir to set
+     */
+    public void setSourceDir(File sourceDir) {
+        this.sourceDir = sourceDir;
+    }
+
+    /**
      * {@inheritDoc}
      */
     @Override
     public void execute() {
         // creating the exec subtask
         ExecTask task = new ExecTask();
-        task.setProject(getProject());
-        task.setTaskName(this.getTaskName());
+        task.bindToOwner(this);
         task.setFailonerror(failonerror);
         task.setExecutable("codescanner");
         task.setDir(new File("."));
+        String commandString = "codescanner";
         if (dest == null) {
             throw new BuildException("'dest' attribute must be defined");
         }
@@ -178,6 +197,7 @@
             else {
                 task.createArg().setValue("-c");
                 task.createArg().setValue(configuration.getAbsolutePath());
+                commandString += " -c " + configuration.getAbsolutePath();
             }
         }
         else {
@@ -190,7 +210,7 @@
         // -t off
         task.createArg().setValue("-t");
         task.createArg().setValue(auto ? "on" : "off");
-
+        commandString += " -t " + (auto ? "on" : "off");
         // -l log
         if (log != null) {
             this.log("Output log: " + log.getAbsolutePath());
@@ -201,34 +221,66 @@
         // -o type
         task.createArg().setValue("-o");
         task.createArg().setValue(format);
-        if (paths.isEmpty()) {
-            throw new BuildException("No input directory defined");
-        }
-        // Getting the list of source dir to scan
-        Vector<String> srcs = new Vector<String>();
-        for (Path path : paths) {
-            if (path.isReference()) {
-                path = (Path) path.getRefid().getReferencedObject();
+        commandString += " -o " + format;
+            
+        if (this.lxrURL != null ) {
+            if (this.sourceDir == null) {
+                throw new BuildException("'sourceDir' attribute must be defined");
+            }
+            if (!paths.isEmpty() ) {
+                throw new BuildException("Nested path element are not allowed when lxrURL attribute is in use.");
+            }
+            task.createArg().setValue("-x");
+            task.createArg().setValue(this.lxrURL);
+            commandString += " -x " + this.lxrURL;
+            task.createArg().setValue(sourceDir.getAbsolutePath());
+            commandString += " " + sourceDir.getAbsolutePath();
+        } else {
+            if (paths.isEmpty()) {
+                throw new BuildException("No input directory defined");
             }
-            for (String apath : path.list()) {
-                srcs.add(apath);
+            
+            // Getting the list of source dir to scan
+            Vector<String> srcs = new Vector<String>();
+            for (Path path : paths) {
+                if (path.isReference()) {
+                    path = (Path) path.getRefid().getReferencedObject();
+                }
+                for (String apath : path.list()) {
+                    srcs.add(apath);
+                }
+            }
+            for (int i = 0; i < srcs.size(); i++) {
+                if (i != srcs.size() - 1) {
+                    task.createArg().setValue("-i");
+                    task.createArg().setValue(srcs.elementAt(i));
+                    commandString += " -i " + srcs.elementAt(i);
+                }
+                else {
+                    task.createArg().setValue(srcs.elementAt(i));
+                    commandString += " " + srcs.elementAt(i);
+                }
             }
         }
-        for (int i = 0; i < srcs.size(); i++) {
-            if (i != srcs.size() - 1) {
-                task.createArg().setValue("-i");
-                task.createArg().setValue(srcs.elementAt(i));
-            }
-            else {
-                task.createArg().setValue(srcs.elementAt(i));
-                task.createArg().setValue(dest.toString());
+        
+        // output path
+        task.createArg().setValue(dest.getAbsolutePath());
+        commandString += " " + dest.getAbsolutePath();
+        this.log("Output dir " + dest.getAbsolutePath());
+
+        // Run codescanner
+        try {
+            log("Running codescanner with arguments '" + commandString + "'");
+            task.execute();
+        } catch (BuildException be) {
+            if (this.failonerror) {
+                throw new BuildException("Errors occured while running 'codescanner'", be);
+            } else {
+                log("Errors occured while running 'codescanner' " + be.getMessage(), Project.MSG_ERR);
             }
         }
-        // output path
-        this.log("Output dir " + dest);
-
-        // Run codescanner
-        task.execute();
+        
+        
         this.log("Successfully executed codescanner");
     }
 }
--- a/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CoverityTask.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CoverityTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -23,6 +23,7 @@
 import org.apache.tools.ant.Task;
 import org.apache.tools.ant.taskdefs.ExecTask;
 
+import com.nokia.helium.core.ant.MappedVariable;
 import com.nokia.helium.core.ant.types.VariableImpl;
 import com.nokia.helium.core.ant.types.VariableSet;
 
@@ -40,7 +41,7 @@
  * 
  * </pre>
  * 
- * @ant.task name="coverity" category="Quality".
+ * @ant.task name="coverity" category="Quality"
  * 
  */
 
@@ -51,6 +52,7 @@
     private boolean execute = true;
     private boolean append;
     private File error;
+    private File output;
     private String dir;
     private Vector<VariableSet> coverityOptions = new Vector<VariableSet>();
     private Vector<VariableImpl> coverityArgs = new Vector<VariableImpl>();
@@ -81,17 +83,32 @@
         task.setTaskName(this.getTaskName());
         task.setFailonerror(failOnError);
         task.setError(this.error);
+        if (this.output != null) {
+            task.setOutput(this.output);
+        }
         task.setAppend(isAppend());
         task.setExecutable(command);
         task.setDir(new File(this.dir));
 
         for (VariableSet coverityArg : coverityOptions) {
+            
+            for (MappedVariable variable : coverityArg.getVariables()) {
+                if (variable.getName().equals("--password") || variable.getName().equals("-pa")) {
+                    commandString += " " + variable.getName() + " ********";
+                } else {
+                    commandString += " " + variable.getName() + " " + variable.getValue();
+                }
+            }
             task.createArg().setLine(coverityArg.getParameter(" "));
-            commandString += " " + coverityArg.getParameter(" ");
+            
         }
         for (VariableImpl coverityArg : coverityArgs) {
+            if (coverityArg.getName().equals("--password") || coverityArg.getName().equals("-pa")) {
+                commandString += " " + coverityArg.getName() + " ********";
+            } else {
+                commandString += " " + coverityArg.getName() + " " + coverityArg.getValue();
+            }
             task.createArg().setLine(coverityArg.getParameter(" "));
-            commandString += " " + coverityArg.getParameter(" ");
         }
 
         try {
@@ -183,6 +200,20 @@
     }
 
     /**
+     * @param output the output to set
+     */
+    public void setOutput(File output) {
+        this.output = output;
+    }
+
+    /**
+     * @return the output
+     */
+    public File getOutput() {
+        return output;
+    }
+
+    /**
      * @param append the append to set
      */
     public void setAppend(boolean append) {
--- a/buildframework/helium/sf/java/quality/tests/antunit/test_ca.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/quality/tests/antunit/test_ca.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -32,7 +32,6 @@
     <property name="temp.diamonds.footer.xml" location="${ca.output.dir}/ca/diamonds_footer.xml" />
     
     <property name="diamonds.build.output.dir" location="${ca.output.dir}/ca" />
-    <property name="bc.config.dir.name" location="" />
 
     <!-- is called prior to the test -->
     <target name="setUp">
@@ -57,12 +56,11 @@
 
     <!--
      **************************************************************
-     ** test CMT for windows
+     ** test CA for windows
      **************************************************************
     -->
 
     <target name="test-ca-header-with-all-reqd-params-set" >
-        <echo> output file is ${diamonds.build.output.dir} </echo>
         <hlm:casummary diamondsHeaderFileName="${temp.diamonds.header.xml}" diamondsFooterFileName="${temp.diamonds.footer.xml}"
                     header="true"
                     outputFile="${ca.output.dir}/ca/ca_summary_header_ok.xml"
@@ -75,7 +73,7 @@
             </filterchain>
         </loadfile>
         <echo>${header.ok}</echo>
-        <au:assertTrue message="type ID 13 occurs ">
+        <au:assertTrue message="typeID:13:has compilation errors:occurs ">
             <contains string="${header.ok}" 
                 substring="value=" />
         </au:assertTrue>
@@ -95,10 +93,27 @@
         </loadfile>
         <echo>${header.notypeids}</echo>
         <au:assertTrue message="compatibility-headers">
-            <not>
-                <contains string="${header.notypeids}" 
-                    substring="summary message" />
-            </not>
+            <contains string="${header.notypeids}" 
+                substring="number of errors present" />
+        </au:assertTrue>
+    </target>
+
+    <target name="test-ca-header-no-issues" >
+        <hlm:casummary diamondsHeaderFileName="${temp.diamonds.header.xml}" diamondsFooterFileName="${temp.diamonds.footer.xml}"
+                    header="true"
+                    outputFile="${ca.output.dir}/ca/ca_summary_header_noissues.xml"
+                    inputFile="${test.data.src}/headers_report_noissues.xml" />
+        <au:assertLogContains text="CASummaryTask execute"/>
+        <au:assertFileExists file="${ca.output.dir}\ca\ca_summary_header_noissues.xml"/>
+        <loadfile property="header.no.issues" srcfile="${ca.output.dir}/ca/ca_summary_header_noissues.xml">
+            <filterchain>
+                <replaceregex pattern="\\(:|\\)" replace="\1" flags="g" />
+            </filterchain>
+        </loadfile>
+        <echo>${header.no.issues}</echo>
+        <au:assertTrue message="compatibility-headers">
+            <contains string="${header.no.issues}" 
+                substring="number of errors present" />
         </au:assertTrue>
     </target>
 
@@ -117,15 +132,37 @@
         <echo>${libraries.ok}</echo>
         <au:assertTrue message="compatibility-libs">
             <contains string="${libraries.ok}" 
-                substring="type ID 14 occurs" />
+                substring="typeID:6:mode:modified:None:occurs" />
+        </au:assertTrue>
+        <au:assertTrue message="compatibility-libs">
+            <contains string="${libraries.ok}" 
+                substring="typeID:2:mode:added:Informative:occurs" />
+        </au:assertTrue>
+        <au:assertTrue message="compatibility-libs">
+            <contains string="${libraries.ok}" 
+                substring="typeID:14:mode:not available:Baseline DLL is not available for analysis:occurs" />
         </au:assertTrue>
     </target>
     
-    <target name="test-ca-library-fail" >
+    <target name="test-ca-library-fail-failOnError-true" >
+        <property name="bc.fail.on.error" value="true" />
+        <au:expectfailure message="not stop the build if failOnError is set to false">
             <hlm:casummary diamondsHeaderFileName="${temp.diamonds.header.xml}" diamondsFooterFileName="${temp.diamonds.footer.xml}"
                     header="false"
                     outputFile="${ca.output.dir}/ca/ca_summary_library_fail.xml"
-                    inputFile="${test.data.src}/libraries_report_fail.xml" />
+                    inputFile="${test.data.src}/libraries_report_fail.xml" 
+                    failOnError="${bc.fail.on.error}" />
+            <au:assertFileDoesntExist file="${ca.output.dir}\ca\ca_summary_library_fail.xml" />
+            <au:assertLogContains text="FileNotFoundException while getting the input file" />
+        </au:expectfailure>
+    </target>
+
+    <target name="test-ca-library-fail-failOnError-false" >
+        <hlm:casummary diamondsHeaderFileName="${temp.diamonds.header.xml}" diamondsFooterFileName="${temp.diamonds.footer.xml}"
+                header="false"
+                outputFile="${ca.output.dir}/ca/ca_summary_library_fail.xml"
+                inputFile="${test.data.src}/libraries_report_fail.xml" 
+                failOnError="false"/>
         <au:assertFileDoesntExist file="${ca.output.dir}\ca\ca_summary_library_fail.xml" />
         <au:assertLogContains text="FileNotFoundException while getting the input file" />
     </target>
@@ -144,8 +181,53 @@
         <echo>${libraries.one.id}</echo>
         <au:assertTrue message="compatibility-libs">
             <contains string="${libraries.one.id}" 
-                substring="type ID 7 occurs" />
+                substring="typeID:7:mode:added:Informative:occurs" />
+        </au:assertTrue>
+    </target>
+
+    <target name="test-ca-library-no-ids" >
+        <hlm:casummary diamondsHeaderFileName="${temp.diamonds.header.xml}" diamondsFooterFileName="${temp.diamonds.footer.xml}"
+                    header="false"
+                    outputFile="${ca.output.dir}/ca/ca_summary_library_no_ids.xml"
+                    inputFile="${test.data.src}/libraries_report_no_ids.xml" />
+        <au:assertFileExists file="${ca.output.dir}\ca\ca_summary_library_no_ids.xml" />
+        <loadfile property="libraries.no.id" srcfile="${ca.output.dir}/ca/ca_summary_library_no_ids.xml">
+            <filterchain>
+                <replaceregex pattern="\\(:|\\)" replace="\1" flags="g" />
+            </filterchain>
+        </loadfile>
+        <echo>${libraries.no.id}</echo>
+        <au:assertTrue message="compatibility-libs">
+            <contains string="${libraries.no.id}" 
+                substring="number of errors present" />
         </au:assertTrue>
     </target>
 
+
+    <target name="test-ca-library-no-issues" >
+        <hlm:casummary diamondsHeaderFileName="${temp.diamonds.header.xml}" diamondsFooterFileName="${temp.diamonds.footer.xml}"
+                    header="false"
+                    outputFile="${ca.output.dir}/ca/ca_summary_library_noissues.xml"
+                    inputFile="${test.data.src}/libraries_report_noissues.xml" />
+        <au:assertFileExists file="${ca.output.dir}\ca\ca_summary_library_noissues.xml" />
+        <loadfile property="libraries.no.issues" srcfile="${ca.output.dir}/ca/ca_summary_library_noissues.xml">
+            <filterchain>
+                <replaceregex pattern="\\(:|\\)" replace="\1" flags="g" />
+            </filterchain>
+        </loadfile>
+        <echo>${libraries.no.issues}</echo>
+        <au:assertTrue message="compatibility-libs">
+            <contains string="${libraries.no.issues}" 
+                substring="number of errors present" />
+        </au:assertTrue>
+    </target>
+
+    <target name="test-ca-library-no-input-file-no-fail" >
+            <hlm:casummary diamondsHeaderFileName="${temp.diamonds.header.xml}" diamondsFooterFileName="${temp.diamonds.footer.xml}"
+                        header="false"
+                        outputFile="${ca.output.dir}/ca/ca_summary_library_nofile.xml"
+                        inputFile="${test.data.src}/libraries_report_nofile.xml"
+                        failOnError = "false" />
+            <au:assertFileDoesntExist file="${ca.output.dir}\ca\ca_summary_library_nofile.xml" />
+    </target>
 </project>
\ No newline at end of file
--- a/buildframework/helium/sf/java/quality/tests/antunit/test_codescanner.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/quality/tests/antunit/test_codescanner.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -62,6 +62,7 @@
             configuration="${codescanner.config}">
             <path refid="src.path"/>
         </hlm:codescanner>
+        <au:assertLogContains text="Running codescanner with arguments 'codescanner -c"/>
         <au:assertLogContains text="Successfully executed codescanner"/>
         <au:assertLogContains text="Output format: xml,html"/>
         <au:assertLogContains text="data\src\exclude.txt"/>
@@ -113,4 +114,41 @@
         <au:assertLogContains text="data\src2\exclude.txt"/>
         <au:assertFileExists file="${codescanner.output.dir}/problemIndex.xml"/>
     </target>
+    
+    <target name="test-codescanner-with-lxr-without-source-dir">
+        <au:expectfailure expectedMessage="'sourceDir' attribute must be defined">
+            <hlm:codescanner dest="${codescanner.output.dir}"
+                format="${codescanner.output.type}"
+                configuration="${codescanner.config}"
+                lxrurl="http://codescanner.lxr.server.com/source">
+                <path refid="src.path.two.path"/>
+            </hlm:codescanner>
+        </au:expectfailure>
+        <au:assertFileExists file="${codescanner.output.dir}" message="codescanner task is not able to create dest folder."/>
+    </target>
+    
+    <target name="test-codescanner-with-lxr-with-source-dir-and-path">
+        <au:expectfailure expectedMessage="Nested path element are not allowed when lxrURL attribute is in use">
+            <hlm:codescanner dest="${codescanner.output.dir}"
+                format="${codescanner.output.type}"
+                configuration="${codescanner.config}"
+                lxrurl="http://codescanner.lxr.server.com/source"
+                sourcedir="../data">
+                <path refid="src.path.two.path"/>
+            </hlm:codescanner>
+        </au:expectfailure>
+        <au:assertFileExists file="${codescanner.output.dir}" message="codescanner task is not able to create dest folder."/>
+    </target>
+    
+    <target name="test-codescanner-with-lxr-without-input-dir" if="do.codescanner.test">
+        <hlm:codescanner dest="${codescanner.output.dir}"
+            format="${codescanner.output.type}"
+            configuration="${codescanner.config}"
+            lxrurl="http://codescanner.lxr.server.com/source"
+            sourcedir="../data/src"/>
+        <au:assertLogContains text="-x http://codescanner.lxr.server.com/source"/>
+        <au:assertFileExists file="${codescanner.output.dir}" message="codescanner task is not able to create dest folder."/>
+    </target>
+    
+    
 </project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/quality/tests/data/headers_report_noissues.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ASCII" standalone="no" ?>
+<?xml-stylesheet type="text/xsl" href="BBCResults.xsl"?>
+<!-- 
+============================================================================ 
+Name        : headers_report_noissues.xml 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<bbcresults>
+
+  <issuelist>
+    <headerfile>
+      <filename>C:\Symbian\9.2\S60_3rd_FP1_2\epoc32\include\_sdpdefs.h</filename>
+      <api category="Unknown" name="Unknown"/>
+    </headerfile>
+    <headerfile>
+      <filename>C:\Symbian\9.2\S60_3rd_FP1_2\epoc32\include\_sipcodecdefs.h</filename>
+      <api category="Unknown" name="Unknown"/>
+    </headerfile>
+    <headerfile>
+      <filename>C:\Symbian\9.2\S60_3rd_FP1_2\epoc32\include\animationcmd.h</filename>
+      <api category="Unknown" name="Unknown"/>
+    </headerfile>
+  </issuelist>
+</bbcresults>
--- a/buildframework/helium/sf/java/quality/tests/data/headers_report_ok.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/quality/tests/data/headers_report_ok.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -31,6 +31,7 @@
         <issueid>60</issueid>
         <typeid>13</typeid>
         <identityid>13</identityid>
+        <typestring>has compilation errors</typestring>
         <severity>
           <typeid>1</typeid>
           <typestring>BBC Break</typestring>
@@ -48,6 +49,22 @@
         <issueid>62</issueid>
         <typeid>13</typeid>
         <identityid>13</identityid>
+        <typestring>has compilation errors</typestring>
+        <identitydescription>File</identitydescription>
+        <severity>
+          <typeid>1</typeid>
+          <typestring>BBC Break</typestring>
+        </severity>
+        <scseverity>
+          <typeid>1</typeid>
+          <typestring>SC Break</typestring>
+        </scseverity>
+      </issue>
+      <issue>
+        <issueid>63</issueid>
+        <typeid>6</typeid>
+        <identityid>13</identityid>
+        <typestring>has changed parameters</typestring>
         <identitydescription>File</identitydescription>
         <severity>
           <typeid>1</typeid>
@@ -66,6 +83,7 @@
         <issueid>5</issueid>
         <typeid>0</typeid>
         <identityid>13</identityid>
+        <typestring>has been removed</typestring>
         <severity>
           <typeid>1</typeid>
           <typestring>BBC Break</typestring>
@@ -75,6 +93,35 @@
           <typestring>SC Break</typestring>
         </scseverity>
       </issue>
+      <issue>
+        <issueid>519</issueid>
+        <typeid>13</typeid>
+        <typestring>has compilation errors</typestring>
+        <cause/>
+        <documentation>Not specified</documentation>
+        <severity>
+          <typeid>1</typeid>
+          <typestring>BBC Break</typestring>
+        </severity>
+      </issue>
+    </headerfile>
+    <headerfile>
+      <filename>c:\symbian\9.2\s60_3rd_fp1_2\epoc32\include\avkon.rh</filename>
+      <comparefilename>j:\epoc32\include\platform\mw\avkon.rh</comparefilename>
+      <api category="Unknown" name="Unknown"/>
+      <issue>
+        <issueid>0</issueid>
+        <typeid>12</typeid>
+        <typestring>has changed its initialisation value</typestring>
+        <cause>avkon_multiselection_list_query_list::flags</cause>
+        <documentation>Not specifiedavkon_multiselection_list_query_list::flags</documentation>
+        <scseverity>
+          <typeid>1</typeid>
+          <typestring>SC Break</typestring>
+        </scseverity>
+      </issue>
+      <checksum>xZxyUIjD0pqjT</checksum>
+      <shortname>platform\mw\avkon.rh</shortname>
     </headerfile>
   </issuelist>
 </bbcresults>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/quality/tests/data/libraries_report_no_ids.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ASCII" standalone="no" ?>
+<?xml-stylesheet type="text/xsl" href="BBCResults.xsl"?>
+<!-- 
+============================================================================ 
+Name        : libraries_report_no_ids.xml 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<bbcresults>
+    <issuelist>
+        <library>
+            <name>C:\Symbian\9.2\S60_3rd_FP1_2\aknicon.dso</name>
+            <currentplatform>armv5</currentplatform>
+        </library>
+    </issuelist>
+
+</bbcresults>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/quality/tests/data/libraries_report_noissues.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="ASCII" standalone="no" ?>
+<?xml-stylesheet type="text/xsl" href="BBCResults.xsl"?>
+<!-- 
+============================================================================ 
+Name        : libraries_report_noissues.xml 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<bbcresults>
+    <issuelist>
+          <library>
+              <name>C:\Symbian\9.2\S60_3rd_FP1_2\aknicon.dso</name>
+              <currentplatform>armv5</currentplatform>
+              <name>C:\Symbian\9.2\S60_3rd_FP1_2\epoc32\release\armv5\lib\hal.dso</name>
+              <comparefilename>J:\epoc32\release\armv5\lib\hal.dso</comparefilename>
+              <shortname>hal</shortname>
+              <baseplatform>armv5</baseplatform>
+              <currentplatform>armv5</currentplatform>
+          </library>
+          <library>
+              <name>C:\Symbian\9.2\S60_3rd_FP1_2\epoc32\release\armv5\lib\irs.dso</name>
+              <comparefilename>J:\epoc32\release\armv5\lib\irs.dso</comparefilename>
+              <shortname>irs</shortname>
+              <baseplatform>armv5</baseplatform>
+              <currentplatform>armv5</currentplatform>
+          </library>
+    </issuelist>
+
+</bbcresults>
--- a/buildframework/helium/sf/java/quality/tests/data/libraries_report_ok.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/quality/tests/data/libraries_report_ok.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -23,7 +23,7 @@
 -->
 <bbcresults>
     <issuelist>
-        <library>
+          <library>
             <name>C:\Symbian\9.2\S60_3rd_FP1_2\aknicon.dso</name>
             <currentplatform>armv5</currentplatform>
             <issue>
@@ -36,49 +36,191 @@
                 <bc_severity>Informative</bc_severity>
                 <sc_severity>None</sc_severity>
             </issue>
-        </library>
-        <library>
-            <name>C:\Symbian\9.2\S60_3rd_FP1_2\aknnotify.dso</name>
+              <name>C:\Symbian\9.2\S60_3rd_FP1_2\epoc32\release\armv5\lib\hal.dso</name>
+              <comparefilename>J:\epoc32\release\armv5\lib\hal.dso</comparefilename>
+              <shortname>hal</shortname>
+              <baseplatform>armv5</baseplatform>
+              <currentplatform>armv5</currentplatform>
+              <issue>
+                    <typeid>13</typeid>
+                    <typeinfo>DLL is missing in current SDK</typeinfo>
+                    <bc_severity>BBC Break</bc_severity>
+                    <sc_severity>None</sc_severity>
+                    <status>OK</status>
+              </issue>
+              <issue>
+                    <typeid>14</typeid>
+                    <typeinfo>Baseline DLL is not available for analysis</typeinfo>
+                    <bc_severity>Informative</bc_severity>
+                    <sc_severity>None</sc_severity>
+              </issue>
+          </library>
+          <library>
+              <name>C:\Symbian\9.2\S60_3rd_FP1_2\epoc32\release\armv5\lib\irs.dso</name>
+              <comparefilename>J:\epoc32\release\armv5\lib\irs.dso</comparefilename>
+              <shortname>irs</shortname>
+              <baseplatform>armv5</baseplatform>
+              <currentplatform>armv5</currentplatform>
+              <issue>
+                    <typeid>14</typeid>
+                    <typeinfo>Baseline DLL is not available for analysis</typeinfo>
+                    <bc_severity>Informative</bc_severity>
+                    <sc_severity>None</sc_severity>
+              </issue>
             <issue>
-                <typeid>6</typeid>
-                <bc_severity>Possible BBC Break</bc_severity>
-                <sc_severity>SC Break</sc_severity>
+                <typeid>8</typeid>
+                <typeinfo>Target type/UID1 has been changed</typeinfo>
+                <bc_severity>BBC Break</bc_severity>
+                <sc_severity>None</sc_severity>
             </issue>
             <issue>
-                <typeid>7</typeid>
-                <bc_severity>Informative</bc_severity>
-                <sc_severity>None</sc_severity>
-            </issue>
-        </library>
-        <library>
-            <name>C:\Symbian\9.2\S60_3rd_FP1_2\animation.dso</name>
-            <issue>
-                <typeid>7</typeid>
-                <bc_severity>Informative</bc_severity>
+                <typeid>9</typeid>
+                <typeinfo>UID2 has been changed</typeinfo>
+                <bc_severity>BBC Break</bc_severity>
                 <sc_severity>None</sc_severity>
             </issue>
             <issue>
-                <typeid>14</typeid>
-                 <bc_severity>Informative</bc_severity>
+                <typeid>10</typeid>
+                <typeinfo>UID3 has been changed</typeinfo>
+                <bc_severity>BBC Break</bc_severity>
                 <sc_severity>None</sc_severity>
             </issue>
-        </library>
-        <library>
-            <name>C:\Symbian\9.2\S60_3rd_FP1_2\animationshared.dso</name>
-            <issue>
-                <typeid>14</typeid>
-                <bc_severity>Informative</bc_severity>
-                <sc_severity>None</sc_severity>
-            </issue>
+          </library>
+          <library>
+              <name>C:\Symbian\9.2\S60_3rd_FP1_2\epoc32\release\armv5\lib\lmkcommonui.dso</name>
+              <comparefilename/>
+              <shortname>lmkcommonui</shortname>
+              <baseplatform>armv5</baseplatform>
+              <currentplatform/>
+              <issue>
+                    <typeid>1</typeid>
+                    <bc_severity>BBC Break</bc_severity>
+                    <sc_severity>SC Break</sc_severity>
+              </issue>
+              <issue>
+                    <typeid>13</typeid>
+                    <typeinfo>DLL is missing in current SDK</typeinfo>
+                    <bc_severity>BBC Break</bc_severity>
+                    <sc_severity>None</sc_severity>
+              </issue>
+          </library>
+          <library>
+              <name/>
+              <comparefilename>J:\epoc32\release\armv5\lib\HelloWorldAPI.dso</comparefilename>
+              <shortname>HelloWorldAPI</shortname>
+              <baseplatform/>
+              <currentplatform>armv5</currentplatform>
+              <issue>
+                    <typeid>2</typeid>
+                    <bc_severity>Informative</bc_severity>
+                    <sc_severity>Informative</sc_severity>
+              </issue>
+              <issue>
+                    <typeid>4</typeid>
+                    <funcname>vtable for CommsDat::CCDDefaultCDMA2000SettingsRecord</funcname>
+                    <funcpos>222</funcpos>
+                    <bc_severity>BBC Break</bc_severity>
+                    <sc_severity>SC Break</sc_severity>
+                    <status>OK</status>
+                    <comment>Studied and approved..</comment>
+              </issue>
+              <issue>
+                    <typeid>5</typeid>
+                    <newfuncname>typeinfo for CommsDat::CCDCprRecord</newfuncname>
+                    <newfuncpos>257</newfuncpos>
+                    <bc_severity>BBC Break</bc_severity>
+                    <sc_severity>None</sc_severity>
+                    <status>OK</status>
+                    <comment>CCDCprRecord is part of internal technology..</comment>
+              </issue>
+              <issue>
+                    <typeid>3</typeid>
+                    <funcname>typeinfo for CommsDat::CCDIAPPrioritySelectionPolicyRecord</funcname>
+                    <funcpos>257</funcpos>
+                    <newfuncpos>289</newfuncpos>
+                    <bc_severity>BBC Break</bc_severity>
+                    <sc_severity>None</sc_severity>
+                    <status>OK</status>
+                    <comment>Constructor is part of internal technology..</comment>
+              </issue>
+              <issue>
+                    <typeid>5</typeid>
+                    <newfuncname>typeinfo for CommsDat::CCDLEAPRecord</newfuncname>
+                    <newfuncpos>258</newfuncpos>
+                    <bc_severity>BBC Break</bc_severity>
+                    <sc_severity>None</sc_severity>
+              </issue>
+              <issue>
+                    <typeid>3</typeid>
+                    <funcname>vtable for CommsDat::CCDAccessPointRecord</funcname>
+                    <funcpos>258</funcpos>
+                    <newfuncpos>281</newfuncpos>
+                    <bc_severity>BBC Break</bc_severity>
+                    <sc_severity>None</sc_severity>
+                    <status>OK</status>
+                    <comment>Constructor is part of internal technology..</comment>
+              </issue>
+         </library>
+          <library>
+              <name>C:\Symbian\9.2\S60_3rd_FP1_2\epoc32\release\armv5\lib\cone.dso</name>
+              <comparefilename>J:\epoc32\release\armv5\lib\cone.dso</comparefilename>
+              <shortname>cone</shortname>
+              <baseplatform>armv5</baseplatform>
+              <currentplatform>armv5</currentplatform>
+              <issue>
+                    <typeid>6</typeid>
+                    <funcname>CCoeControl::SetGc(CWindowGc*) const</funcname>
+                    <newfuncname>CCoeControl::SetCustomGc(CWindowGc*)</newfuncname>
+                    <funcpos>470</funcpos>
+                    <bc_severity>None</bc_severity>
+                    <sc_severity>SC Break</sc_severity>
+                    <status>OK</status>
+                    <comment>Function names changed but entry points and arg lists retained.  Old names deprecated. an inline trampoline exists for both removed functions.  This is OK.</comment>
+              </issue>
+              <issue>
+                    <typeid>6</typeid>
+                    <funcname>CCoeTextDrawerBase::CCoeTextDrawerBase_Reserved2()</funcname>
+                    <newfuncname>CCoeTextDrawerBase::DrawTextVertical(CGraphicsContext&amp;, TCoeTextTypeAdaptor const&amp;, CFont const&amp;, TRect const&amp;, TRect const&amp;, int) const</newfuncname>
+                    <funcpos>536</funcpos>
+                    <bc_severity>None</bc_severity>
+                    <sc_severity>SC Break</sc_severity>
+                    <status>OK</status>
+                    <comment>Reserved function has been renamed.</comment>
+              </issue>
+              <issue>
+                    <typeid>4</typeid>
+                    <funcname>CCoePlainTextDrawer::Construct()</funcname>
+                    <funcpos>552</funcpos>
+                    <bc_severity>BBC Break</bc_severity>
+                    <sc_severity>SC Break</sc_severity>
+                    <status>OK</status>
+                    <comment>Private function, which is not called from any inline functions.</comment>
+              </issue>
+              <issue>
+                    <typeid>6</typeid>
+                    <funcname>CCoeControl::GetGc() const</funcname>
+                    <newfuncname>CCoeControl::CustomGc() const</newfuncname>
+                    <funcpos>619</funcpos>
+                    <bc_severity>Possible BBC Break</bc_severity>
+                    <sc_severity>Possible SC Break</sc_severity>
+                    <status>OK</status>
+                    <comment>Function name has changed, which is ok.</comment>
+              </issue>
+              <issue>
+                    <typeid>7</typeid>
+                    <newfuncname>CCoeEnv::ScreenDevice(int) const</newfuncname>
+                    <newfuncpos>716</newfuncpos>
+                    <bc_severity>Informative</bc_severity>
+                    <sc_severity>None</sc_severity>
+              </issue>
+              <issue>
+                    <typeid>7</typeid>
+                    <newfuncname>CCoeEnv::RootWin(int) const</newfuncname>
+                    <newfuncpos>717</newfuncpos>
+                    <bc_severity>Informative</bc_severity>
+                    <sc_severity>None</sc_severity>
+              </issue>
         </library>
-        <library>
-            <name>C:\Symbian\9.2\S60_3rd_FP1_2\apfile.dso</name>
-          <issue>
-              <typeid>4</typeid>
-              <bc_severity>BBC Break</bc_severity>
-              <sc_severity>SC Break</sc_severity>
-          </issue>
-      </library>
     </issuelist>
 
 </bbcresults>
--- a/buildframework/helium/sf/java/quality/tests/data/libraries_report_one_id.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/quality/tests/data/libraries_report_one_id.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -31,11 +31,6 @@
                 <bc_severity>Informative</bc_severity>
                 <sc_severity>None</sc_severity>
             </issue>
-            <issue>
-                <typeid>7</typeid>
-                <bc_severity>Informative</bc_severity>
-                <sc_severity>None</sc_severity>
-            </issue>
         </library>
     </issuelist>
 
--- a/buildframework/helium/sf/java/sbs/doc/sbsctc.rst	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/sbs/doc/sbsctc.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -73,4 +73,10 @@
     
     <hlm:argSet id="ctc.build.options">
         <arg line="-C OPT_ADD_COMPILE+-DCTC_NO_START_CTCMAN" />
-    </hlm:argSet>
\ No newline at end of file
+    </hlm:argSet>
+    
+    or
+    
+    <hlm:argSet id="ctc.build.options">
+        <arg line='-C "EXCLUDE+*\sf\os\xyz\*,*\tools\xyz\*"'/>
+    </hlm:argSet>
--- a/buildframework/helium/sf/java/scm/tests/antunit/abstract_unittest_scmtask.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/scm/tests/antunit/abstract_unittest_scmtask.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -288,7 +288,7 @@
         </hlm:scm>
     </target>
         
-    <target name="test-update-basedir-tag" depends="test-checkin">
+    <target name="test-update-basedir-tag">
         <echo file="${repo.dir}/test1/not_in_repo.txt">Not in repo</echo>
         <hlm:scm verbose="true" scmUrl="scm:${repo.type}:${repo.dir}/test1">
             <hlm:add>
--- a/buildframework/helium/sf/java/signaling/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -22,10 +22,6 @@
 -->
 <project name="helium-signaling">
     <description>Helium Antlib signaling.</description>
-    
-    
-    <property name="name" value="signaling"/>
-    
     <import file="${builder.dir}/java/macros.ant.xml"/>
     
 </project>
--- a/buildframework/helium/sf/java/signaling/signaling.rst	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/signaling.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -104,8 +104,6 @@
         </hlm:executeTaskNotifier>
     </hlm:notifierList>
 
-Detailed documentation of the notifier interface could be found `here <../../helium-antlib/index.html>`_.
-
 
 Example: configuring compileSignal
 ----------------------------------
--- a/buildframework/helium/sf/java/signaling/signalingCreateANewSignal.rst	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/signalingCreateANewSignal.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -69,7 +69,7 @@
 
 The signalListenerConfig defines which target to listen and raise signal for. The target name is defined through the **target** attribute.
 Then the nested **targetCondition** element is used to configure how the signal should be triggered.
-This element accepts any nested `Ant conditions <http://ant.apache.org/manual/CoreTasks/conditions.html>`_.
+This element accepts any nested `Ant conditions <http://ant.apache.org/manual/Tasks/condition.html>`_.
 In this case the signal will get raised only if the file is not present after the execution of the **custom-action** target.
 
 The framework then uses the defined signalInput from the signalNotifierInput configuration to know how to behave when the signal is raised. In the previous example it will
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/Notifier.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-package com.nokia.helium.signal;
-
-import org.apache.tools.ant.Project;
-
-import com.nokia.helium.signal.ant.types.NotifierInput;
-
-/**
- * This interface describe what method a Notifier needs to implement.
- * 
- */
-public interface Notifier {
-
-    /**
-     * Setting the project.
-     * 
-     * @param project
-     */
-    void setProject(Project project);
-
-    /**
-     * Sends the data to the requested sender list with specified notifier
-     * 
-     * @param signalName is the name of the signal that has been raised.
-     * @param failStatus indicates whether to fail the build or not
-     * @param notifierInput contains signal notifier info
-     * @param message is the message from the signal that has been raised.           
-     */
-    void sendData(String signalName, boolean failStatus,
-            NotifierInput notifierInput, String message );
-
-}
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/SignalExceptionMessage.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:To print the message on the shell in case of build fails for deffered Signals. 
- *
- */
-
-package com.nokia.helium.signal;
-
-import org.apache.log4j.Logger;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.types.DataType;
-
-import com.nokia.helium.core.ant.HlmExceptionHandler;
-
-/**
- * Class to check the signal is present in the deferred and now signal list.
- * Print the message on the shell "Build completed with errors and warnings".
- * 
- */
-
-public class SignalExceptionMessage extends DataType implements
-        HlmExceptionHandler {
-    private Logger log = Logger.getLogger(SignalExceptionMessage.class);
-
-    /**
-     * Implements the Exception method to print the build completed message.
-     * 
-     * @param project
-     * @param module
-     * @param e
-     */
-    public void handleException(Project project, Exception e) {
-
-        if (SignalStatusList.getDeferredSignalList().hasSignalInList()) {
-            log.info("Build completed with errors and warnings.");
-        }
-
-        if (SignalStatusList.getNowSignalList().hasSignalInList()) {
-            log.info("Build completed with errors and warnings.");
-        }
-    }
-}
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/SignalNeverFailMessage.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: To print the message on the shell in case of build has errors
- * is user sets failbuild status to never in signal configuration file.
- *
- */
-
-package com.nokia.helium.signal;
-
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.types.DataType;
-
-import com.nokia.helium.core.ant.PostBuildAction;
-
-/**
- * Class to check the signal is present in the never signal list. Print the
- * message on the shell "Build completed with errors and warnings".
- * 
- */
-public class SignalNeverFailMessage extends DataType implements PostBuildAction {
-
-    /**
-     * Override execute method to print build completed message.
-     * 
-     * @param prj
-     * @param module
-     * @param targetNames
-     */
-    public void executeOnPostBuild(Project project, String[] targetNames) {
-        if (SignalStatusList.getNeverSignalList().hasSignalInList()) {
-            project.log(SignalStatusList.getNeverSignalList().getErrorMsg());
-        }
-    }
-}
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/SignalStatus.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-package com.nokia.helium.signal;
-
-import java.util.Date;
-
-/**
- * Signal data holder;
- */
-public class SignalStatus {
-
-    // Signal attributes.
-    private String name;
-    private String message;
-    private String targetName;
-    private Date signalTimeStamp;
-
-    /**
-     * Deferred signal holder.
-     * 
-     * @param signalName
-     *            name of the signal been raised
-     * @param message
-     *            message for the user
-     * @param targetName
-     *            current target.
-     */
-    public SignalStatus(String signalName, String message, String targetName, Date signalDateAndTime) {
-        this.name = signalName;
-        this.message = message;
-        this.targetName = targetName;
-        this.signalTimeStamp = signalDateAndTime;
-        
-    }
-    /**
-     * Returns the signal message.
-     * @return
-     */
-    public String getMessage() {
-        return message;
-    }
-
-    /**
-     * Returns signal name.
-     * @return
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Returns target name.
-     * @return
-     */
-    public String getTargetName() {
-        return targetName;
-    }
-    
-    /**
-     * Returns signal date and time.
-     * @return
-     */
-    public Date getTimestamp() {
-        return signalTimeStamp;
-    }
-    
-    /**
-     * Converts signal status object to string.
-     */
-    public String toString() {
-        return name + ": " + message + " : " + targetName;
-    }
-}
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/SignalStatusList.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-package com.nokia.helium.signal;
-
-import java.util.Vector;
-
-import org.apache.log4j.Logger;
-
-/**
- * This class implements at storage for SignalStatus object.
- * It cannot be instantiated, it must be used through the typed list:
- * getDeferredSignalList, getNowSignalList, getNeverSignalList
- *
- */
-public final class SignalStatusList {
-    
-    private static SignalStatusList deferSignalList = new SignalStatusList();
-    private static SignalStatusList nowSignalList = new SignalStatusList();
-    private static SignalStatusList neverSignalList = new SignalStatusList();
-
-    private Vector<SignalStatus> signals = new Vector<SignalStatus>();
-    
-    private Logger log = Logger.getLogger(this.getClass());
-    
-    
-    private SignalStatusList() { }
-    
-    /**
-     * Get the list of stored SignalStatus object.
-     * @return a Vector of SignalStatus instances.
-     */
-    public Vector<SignalStatus> getSignalStatusList() {
-        return new Vector<SignalStatus>(signals);
-    }
-    
-    /**
-     * Add a SignalStatus object to the list.
-     * 
-     * @param status
-     *            a signal
-     */
-    public void addSignalStatus(SignalStatus status) {
-        log.debug("SignalStatusList:addSignalStatus:msg:" + status);
-        signals.add(status);
-    }
-
-    /**
-     * Converts the error list into a user readable message.
-     * 
-     * @return the error message.
-     */
-    public String getErrorMsg() {
-        StringBuffer statusBuffer = new StringBuffer();
-        for (SignalStatus signalStatus : signals) {
-            statusBuffer.append(signalStatus);
-            statusBuffer.append("\n");
-        }
-        log.debug("getErrorMsg:msg:" + statusBuffer.toString());
-        return statusBuffer.toString();
-    }
-
-    /**
-     * Check if it has any pending signals stored.
-     * 
-     * @return true if any signal are pending.
-     */
-    public boolean hasSignalInList() {
-        log.debug("asDeferMsgInList:size:"
-                + signals.size());
-        return signals.size() > 0;
-    }
-
-    /**
-     * Clear all deferred signals.
-     */
-    public void clearStatusList() {
-        log.debug("clearStatusList:size1:"
-                + signals.size());
-        signals.clear();
-        log.debug("clearStatusList:size2:"
-                + signals.size());
-    }
-    
-    /*
-     * Returns the deferred signal list.
-     */
-    public static SignalStatusList getDeferredSignalList() {
-        return deferSignalList;
-    }
-    
-    /*
-     * Returns the now signal list.
-     */
-    public static SignalStatusList getNowSignalList() {
-        return nowSignalList;
-    }
-    
-    /*
-     * Returns the never signal list.
-     */
-    public static SignalStatusList getNeverSignalList() {
-        return neverSignalList;
-    }
-
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/Notifier.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+package com.nokia.helium.signal.ant;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.ResourceCollection;
+
+/**
+ * This interface describe what method a Notifier needs to implement.
+ * 
+ */
+public interface Notifier {
+
+    /**
+     * Setting the project.
+     * 
+     * @param project
+     */
+    void setProject(Project project);
+
+    /**
+     * Sends the data to the requested sender list with specified notifier
+     * 
+     * @param signalName is the name of the signal that has been raised.
+     * @param failStatus indicates whether to fail the build or not
+     * @param notifierInput contains signal notifier info, collection of resources.
+     * @param message is the message from the signal that has been raised.           
+     */
+    void sendData(String signalName, boolean failStatus,
+            ResourceCollection notifierInput, String message );
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/SignalExceptionMessage.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:To print the message on the shell in case of build fails for deffered Signals. 
+ *
+ */
+
+package com.nokia.helium.signal.ant;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.DataType;
+
+import com.nokia.helium.core.ant.HlmExceptionHandler;
+
+/**
+ * Class to check the signal is present in the deferred and now signal list.
+ * Print the message on the shell "Build completed with errors and warnings".
+ * 
+ */
+
+public class SignalExceptionMessage extends DataType implements
+        HlmExceptionHandler {
+
+    /**
+     * Implements the Exception method to print the build completed message.
+     * 
+     * @param project
+     * @param module
+     * @param e
+     */
+    public void handleException(Project project, Exception e) {
+        if (!Signals.getSignals().getDeferredSignalList().isEmpty()
+                || !Signals.getSignals().getNowSignalList().isEmpty()) {
+            log("Build completed with errors and warnings.", Project.MSG_WARN);
+        }
+    }
+}
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/SignalList.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,253 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  
- *
- */
-
-package com.nokia.helium.signal.ant;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Vector;
-
-import org.apache.log4j.Logger;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Target;
-import org.apache.tools.ant.taskdefs.condition.Condition;
-
-import com.nokia.helium.signal.Notifier;
-import com.nokia.helium.signal.SignalStatus;
-import com.nokia.helium.signal.SignalStatusList;
-import com.nokia.helium.signal.ant.types.NotifierInput;
-import com.nokia.helium.signal.ant.types.SignalInput;
-import com.nokia.helium.signal.ant.types.SignalListenerConfig;
-import com.nokia.helium.signal.ant.types.SignalNotifierInput;
-import com.nokia.helium.signal.ant.types.SignalNotifierList;
-import com.nokia.helium.signal.ant.types.TargetCondition;
-
-/**
- * Helper class to store the list of notifiers.
- */
-public class SignalList {
-
-    // default id list name
-    public static final String DEFAULT_NOTIFIER_LIST_REFID = "defaultSignalInput";
-
-
-    private Hashtable<String, SignalListenerConfig> signalListenerConfigs = new Hashtable<String, SignalListenerConfig>();
-
-    private HashMap<String, List<SignalListenerConfig>> targetsMap = new HashMap<String, List<SignalListenerConfig>>();
-
-    private Project project;
-
-    private Logger log = Logger.getLogger(this.getClass());
-
-     /**
-     * Constructor
-     */
-    @SuppressWarnings("unchecked")
-    public SignalList(Project project) {
-        this.project = project;
-        Hashtable<String, Object> references = project.getReferences();
-        Enumeration<String> keyEnum = references.keys();
-        while (keyEnum.hasMoreElements()) {
-            String key = keyEnum.nextElement();
-            if (references.get(key) instanceof SignalListenerConfig) {
-                log.debug("SignalList: Found reference: " + key);
-                SignalListenerConfig config = (SignalListenerConfig) references
-                        .get(key);
-                config.setConfigId(key);
-                signalListenerConfigs.put(key, config);
-                String targetName = config.getTargetName();
-                List<SignalListenerConfig> list;
-                if (targetsMap.get(targetName) == null) {
-                    list = new ArrayList<SignalListenerConfig>();
-                } else {
-                    list = targetsMap.get(targetName);
-                }
-                list.add(config);
-                targetsMap.put(targetName, list);
-            }
-        }
-    }
-
-    public Project getProject() {
-        return project;
-    }
-
-    /**
-     * Returns the list of SignalListenerConfig discovered.
-     * @return a Vector of SignalList objects.
-     */
-    public Vector<SignalListenerConfig> getSignalListenerConfigList() {
-        return new Vector<SignalListenerConfig>(signalListenerConfigs.values());
-    }
-
-    /**
-     * Check if targetName is defined is defined by a targetCondition.
-     * @param targetName the target name
-     * @return a boolean, true if found, false otherwise.
-     */
-    public boolean isTargetInSignalList(String targetName) {
-        return targetsMap.get(targetName) != null;
-    }
-
-    /**
-     * Return the list of SignalListenerConfig defining a target.
-     * @param targetName
-     * @return
-     */
-    public List<SignalListenerConfig> getSignalListenerConfig(String targetName) {
-        return targetsMap.get(targetName);
-    }
-
-    protected void sendNotifications(Vector<Notifier> notifierList, String signalName, String errorMessage ) {
-        sendNotifications( notifierList, signalName, false, null, errorMessage );
-    }
-
-    public void processForSignal(Project prj, SignalNotifierInput signalNotifierInput, String signalName, String targetName, 
-            String errorMessage, boolean failBuild) {
-        SignalInput signalInput = signalNotifierInput.getSignalInput();
-        Vector<Notifier> notifierList = signalInput.getSignalNotifierList();
-        if (notifierList == null) {
-            Object obj = (Object) prj
-                    .getReference(DEFAULT_NOTIFIER_LIST_REFID);
-            if (obj instanceof SignalNotifierList) {
-                notifierList = ((SignalNotifierList) obj)
-                        .getNotifierList();
-            }
-        }
-        NotifierInput notifierInput = signalNotifierInput.getNotifierInput();
-        sendNotifications(notifierList, signalName, failBuild,
-                notifierInput, errorMessage );
-        if (failBuild) {
-            String failStatus = "now";
-            if (signalInput != null) {
-                failStatus = signalInput.getFailBuild();
-            } else {
-                log.debug("Could not find config for signal: " + signalName);
-            }
-            if (failStatus == null || failStatus.equals("now")) {
-                log.debug("Adding now signal. Signal name is " + signalName);
-                SignalStatusList.getNowSignalList().addSignalStatus(new SignalStatus(signalName,
-                        errorMessage, targetName, new Date()));
-                throw new BuildException(new SignalStatus(signalName,
-                        errorMessage, targetName, new Date()).toString());
-            } else if (failStatus.equals("defer")) {
-                log.debug("Adding deffer signal. Signal " + signalName + " will be deferred.");
-                SignalStatusList.getDeferredSignalList().addSignalStatus(new SignalStatus(
-                        signalName, errorMessage, targetName, new Date()));
-            } else if (failStatus.equals("never")) {
-                log.debug("Adding never signal. Signal name is " + signalName);
-                SignalStatusList.getNeverSignalList().addSignalStatus(new SignalStatus(signalName,
-                        errorMessage, targetName, new Date()));
-            } else if (!failStatus.equals("never")) {
-                SignalStatusList.getNowSignalList().addSignalStatus(new SignalStatus(signalName,
-                        errorMessage, targetName, new Date()));
-                throw new BuildException(new SignalStatus(signalName,
-                        errorMessage, targetName, new Date()).toString());
-            } else {
-                log.info("Signal " + signalName
-                        + " set to be ignored by the configuration.");
-            }
-        }
-    }
-    /**
-     * Send notification using the notification list.
-     * 
-     * @param notifierList
-     */
-    protected void sendNotifications(Vector<Notifier> notifierList, String signalName,
-            boolean failStatus, NotifierInput notifierInput, String errorMessage ) {
-        if (notifierList == null) {
-            return;
-        }
-        for (Notifier notifier : notifierList) {
-            if (notifier != null) {
-                notifier.sendData(signalName, failStatus, notifierInput, errorMessage );
-            }
-        }
-    }
-
-    public boolean checkAndNotifyFailure(Target target, Project prj) {
-        String targetName = target.getName();
-        String signalName = "unknown";
-        boolean retValue = false;
-        
-        if (isTargetInSignalList(targetName)) {
-            retValue = true;
-            for (SignalListenerConfig config : getSignalListenerConfig(targetName))
-            {
-                TargetCondition targetCondition = config
-                        .getTargetCondition();
-                String errorMessage = null;
-                log.debug("targetcondition:" + targetCondition);
-                Condition condition = null;
-                if (targetCondition != null) {
-                    condition = getFailureCondition(targetCondition);
-                }
-                errorMessage = config.getErrorMessage();
-                String refid = config.getConfigId();
-                log.debug("refid:" + refid);
-                Object  configCurrent = prj.getReference(refid);
-                if (configCurrent != null && configCurrent instanceof SignalListenerConfig) {
-                    signalName = refid;
-                }
-                processForSignal(prj, config.getSignalNotifierInput(), signalName, 
-                        targetName, errorMessage, condition != null);
-                log.debug("checkAndNotifyFailure: SignalName: " + signalName);
-            }
-        }
-        return retValue;
-    }
-    
-    private Condition getFailureCondition(TargetCondition targetCondition) {
-        Condition retCondition = null;
-        Vector<Condition> conditionList = targetCondition.getConditions();
-        for (Condition condition : conditionList) {
-            log.debug("getFailureCondition:" + condition.eval());
-            if (condition.eval()) {
-                retCondition = condition;
-                break;
-            }
-        }
-        return retCondition;
-    }
-
-
-    /**
-     * Handle the signal, either fail now, or defer the failure.
-     * 
-     * @param targetName
-     *            , target where the failure happened.
-     * @param errMsg
-     *            , the error message
-     */
-    public void fail(String signalName, String targetName, String errorMessage)
-    {
-        String failStatus = "now";
-        log.debug("Could not find config for signal: " + signalName);
-        log.debug("failStatus: " + failStatus);
-        log.debug("Adding now signal. Signal name is " + signalName);
-        SignalStatusList.getNowSignalList().addSignalStatus(new SignalStatus(signalName,
-            errorMessage, targetName, new Date()));
-        throw new BuildException(new SignalStatus(signalName,
-            errorMessage, targetName, new Date()).toString());
-    }
-}
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/SignalListener.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/SignalListener.java	Wed Oct 13 16:31:27 2010 +0800
@@ -18,10 +18,18 @@
 
 package com.nokia.helium.signal.ant;
 
-import org.apache.log4j.Logger;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.List;
+
 import org.apache.tools.ant.BuildEvent;
 import org.apache.tools.ant.BuildListener;
 import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Target;
+
+import com.nokia.helium.signal.ant.types.SignalListenerConfig;
 
 /**
  * Listener class that can connect to Ant and log information regarding to build
@@ -38,14 +46,13 @@
  * 
  */
 public class SignalListener implements BuildListener {
-    
     private boolean initialized;
 
-    private SignalList signalList;
-
     private Project project;
 
-    private Logger log = Logger.getLogger(this.getClass());
+    private Hashtable<String, SignalListenerConfig> signalListenerConfigs = new Hashtable<String, SignalListenerConfig>();
+
+    private HashMap<String, List<SignalListenerConfig>> targetsMap = new HashMap<String, List<SignalListenerConfig>>();
 
     /**
      * Ant call this function when build start.
@@ -57,28 +64,41 @@
     /**
      * Triggered when a target starts.
      */
+    @SuppressWarnings("unchecked")
     public void targetStarted(BuildEvent event) {
         if (project == null) {
             project = event.getProject();
         }
-    }
-
-    private void initialize() {
-        signalList = new SignalList(project);
-        //signalList1 = new SignalList(project);
+        if (!initialized) {
+            Hashtable<String, Object> references = (Hashtable<String, Object>)project.getReferences();
+            Enumeration<String> keyEnum = references.keys();
+            while (keyEnum.hasMoreElements()) {
+                String key = keyEnum.nextElement();
+                if (references.get(key) instanceof SignalListenerConfig) {
+                    SignalListenerConfig config = (SignalListenerConfig) references
+                        .get(key);
+                    config.setConfigId(key);
+                    signalListenerConfigs.put(key, config);
+                    String targetName = config.getTargetName();
+                    List<SignalListenerConfig> list;
+                    if (targetsMap.get(targetName) == null) {
+                        list = new ArrayList<SignalListenerConfig>();
+                    } else {
+                        list = targetsMap.get(targetName);
+                    }
+                    list.add(config);
+                    targetsMap.put(targetName, list);
+                }
+            }
+            initialized = true;
+        }
     }
 
     /**
      * Triggered when a target finishes.
      */
     public void targetFinished(BuildEvent event) {
-        if (!initialized) {
-            log.debug("Signaling: Initializing Signaling");
-            initialize();
-            initialized = true;
-        }
-        log.debug("Signaling:targetFinished:sendsignal: " + event.getTarget());
-        signalList.checkAndNotifyFailure(event.getTarget(), event.getProject());
+        checkAndNotifyFailure(event.getTarget(), event.getProject());
     }
 
     /**
@@ -104,4 +124,30 @@
      */
     public void messageLogged(BuildEvent event) {
     }
+
+    protected boolean checkAndNotifyFailure(Target target, Project prj) {
+        String targetName = target.getName();
+        String signalName = "unknown";
+        boolean retValue = false;
+        
+        if (targetsMap.containsKey(targetName)) {
+            retValue = true;
+            for (SignalListenerConfig config : targetsMap.get(targetName))
+            {
+                String refid = config.getConfigId();
+                Object  configCurrent = prj.getReference(refid);
+                if (configCurrent != null && configCurrent instanceof SignalListenerConfig) {
+                    signalName = refid;
+                }
+                boolean failBuild = false;
+                if (config.getTargetCondition() != null) {
+                    failBuild = config.getTargetCondition().getCondition().eval();
+                }
+                Signals.getSignals().processSignal(prj, config.getSignalNotifierInput(), signalName, 
+                        targetName, config.getErrorMessage(), failBuild);
+            }
+        }
+        return retValue;
+    }
+
 }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/SignalNeverFailMessage.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: To print the message on the shell in case of build has errors
+ * is user sets failbuild status to never in signal configuration file.
+ *
+ */
+
+package com.nokia.helium.signal.ant;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.DataType;
+
+import com.nokia.helium.core.ant.PostBuildAction;
+
+/**
+ * Class to check the signal is present in the never signal list. Print the
+ * message on the shell "Build completed with errors and warnings".
+ * 
+ */
+public class SignalNeverFailMessage extends DataType implements
+        PostBuildAction {
+
+    /**
+     * Override execute method to print build completed message.
+     * 
+     * @param prj
+     * @param module
+     * @param targetNames
+     */
+    public void executeOnPostBuild(Project project, String[] targetNames) {
+        if (!Signals.getSignals().getNeverSignalList().isEmpty()) {
+            log("Build completed with errors and warnings.", Project.MSG_WARN);
+        }
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/SignalStatus.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,89 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+package com.nokia.helium.signal.ant;
+
+import java.util.Date;
+
+/**
+ * Signal data holder;
+ */
+public class SignalStatus {
+
+    // Signal attributes.
+    private String name;
+    private String message;
+    private String targetName;
+    private Date signalTimeStamp;
+
+    /**
+     * Deferred signal holder.
+     * 
+     * @param signalName
+     *            name of the signal been raised
+     * @param message
+     *            message for the user
+     * @param targetName
+     *            current target.
+     */
+    public SignalStatus(String signalName, String message, String targetName, Date signalDateAndTime) {
+        this.name = signalName;
+        this.message = message;
+        this.targetName = targetName;
+        this.signalTimeStamp = signalDateAndTime;
+        
+    }
+    /**
+     * Returns the signal message.
+     * @return
+     */
+    public String getMessage() {
+        return message;
+    }
+
+    /**
+     * Returns signal name.
+     * @return
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Returns target name.
+     * @return
+     */
+    public String getTargetName() {
+        return targetName;
+    }
+    
+    /**
+     * Returns signal date and time.
+     * @return
+     */
+    public Date getTimestamp() {
+        return signalTimeStamp;
+    }
+    
+    /**
+     * Converts signal status object to string.
+     */
+    public String toString() {
+        return getName() + ": " + getMessage() + " : " + getTargetName();
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/Signals.java	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: To print the message on the shell in case of build has errors
+ * is user sets failbuild status to never in signal configuration file.
+ *
+ */
+package com.nokia.helium.signal.ant;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Vector;
+
+import org.apache.log4j.Logger;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.ResourceCollection;
+
+import com.nokia.helium.signal.ant.types.SignalInput;
+import com.nokia.helium.signal.ant.types.SignalNotifierInput;
+
+/**
+ * Signals give access to signals raised during the build.
+ *
+ */
+public class Signals {
+    // Global instance handling signals a the running Ant build
+    private static Signals self;
+    
+    private SignalStatusList deferSignalList = new SignalStatusList();
+    private SignalStatusList nowSignalList = new SignalStatusList();
+    private SignalStatusList neverSignalList = new SignalStatusList();
+    private Logger log = Logger.getLogger(this.getClass());
+    
+    /**
+     * Get the access to the unique instance of Signals.
+     * @return
+     */
+    public static Signals getSignals() {
+        if (self == null) {
+            self = new Signals();
+        }
+        return self;
+    }
+
+    /**
+     * Returns the deferred signal list.
+     */
+    public List<SignalStatus> getDeferredSignalList() {
+        return deferSignalList;
+    }
+    
+    /**
+     * Returns the now signal list.
+     */
+    public List<SignalStatus> getNowSignalList() {
+        return nowSignalList;
+    }
+    
+    /**
+     * Returns the never signal list.
+     */
+    public List<SignalStatus> getNeverSignalList() {
+        return neverSignalList;
+    }
+
+    /**
+     * 
+     * @param project current Ant project
+     * @param signalNotifierInput can be null, the DEFAULT_NOTIFIER_LIST_REFID will be used for notification,
+     *                            and failing configuration will be considered as now.  
+     * @param signalName the signal name
+     * @param targetName target where the signal has been raised.
+     * @param errorMessage the message
+     * @param failBuild true for a failure, false in case of success.
+     */
+    public void processSignal(Project project, SignalNotifierInput signalNotifierInput, String signalName, String targetName, 
+            String errorMessage, boolean failBuild) {
+        Vector<Notifier> notifierList = null;
+        ResourceCollection notifierInput = null;
+        if (signalNotifierInput != null) {
+            SignalInput signalInput = signalNotifierInput.getSignalInput();
+            notifierList = signalInput.getSignalNotifierList();
+            notifierInput = signalNotifierInput.getNotifierInput();
+        }
+        // Print some verbose log information about signal raised.
+        project.log("------------ Signal raised ------------", notifierList != null ? Project.MSG_VERBOSE : Project.MSG_INFO);
+        project.log("Signal: " + signalName, notifierList != null ? Project.MSG_VERBOSE : Project.MSG_INFO);
+        project.log("Target: " + targetName, notifierList != null ? Project.MSG_VERBOSE : Project.MSG_INFO);
+        project.log("Message: " + errorMessage, notifierList != null ? Project.MSG_VERBOSE : Project.MSG_INFO);
+        project.log("Failure: " + (failBuild ? "Yes" : "No"), notifierList != null ? Project.MSG_VERBOSE : Project.MSG_INFO);
+        project.log("---------------------------------------", notifierList != null ? Project.MSG_VERBOSE : Project.MSG_INFO);
+
+        // Only run notification 
+        if (notifierList != null) {
+            sendNotifications(notifierList, signalName, failBuild,
+                    notifierInput, errorMessage );
+        }
+        if (failBuild) {
+            String failStatus = "now";
+            if (signalNotifierInput != null && signalNotifierInput.getSignalInput() != null) {
+                failStatus = signalNotifierInput.getSignalInput().getFailBuild();
+            } else {
+                log.debug("Could not find config for signal: " + signalName);
+            }
+            if (failStatus == null || failStatus.equals("now")) {
+                log.debug("Adding now signal. Signal name is " + signalName);
+                Signals.getSignals().getNowSignalList().add(new SignalStatus(signalName,
+                        errorMessage, targetName, new Date()));
+                throw new BuildException(new SignalStatus(signalName,
+                        errorMessage, targetName, new Date()).toString());
+            } else if (failStatus.equals("defer")) {
+                log.debug("Adding deffer signal. Signal " + signalName + " will be deferred.");
+                Signals.getSignals().getDeferredSignalList().add(new SignalStatus(
+                        signalName, errorMessage, targetName, new Date()));
+            } else if (failStatus.equals("never")) {
+                log.debug("Adding never signal. Signal name is " + signalName);
+                Signals.getSignals().getNeverSignalList().add(new SignalStatus(signalName,
+                        errorMessage, targetName, new Date()));
+            } else if (!failStatus.equals("never")) {
+                Signals.getSignals().getNowSignalList().add(new SignalStatus(signalName,
+                        errorMessage, targetName, new Date()));
+                throw new BuildException(new SignalStatus(signalName,
+                        errorMessage, targetName, new Date()).toString());
+            } else {
+                log.info("Signal " + signalName
+                        + " set to be ignored by the configuration.");
+            }
+        }
+    }
+
+    /**
+     * Send notification using the notification list.
+     * 
+     * @param notifierList
+     */
+    protected void sendNotifications(List<Notifier> notifierList, String signalName,
+            boolean failStatus, ResourceCollection notifierInput, String errorMessage ) {
+        if (notifierList == null) {
+            return;
+        }
+        for (Notifier notifier : notifierList) {
+            if (notifier != null) {
+                notifier.sendData(signalName, failStatus, notifierInput, errorMessage);
+            }
+        }
+    }
+    
+    protected class SignalStatusList extends ArrayList<SignalStatus> {
+
+        private static final long serialVersionUID = 2159492246599277712L;
+
+        /**
+         * Converts the error list into a user readable message.
+         * 
+         * @return the error message.
+         */
+        public String toString() {
+            StringBuffer statusBuffer = new StringBuffer();
+            for (SignalStatus signalStatus : this) {
+                statusBuffer.append(signalStatus);
+                statusBuffer.append("\n");
+            }
+            return statusBuffer.toString();
+        }
+
+    }
+}
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/conditions/DeferredFailureCondition.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/conditions/DeferredFailureCondition.java	Wed Oct 13 16:31:27 2010 +0800
@@ -21,8 +21,8 @@
 import org.apache.tools.ant.ProjectComponent;
 import org.apache.tools.ant.taskdefs.condition.Condition;
 
-import com.nokia.helium.signal.SignalStatus;
-import com.nokia.helium.signal.SignalStatusList;
+import com.nokia.helium.signal.ant.SignalStatus;
+import com.nokia.helium.signal.ant.Signals;
 
 /**
  * The hasDeferredFailure condition allows you to know if any diferred failure are pending,
@@ -65,7 +65,7 @@
     public boolean eval() {
         if (name != null) {
             getProject().log("Has deferred " + name + " failure?");
-            for (SignalStatus signal : SignalStatusList.getDeferredSignalList().getSignalStatusList()) {
+            for (SignalStatus signal : Signals.getSignals().getDeferredSignalList()) {
                 if (signal.getName().equals(name)) {
                     getProject().log("Failure " + name + " found.");
                     return true;
@@ -74,9 +74,9 @@
         } else {
             getProject().log(
                     "Deferred failure: "
-                            + ((SignalStatusList.getDeferredSignalList().hasSignalInList()) ? "Yes"
+                            + ((!Signals.getSignals().getDeferredSignalList().isEmpty()) ? "Yes"
                                     : "No"));
-            return SignalStatusList.getDeferredSignalList().hasSignalInList();
+            return !Signals.getSignals().getDeferredSignalList().isEmpty();
         }
         return false;
     }
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/helium.antlib.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/helium.antlib.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -29,8 +29,8 @@
 
     <typedef name="signalstatusdef" classname="com.nokia.helium.signal.ant.types.SignalStatusDef" uri="http://www.nokia.com/helium"/>
     <typedef name="exceptionsignal" classname="com.nokia.helium.signal.ant.types.SignalExceptionConfigHandler" uri="http://www.nokia.com/helium"/>
-    <typedef name="buildfailmessage" classname="com.nokia.helium.signal.SignalExceptionMessage" uri="http://www.nokia.com/helium"/>
-    <typedef name="buildneverfailmessage" classname="com.nokia.helium.signal.SignalNeverFailMessage" uri="http://www.nokia.com/helium"/>
+    <typedef name="buildfailmessage" classname="com.nokia.helium.signal.ant.SignalExceptionMessage" uri="http://www.nokia.com/helium"/>
+    <typedef name="buildneverfailmessage" classname="com.nokia.helium.signal.ant.SignalNeverFailMessage" uri="http://www.nokia.com/helium"/>
 
     <hlm:deflist id="helium-signaling.list">
         <hlm:listenerdef classname="com.nokia.helium.signal.ant.SignalListener" />
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/taskdefs/ClearDeferredFailuresTask.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/taskdefs/ClearDeferredFailuresTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -20,7 +20,7 @@
 
 import org.apache.tools.ant.Task;
 
-import com.nokia.helium.signal.SignalStatusList;
+import com.nokia.helium.signal.ant.Signals;
 
 /**
  * This class implements a task that clear all pending failure. It is quite
@@ -35,7 +35,7 @@
     @Override
     public void execute() {
         log("Clearing all pending failures.");
-        SignalStatusList.getDeferredSignalList().clearStatusList();
+        Signals.getSignals().getDeferredSignalList().clear();
     }
 
 }
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/taskdefs/SignalTask.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/taskdefs/SignalTask.java	Wed Oct 13 16:31:27 2010 +0800
@@ -20,10 +20,12 @@
 import java.util.Vector;
 
 import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
 import org.apache.tools.ant.Target;
 import org.apache.tools.ant.Task;
 
-import com.nokia.helium.signal.ant.SignalList;
+import com.nokia.helium.signal.ant.Signals;
+import com.nokia.helium.signal.ant.types.SignalInput;
 import com.nokia.helium.signal.ant.types.SignalNotifierInput;
 
 /**
@@ -58,24 +60,29 @@
 
     private Vector<SignalNotifierInput> signalNotifierInputs = new Vector<SignalNotifierInput>();
     
-    public String getMessage() {
-        return message;
-    }
-
     /**
-     * Helper function called by ant to create the new signalinput
-     */
+     * Create a nested signalNotifierInput element.
+     * @return a SignalNotifierInput instance
+     */   
     public SignalNotifierInput createSignalNotifierInput() {
         SignalNotifierInput input =  new SignalNotifierInput();
         add(input);
         return input;
     }
 
+    /**
+     * Get the nested SignalNotifierInput. Only the first element will be returned.
+     * @return null if the list is empty of the first element.
+     */
     public SignalNotifierInput getSignalNotifierInput() {
+        if (signalNotifierInputs.isEmpty()) {
+            return null;
+        }
         return (SignalNotifierInput)signalNotifierInputs.elementAt(0);
     }
+    
     /**
-     * Helper function to add the created signalinput
+     * Add a SignalNotifierInput kind of element.
      * @param filter to be added to the filterset
      */
     public void add(SignalNotifierInput input) {
@@ -84,21 +91,16 @@
     
     
     /**
-     * Error message.
-     * 
-     * @ant.not-required
+     * Error message sent to the user.
+     * @ant.not-required Default message will be sent.
      */
     public void setMessage(String message) {
         this.message = message;
     }
 
-
-    public String getName() {
-        return name;
-    }
-
     /**
-     * Signal name to emit.
+     * Reference of the signal to emit. The referenced object
+     * must be a signalInput.
      * 
      * @ant.required
      */
@@ -109,69 +111,59 @@
     /**
      * integer value representing the number of errors.
      * 
-     * @ant.required
+     * @ant.no-required Default is 0.
      */
     public void setResult(int result) {
         this.result = new Integer(result);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public void execute() {
-        if (name == null) {
+        if (name == null && getSignalNotifierInput() == null) {
             throw new BuildException("'name' attribute is not defined.");
         }
+        if (name != null && getSignalNotifierInput() != null) {
+            log("The usage of name and nested signalInputNotifier at the same time is deprecated.", Project.MSG_WARN);
+            log("'name' attribute will be ignored.", Project.MSG_WARN);
+            name = null;
+        }
         if (result == null) {
             result = new Integer(0);
         }
+        SignalNotifierInput config = null;
+        String signalName = null;
+        if (name != null) {
+            signalName = name;
+            Object configObject = getProject().getReference(name);
+            if (configObject != null && configObject instanceof SignalInput) {
+                config = new SignalNotifierInput();
+                config.setProject(getProject());
+                config.add((SignalInput)configObject);
+            } else {
+                throw new BuildException("name attribute (" + name + ") is not refering to a signalInput");
+            }
+        } else {
+            config = getSignalNotifierInput();
+            signalName = config.getSignalInput().getName();
+        }
 
-        SignalList signalList = new SignalList(getProject());
-        boolean failStatus = result.intValue() != 0; 
-        if (failStatus) {
-            // keep same message as earlier.
-            log(name
-                    + ": "
-                    + name
-                    + " signal failed. Expected result was 0, actual result was "
-                    + result);
-
-            if (message == null) {
-                message = "Expected result was 0, actual result was " + result;
-            }
-        }
-        
         // notify the user
-        String targetName = "signalExceptionTarget";  
+        String targetName = "unknown";  
         Target target = this.getOwningTarget();
         if (target != null) {
             targetName = target.getName();
         }
 
-        if (signalNotifierInputs.isEmpty()) {          
-            Object config = getProject().getReference(name);
-            if (config == null) {
-                throw new BuildException("Could not find signal config for signal name: " + name);
-            }
-            signalList.processForSignal(getProject(), this.getSignalNotifierInput(), this.name, 
-                    this.getOwningTarget().getName(), message, result.intValue() != 0);
+        if (message == null) {
+            message = "Expected result was 0, actual result was " + result;
+        }
+        log(signalName + ": " + targetName + ": " + message);
 
-            if (result.intValue() != 0) {
-                // keep same message as earlier.
-                log(name
-                        + ": "
-                        + name
-                        + " signal failed. Expected result was 0, actual result was "
-                        + result);
-
-                if (message == null) {
-                    message = "Expected result was 0, actual result was " + result;
-                }
-                signalList.fail(getName(), this.getOwningTarget().getName(), message);
-            }
-            
-        } else {
-            signalList.processForSignal(getProject(), getSignalNotifierInput(), getName(),
-                targetName, message, failStatus);
-        }
+        Signals.getSignals().processSignal(getProject(), config, signalName, 
+                targetName, message, result.intValue() != 0);            
     }
 
 }
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/EMAILNotifier.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/EMAILNotifier.java	Wed Oct 13 16:31:27 2010 +0800
@@ -22,8 +22,10 @@
 import com.nokia.helium.core.EmailSendException;
 import com.nokia.helium.core.PropertiesSource;
 import com.nokia.helium.core.TemplateInputSource;
-import com.nokia.helium.signal.Notifier;
+import com.nokia.helium.signal.ant.Notifier;
 import com.nokia.helium.core.TemplateProcessor;
+import com.nokia.helium.core.ant.ResourceCollectionUtils;
+
 import java.util.List;
 import java.util.Hashtable;
 import java.util.ArrayList;
@@ -32,6 +34,8 @@
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.ResourceCollection;
+
 import java.io.File;
 
 /**
@@ -53,21 +57,11 @@
     private String additionalRecipients;
 
     /**
-     * Rendering the template, and sending the result through email.
-     * 
-     * @param signalName
-     *            - is the name of the signal that has been raised.
-     * @param failStatus
-     *            - indicates whether to fail the build or not
-     * @param notifierInput
-     *            - contains signal notifier info
-     * @param message
-     *            - is the message from the signal that has been raised.
+     * {@inheritDoc}
      */
-
     @SuppressWarnings("unchecked")
     public void sendData(String signalName, boolean failStatus,
-            NotifierInput notifierInput, String message) {
+            ResourceCollection notifierInput, String message) {
         if (notifyWhen != null
                 && (notifyWhen.equals("always")
                         || (notifyWhen.equals("fail") && failStatus) || (notifyWhen
@@ -96,7 +90,7 @@
                 
                 File fileToSend = null;
                 if (notifierInput != null) {
-                    fileToSend = notifierInput.getFile(".*.html");
+                    fileToSend = ResourceCollectionUtils.getFile(notifierInput, ".*.html");
                 }
                 if (fileToSend == null) {
                     if (defaultTemplate != null && defaultTemplate.exists()) {
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/ExecuteTaskNotifier.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/ExecuteTaskNotifier.java	Wed Oct 13 16:31:27 2010 +0800
@@ -20,10 +20,10 @@
 
 import java.io.File;
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Vector;
 
-import org.apache.log4j.Logger;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.BuildListener;
 import org.apache.tools.ant.MagicNames;
@@ -32,8 +32,10 @@
 import org.apache.tools.ant.Task;
 import org.apache.tools.ant.TaskContainer;
 import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Resource;
+import org.apache.tools.ant.types.ResourceCollection;
 
-import com.nokia.helium.signal.Notifier;
+import com.nokia.helium.signal.ant.Notifier;
 
 /**
  * This notifier allows you to execute a task sequence when a specific signal
@@ -55,11 +57,8 @@
  * 
  * @ant.type name="executeTaskNotifier" category="Signaling"
  */
-@SuppressWarnings("deprecation")
 public class ExecuteTaskNotifier extends DataType implements Notifier,
         TaskContainer {
-
-    private Logger log = Logger.getLogger(ExecuteTaskNotifier.class);
     private List<Task> tasks = new ArrayList<Task>();
     private boolean failOnError;
 
@@ -74,7 +73,7 @@
      */
     @SuppressWarnings("unchecked")
     public void sendData(String signalName, boolean failStatus,
-            NotifierInput notifierInput, String message ) {
+            ResourceCollection notifierInput, String message ) {
         try {
             // Configure the project
             Project prj = getProject().createSubProject();
@@ -96,12 +95,18 @@
             prj.setProperty("signal.message", message );
             // Converting the list of inputs into a string.
             String inputs = "";
-            if (notifierInput != null && notifierInput.getFile() != null) {
-                inputs += notifierInput.getFile().toString();
+            if (notifierInput != null) {
+                Iterator<Resource> ri = notifierInput.iterator();
+                while (ri.hasNext()) {
+                    inputs += ri.next().toString();
+                    if (ri.hasNext()) {
+                        inputs += File.pathSeparator;
+                    }
+                }
             }
             prj.setProperty("signal.notifier.inputs", inputs);
             for (Task task : tasks) {
-                log.debug("Executing task: " + task.getTaskName());
+                log("Executing task: " + task.getTaskName(), Project.MSG_DEBUG);
                 task.setProject(prj);
                 task.perform();
             }
@@ -115,9 +120,10 @@
         }
     }
 
-    @Override
+    /**
+     * {@inheritDoc}
+     */
     public void addTask(Task task) {
-        log.debug("Adding task: " + task.getTaskName());
         tasks.add(task);
     }
 
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/InfoNotifier.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/InfoNotifier.java	Wed Oct 13 16:31:27 2010 +0800
@@ -19,10 +19,12 @@
 
 import java.io.File;
 
-import org.apache.log4j.Logger;
+import org.apache.tools.ant.Project;
 import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.ResourceCollection;
 
-import com.nokia.helium.signal.Notifier;
+import com.nokia.helium.core.ant.ResourceCollectionUtils;
+import com.nokia.helium.signal.ant.Notifier;
 
 /**
  * The InfoNotifier provides you an easy way to inform the
@@ -30,24 +32,15 @@
  * @ant.type name="infoNotifier" category="Signaling"
  */
 public class InfoNotifier extends DataType implements Notifier {
-
-    private Logger log = Logger.getLogger(InfoNotifier.class);
     
     /**
-     * Rendering the template, and sending the result through email.
-     * 
-     * @param signalName - is the name of the signal that has been raised.
-     * @param failStatus - indicates whether to fail the build or not
-     * @param notifierInput - contains signal notifier info
-     * @param message - is the message from the signal that has been raised. 
+     * {@inheritDoc}
      */
-
-    @SuppressWarnings("unchecked")
     public void sendData(String signalName, boolean failStatus,
-            NotifierInput notifierInput, String message ) {
-        if (notifierInput != null) { 
-            File logFile = notifierInput.getFile(".*.log");
-            log.error("Error in log file: " + logFile);
+            ResourceCollection notifierInput, String message ) {
+        if (notifierInput != null) {
+            File logFile = ResourceCollectionUtils.getFile(notifierInput, ".*.log");
+            log("Error in log file: " + logFile, Project.MSG_ERR);
         }
     }
 }
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/NotifierInput.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/NotifierInput.java	Wed Oct 13 16:31:27 2010 +0800
@@ -20,110 +20,30 @@
 
 
 import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Vector;
 
-import org.apache.log4j.Logger;
-import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.types.DataType;
-import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.Path;
 
 /**
- * Helper class to store the signal notifier info.
+ * This Ant type allows you to provide a list of files, for
+ * example logs to a notifier. The usage of this type is 
+ * deprecated, please consider using any kind of Ant 
+ * ResourceCollection like paths or filesets.
+ * 
+ * @ant.type name="NotifierInput" category="Signaling"
  */
-public class NotifierInput extends DataType
-{
-
-    private File file;
-
-    //Different notifier could choose specific file
-    private String pattern = ".html";
-
-    private Vector<FileSet> fileSetList = new Vector<FileSet>();
-
-    private Logger log = Logger.getLogger(this.getClass());
-
-    /**
-     * Adds the fileset (list of input log files to be processed).
-     *  @param fileSet fileset to be added
-     * 
-     */
-    public void add(FileSet fileSet) {
-        fileSetList.add(fileSet);
-    }   
+public class NotifierInput extends Path {
 
-    public File getFile() {
-        return getFile(pattern);
-    }
-    
-    /**
-     * Return a file from the input fileset.
-     *  @param pattern pattern to match from the input fileset
-     *  @return the matched files including the base dir. 
-     */
-    public File getFile(String pattern) {
-        File fileToReturn = null;
-        if (file != null) {
-            if (file.toString().matches(pattern)) {
-                fileToReturn = file;
-            }
-            return fileToReturn;
-        }
-        for (FileSet fs : fileSetList) {
-            DirectoryScanner ds = fs.getDirectoryScanner(getProject());
-            String[] includedFiles = ds.getIncludedFiles();
-            for ( String filePath : includedFiles ) {
-                if (filePath.matches(pattern)) {
-                    fileToReturn = new File(ds.getBasedir(), filePath);
-                    log.debug("matched file for pattern: " + pattern + ":" + fileToReturn);
-                    break;
-                }
-            }
-        }
-        return fileToReturn;
-    }
-
-    /**
-     * Returns the list of filelist from the input fileset.
-     *  @param pattern pattern to match from the input fileset
-     *  @return the matched files including the base dir. 
-     */
-    public List<File> getFileList(String pattern) {
-        List<File> fileList = new ArrayList<File>();
-        for (FileSet fs : fileSetList) {
-            DirectoryScanner ds = fs.getDirectoryScanner(getProject());
-            String[] includedFiles = ds.getIncludedFiles();
-            for ( String filePath : includedFiles ) {
-                if (filePath.matches(pattern)) {
-                    fileList.add(new File(ds.getBasedir(), filePath));
-                }
-            }
-        }
-        return fileList;
+    public NotifierInput(Project project) {
+        super(project);
     }
 
     /**
      * Helper function called by ant to set the input file.
      * @param inputFile input file for notifier
-     */
-    public void setFile(File inputFile) {
-        file = inputFile;
-    }
-
-    /**
-     * Helper function called by ant to get the file
-     * @return the input file for notifier.
+     * @ant.not-required
      */
-    public String getPattern() {
-        return pattern ;
-    }
-
-    /**
-     * Helper function called by ant to get the file
-     * @return the input file for notifier.
-     */
-    public void setPattern(String ptn) {
-        pattern = ptn;
+    public void setFile(File file) {
+        this.createPathElement().setLocation(file);
     }
 }
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/SMSNotifier.java	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
- 
-package com.nokia.helium.signal.ant.types;
-
-
-import org.apache.tools.ant.types.DataType;
-
-import com.nokia.helium.signal.Notifier;
-
-/**
- * Defines a signal notification via SMS.
- */
-public class SMSNotifier extends DataType implements Notifier {
-
-    /**
-     * Sends the data to the requested sender list with specified notifier
-     * 
-     * @param signalName is the name of the signal that has been raised.
-     * @param failStatus indicates whether to fail the build or not
-     * @param notifierInput contains signal notifier info
-     * @param message is the message from the signal that has been raised.           
-     */
-    public void sendData(String signalName, boolean failStatus,
-            NotifierInput notifierInput, String message ) {
-    }
-
-}
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/SignalExceptionConfig.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/SignalExceptionConfig.java	Wed Oct 13 16:31:27 2010 +0800
@@ -25,7 +25,7 @@
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.types.DataType;
 
-import com.nokia.helium.signal.Notifier;
+import com.nokia.helium.signal.ant.Notifier;
 
 /**
  * The signalExceptionConfig type will allow you to configure post-build
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/SignalInput.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/SignalInput.java	Wed Oct 13 16:31:27 2010 +0800
@@ -19,14 +19,14 @@
 package com.nokia.helium.signal.ant.types;
 
 
+import java.util.List;
 import java.util.Vector;
 
-import org.apache.log4j.Logger;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.types.DataType;
 
 import com.nokia.helium.core.ant.types.ReferenceType;
-import com.nokia.helium.signal.Notifier;
+import com.nokia.helium.signal.ant.Notifier;
 
 /**
  * SignalInput class which is a type to store input for signals
@@ -47,15 +47,11 @@
  */
 public class SignalInput extends DataType
 {
-    private Vector<ReferenceType> notifierListRef = new Vector<ReferenceType>();
-
-    private Vector<NotifierInput> notifierInputList = new Vector<NotifierInput>();
+    private List<ReferenceType<SignalNotifierList>> notifierListRef = new Vector<ReferenceType<SignalNotifierList>>();
 
     // By default it is configured to fail the build.
     private String failBuild = "now";
 
-    private Logger log = Logger.getLogger(SignalInput.class);
-
     
     /**
      * Defines how the signal framework should handle the error, either
@@ -73,27 +69,10 @@
      * @param failBuild type of failure for this input.
      */
     public String getFailBuild() {
-        return failBuild;
-    }
-
-    /**
-     * Helper function called by ant to create a new notifier for
-     * this input.
-     * @return ReferenceType created ReferenceType.
-     */    
-    public NotifierInput createNotifierInput() {
-        NotifierInput notifierInput =  new NotifierInput();
-        add(notifierInput);
-        return notifierInput;
-    }
-
-    /**
-     * Adds the created notifier to the list
-     * @param ReferenceType notifier to be added to the list.
-     */    
-    public void add(NotifierInput notifierInput) {
-        if (notifierInput != null) {
-            notifierInputList.add(notifierInput);
+        if (this.isReference()) {
+            return getReferencedObject().getFailBuild();
+        } else {
+            return failBuild;
         }
     }
     
@@ -102,8 +81,8 @@
      * this input.
      * @return ReferenceType created ReferenceType.
      */    
-    public ReferenceType createNotifierListRef() {
-        ReferenceType notifierRef =  new ReferenceType();
+    public ReferenceType<SignalNotifierList> createNotifierListRef() {
+        ReferenceType<SignalNotifierList> notifierRef =  new ReferenceType<SignalNotifierList>();
         add(notifierRef);
         return notifierRef;
     }
@@ -112,34 +91,49 @@
      * Adds the created notifier to the list
      * @param ReferenceType notifier to be added to the list.
      */    
-    public void add(ReferenceType notifier) {
+    public void add(ReferenceType<SignalNotifierList> notifier) {
         if (notifier != null) {
             notifierListRef.add(notifier);
         }
     }
-    
-    public Vector<NotifierInput> getNotifierInput() {
-        return notifierInputList;
-    }
-    
+        
     /**
      * Gets the NotifierList associated with this input. If the
      * notifier list reference is empty then it throws exception. 
      * @return List of notifier associated with this input.
      */    
     public Vector<Notifier> getSignalNotifierList() {
-        Vector<Notifier> notifierList = null;
-        if (notifierListRef != null) {
-            log.debug("getSignalNotifierList:list.size:" + notifierListRef.size());
-            for (ReferenceType notifierRef : notifierListRef) {
-                Object obj = notifierRef.getReferencedObject();
-                if (obj instanceof SignalNotifierList) {
-                    notifierList = ((SignalNotifierList)obj).getNotifierList();
-                    break;
+        if (this.isReference()) {
+            return getReferencedObject().getSignalNotifierList();
+        } else {
+            Vector<Notifier> notifierList = null;
+            if (notifierListRef != null) {
+                for (ReferenceType<SignalNotifierList> notifierRef : notifierListRef) {
+                    notifierList = notifierRef.getReferencedObject().getNotifierList();
                 }
+                return notifierList;
             }
-            return notifierList;
+            throw new BuildException("No signal notifierlist reference defined.");
         }
-        throw new BuildException("No signal notifierlist reference defined.");
-    }    
+    }
+    
+    /**
+     * Get the signal name. If the object is a reference then its id is used.
+     * 'unknownSignalName' is returned otherwise. 
+     * @return the signal name.
+     */
+    public String getName() {
+        if (this.isReference()) {
+            return this.getRefid().getRefId();
+        }
+        return "unknownSignalName";
+    }
+    
+    protected SignalInput getReferencedObject() {
+        Object obj = this.getRefid().getReferencedObject();
+        if (obj instanceof SignalInput) {
+            return (SignalInput)obj; 
+        }
+        throw new BuildException("SignalInput reference " + this.getRefid().getRefId() + " does not exist.");
+    }
 }
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/SignalListenerConfig.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/SignalListenerConfig.java	Wed Oct 13 16:31:27 2010 +0800
@@ -20,6 +20,7 @@
 
 import java.util.Vector;
 
+import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.types.DataType;
 
 /**
@@ -50,7 +51,7 @@
     
     private String errMsg;
 
-    private Vector<TargetCondition> targetConditions = new Vector<TargetCondition>();
+    private TargetCondition targetCondition;
         
     private String configID;
 
@@ -85,27 +86,24 @@
      */
     public SignalNotifierInput createSignalNotifierInput() {
         SignalNotifierInput input =  new SignalNotifierInput();
-        add(input);
+        signalNotifierInputs.add(input);
+        if (this.signalNotifierInputs.size() > 1) {
+            throw new BuildException(this.getDataTypeName() + " only accept one nested signalNotifierInput at " + this.getLocation());
+        }
         return input;
     }
 
     /**
-     * Helper function to add the created signalinput
-     * @param filter to be added to the filterset
-     */
-    public void add(SignalNotifierInput input) {
-        signalNotifierInputs.add(input);
-    }
-
-
-    /**
      * Creates type target condition of type TargetCondition.
      * @return ReferenceType which is created and stored by the config.
      */
     public TargetCondition createTargetCondition() {
+        if (this.targetCondition != null) {
+            throw new BuildException(this.getDataTypeName() + " only accept one nested targetCondition at " + this.getLocation());
+        }
         TargetCondition condition =  new TargetCondition();
-        add(condition);
-        return condition;
+        this.targetCondition = condition;
+        return this.targetCondition;
     }
 
     /**
@@ -125,24 +123,12 @@
     }
 
     /**
-     * Adds the TargetCondition reference to the container.
-     * @param TargetCondition to be added to the container, to be processed during signaling.
-     */    
-    public void add(TargetCondition condition) {
-        if (condition != null) {
-            targetConditions.add(condition);
-        }
-    }    
-
-    /**
      * Helper function to return the Targetcondition matching the target name.
-     * @param String name of the target for which the targetcondition is returned,
+     * @param String name of the target for which the targetcondition is returned, can be null in case of
+     * informative signal, in that case build should not be failing. 
      */    
     public TargetCondition getTargetCondition() {
-        if (targetConditions.isEmpty()) {
-            return null;
-        }
-        return targetConditions.get(0);
+        return this.targetCondition;
     }
 
     /**
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/SignalNotifierInput.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/SignalNotifierInput.java	Wed Oct 13 16:31:27 2010 +0800
@@ -23,6 +23,7 @@
 
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.ResourceCollection;
 
 
 /**
@@ -33,43 +34,41 @@
  * &lt;/targetCondition&gt;
  * 
  */
-public class SignalNotifierInput extends DataType
-{
+public class SignalNotifierInput extends DataType {
+    
     private Vector<SignalInput> signalInputs = new Vector<SignalInput>();
 
-    private Vector<NotifierInput> notifierInputList = new Vector<NotifierInput>();
+    private Vector<ResourceCollection> notifierInputList = new Vector<ResourceCollection>();
 
     /**
-     * Helper function called by ant to create a new notifier for
-     * this input.
-     * @return ReferenceType created ReferenceType.
+     * Create a nested notifierInput element.
+     * @return a new NotifierInput instance.
      */    
     public NotifierInput createNotifierInput() {
-        NotifierInput notifierInput =  new NotifierInput();
+        NotifierInput notifierInput =  new NotifierInput(getProject());
         add(notifierInput);
         return notifierInput;
     }
 
     /**
-     * Adds the created notifier to the list
-     * @param ReferenceType notifier to be added to the list.
+     * Adds any kind of ResourceCollection Ant type like 
+     * paths or filesets.
+     * @param notifierInput notifier to be added to the list.
      */    
-    public void add(NotifierInput notifierInput) {
-        if (notifierInput != null) {
-            notifierInputList.add(notifierInput);
-        }
+    public void add(ResourceCollection notifierInput) {
+        notifierInputList.add(notifierInput);
     }
 
     /**
-     * Helper function to add the created signalinput
-     * @param filter to be added to the filterset
+     * Add a nested signalInput.
+     * @param signalInput the signalInput to be added
      */
-    public void add(SignalInput input) {
-        signalInputs.add(input);
+    public void add(SignalInput signalInput) {
+        signalInputs.add(signalInput);
     }
 
     /**
-     * Helper function called by ant to create the new signalinput
+     * Create a nested signalInput.
      */
     public SignalInput createSignalInput() {
         SignalInput input =  new SignalInput();
@@ -77,8 +76,12 @@
         return input;
     }
 
-    public NotifierInput getNotifierInput() {
-        NotifierInput input = null;
+    /**
+     * Returns the notifierInput associated to the current object.
+     * @return a ResourceCollection representing the notifier inputs.
+     */
+    public ResourceCollection getNotifierInput() {
+        ResourceCollection input = null;
         if (notifierInputList.size() > 1) {
             throw new BuildException("One and only signal input can be defined");
         }
@@ -94,18 +97,11 @@
      */    
     public SignalInput getSignalInput() {
         if (signalInputs.isEmpty()) {
-            throw new BuildException("No signal input in signal config, failed: ");
+            throw new BuildException("One nested signalInput is required at " + this.getLocation());
         }
         if (signalInputs.size() > 1) {
-            throw new BuildException("One and only signal input can be defined");
+            throw new BuildException("One and only signalInput can be defined at " + this.getLocation());
         }
-
-        Object refObject =  signalInputs.elementAt(0).getRefid().getReferencedObject();
-        if (refObject == null) {
-            throw new BuildException("Signal Input Reference not exists");
-        }
-        
-        SignalInput signalInput = (SignalInput)refObject;
-        return signalInput;
+        return signalInputs.elementAt(0);
     }
 }
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/SignalNotifierList.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/SignalNotifierList.java	Wed Oct 13 16:31:27 2010 +0800
@@ -22,7 +22,7 @@
 
 import org.apache.tools.ant.types.DataType;
 
-import com.nokia.helium.signal.Notifier;
+import com.nokia.helium.signal.ant.Notifier;
 
     
 /**
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/SignalStatusDef.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/SignalStatusDef.java	Wed Oct 13 16:31:27 2010 +0800
@@ -22,7 +22,7 @@
 import org.apache.tools.ant.types.DataType;
 
 import com.nokia.helium.core.ant.PostBuildAction;
-import com.nokia.helium.signal.SignalStatusList;
+import com.nokia.helium.signal.ant.Signals;
 
 /**
  * Class to store the status of the signal of a particular target.
@@ -35,8 +35,8 @@
      * @throws BuildException
      */
     public void executeOnPostBuild(Project project, String[] targetNames) {
-        if (SignalStatusList.getDeferredSignalList().hasSignalInList()) {
-            throw new BuildException(SignalStatusList.getDeferredSignalList().getErrorMsg());
+        if (!Signals.getSignals().getDeferredSignalList().isEmpty()) {
+            throw new BuildException(Signals.getSignals().getDeferredSignalList().toString());
         }
     }
 }
--- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/TargetCondition.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/TargetCondition.java	Wed Oct 13 16:31:27 2010 +0800
@@ -17,8 +17,7 @@
 
 package com.nokia.helium.signal.ant.types;
 
-import java.util.Vector;
-
+import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.taskdefs.condition.Condition;
 import org.apache.tools.ant.types.DataType;
 
@@ -31,17 +30,17 @@
 
     private String name;
 
-    private String errMsg;
+    private String message;
 
-    private Vector<Condition> conditionList = new Vector<Condition>();
+    private Condition condition;
 
     /**
      * Helper function to store the Name of the target for which the signal to be processed.
      * 
      * @param targetName to be stored.
      */
-    public void setName(String targetName) {
-        name = targetName;
+    public void setName(String name) {
+        this.name = name;
     }
 
     /**
@@ -49,8 +48,8 @@
      * 
      * @param errorMessage to be displayed after failure.
      */
-    public void setMessage(String errorMessage) {
-        errMsg = errorMessage;
+    public void setMessage(String message) {
+        this.message = message;
     }
 
     /**
@@ -59,7 +58,10 @@
      * @param condition variable to add
      */
     public void add(Condition condition) {
-        conditionList.add(condition);
+        if (this.condition != null) {
+            throw new BuildException(this.getDataTypeName() + " type can only accept one condition at " + this.getLocation().toString());
+        }
+        this.condition = condition;
     }
 
     /**
@@ -67,8 +69,11 @@
      * 
      * @return conditions variable for this configuration.
      */
-    public Vector<Condition> getConditions() {
-        return conditionList;
+    public Condition getCondition() {
+        if (this.condition == null) {
+            throw new BuildException(this.getDataTypeName() + " must have one nested condition defined at " + this.getLocation().toString());
+        }
+        return condition;
     }
 
     /**
@@ -88,6 +93,6 @@
      * @deprecated
      */
     public String getMessage() {
-        return errMsg;
+        return message;
     }
 }
--- a/buildframework/helium/sf/java/signaling/src/templates/email.html.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-<#--
-============================================================================ 
-Name        : email.html.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-  <head>
-  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-    <title>
-      Build result e-mail from ${ant["env.COMPUTERNAME"]}.
-    </title>
-    <style type="text/css">
-        body{font-family:Verdana; font-size:10pt; line-height:1.1em; padding: 10px 10px; background-color:#E4F0F4;}
-        h1{
-          font-size:14pt;
-          color:#000;
-          padding: 20px 15px;
-              margin:0;
-         }
-        h2{font-size:12pt;}
-        h5{
-          font-size:10pt;
-          background-color:#8495BA;
-          color:#fff;
-          heigth:20pt;
-          padding: 5px 15px;
-          border-left:2px solid #5A6FA0;
-          border-bottom:2px solid #5A6FA0;
-          border-top:2px solid #98A6C6;
-          border-right:2px solid #98A6C6;
-          margin:0;
-         }
- 
-  
-        p {
-          font-size:10pt;
-          padding: 0em 1em 1em 1em;
-          margin: 0 1em 0.5em 1em;
-          border-right:1px solid #5A6FA0;
-          border-top:0;
-          border-bottom:1px solid #98A6C6;
-          border-left:1px solid #98A6C6;
-          background-color:#CDE4EB;
-          white-space:normal;
-        }
- 
-        .data{color:#00F;}
-        .okmessage{color:#24A22D;font-weight:bold; display:block; margin-bottom: 1em;padding-top: 1em;}
-        .errormessage{color:#F00;font-weight:bold; display:block; margin-bottom: 1em;padding-top: 1em;}
- 
-        span.items{text-indent:-1em; padding-left: 1em; display:block; word-wrap:normal;}
-
-        span.bold{font-weight:bold; display:block; padding: 1em 0;}
-        p.maintext{padding-top: 1em;}
-        p.logfolder{color:#000;font-weight:bold; padding-top: 1em;}
-        p.distrib{font-weight:bold;}
- 
- 
-        a:link,a:visited{color:#00E;}
-        
-    </style>
-  </head>
-  <body>
-      <!-- The title -->
-      <div id="buildname">
-        <h1>This is an e-mail notification that a build has been completed on ${ant["env.COMPUTERNAME"]}</h1>
-      </div>
-
-    <!-- section -->
-    <#macro create_section title type>
-           <div id="foldername">
-               <h5>${title}</h5>
-               <p class="maintext">
-                   <!-- content span -->
-                   <span class="${type}"><#nested></span>
-               </p>
-           </div>
-       </#macro>
-
-<#list doc.logSummary.log as lognode>
-    <#if (lognode.build[".//message[@priority='error']"]?size > 0)>
-        <span class="errormessage">
-            <#if (lognode.@filename[0])?exists>${lognode.@filename[0]}...FAIL<br/></#if>                    
-            <ul>
-            <#list lognode.build[".//message[@priority='error']"] as message>
-                ${message}<br/>
-            </#list>
-            </ul>
-        </span>
-    <#else>
-        <span class="okmessage"><#if (lognode.@filename[0])?exists>${lognode.@filename[0]}...OK<br/></#if></span>
-    </#if>
-</#list>
-</body>
-</html>
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/src/templates/email_default.html.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-<#--
-============================================================================ 
-Name        : email.html.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-  <head>
-  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-    <title>
-      Build result e-mail from ${ant["env.COMPUTERNAME"]}.
-    </title>
-    <style type="text/css">
-        body{font-family:Verdana; font-size:10pt; line-height:1.1em; padding: 10px 10px; background-color:#E4F0F4;}
-        h1{
-          font-size:14pt;
-          color:#000;
-          padding: 20px 15px;
-              margin:0;
-         }
-        h2{font-size:12pt;}
-        h5{
-          font-size:10pt;
-          background-color:#8495BA;
-          color:#fff;
-          heigth:20pt;
-          padding: 5px 15px;
-          border-left:2px solid #5A6FA0;
-          border-bottom:2px solid #5A6FA0;
-          border-top:2px solid #98A6C6;
-          border-right:2px solid #98A6C6;
-          margin:0;
-         }
- 
-  
-        p {
-          font-size:10pt;
-          padding: 0em 1em 1em 1em;
-          margin: 0 1em 0.5em 1em;
-          border-right:1px solid #5A6FA0;
-          border-top:0;
-          border-bottom:1px solid #98A6C6;
-          border-left:1px solid #98A6C6;
-          background-color:#CDE4EB;
-          white-space:normal;
-        }
- 
-        .data{color:#00F;}
-        .okmessage{color:#24A22D;font-weight:bold; display:block; margin-bottom: 1em;padding-top: 1em;}
-        .errormessage{color:#F00;font-weight:bold; display:block; margin-bottom: 1em;padding-top: 1em;}
- 
-        span.items{text-indent:-1em; padding-left: 1em; display:block; word-wrap:normal;}
-
-        span.bold{font-weight:bold; display:block; padding: 1em 0;}
-        p.maintext{padding-top: 1em;}
-        p.logfolder{color:#000;font-weight:bold; padding-top: 1em;}
-        p.distrib{font-weight:bold;}
- 
- 
-        a:link,a:visited{color:#00E;}
-        
-    </style>
-  </head>
-  <body>
-      <!-- The title -->
-      <div id="buildname">
-        <h1>This is an e-mail notification that a build has been completed on ${ant["env.COMPUTERNAME"]}</h1>
-      </div>
-      <span class="okmessage">${signaling['signal.name']} is finished.</span>
-    </body>
-</html>
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/src/templates/email_subject.txt.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-<#--
-============================================================================ 
-Name        : email_subject.txt.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-${ant["build.id"]}:${ant["env.COMPUTERNAME"]}: ${signalname} alert
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/tests/antunit/signaling_test.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,272 +0,0 @@
-<?xml version="1.0"?>
-<!-- 
-============================================================================ 
-Name        : test_signaling.ant.xml 
-Part of     : Helium AntLib
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
--->
-<project name="test-signaling" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
-    <description>
-        Test all the helium signals
-    </description>
-
-    <dirname property="project.dir.signaling" file="${ant.file.test-signaling}" />
-
-    <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium" />
-    <import file="test_signaling_config.ant.xml" />
-
-    <property name="build.summary.file" location="${project.dir.signaling}/data/ido_tedo_mcl_devlon52_ec_MCL.52.105_summary.log.xml" />
-
-    <target name="target-valid-config1">
-        <echo message="valid configuration1" />
-    </target>
-
-    <target name="target-valid-config2">
-        <echo message="valid configuration2" />
-    </target>
-
-    <target name="target-valid-config3">
-        <echo message="valid configuration3" />
-    </target>
-
-    <target name="target-valid-config4">
-        <echo message="valid configuration4" />
-    </target>
-
-    <target name="target-valid-config5">
-        <echo message="valid configuration5" />
-    </target>
-
-    <target name="target-invalid-config1">
-        <echo message="invalid configuration1" />
-    </target>
-
-    <target name="target-invalid-config2">
-        <echo message="invalid configuration2" />
-    </target>
-
-    <target name="target-invalid-config3">
-        <echo message="invalid configuration3" />
-    </target>
-
-    <target name="target-invalid-config4">
-        <echo message="invalid configuration4" />
-    </target>
-
-    <target name="target-empty-notifier-list-config5">
-        <echo message="Empty signal list is a valid configuration5" />
-    </target>
-
-    <target name="target-valid-config6">
-        <echo message="Empty signal list is a valid configuration6" />
-    </target>
-
-    <target name="target-valid-config7">
-        <echo message="Empty signal list is a valid configuration7" />
-    </target>
-
-    <target name="target-valid-config8">
-        <echo message="Empty signal list is a valid configuration8" />
-    </target>
-
-    <target name="target-invalid-config9">
-        <echo message="invalid configuration9" />
-    </target>
-
-    <target name="test-case1">
-        <echo message="testing config without signal input" />
-        <antcall target="target-valid-config1" inheritRefs="true"/>
-    </target>
-
-    <target name="test-case2">
-        <echo message="testing config without signal input" />
-        <antcall target="target-valid-config2" inheritRefs="true" />
-    </target>
-
-    <target name="test-case3">
-        <echo message="testing config without signal input" />
-        <antcall target="target-valid-config3" inheritRefs="true" />
-    </target>
-
-    <target name="test-case4">
-        <echo message="testing config without signal input" />
-        <antcall target="target-valid-config4" inheritRefs="true" />
-    </target>
-
-    <target name="test-case5">
-        <echo message="testing config without signal input" />
-        <antcall target="target-valid-config5" inheritRefs="true" />
-    </target>
-
-    <target name="test-case6">
-        <echo message="testing config without signal input" />
-        <au:expectfailure>
-            <antcall target="target-invalid-config1" inheritRefs="true" />
-        </au:expectfailure>
-    </target>
-
-    <target name="test-case7">
-        <echo message="testing when the named target is not exists, so signal" />
-        <antcall target="target-invalid-config2" inheritRefs="true" />
-    </target>
-
-    <target name="test-case8">
-        <!-- This test case is not valid anymore, now the attribute validation is done 
-    	     at Ant parsing level -->
-        <!--echo message="testing config without signal input" />
-        <au:expectfailure>
-            <antcall target="target-invalid-config3" inheritRefs="true" />
-        </au:expectfailure-->
-    </target>
-
-    <target name="test-case9">
-        <echo message="testing config without signal input" />
-        <au:expectfailure>
-            <antcall target="target-invalid-config4" inheritRefs="true" />
-        </au:expectfailure>
-    </target>
-
-    <target name="test-case10">
-        <echo message="testing config without signal input" />
-        <au:expectfailure>
-            <antcall target="target-invalid-config5" inheritRefs="true" />
-        </au:expectfailure>
-    </target>
-
-    <target name="test-case11">
-        <echo message="testing config without signal input" />
-        <au:expectfailure>
-            <antcall target="target-invalid-config6" inheritRefs="true" />
-        </au:expectfailure>
-    </target>
-
-    <target name="test-signal-exception">
-        <property name="exceptions.target" value="final-exception-target"/>
-        <echo message="signal exception target" />
-        <fail message="fail for signal exception" />
-    </target>
-
-    <target name="final-exception-target">
-        <echo message="final-exception-target executed" />
-    </target>
-    
-    <target name="test-case12">
-        <echo message="testing config without signal input" />
-        <au:expectfailure>
-            <antcall target="target-invalid-config7" inheritRefs="true" />
-        </au:expectfailure>
-    </target>
-
-    <target name="test-case13">
-        <echo message="testing config without signal input" />
-        <au:expectfailure>
-            <antcall target="target-invalid-config8" inheritRefs="true" />
-        </au:expectfailure>
-    </target>
-
-    <target name="test-case14">
-        <echo message="testing config without signal input" />
-        <au:expectfailure>
-            <antcall target="target-invalid-config9" inheritRefs="true" />
-        </au:expectfailure>
-    </target>
-
-    <!-- functionality testing -->
-    <target name="fail-now-false-condition">
-        <echo message="fail-now-false-condition target: configured to fail now - false condition" />
-    </target>
-
-    <target name="fail-now-true-condition">
-        <echo message="fail-now-true-condition target: configured to fail now - true condition" />
-    </target>
-
-    <target name="fail-no-condition">
-        <echo message="fail-now-false-condition target: configured to fail now - true condition" />
-    </target>
-
-    <target name="fail-defer-false-condition">
-        <echo message="fail-defer-false-condition target: configured to fail later - false condition" />
-    </target>
-
-    <target name="fail-defer-true-condition">
-        <echo message="${number.of.errors}" />
-        <echo message="fail-defer-true-condition target: configured to fail later - true condition" />
-    </target>
-
-    <target name="fail-never-false-condition">
-        <echo message="fail-never-false-condition target: configured to fail never - false condition" />
-    </target>
-
-    <target name="fail-never-true-condition">
-        <echo message="fail-never-true-condition target: configured to fail never - true condition" />
-    </target>
-
-    <target name="test-fail-now-false-condition">
-        <antcall target="fail-now-false-condition" inheritRefs="true" />
-    </target>
-
-    <target name="compile-signal-test">
-        <au:expectfailure>
-            <echo message="compile-signal failure test" />
-        </au:expectfailure>
-    </target>
-
-    <target name="test-compile-signal-test">
-        <au:expectfailure>
-            <antcall target="compile-signal-test" inheritRefs="true" />
-        </au:expectfailure>
-    </target>
-
-    <target name="test-fail-now-true-condition">
-        <au:expectfailure>
-            <antcall target="fail-now-true-condition" inheritRefs="true" />
-        </au:expectfailure>
-    </target>
-
-    <target name="test-fail-no-condition" >
-        <antcall target="fail-no-condition" inheritRefs="true" />
-    </target>
-
-    <target name="test-fail-defer-false-condition">
-        <antcall target="fail-defer-false-condition" inheritRefs="true" />
-    </target>
-
-    <target name="test-fail-defer-true-condition">
-        <antcall target="fail-defer-true-condition" inheritRefs="true"/>
-        <au:assertTrue>
-            <hlm:hasDeferredFailure name="inputFailDefer"/>
-        </au:assertTrue>
-        <hlm:clearDeferredFailures/>
-    </target>
-
-    <target name="test-fail-never-false-condition">
-        <antcall target="fail-never-false-condition" inheritRefs="true" />
-    </target>
-
-    <target name="test-fail-never-true-condition">
-        <antcall target="fail-never-true-condition" inheritRefs="true" />
-    </target>
-
-
-    <target name="test-all" depends="test-fail-all, test-case-all,test-compile-signal-test" />
-    <target name="test-fail-all" depends="test-fail-now-false-condition, test-fail-now-true-condition,
-                test-fail-no-condition,test-fail-defer-false-condition, test-fail-defer-true-condition,
-                test-fail-never-false-condition, fail-never-false-condition, fail-never-true-condition" />
-    <target name="test-case-all" depends="test-case1, test-case2, test-case3, test-case4, test-case5, test-case6,
-                test-case7,test-case8,test-case9,test-case10,test-case11,test-case12,test-case13,test-case14" />
-</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/signaling/tests/antunit/test_defered_failure.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!-- 
+============================================================================ 
+Name        : build.xml 
+Part of     : Helium
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test-deferred-failure" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    
+    <taskdef resource="com/nokia/helium/signal/ant/antlib.xml" uri="http://www.nokia.com/helium" />
+    <import file="run-scenario.ant.xml" />
+
+    <!-- This scenario is testing the SignalStatusDef is correctly failing the build -->
+    <target name="test-failing-build">
+        <au:expectfailure>
+            <runScenario scenario="test-deferred-failure" target="build" />
+        </au:expectfailure>
+        <au:assertLogContains text="BUILD FAILED" />
+        <au:assertLogContains text="Executing failing-target." />
+        <au:assertLogContains text="Executing build." />
+    </target>
+   
+</project>
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/tests/antunit/test_executetasknotifier.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/tests/antunit/test_executetasknotifier.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -65,20 +65,20 @@
     </target>
 
     <target name="test-notifier-is-called">
-        <hlm:signal name="testSignal" result="0" message="message">
+        <hlm:signal result="0" message="message">
             <signalNotifierInput>
                 <hlm:signalInput refid="testNeverSignalInput" />
             </signalNotifierInput>
         </hlm:signal>
-        <au:assertLogContains text="Signal: testSignal" />
+        <au:assertLogContains text="Signal: testNeverSignalInput" />
     </target>
 
     <target name="test-notifier-with-runtarget-works">
-        <hlm:signal name="testSignal" result="0" message="message">
+        <hlm:signal result="0" message="message">
             <signalNotifierInput>
                 <hlm:signalInput refid="testNeverSignalInputRuntarget" />
             </signalNotifierInput>
         </hlm:signal>
-        <au:assertLogContains text="Signal: testSignal" />
+        <au:assertLogContains text="Signal: testNeverSignalInputRuntarget" />
     </target>
 </project>
--- a/buildframework/helium/sf/java/signaling/tests/antunit/test_hasdeferredfailure.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/tests/antunit/test_hasdeferredfailure.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -77,11 +77,7 @@
 
     <target name="raise-signal">
         <!-- This raise a  testSignal. -->
-        <hlm:signal name="testDeferredSignal" result="1" >
-            <signalNotifierInput>
-                <hlm:signalInput refid="testDeferredSignalInput" />
-            </signalNotifierInput>
-        </hlm:signal>
+        <hlm:signal name="testDeferredSignalInput" result="1" />
     </target>
 
     <target name="test-pending-failure" depends="raise-signal">
@@ -92,7 +88,7 @@
 
     <target name="test-pending-failure-named" depends="raise-signal">
         <au:assertTrue>
-            <hlm:hasDeferredFailure name="testDeferredSignal"/>
+            <hlm:hasDeferredFailure name="testDeferredSignalInput"/>
         </au:assertTrue>
     </target>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/signaling/tests/antunit/test_signal_listener.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!-- 
+============================================================================ 
+Name        : build.xml 
+Part of     : Helium
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test-signal-listener" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    
+    <taskdef resource="com/nokia/helium/signal/ant/antlib.xml" uri="http://www.nokia.com/helium" />
+    <import file="run-scenario.ant.xml" />
+
+    <!-- This scenario is testing the SignalStatusDef is correctly failing the build -->
+    <target name="test-failing-build-with-deferred-failure">
+        <au:expectfailure>
+            <runScenario scenario="signal-listener-test" target="build-with-deferred-failure" />
+        </au:expectfailure>
+        <au:assertLogContains text="BUILD FAILED" />
+        <au:assertLogContains text="Executing failing-target." />
+        <au:assertLogContains text="Executing build." />
+        <au:assertLogContains text="testDeferredSignal: Errors happened during failing-target : failing-target" />
+        <au:assertLogContains text="Build completed with errors and warnings." />
+    </target>
+   
+    <target name="test-failing-build-with-never-failure">
+        <runScenario scenario="signal-listener-test" target="build-with-never-failure" />
+        <au:assertLogContains text="BUILD SUCCESSFUL" />
+        <au:assertLogContains text="Executing never-failing-target." />
+        <au:assertLogContains text="Executing build." />
+        <au:assertLogContains text="Build completed with errors and warnings." />
+    </target>
+
+    <!-- This test check that missing condition on signalListenerConfig only throw non-failing signal -->
+    <target name="test-no-cond-signal">
+        <runScenario scenario="signal-listener-test" target="no-cond-signal" />
+        <au:assertLogContains text="BUILD SUCCESSFUL" />
+        <au:assertLogContains text="Signal: testNoCondSignal" />
+        <au:assertLogContains text="Failure: No" />
+    </target>
+</project>
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/tests/antunit/test_signaling_config.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/tests/antunit/test_signaling_config.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -229,8 +229,8 @@
             <signalInput refid="validSignalInput" />
         </signalNotifierInput>
 
-        <targetCondition >
-            <!-- <xml severity="error" file="./data/helium_minibuild_ido_compile.log.xml" /> -->
+        <targetCondition>
+            <cond:not><equals arg1="0" arg2="0"/></cond:not>
         </targetCondition>
     </hlm:signalListenerConfig>
 
@@ -239,7 +239,7 @@
             <signalInput refid="validSignalInput" />
         </signalNotifierInput>
         <targetCondition >
-            <!-- <cond:not><equals arg1="0" arg2="${number.of.error}"/></cond:not> -->
+            <cond:not><equals arg1="0" arg2="0"/></cond:not>
         </targetCondition>
     </hlm:signalListenerConfig>
 
@@ -248,7 +248,7 @@
             <signalInput refid="validSignalInput" />
         </signalNotifierInput>
         <targetCondition >
-            <!--<cond:not><equals arg1="0" arg2="0"/></cond:not> -->
+            <cond:not><equals arg1="0" arg2="0"/></cond:not>
         </targetCondition>
     </hlm:signalListenerConfig>
 
@@ -274,12 +274,12 @@
         </targetCondition>
     </hlm:signalListenerConfig>
 
-    <hlm:signalListenerConfig id="failNow" target="fail-no-condition" message="Errors during testing" >
+    <!-- Not allowed hlm:signalListenerConfig id="failNow" target="fail-no-condition" message="Errors during testing" >
         <signalNotifierInput>
             <signalInput refid="input-fail-build-never" />
         </signalNotifierInput>
         <targetCondition />
-    </hlm:signalListenerConfig>
+    </hlm:signalListenerConfig-->
 
     <hlm:signalListenerConfig id="failbuildDefer" target="fail-defer-false-condition" message="Errors during testing">
         <signalNotifierInput>
@@ -320,7 +320,7 @@
             <signalInput refid="input-fail-build-never" />
         </signalNotifierInput>
 
-        <targetCondition  >
+        <targetCondition>
             <cond:not>
                 <equals arg1="0" arg2="${number.of.errors}" />
             </cond:not>
@@ -332,4 +332,39 @@
             <hlm:signalInput id="invalid-input1" failbuild="wrong-type" />
         </au:expectfailure>
     </target>
+    
+    
+    <target name="test-dual-cond-failure">
+        <au:expectfailure expectedMessage="TargetCondition type can only accept one condition at">
+            <hlm:signalListenerConfig id="dualCondSignal" target="compile-signal-test" message="Errors happened during compilation">
+                <signalNotifierInput>
+                    <signalInput refid="compilesignalinput" />
+                </signalNotifierInput>
+                <targetCondition >
+                    <cond:not>
+                        <equals arg1="0" arg2="${number.of.errors}" />
+                    </cond:not>
+                    <cond:equals arg1="0" arg2="${number.of.errors}" />
+                </targetCondition>
+            </hlm:signalListenerConfig>
+        </au:expectfailure>
+    </target>
+
+    <target name="test-dual-signal-input-failure">
+        <au:expectfailure expectedMessage="signalListenerConfig only accept one nested signalNotifierInput at">
+            <hlm:signalListenerConfig id="dualSignalNotifierInputSignal" target="compile-signal-test" message="Errors happened during compilation">
+                <signalNotifierInput>
+                    <signalInput refid="compilesignalinput" />
+                </signalNotifierInput>
+                <signalNotifierInput>
+                    <signalInput refid="compilesignalinput" />
+                </signalNotifierInput>
+                <targetCondition>
+                    <cond:not>
+                        <equals arg1="0" arg2="${number.of.errors}" />
+                    </cond:not>
+                </targetCondition>
+            </hlm:signalListenerConfig>
+        </au:expectfailure>
+    </target>
 </project>
--- a/buildframework/helium/sf/java/signaling/tests/antunit/test_signaltask.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/tests/antunit/test_signaltask.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -64,7 +64,12 @@
 
     <target name="raise-deferred-failure">
         <!-- This raise a  testSignal. -->
-        <hlm:signal name="testDeferredSignal" result="1" message="message">
+        <hlm:signal name="testDeferredSignalInput" result="1" message="message" />
+    </target>
+
+    <target name="raise-deferred-failure-nested-signal">
+        <!-- This raise a  testSignal. -->
+        <hlm:signal result="1" message="message">
             <signalNotifierInput>
                 <hlm:signalInput refid="testDeferredSignalInput" />
             </signalNotifierInput>
@@ -101,13 +106,25 @@
     <target name="test-raise-deferred-failure">
         <!-- This will not fail the build -->
         <antcall target="raise-deferred-failure" />
+        <au:assertTrue>
+            <hlm:hasDeferredFailure name="testDeferredSignalInput"/>
+        </au:assertTrue>
+    </target>
+
+    
+    <target name="test-raise-deferred-failure-nested-signal">
+        <!-- This will not fail the build -->
+        <antcall target="raise-deferred-failure-nested-signal" />
+        <au:assertTrue>
+            <hlm:hasDeferredFailure name="testDeferredSignalInput"/>
+        </au:assertTrue>
     </target>
 
     <target name="test-raise-deferred-now-failure">
         <!-- This will not fail the build -->
         <antcall target="raise-deferred-failure" />
         <!-- But next one should. -->
-        <au:expectfailure expectedMessage="testSignal: message : raise-failure-now">
+        <au:expectfailure expectedMessage="testSignalInput: message : raise-failure-now">
             <antcall target="raise-failure-now" />
         </au:expectfailure>
     </target>
@@ -120,13 +137,14 @@
     </target>
 
     <target name="test-name-args-not-existing">
-        <au:expectfailure expectedMessage="Could not find signal config for signal name: testNonExistingSignal">
+        <au:expectfailure expectedMessage="name attribute (testNonExistingSignal) is not refering to a signalInput">
             <hlm:signal name="testNonExistingSignal" />
         </au:expectfailure>
     </target>
 
+    <!-- You can use-->
     <target name="test-too-many-nested-element">
-        <au:expectfailure expectedMessage="One and only signal input can be defined">
+        <au:expectfailure expectedMessage="One and only signalInput can be defined at">
             <hlm:signal name="testNonExistingSignal">
                 <signalNotifierInput>
                     <hlm:signalInput refid="testSignalInput" />
@@ -136,4 +154,24 @@
         </au:expectfailure>
     </target>
 
+    <!-- Should fail if the signal name is not refering to a signalInput instance -->
+    <fileset id="fileset.id" dir="." />
+    <target name="test-invalid-reference">
+        <au:expectfailure expectedMessage="name attribute (fileset.id) is not refering to a signalInput">
+            <hlm:signal name="fileset.id" />
+        </au:expectfailure>
+    </target>
+
+    
+    <target name="test-deprecation-message">
+        <!-- This raise a  testSignal. -->
+        <hlm:signal name="testDeferredSignal" result="1" message="message">
+            <signalNotifierInput>
+                <hlm:signalInput refid="testDeferredSignalInput" />
+            </signalNotifierInput>
+        </hlm:signal>
+        <au:assertLogContains text="The usage of name and nested signalInputNotifier at the same time is deprecated." />
+    </target>
+
+
 </project>
--- a/buildframework/helium/sf/java/signaling/tests/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/tests/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -24,17 +24,5 @@
     <description>Helium Antlib signaling tests.</description>
     <import file="${builder.dir}/java/test-macros.ant.xml"/>
 
-    <property environment="env" />
-    <dirname property="signaling.test.project.dir" file="${ant.file.helium-antlib-signaling-unittest}" />
-    <property name="build.summary.file" location="${signaling.test.project.dir}/test_signal/data/ido_tedo_mcl_devlon52_ec_MCL.52.105_summary.log.xml" />
-    <property name="build.id" value="test_new_hlm"/>
-  
-    <import file="${signaling.test.project.dir}/antunit/signaling_test.ant.xml" />
-    
-    <target name="unittest" depends="unittest-signaling,test-macros.unittest" />
-
-    <target name="unittest-signaling">
-        <antcall target="test-all" />
-    </target>
 
 </project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/signaling/tests/scenarii/dual-cond-config-failure/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<!-- 
+============================================================================ 
+Name        : build.xml 
+Part of     : Helium
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="failing-build" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    
+    <taskdef resource="com/nokia/helium/signal/ant/antlib.xml" uri="http://www.nokia.com/helium" />
+    
+    <hlm:signalExceptionConfig id="signal.exception.config">
+        <hlm:notifierList>
+            <hlm:executeTaskNotifier>
+                <echo>Signal: ${signal.name}</echo>
+                <echo>Message: ${signal.message}</echo>
+            </hlm:executeTaskNotifier>
+        </hlm:notifierList>
+    </hlm:signalExceptionConfig>
+    
+
+    <target name="build">
+        <fail message="Failing the build." />
+    </target>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/signaling/tests/scenarii/signal-listener-test/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,94 @@
+<?xml version="1.0"?>
+<!-- 
+============================================================================ 
+Name        : build.xml 
+Part of     : Helium
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="signal-listener-test" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium" xmlns:cond="antlib:org.apache.tools.ant.types.conditions">
+    
+    <taskdef resource="com/nokia/helium/signal/ant/antlib.xml" uri="http://www.nokia.com/helium" />
+    
+    <!-- Deferred signal -->
+    <hlm:notifierList id="testSignalNotifiers">
+        <hlm:executeTaskNotifier>
+            <echo>Signal: ${signal.name}</echo>
+        </hlm:executeTaskNotifier>
+    </hlm:notifierList>
+
+    <hlm:signalInput id="testDeferredSignalInput" failBuild="defer">
+        <hlm:notifierListRef refid="testSignalNotifiers" />
+    </hlm:signalInput>
+
+    <hlm:signalListenerConfig id="testDeferredSignal" target="failing-target" message="Errors happened during failing-target">
+        <signalNotifierInput>
+            <signalInput refid="testDeferredSignalInput" />
+        </signalNotifierInput>
+        <targetCondition >
+            <cond:not>
+                <equals arg1="0" arg2="${number.of.errors}" />
+            </cond:not>
+        </targetCondition>
+    </hlm:signalListenerConfig>
+
+    <hlm:signalInput id="testNeverSignalInput" failBuild="never">
+        <hlm:notifierListRef refid="testSignalNotifiers" />
+    </hlm:signalInput>
+
+    <hlm:signalListenerConfig id="testNeverSignal" target="never-failing-target" message="Errors happened during never-failing-target">
+        <signalNotifierInput>
+            <signalInput refid="testNeverSignalInput" />
+        </signalNotifierInput>
+        <targetCondition >
+            <cond:not>
+                <equals arg1="0" arg2="${number.of.errors}" />
+            </cond:not>
+        </targetCondition>
+    </hlm:signalListenerConfig>
+
+    <target name="failing-target">
+        <echo message="Executing failing-target." />
+        <property name="number.of.errors" value="1" />
+    </target>
+
+    <target name="build-with-deferred-failure" depends="failing-target">
+        <echo message="Executing build." />
+    </target>
+
+    <target name="never-failing-target">
+        <echo message="Executing never-failing-target." />
+        <property name="number.of.errors" value="1" />
+    </target>
+
+    <target name="build-with-never-failure" depends="never-failing-target">
+        <echo message="Executing build." />
+    </target>
+
+    
+    <!-- -->
+    <hlm:signalInput id="testNoCondSignalInput" failBuild="defer" />
+
+    <hlm:signalListenerConfig id="testNoCondSignal" target="no-cond-signal" message="This signal is emitted without specific condition, except the target being called.">
+        <signalNotifierInput>
+            <signalInput refid="testNoCondSignalInput" />
+        </signalNotifierInput>
+    </hlm:signalListenerConfig>
+
+    <target name="no-cond-signal" />
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/signaling/tests/scenarii/test-deferred-failure/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!-- 
+============================================================================ 
+Name        : build.xml 
+Part of     : Helium
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test-defered-failure" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    
+    <taskdef resource="com/nokia/helium/signal/ant/antlib.xml" uri="http://www.nokia.com/helium" />
+    
+    <!-- Deferred signal -->
+    <hlm:notifierList id="testDeferredSignalNotifiers">
+        <hlm:executeTaskNotifier>
+            <echo>Signal: ${signal.name}</echo>
+        </hlm:executeTaskNotifier>
+    </hlm:notifierList>
+
+    <hlm:signalInput id="testDeferredSignalInput" failBuild="defer">
+        <hlm:notifierListRef refid="testDeferredSignalNotifiers" />
+    </hlm:signalInput>
+
+    <target name="failing-target">
+        <echo message="Executing failing-target." />
+        <hlm:signal name="testDeferredSignalInput" result="1" message="Failure under failing-target." />
+    </target>
+
+    <target name="build" depends="failing-target">
+        <echo message="Executing build." />
+    </target>
+
+</project>
\ No newline at end of file
--- a/buildframework/helium/sf/java/signaling/tests/src/com/nokia/helium/signaling/tests/TestEmailSender.java	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/signaling/tests/src/com/nokia/helium/signaling/tests/TestEmailSender.java	Wed Oct 13 16:31:27 2010 +0800
@@ -51,7 +51,7 @@
         en.setTitle("test");
         en.setSmtp("test");
         en.setLdap("test");
-        NotifierInput input = new NotifierInput();
+        NotifierInput input = new NotifierInput(p);
         input.setFile(new File(System.getProperty("testdir") + "/tests/data/test.log_status.html"));
         en.sendData("test", true, input, "Test Message");
     }
@@ -70,7 +70,7 @@
         en.setTitle("test");
         en.setSmtp("test");
         en.setLdap("test");
-        NotifierInput input = new NotifierInput();
+        NotifierInput input = new NotifierInput(p);
         en.sendData("test", true, input, "Test Message");
     }   
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/joinsysdef.pl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,20 @@
+#============================================================================ 
+#Name        : .pl 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description: 
+#============================================================================
+use FindBin '$Bin';
+system("python $Bin/joinsysdef_mock.py @ARGV");
\ No newline at end of file
--- a/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/templates/root_sysdef_model.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/templates/root_sysdef_model.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -142,7 +142,7 @@
 ]>
 <SystemDefinition schema="3.0.0" <#if (idnamespace?? && idnamespace!="http://www.symbian.org/system-definition")>xmlns:vendor="${idnamespace}"</#if>>
 <systemModel name="<#list roots?keys as root>${root}<#if root_has_next>_</#if></#list>">
-<#list layers?keys as layer>
+<#list layers?keys?sort as layer>
     <layer id="${layer}" name="${layer}">
     <#list roots?keys as root>
         <#if roots[root]?keys?seq_contains(layer)>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : build.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="blockspackager">
+    <property name="builder.dir" location="../../builder"/>
+    <import file="${builder.dir}/python/macros.ant.xml"/>
+    
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/ivy.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+============================================================================ 
+Name        : ivy.xml 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================  
+-->
+<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
+    <info
+        organisation="com.nokia.helium"
+        module="blockspackager"
+        status="integration">        
+  </info>
+  <publications>
+      <artifact type="egg"/>
+  </publications>
+  <dependencies>
+      <dependency name="pythoncore" rev="latest.integration" conf="default" />
+  </dependencies>
+</ivy-module>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/lib/blockspackagercpythontests/__init__.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,19 @@
+#============================================================================ 
+#Name        : __init__.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/lib/blockspackagertests/__init__.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,18 @@
+#============================================================================ 
+#Name        : __init__.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/lib/blockspackagertests/test_packager_cli.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,44 @@
+#============================================================================ 
+#Name        : test_packager_cli.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+import unittest
+import unittestadditions
+skipTest = False
+try:
+    import packager.cli
+except ImportError:
+    skipTest = True
+import logging
+
+
+#logging.basicConfig(level=logging.DEBUG)
+logger = logging.getLogger('nokiatest.datasources')
+
+
+class CliTest(unittest.TestCase):
+    """ Verifying the datasource interface. """
+    
+    @unittestadditions.skip(skipTest)
+    def test_cli(self):
+        """ Check that --help-datasource works. """
+        app = packager.cli.PackagerApp()
+        ret = app.execute(['--help-datasource'])
+        print ret
+        assert ret == 0, "Return value for help must be 0."
+
+        
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/lib/blockspackagertests/test_packager_datasources.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,377 @@
+#============================================================================ 
+#Name        : test_packager_datasources.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+import unittest
+from unittestadditions import skip
+skipTest = False
+try:
+    import packager.datasources
+except ImportError:
+    skipTest = True
+import os
+from StringIO import StringIO
+import tempfile
+import xml.sax
+import logging
+import sys
+
+#logging.basicConfig(level=logging.DEBUG)
+logger = logging.getLogger('nokiatest.datasources')
+
+class DataSourceInterfaceTest(unittest.TestCase):
+    """ Verifying the datasource interface. """
+    
+    @skip(skipTest)
+    def test_datasource_getComponent(self):
+        """ Check that getComponent is not implemented. """
+        ds = packager.datasources.DataSource('/')
+        self.assertRaises(NotImplementedError, ds.getComponents)
+
+    @skip(skipTest)
+    def test_datasource_getHelp(self):
+        """ Check that no help is defined. """
+        ds = packager.datasources.DataSource('/')
+        self.assertEqual(None, ds.getHelp())
+        self.assertEqual(ds.help, ds.getHelp())       
+    
+class CMakerDataSourceTest(unittest.TestCase):
+    """ Unit test for CMakerDataSource """
+    @skip(skipTest)
+    def test_whatlog_missing(self):
+        """ getComponent should fail if whatlog is missing. """
+        data = {}
+        ds = packager.datasources.CMakerDataSource('/', data)
+        self.assertRaises(packager.datasources.MissingProperty, ds.getComponents)
+        
+    @skip(skipTest)
+    def test_configdir_missing(self):
+        """ getComponent should fail if configdir is missing. """
+        data = {'whatlog': 'somevalue'}
+        ds = packager.datasources.CMakerDataSource('/', data)
+        self.assertRaises(packager.datasources.MissingProperty, ds.getComponents)
+    
+    @skip(skipTest)
+    def test_invalid_whatlog_invalid_configdir(self):
+        """ getComponent should fail because whatlog doesn't exists. """
+        data = {'whatlog': 'somevalue', 'configdir': 'somevalue'}
+        ds = packager.datasources.CMakerDataSource('/', data)
+        self.assertRaises(Exception, ds.getComponents)
+
+    @skip(skipTest)
+    def test_valid_whatlog_invalid_configdir(self):
+        """ getComponent should fail because configdir doesn't exists. """
+        data = {'whatlog': __file__, 'configdir': 'somevalue'}
+        ds = packager.datasources.CMakerDataSource('/', data)
+        self.assertRaises(Exception, ds.getComponents)
+        
+    @skip(skipTest)
+    def test_install_log_parsing(self):
+        """ Test the parsing of a regular cmaker install log. """
+        log = r"""C:\APPS\actperl\bin\perl.exe -e 'use File::Copy; copy(q(src/env.mk),q(/epoc32/tools/cmaker/env.mk))'
+C:\APPS\actperl\bin\perl.exe -e 'use File::Copy; copy(q(src/functions.mk),q(/epoc32/tools/cmaker/functions.mk))'
+C:\APPS\actperl\bin\perl.exe -e 'use File::Copy; copy(q(src/include_template.mk),q(/epoc32/tools/cmaker/include_template.mk))'
+C:\APPS\actperl\bin\perl.exe -e 'use File::Copy; copy(q(src/settings.mk),q(/epoc32/tools/cmaker/settings.mk))'
+C:\APPS\actperl\bin\perl.exe -e 'use File::Copy; copy(q(src/tools.mk),q(/epoc32/tools/cmaker/tools.mk))'
+C:\APPS\actperl\bin\perl.exe -e 'use File::Copy; copy(q(src/utils.mk),q(/epoc32/tools/cmaker/utils.mk))'
+C:\APPS\actperl\bin\perl.exe -e 'use File::Copy; copy(q(bin/mingw_make.exe),q(/epoc32/tools/rom/mingw_make.exe))'
+C:\APPS\actperl\bin\perl.exe -e 'use File::Copy; copy(q(src/cmaker.cmd),q(/epoc32/tools/cmaker.cmd))'
+"""
+        (handle, filename) = tempfile.mkstemp()
+        os.write(handle, log)
+        os.close(handle)
+        
+        data = {'whatlog': filename, 'configdir': os.path.dirname(__file__)}
+        ds = packager.datasources.CMakerDataSource('/', data)
+        components = ds.getComponents()
+        assert len(components) == 1
+        assert len(components[0].getTargetFiles()) == 8
+        assert 'epoc32/tools/rom/mingw_make.exe' in components[0].getTargetFiles()
+        
+        os.remove(filename)
+        
+        
+    @skip(skipTest)
+    def test_what_log_parsing_windows(self):
+        """ Test the parsing of a regular cmaker what log (windows). """
+        if sys.platform == 'win32':
+            log = r"""\epoc32\tools\rom\image.txt
+\CreateImage.cmd
+cd \config\overlay && xcopy *.* \ /F /R /Y /S
+0 File(s) copied
+cd \tools\toolsmodTB92 && xcopy *.* \ /F /R /Y /S
+Y:\tools\toolsmodTB92\epoc32\tools\abld.pl -> Y:\epoc32\tools\abld.pl
+Y:\tools\toolsmodTB92\epoc32\tools\bldmake.pl -> Y:\epoc32\tools\bldmake.pl
+"""
+            (handle, filename) = tempfile.mkstemp()
+            os.write(handle, log)
+            os.close(handle)
+            
+            data = {'whatlog': filename, 'configdir': os.path.dirname(__file__)}
+            ds = packager.datasources.CMakerDataSource('/', data)
+            components = ds.getComponents()
+            assert len(components) == 1
+            assert len(components[0].getTargetFiles()) == 2
+            print components[0].getTargetFiles()
+            assert 'CreateImage.cmd' in components[0].getTargetFiles()
+            assert 'epoc32/tools/rom/image.txt' in components[0].getTargetFiles()
+            assert 'epoc32/tools/abld.pl' not in components[0].getTargetFiles()
+            assert 'epoc32/tools/bldmake.pl' not in components[0].getTargetFiles()
+        
+            os.remove(filename)
+
+    @skip(skipTest)
+    def test_what_log_parsing_linux(self):
+        """ Test the parsing of a regular cmaker what log (linux). """
+        if sys.platform != 'win32':
+            log = r"""/epoc32/tools/rom/image.txt
/CreateImage.cmd
+"""
+            (handle, filename) = tempfile.mkstemp()
+            os.write(handle, log)
+            os.close(handle)
+        
+            data = {'whatlog': filename, 'configdir': os.path.dirname(__file__)}
+            ds = packager.datasources.CMakerDataSource('/', data)
+            components = ds.getComponents()
+            assert len(components) == 1
+            assert len(components[0].getTargetFiles()) == 2
+            print components[0].getTargetFiles()
+            assert 'CreateImage.cmd' in components[0].getTargetFiles()
+            assert 'epoc32/tools/rom/image.txt' in components[0].getTargetFiles()
+        
+            os.remove(filename)
+
+        
+    @skip(skipTest)
+    def test_getHelp(self):
+        """ Check that help is defined for CMakerDataSource. """
+        ds = packager.datasources.CMakerDataSource('/', {})
+        self.assertNotEqual(None, ds.getHelp())
+        self.assertEqual(ds.help, ds.getHelp())       
+
+
+class SBSDataSourceTest(unittest.TestCase):
+    """ Unit test case for SBSDataSource """
+    @skip(skipTest)
+    def test_getHelp(self):
+        """ Check that help is defined for SBSDataSource. """
+        ds = packager.datasources.SBSDataSource('/', {})
+        self.assertNotEqual(None, ds.getHelp())
+        self.assertEqual(ds.help, ds.getHelp())       
+
+
+class SysdefComponentListTest(unittest.TestCase):
+    """ Unit test case for packager.datasources.sbs.SysdefComponentList """
+    sysdef = None
+        
+    def setUp(self):
+        self.sysdef = StringIO("""<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<SystemDefinition name="main" schema="1.4.0">
+    <systemModel>
+    <layer name="layer1">
+        <module name="module1">
+            <component name="cmp1">
+                <unit unitID="unit1" name="unit1.name" mrp="" filter="" bldFile="path/to/component1"/>
+            </component>
+        </module>
+    </layer>
+    <layer name="layer2">
+        <module name="module2">
+            <component name="cmp2">
+                <unit unitID="unit2" name="unit2.name" mrp="" filter="" bldFile="path\\to\\Component2"/>
+            </component>
+        </module>
+    </layer>
+    </systemModel>
+</SystemDefinition>
+""")
+
+    @skip(skipTest)
+    def test_unit_parsing(self):
+        """ SysdefComponentList extract correctly the units... """
+        cl = packager.datasources.sbs.SysdefComponentList('/')
+        p = xml.sax.make_parser()
+        p.setContentHandler(cl)
+        p.parse(self.sysdef)
+        assert len(cl) == 2
+        assert cl['unit1_name']['path'] == os.path.normpath('/path/to/component1')
+        assert cl['unit2_name']['path'] == os.path.normpath('/path/to/Component2')
+        assert cl['unit2_name']['name'] == 'unit2_name'
+
+    @skip(skipTest)
+    def test_get_component_name_by_path(self):
+        """ Check if get_component_name_by_path is case unsensitive. """ 
+        cl = packager.datasources.sbs.SysdefComponentList('/')
+        p = xml.sax.make_parser()
+        p.setContentHandler(cl)
+        p.parse(self.sysdef)
+
+        # reading path should be case independent.
+        assert cl.get_component_name_by_path(os.path.normpath('/path/to/Component2')) == 'unit2_name'
+        assert cl.get_component_name_by_path(os.path.normpath('/path/to/component2')) == 'unit2_name'
+
+    @skip(skipTest)
+    def test_get_component_name_by_path_invalid(self):
+        """ Check that get_component_name_by_path is raising an exception if """
+        cl = packager.datasources.sbs.SysdefComponentList('/')
+        p = xml.sax.make_parser()
+        p.setContentHandler(cl)
+        p.parse(self.sysdef)
+
+        # reading path should be case independent.
+        try:
+            cl.get_component_name_by_path(os.path.normpath('/path/to/invalid'))
+        except packager.datasources.sbs.ComponentNotFound:
+            pass
+        else:
+            self.fail("Expected get_component_name_by_path to raise an exception in case of non-existing component definition.")
+
+
+class SysdefComponentListSysdef3ParsingTest(unittest.TestCase):
+    """ Unit test case for packager.datasources.sbs.SysdefComponentList """
+    sysdef = None
+        
+    def setUp(self):
+        self.sysdef = StringIO("""<?xml version="1.0" encoding="UTF-8"?>
+<SystemDefinition schema="3.0.0" id-namespace="http://www.symbian.org/system-definition">
+<systemModel name="sf_">
+<layer id="app" name="app">
+<package id="helloworldcons" name="helloworldcons" levels="demo">
+<collection id="helloworldcons_apps" name="helloworldcons_apps" level="demo">
+<component id="helloworldcons_app" name="helloworldcons app" purpose="development">
+<unit bldFile="/sf/app/helloworldcons/group" mrp="/sf/app/helloworldcons/"/>
+</component>
+</collection>
+</package>
+</layer>
+<layer id="mw" name="mw">
+<package id="helloworldapi" name="helloworldapi" levels="demo">
+<collection id="helloworld_apis" name="helloworlds APIs" level="demo">
+<component id="helloworld_api" name="Hello World API" purpose="development">
+<unit bldFile="/sf/mw/helloworldapi/group" mrp="/sf/mw/helloworldapi/"/>
+</component>
+</collection>
+</package>
+</layer>
+</systemModel>
+</SystemDefinition>
+""")
+
+    @skip(skipTest)
+    def test_unit_parsing(self):
+        """ SysdefComponentList extract correctly the units... """
+        cl = packager.datasources.sbs.SysdefComponentList('/')
+        p = xml.sax.make_parser()
+        p.setContentHandler(cl)
+        p.parse(self.sysdef)
+        assert len(cl) == 2
+        print cl
+        assert cl['helloworldcons_app_sf_app_helloworldcons_group']['path'] == os.path.normpath('/sf/app/helloworldcons/group')
+        assert cl['helloworld_api_sf_mw_helloworldapi_group']['path'] == os.path.normpath('/sf/mw/helloworldapi/group')
+        assert cl['helloworld_api_sf_mw_helloworldapi_group']['name'] == 'helloworld_api'
+
+    @skip(skipTest)
+    def test_get_component_name_by_path(self):
+        """ Check if get_component_name_by_path is case unsensitive. """ 
+        cl = packager.datasources.sbs.SysdefComponentList('/')
+        p = xml.sax.make_parser()
+        p.setContentHandler(cl)
+        p.parse(self.sysdef)
+
+        # reading path should be case independent.
+        assert cl.get_component_name_by_path(os.path.normpath('/sf/app/helloworldcons/group')) == 'helloworldcons_app_sf_app_helloworldcons_group'
+        assert cl.get_component_name_by_path(os.path.normpath('/sf/mw/helloworldapi/group')) == 'helloworld_api_sf_mw_helloworldapi_group'
+
+    @skip(skipTest)
+    def test_get_component_name_by_path_invalid(self):
+        """ Check that get_component_name_by_path is raising an exception if """
+        cl = packager.datasources.sbs.SysdefComponentList('/')
+        p = xml.sax.make_parser()
+        p.setContentHandler(cl)
+        p.parse(self.sysdef)
+
+        # reading path should be case independent.
+        try:
+            cl.get_component_name_by_path(os.path.normpath('/path/to/invalid'))
+        except packager.datasources.sbs.ComponentNotFound:
+            pass
+        else:
+            self.fail("Expected get_component_name_by_path to raise an exception in case of non-existing component definition.")
+
+
+class ObyParserTest(unittest.TestCase):
+    """ Unit test case for packager.datasources.imaker.ObyParser """
+    oby = None
+    
+    def setUp(self):
+        (hld, filename) = tempfile.mkstemp(".oby", "datasource_test")
+        os.write(hld, """
+rofssize=0x10000000
+# file=\\epoc32\\release\\ARMV5\\urel\\COMMENT.DLL       "Sys\\Bin\\EDISP.DLL"
+file=\\epoc32\\release\\ARMV5\\urel\\edisp.dll       "Sys\\Bin\\EDISP.DLL"
+data=\\epoc32\\data\\Z\\Private\\10202BE9\\20000585.txt       "Private\\10202BE9\\20000585.txt"
+extension[0x09080004]=\\epoc32\\release\ARMV5\urel\power_resources.dll      "Sys\\Bin\\power_resources.dll"
+variant[0x09080004]=\\epoc32\\release\\ARMV5\\urel\\ecust.b23b7726cf4b5801b0dc14102b245fb8.dll         "Sys\\Bin\\ecust.dll"
+# file="\\epoc32\\release\\ARMV5\\urel\\edisp.dll"       "Sys\\Bin\\EDISP.DLL"
+data="/output/release_flash_images/langpack_01/rofs2/variant/private/10202be9/10281872.txt"  "private\10202be9\10281872.txt"
+""")
+        os.close(hld)
+        self.oby = filename
+        
+    def tearDown(self):
+        os.remove(self.oby)
+        
+    @skip(skipTest)
+    def test_oby(self):
+        """ Testing the extraction of source files from an processed Oby file. """
+        print self.oby
+        p = packager.datasources.imaker.ObyParser('/', self.oby)
+        files = p.getSourceFiles()
+        print files
+        assert len(files) == 5
+        assert os.path.normpath(r'\epoc32\release\ARMV5\urel\edisp.dll'.replace('\\', os.sep).replace('/', os.sep)) in files
+        assert os.path.normpath(r'\epoc32\data\Z\Private\10202BE9\20000585.txt'.replace('\\', os.sep).replace('/', os.sep)) in files
+        assert os.path.normpath(r'\epoc32\release\ARMV5\urel\power_resources.dll'.replace('\\', os.sep).replace('/', os.sep)) in files
+        assert os.path.normpath(r'\epoc32\release\ARMV5\urel\ecust.b23b7726cf4b5801b0dc14102b245fb8.dll'.replace('\\', os.sep).replace('/', os.sep)) in files
+        assert os.path.normpath(r'/output/release_flash_images/langpack_01/rofs2/variant/private/10202be9/10281872.txt'.replace('\\', os.sep).replace('/', os.sep)) in files
+        
+
+class ConEDataSourceTest(unittest.TestCase):
+    """ ConfToolDataSource unittest. """
+    
+    @skip(skipTest)
+    def test_cone_input(self):
+        """ Testing ConE output log parsing. """
+        log = """  Generating file '\\epoc32\\release\\winscw\\urel\\z\\private\\10202BE9\\10208dd7.txt'...
+DEBUG   : cone.crml(assets/symbianos/implml/usbmanager_10285c46.crml)
+  Generating file '\\epoc32\\release\\winscw\\urel\\z\\private\\10202BE9\\10285c46.txt'...
+DEBUG   : cone.crml(assets/symbianos/implml/usbmanager_10286a43.crml)
+  Generating file '\\epoc32\\release\\winscw\\urel\\z\\private\\10202BE9\\10286a43.txt'...
+INFO    : cone
+  Adding impl CrmlImpl(ref='assets/symbianos/implml/apputils_100048aa.crml', type='crml', index=0)
+INFO    : cone
+"""
+        (handle, filename) = tempfile.mkstemp()
+        os.write(handle, log)
+        os.close(handle)
+        data = {'filename': filename, 'name': 'cone', 'version': '1.0'}
+        ds = packager.datasources.ConEDataSource('/', data)
+        components = ds.getComponents()
+        assert len(components) == 1
+        print components[0].getTargetFiles()
+        assert len(components[0].getTargetFiles()) == 3
+        
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/lib/blockspackagertests/test_packager_io.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,113 @@
+#============================================================================ 
+#Name        : test_packager_io.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+
+# pylint: disable=E0602
+import unittest
+import logging
+from unittestadditions import skip
+skipTest = False
+try:
+    import packager.io
+    from Blocks.Packaging.BuildData import *
+except ImportError:
+    skipTest = True
+
+#logging.basicConfig(level=logging.DEBUG)
+logger = logging.getLogger('nokiatest.datasources')
+
+class BuildDataSerializerTest(unittest.TestCase):
+    """ Check the de/serialisation of PlainBuildData objects. """
+    
+    @skip(skipTest)
+    def test_serialization_deserialization(self):
+        """ Check if a serialized PlainBuildData can be deserialized correctly. """
+        bd = PlainBuildData()
+        bd.setComponentName("foobar")
+        bd.setComponentVersion("99")
+        bd.setSourceRoot('/src')
+        bd.setTargetRoot('/epoc32')
+        bd.addSourceFiles(['src.txt', 'cmp/src.txt'])
+        bd.addTargetFiles(['release/armv5/urel/target.dll', 'release/armv5/lib/target.lib'])
+        data_xml = packager.io.BuildDataSerializer(bd).toXml()
+        bdx = packager.io.BuildDataSerializer().fromXml(data_xml)
+        self.assertEquals(bd.getComponentName(), bdx.getComponentName())
+        self.assertEquals(bd.getComponentVersion(), bdx.getComponentVersion())
+        self.assertEquals(bd.getSourceRoot(), bdx.getSourceRoot())
+        self.assertEquals(bd.getTargetRoot(), bdx.getTargetRoot())
+        self.assertEquals(bd.getSourceFiles(), bdx.getSourceFiles())
+        self.assertEquals(bd.getTargetFiles(), bdx.getTargetFiles())
+        self.assertEquals(len(bdx.getSourceFiles()), 2)
+        self.assertEquals(len(bdx.getTargetFiles()), 2)
+        assert 'release/armv5/urel/target.dll' in bdx.getTargetFiles()
+        assert 'release/armv5/lib/target.lib' in bdx.getTargetFiles()
+        assert 'src.txt' in bdx.getSourceFiles()
+        assert 'cmp/src.txt' in bdx.getSourceFiles()
+
+class BdFileSerializerTest(unittest.TestCase):
+    """ Verifying the datasource interface. """
+    
+    @skip(skipTest)
+    def test_serialization_deserialization(self):
+        """ Check if a serialized BdFile can be deserialized correctly. """
+        bd = BdFile("epoc32/release/armv5/urel/target.dll")
+        bd.getVariantPlatform()
+        bd.addSourceDependency("/src/src.txt")
+        bd.addOwnerDependency("/epoc32/release/armv5/urel/target.dll")
+        data_xml = packager.io.BdFileSerializer(bd).toXml()
+        bdx = packager.io.BdFileSerializer().fromXml(data_xml)
+        self.assertEquals(bd.getPath(), bdx.getPath())
+        self.assertEquals(bd.getVariantPlatform(), bdx.getVariantPlatform())
+        self.assertEquals(bd.getVariantType(), bdx.getVariantType())
+        self.assertEquals(bd.getSourceDependencies(), bdx.getSourceDependencies())
+        self.assertEquals(bd.getOwnerDependencies(), bdx.getOwnerDependencies())
+
+        assert len(bd.getSourceDependencies()) == 1
+        assert len(bd.getOwnerDependencies()) == 1
+
+        assert "/src/src.txt" in bd.getSourceDependencies()
+        assert '/epoc32/release/armv5/urel/target.dll' in bd.getOwnerDependencies()
+        
+        
+class BuildDataMergerTest(unittest.TestCase):
+    """ Unit test case for packager.io.BuildDataMerger """
+    @skip(skipTest)
+    def test_merge(self):
+        """ Testing a simple merge. """
+        bd = PlainBuildData()
+        bd.setComponentName("foobar")
+        bd.setComponentVersion("99")
+        bd.setSourceRoot('/src')
+        bd.setTargetRoot('/epoc32')
+        bd.addSourceFiles(['src.txt', 'cmp/src.txt'])
+        bd.addTargetFiles(['release/armv5/urel/target.dll', 'release/armv5/lib/target.lib'])
+        
+        bd2 = PlainBuildData()
+        bd2.setComponentName("foobar")
+        bd2.setComponentVersion("99")
+        bd2.setSourceRoot('/src')
+        bd2.setTargetRoot('/epoc32')
+        bd2.addSourceFiles(['src.txt', 'cmp/src.txt', 'cmp2/src.txt'])
+        bd2.addTargetFiles(['release/armv5/urel/target2.dll'])
+        
+        m = packager.io.BuildDataMerger(bd)
+        m.merge(bd2)
+        
+        assert len(bd.getSourceFiles()) == 3
+        assert len(bd.getTargetFiles()) == 3        
+        
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/lib/packager/__init__.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,18 @@
+#============================================================================ 
+#Name        : __init__.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/lib/packager/cli.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,199 @@
+#============================================================================ 
+#Name        : cli.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+import sys
+import re
+import os
+import xml.dom.minidom
+from optparse import OptionParser
+import Blocks
+from packager.io import BuildDataSerializer, BuildDataMerger
+from Blocks.Packaging.DependencyProcessors.DefaultProcessors import BuildDataDependencyProcessor
+import packager.datasources
+import logging
+logging.basicConfig(level=logging.INFO)
+
+
+
+
+class PackagerApp:
+    """ The packager CLI implementation. """
+    def __init__(self):
+        self.logger = logging.getLogger("packager")
+        self.cli = OptionParser(usage="%prog [options]")
+        self.cli.add_option("--epocroot", metavar="DIR", help="Epocroot location (must be an absolute path)")
+        self.cli.add_option("--config", metavar="DIR")
+        self.cli.add_option("--outputdir", metavar="DIR")
+        self.cli.add_option("--datasource", metavar="NAME")
+        self.cli.add_option("--metadatadir", metavar="DIR")
+        self.cli.add_option("--updateData", action="store_true", dest="action_update", default=False)
+        self.cli.add_option("--createBundles", action="store_true", dest="action_bundle", default=False)
+        self.cli.add_option("--help-datasource", action="store_true", dest="action_help_datasource", default=False)
+        self.cli.add_option("--workers", type="int", dest="workers", default=4)
+        self.cli.add_option("--writer", dest="writer", default='deb')
+        self.cli.add_option("--sourceRules", dest="sourceRules")
+        self.cli.add_option("--targetRules", dest="targetRules")
+        self.cli.add_option("--pkgDirectives", dest="pkgDirectives")
+        self.cli.add_option("--debug", action="store_true", default=False)
+        self.cli.add_option("--interdeps", choices=['true', 'false'], dest="interdeps", default='false')
+        self.__workers = 4
+        self.__writer = "deb"
+        self.__config = None
+        self.__epocroot = None
+        self.__datasource = None
+        self.__update = False
+        self.__bundle = False
+        self.__help_datasource = False
+        self.__outputdir = None
+        self.__source_rules = None
+        self.__target_rules = None
+        self.__directives = None
+        self.__metadatadir = None
+        self.__interdeps = None
+        self.__writerOptions = None
+        self.__data = {}
+
+    def __readoptions(self, argv=sys.argv):
+        # removing -Dxxx=xxx
+        args = []
+        for arg in argv:
+            res = re.match("-D(.+)=(.*)", arg)
+            if res is not None:
+                self.logger.debug("property: %s=%s" % (res.group(1), res.group(2)))
+                self.__data[res.group(1)] = res.group(2)
+            else:
+                args.append(arg)
+        
+        opts, dummy_args = self.cli.parse_args(args)
+        self.__config = opts.config
+        self.__epocroot = opts.epocroot
+        self.__outputdir = opts.outputdir
+        self.__update = opts.action_update
+        self.__bundle = opts.action_bundle
+        self.__help_datasource = opts.action_help_datasource
+        self.__datasource = opts.datasource
+        self.__workers = opts.workers
+        self.__writer = opts.writer
+        self.__source_rules = opts.sourceRules
+        self.__target_rules = opts.targetRules
+        self.__directives = opts.pkgDirectives
+        self.__metadatadir = opts.metadatadir
+        self.__interdeps = opts.interdeps
+        if opts.debug:
+            logging.getLogger().setLevel(logging.DEBUG)
+
+    def __update_data(self):
+        if self.__config is None:
+            raise Exception("--config argument is missing.")
+        if self.__epocroot is None:
+            raise Exception("--epocroot argument is missing.")
+        if not os.path.exists(self.__config) or not os.path.isdir(self.__config):
+            raise Exception("Could not find directory: %s." % self.__config)
+        if not os.path.exists(self.__epocroot) or not os.path.isdir(self.__epocroot) or not os.path.isabs(self.__epocroot):
+            raise Exception("Could not find directory: %s." % self.__epocroot)
+        if self.__datasource is None:
+            raise Exception("--datasource argument is missing.")
+        
+        self.logger.info("Retrieving components information...")
+        datasource = packager.datasources.getDataSource(self.__datasource, self.__epocroot, self.__data)
+        for component in datasource.getComponents():
+            outfilename = os.path.join(self.__config, component.getComponentName() + ".blocks_component.xml")
+            if os.path.exists(outfilename):
+                bd = BuildDataSerializer().fromXml(open(outfilename).read())
+                self.logger.info("Merging with previous data...")
+                component = BuildDataMerger(bd).merge(component)
+            serializer = BuildDataSerializer(component)
+            self.logger.info("Writing %s" % outfilename)
+            output = open(outfilename , 'wb')
+            output.write(xml.dom.minidom.parseString(serializer.toXml()).toprettyxml())
+            output.close()            
+               
+    def __create_bundles(self):
+        if self.__config is None:
+            raise Exception("--config argument is missing.")
+        if self.__epocroot is None:
+            raise Exception("--epocroot argument is missing.")
+        if self.__metadatadir is None:
+            raise Exception("--metadatadir argument is missing.")
+        if not os.path.exists(self.__config) or not os.path.isdir(self.__config):
+            raise Exception("Could not find directory: %s." % self.__config)
+        if not os.path.exists(self.__epocroot) or not os.path.isdir(self.__epocroot) or not os.path.isabs(self.__epocroot):
+            raise Exception("Could not find directory: %s." % self.__epocroot)
+        if self.__outputdir is None:
+            raise Exception("--outputdir argument is missing.")
+        if not os.path.exists(self.__outputdir) or not os.path.isdir(self.__outputdir):
+            raise Exception("Could not find directory: %s." % self.__epocroot)
+        if not os.path.exists(self.__metadatadir) or not os.path.isdir(self.__metadatadir):
+            raise Exception("Could not find directory: %s." % self.__metadatadir)
+        
+        if self.__interdeps == 'false':
+            self.__writerOptions = {'STRONG_DEP_MAPPING': None}
+        
+        # Creating the packager.
+        storage = Blocks.Packaging.OneoffStorage(self.__metadatadir)
+        packager_obj = Blocks.Packaging.Packager(storage,
+                                             self.__outputdir,
+                                             maxWorkers = self.__workers,
+                                             writer = self.__writer,
+                                             targetRules = self.__target_rules,
+                                             sourceRules = self.__source_rules,
+                                             directives = self.__directives,
+                                             writerOptions = self.__writerOptions
+                                             #startNow=False
+                                             )
+        # Adding processors
+        packager_obj.addProcessor(BuildDataDependencyProcessor)
+        try:
+            from Blocks.Packaging.DependencyProcessors.RaptorDependencyProcessor import DotDeeDependencyProcessor 
+            packager_obj.addProcessor(DotDeeDependencyProcessor)
+        except ImportError:
+            logging.warning("Could not load DotDeeDependencyProcessor.")
+
+        for filename in os.listdir(self.__config):
+            filename = os.path.normpath(os.path.join(self.__config, filename))
+            if not filename.endswith('.blocks_component.xml'):
+                continue
+            self.logger.info("Loading %s" % filename)
+            packager_obj.addComponent(BuildDataSerializer().fromXml(open(filename, 'r').read()))
+        
+        packager_obj.wait()
+    
+    def execute(self, argv=sys.argv):
+        """ Run the CLI. """
+        try:
+            self.__readoptions(argv)
+            if self.__help_datasource: 
+                print packager.datasources.getDataSourceHelp()
+            elif self.__update:
+                self.__update_data()
+            elif self.__bundle:
+                self.__create_bundles()
+            else:
+                self.cli.print_help()
+        except IOError, exc:
+            if self.logger.getEffectiveLevel() == logging.DEBUG:
+                self.logger.exception(exc)
+            self.logger.error(str(exc))
+            return -1
+        return 0
+        
+        
+if __name__ == "__main__":
+    app = PackagerApp()
+    sys.exit(app.execute())
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/lib/packager/datasources/__init__.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,29 @@
+#============================================================================ 
+#Name        : __init__.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+"""
+Definitions of the datasource.
+"""
+from packager.datasources.api import *
+from packager.datasources.cmaker import CMakerDataSource
+from packager.datasources.imaker import IMakerDataSource
+from packager.datasources.sbs import SBSDataSource
+from packager.datasources.cone import ConEDataSource
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/lib/packager/datasources/api.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,73 @@
+#============================================================================ 
+#Name        : api.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+
+import logging
+logger = logging.getLogger("datasources.api")
+
+class MissingProperty(Exception):
+    """ An exception to indicate about a missing property """
+    pass
+
+class DataSource(object):
+    """ This abstract class defines a DataSource for the packager application. """
+    def __init__(self, epocroot, data=None):
+        self.epocroot = epocroot
+        self._data = data
+        if data is None:
+            self._data = {}
+            
+    def getComponents(self):
+        """ The getComponents method must return a list of BuildData object (one per component).
+            In case of error (e.g incomplete configuration) the method will raise an Exception.
+        """
+        raise NotImplementedError 
+
+    def getHelp(self):
+        return None
+    
+    help = property(lambda self: self.getHelp())
+
+
+DATASOURCES = {}
+
+def getDataSource(name, epocroot, data):
+    if name in DATASOURCES:
+        logger.debug("Creating datasource for %s." % name) 
+        return DATASOURCES[name](epocroot, data)
+    else:
+        logger.info("Loading %s." % name)
+        def class_import(name):
+            try:
+                components = name.split('.')
+                klassname = components.pop()
+                mod = __import__('.'.join(components), globals(), locals(), [klassname])
+                return getattr(mod, klassname)
+            except:
+                raise Exception("Could not load %s" % name)
+        return class_import(name)(epocroot, data)
+
+
+def getDataSourceHelp():
+    doc = ""
+    for name in DATASOURCES:
+        dshelp = DATASOURCES[name](None, None).help
+        if dshelp is not None:
+            doc = doc + "--- %s -----------------------------------\n" % name + dshelp +\
+                    "\n------------------------------------------\n"
+    return doc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/lib/packager/datasources/cmaker.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,106 @@
+#============================================================================ 
+#Name        : cmaker.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+
+import os
+import re
+from packager.datasources.api import DataSource, MissingProperty, DATASOURCES
+from Blocks.Packaging.BuildData import PlainBuildData
+import logging
+
+logger = logging.getLogger('packager.datasources.cmaker')
+
+class CMakerDataSource(DataSource):
+    """ Extract information from cMaker logs """ 
+    def __init__(self, epocroot, data):
+        DataSource.__init__(self, epocroot, data)
+        
+    def getComponents(self):
+        if 'whatlog' not in self._data:
+            raise MissingProperty("The whatlog property has not be defined.")
+        if 'configdir' not in self._data:
+            raise MissingProperty("The configdir property has not be defined.")        
+        component_name = "cmaker"
+        if 'name' in self._data:
+            component_name = self._data['name']
+        version = "1"
+        if 'version' in self._data:
+            version = self._data['version']
+
+        # validating the inputs
+        if not os.path.exists(self._data['whatlog']) or not os.path.isfile(self._data['whatlog']):
+            raise Exception("Could not find %s file." % self._data['whatlog'])        
+        cdir = os.path.abspath(self._data['configdir'])
+        if not os.path.exists(cdir) or not os.path.isdir(cdir):
+            raise Exception("Could not find %s directory." % cdir)
+            
+            
+        build_data = PlainBuildData()
+        build_data.setComponentName(component_name)
+        build_data.setComponentVersion(version) # need to get it from a the sysdef file
+        build_data.setSourceRoot(self.epocroot)
+        build_data.setTargetRoot(self.epocroot)
+        
+        targets = [path[len(self.epocroot):].lstrip(os.sep) for path in self.getExportedFiles()]
+        build_data.addTargetFiles(targets)
+        sources = [path[len(self.epocroot):].lstrip(os.sep) for path in self.getSourceFiles()]
+        build_data.addSourceFiles(sources)
+        return [build_data]
+        
+
+    def getExportedFiles(self):
+        """ Get the list of exported file from the log. The parser will recognize cMaker what output and
+            cMaker install log. The usage of xcopy will get warn to the user as its output will not be consider
+            and the target file will get dismissed. """
+        log = open(self._data['whatlog'], 'r')
+        for line in log:
+            line = line.rstrip()
+            rcopy = re.match(r'^.*\s+copy\(q\((.+)\),q\((.*)\)\)\'', line)
+            rxcopy = re.match(r'^(.*)\s+\-\>\s+(.+)$', line)
+            if ':' not in line and line.startswith(os.sep):
+                yield os.path.normpath(os.path.join(self.epocroot, line))
+            elif rcopy is not None:
+                yield os.path.normpath(os.path.join(self.epocroot, rcopy.group(2)))
+            elif rxcopy is not None:
+                logger.warning('This looks like an xcopy output! Make sure you use cmaker correctly: %s' % line)
+
+    
+    def getSourceFiles(self):
+        """ Get the list of source file using the call dir and the whatdeps log if available. """
+        cdir = os.path.abspath(self._data['configdir'])
+        for (path, dirpath, namelist) in os.walk(cdir):
+            for name in namelist:
+                yield os.path.join(path, name)                
+        if 'whatdepslog' in self._data:
+            log = open(self._data['whatdepslog'], 'r')
+            for line in log:
+                line = line.rstrip()
+                if ':' not in line and line.startswith(os.sep):
+                    yield os.path.normpath(os.path.join(self.epocroot, line))
+
+    def getHelp(self):
+        help_ = """This datasource will gather information from the cMaker output logs.
+Plugin property configuration:
+whatlog                Defines the location of the whatlog.
+configdir              Defines cMaker calling location.
+whatdepslog            Defines the location of the cMaker whatdeps log (optional).
+        """
+        return help_
+
+
+DATASOURCES['cmaker'] = CMakerDataSource
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/lib/packager/datasources/cone.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,74 @@
+#============================================================================ 
+#Name        : conftool.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+
+from packager.datasources.api import DataSource, DATASOURCES
+from Blocks.Packaging.BuildData import PlainBuildData
+import logging
+import re 
+import os
+
+logger = logging.getLogger('packager.datasources.conftool')
+
+class ConEDataSource(DataSource):
+    """ Extract information from ConE logs """
+    def __init__(self, epocroot, data=None):
+        DataSource.__init__(self, epocroot, data)
+    
+    def getTargetFiles(self):
+        """ Get the generated files from the log output. """
+        result = []
+        txtFile = open(self._data['filename'], 'r')
+        matcher = re.compile(r"^\s*Generating file '(.+)'\.\.\.\s*$")
+        for line in txtFile:
+            res = matcher.match(line)
+            if res:
+                result.append(os.path.normpath(os.path.join(self.epocroot, 
+                                                            res.group(1))))
+        txtFile.close()
+        return result
+
+    def getComponents(self):
+        """ Get the components list from the cli input. """
+        if 'name' not in self._data:
+            raise Exception("The name property has not be defined.")
+        if 'version' not in self._data:
+            raise Exception("The version property has not be defined.")
+
+        if 'filename' not in self._data:
+            raise Exception("The input conftool log file is not defined")
+
+        #todo: add the source iby / path for conftool input
+        build_data = PlainBuildData()
+        build_data.setComponentName(self._data['name'])
+        build_data.setComponentVersion(self._data['version'])
+        build_data.setSourceRoot(self.epocroot)
+        build_data.setTargetRoot(self.epocroot)
+        build_data.addTargetFiles([path[len(self.epocroot):].lstrip(os.sep) for path in self.getTargetFiles()])
+        return [build_data]
+
+    def getHelp(self):
+        """ Returns the help. """
+        return """
+name            Defines the name of the component
+version         Defines the version of the component
+filename        Defines the log file name of ctool
+"""
+
+        
+DATASOURCES['cone'] = ConEDataSource
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/lib/packager/datasources/imaker.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,117 @@
+#============================================================================ 
+#Name        : imaker.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+
+from packager.datasources.api import DataSource, MissingProperty, DATASOURCES
+from Blocks.Packaging.BuildData import PlainBuildData, BdFile
+import logging
+import re 
+import os
+
+logger = logging.getLogger('packager.datasources.imaker')
+
+class ObyParser:
+    """ Simplistic Oby file parser. """
+    def __init__(self, epocroot, filename):
+        self.epocroot = epocroot
+        self.filename = filename
+
+    def getSourceFiles(self):
+        """ Return the list of source file needed to create the image. """
+        result = []
+        logger.debug("Analyzing %s" % self.filename)
+        oby = open(self.filename, 'r')
+        for line in oby:
+            res = re.match(r'\s*(file|data|variant.+|bootbinary|primary.+|extension.+)\s*=\s*\"?(.+?)\"?\s+\".+\"', line)
+            if res is not None:
+                result.append(os.path.normpath(os.path.join(self.epocroot, res.group(2).strip().replace('\\', os.sep).replace('/', os.sep))))
+        oby.close()
+        return result
+
+
+class IMakerDataSource(DataSource):
+    """ Extract information from iMaker logs - iMaker integrated version """
+    def __init__(self, epocroot, data=None):
+        DataSource.__init__(self, epocroot, data)
+    
+    def getComponents(self):
+        if 'name' not in self._data:
+            raise Exception("The name property has not be defined.")
+        if 'version' not in self._data:
+            raise Exception("The version property has not be defined.")
+        obys = [self._data[key] for key in self._data.keys() if key.startswith('oby')]
+        targets = [os.path.normpath(self._data[key]) for key in self._data.keys() if key.startswith('target')]
+        build_data = PlainBuildData()
+        build_data.setComponentName(self._data['name'])
+        build_data.setComponentVersion(self._data['version'])
+        build_data.setSourceRoot(self.epocroot)
+        build_data.setTargetRoot(self.epocroot)
+        
+        build_data.addTargetFiles([path[len(self.epocroot):].lstrip(os.sep) for path in targets])
+        
+        deps = []
+        for oby in obys:        
+            deps.extend(ObyParser(self.epocroot, oby).getSourceFiles())
+        for target in targets:
+            print target
+            if target.endswith(".fpsx"):
+                target = os.path.normpath(target)
+                bdfile = BdFile(target[len(self.epocroot):].lstrip(os.sep))
+                bdfile.setOwnerDependencies([path[len(self.epocroot):].lstrip(os.sep) for path in deps])
+                build_data.addDeliverable(bdfile)
+        return [build_data]
+
+class IMakerRomDirDataSource(DataSource):
+    """ Extract information from iMaker logs - guess content of the package from the rom output dir. """
+    def __init__(self, epocroot, data=None):
+        DataSource.__init__(self, epocroot, data)
+    
+    def getComponents(self):
+        if 'name' not in self._data:
+            raise MissingProperty("The name property has not be defined.")
+        if 'version' not in self._data:
+            raise MissingProperty("The version property has not be defined.")
+        if 'dir' not in self._data:
+            raise MissingProperty("The dir property has not be defined.")
+        cdir = os.path.normpath(self._data['dir']) 
+        obys = []
+        targets = []
+        for (path, dirpath, namelist) in os.walk(cdir):
+            for name in namelist:
+                if name.endswith(".oby"):
+                    obys.append(os.path.join(path, name)[len(self.epocroot):].lstrip(os.sep))
+                targets.append(os.path.join(path, name)[len(self.epocroot):].lstrip(os.sep))
+        build_data = PlainBuildData()
+        build_data.setComponentName(self._data['name'])
+        build_data.setComponentVersion(self._data['version'])
+        build_data.setSourceRoot(self.epocroot)
+        build_data.setTargetRoot(self.epocroot)
+        build_data.addTargetFiles(targets)
+        return [build_data]
+    
+    def getHelp(self):
+        return """
+name            Defines the name of the component
+version         Defines the version of the component
+dir             Defines the root location of ROM images.
+"""
+
+        
+DATASOURCES['imaker'] = IMakerDataSource
+DATASOURCES['imaker-romdir'] = IMakerRomDirDataSource
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/lib/packager/datasources/sbs.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,299 @@
+#============================================================================ 
+#Name        : imaker.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+
+import xml.sax
+import time
+import os
+import re
+import fileutils
+import sys
+from packager.datasources.api import DataSource, MissingProperty, DATASOURCES
+from Blocks.Packaging.DataSources.LinkInfoToBuildData import LinkInfoXmlReader # pylint: disable=F0401
+try:
+    from Blocks.Packaging.DataSources.SbsLinkInfoReader import LinkInfoReader # pylint: disable=E0611
+except ImportError:
+    if os.path.sep == '\\': 
+        raptor_cmd = fileutils.which("sbs.bat")
+    else:
+        raptor_cmd = fileutils.which("sbs")
+    sbs_home = os.path.dirname(os.path.dirname(raptor_cmd))
+    os.environ['SBS_HOME'] = sbs_home
+    sys.path.append(os.path.join(sbs_home, 'python'))
+    sys.path.append(os.path.join(sbs_home, 'python', 'plugins'))
+    # loading as raptor plugin - loading also raptor.
+    if os.path.sep == '\\': 
+        os.environ['HOSTPLATFORM'] = 'win 32'
+        os.environ['HOSTPLATFORM_DIR'] = 'win32'
+    else:
+        os.environ['HOSTPLATFORM'] = 'linux'
+        os.environ['HOSTPLATFORM_DIR'] = 'linux'
+    from filter_blocks import LinkInfoReader # pylint: disable=F0401
+ 
+from Blocks.Packaging.BuildData import PlainBuildData
+from Blocks.Packaging.DataSources.WhatLog import WhatLogReader as LogReader
+import logging
+from Queue import Queue
+from threading import Thread
+
+class ComponentNotFound(Exception):
+    """ Error raised in case of not found component. """
+    
+    def __init__(self, message):
+        Exception.__init__(self, message)
+
+class SysdefComponentList(xml.sax.ContentHandler):
+    """ Simplistic sysdef data extractor, it will only get data from unit elements."""
+    
+    def __init__(self, epocroot, version="1"):
+        xml.sax.ContentHandler.__init__(self)
+        self.__data = {}
+        self.__epocroot = epocroot
+        self.__version = version
+        self.__component = None
+    
+    def startElement(self, tag, attributes):
+        if tag == "component" and attributes.get("id"):
+            self.__component = attributes.get("id")
+        elif tag == "unit" and self.__component and not attributes.get("unitID") and not attributes.get("name") and attributes.get("bldFile"):
+            data = {}
+            data['path'] = os.path.normpath(os.path.join(self.__epocroot, attributes.get("bldFile")).replace('\\', os.sep).replace('/', os.sep))
+            if attributes.get("version") is None:
+                data['version'] = self.__version
+            else:
+                data['version'] = attributes.get("version")
+            data['name'] = self.__cleanup_name(self.__component) 
+            self.__data[self.__component + attributes.get("bldFile").replace('\\', '_').replace('/', '_')] = data
+        elif tag == "unit" and attributes.get("name") is not None and attributes.get("bldFile") is not None:
+            data = {}
+            data['path'] = os.path.normpath(os.path.join(self.__epocroot, attributes.get("bldFile")).replace('\\', os.sep).replace('/', os.sep))
+            if attributes.get("version") is None:
+                data['version'] = self.__version
+            else:
+                data['version'] = attributes.get("version")
+            data['name'] = self.__cleanup_name(attributes.get("name")) 
+            self.__data[self.__cleanup_name(attributes.get("name"))] = data
+
+    def endElement(self, tag):
+        if tag == "component":
+            self.__component = None
+        
+    def __cleanup_name(self, name):
+        return re.sub(r'[^a-zA-Z0-9_-]', '', re.sub(r'\.', '_', name))
+    
+    def keys(self):
+        return self.__data.keys()
+    
+    def __getitem__(self, key):
+        return self.__data[key]
+
+    def __contains__(self, key):
+        for data in self.__data:
+            if key in data['name']:
+                return True
+        return False
+    
+    def __len__(self):
+        return self.__data.__len__()
+
+    def get_component_name_by_path(self, dir_):
+        dir_ = os.path.normpath(dir_)
+        for key in self.__data.keys():
+            if dir_.lower() == self.__data[key]['path'].lower():
+                return key
+        raise ComponentNotFound("Could not find component name for dir %s" % dir_)
+
+    def __str__(self):
+        return "<%s: %s>" % (type(self), self.__data)
+
+
+class BldInfWorker(Thread):
+    """ SBS component worker. """
+    def __init__(self, inqueue, outqueue, datasource, whatlog, cl, link_info):
+        Thread.__init__(self)
+        self.logger = logging.getLogger(self.__class__.__name__)
+        self.inqueue = inqueue
+        self.outqueue = outqueue
+        self.whatlog = whatlog
+        self.cl = cl
+        self.link_info = link_info
+        self.datasource = datasource
+    
+    def run(self):
+        """ Thread implementation. """
+        while True:
+            tag, bldinf = self.inqueue.get()
+            if tag == 'STOP':
+                self.logger.debug("Builder thread exiting..." )
+                return
+            else:
+                try:
+                    tick = time.time()
+                    self.outqueue.put(self.datasource.getBuildData(bldinf, self.whatlog, self.cl, self.link_info))
+                    tock = time.time()
+                    self.logger.info("Analyzed component %s in %s seconds" % (bldinf, tock - tick))
+                except IOError, exc:
+                    self.logger.error('Error happened in thread execution %s' % exc)
+                    import traceback
+                    self.logger.debug(traceback.format_exc())
+                    
+
+class SBSDataSource(DataSource):
+    """ That class implements the DataSource API"""
+    
+    def __init__(self, epocroot, data=None):
+        DataSource.__init__(self, epocroot, data)
+        self.logger = logging.getLogger(self.__class__.__name__)
+        
+    def _get_sysdef_info(self):
+        """ Returns a SysdefComponentList containing the result of sysdef parsing. """
+        self.logger.debug("Reading the component information from the sysdef (%s)." % self._data['sysdef'])
+        p = xml.sax.make_parser()
+        cl = SysdefComponentList(self.epocroot)
+        p.setContentHandler(cl)
+        p.parse(open(self._data['sysdef']))
+        return cl
+
+    def _get_whatlog(self):
+        self.logger.debug("Extracting whatlog data (%s)..." % self._data['sbslog'])
+        parser = xml.sax.make_parser()
+        lr = LogReader()
+        parser.setContentHandler(lr)
+        file_ = open(self._data['sbslog'])
+        while True:
+            data = file_.read()
+            if not data:
+                break
+            parser.feed(data)
+        file_.close()
+        parser.close()
+        return lr
+
+    def _generate_link_info(self, output=None):
+        """ Generate the link.info file from the build log. It returns the generated xml filename. """
+        self.logger.info("Generating the link information from the %s log." % self._data['sbslog'])
+        parser = xml.sax.make_parser()
+        reader = LinkInfoReader(self.epocroot)
+        parser.setContentHandler(reader)
+        parser.parse(open(self._data['sbslog'], 'r'))
+        if output is None:
+            output = self._data['sbslog'] + ".link.xml"
+        self.logger.info("Writing %s." % output)
+        out = open(output, 'wb')
+        reader.writeXml(out=out)
+        out.close()
+        return output
+
+    def getComponents(self):
+        if 'sbslog' not in self._data:
+            raise MissingProperty("The sbslog property has not be defined.") 
+        if 'sysdef' not in self._data:
+            raise MissingProperty("The sysdef property has not be defined.")
+        
+        # generating link info
+        link_info = LinkInfoXmlReader.getBuildData(self._generate_link_info())
+
+        # Read the component list
+        cl = self._get_sysdef_info()
+    
+        # Get the whatlog
+        whatlog = self._get_whatlog()
+        
+        result = []
+        if 'threads' in self._data and self._data['threads'].isdigit():
+            inqueue = Queue()
+            outqueue = Queue()
+            workers = []
+            # Work to be done
+            
+            for bldinf in whatlog.getInfs():
+                inqueue.put(('', bldinf))
+            # Creating the builders 
+            for i in range(int(self._data['threads'])):
+                b = BldInfWorker(inqueue, outqueue, self, \
+                              whatlog, cl, link_info)
+                workers.append(b)
+                b.start()
+            # Waiting the work to finish.
+            for w in workers:
+                inqueue.put(('STOP', None))
+            for w in workers:
+                w.join()
+            self.logger.info("All done.")
+            while not outqueue.empty():
+                result.append(outqueue.get())
+        else:
+            for bldinf in whatlog.getInfs():
+                result.append(self.getBuildData(bldinf, whatlog, cl, link_info))
+        return result
+    
+    def getBuildData(self, bldinf, whatlog, cl, link_info):
+        """ Get the build data from a bldinf name. """
+        tick = time.time()
+        src_walk_path = ""
+        abs_bldinf = os.path.abspath(bldinf)
+        self.logger.debug("component location:   %s" % abs_bldinf)
+        component_name = cl.get_component_name_by_path(os.path.normpath(os.path.dirname(abs_bldinf)))
+        build_data = PlainBuildData()
+        self.logger.debug("component name:       %s" % cl[component_name]['name'])
+        build_data.setComponentName(cl[component_name]['name'])
+        self.logger.debug("component version:    %s" % cl[component_name]['version'])
+        build_data.setComponentVersion(cl[component_name]['version']) # need to get it from a the sysdef file
+        build_data.setSourceRoot(self.epocroot)
+        build_data.setTargetRoot(self.epocroot)
+        
+        targets = [path[len(self.epocroot):].lstrip(os.sep) for path in whatlog.getFilePaths(abs_bldinf)]
+        build_data.addTargetFiles(targets)
+        
+        # If path contains group folder then parent to parent is required else parent folder is enough
+        if os.path.dirname(abs_bldinf).endswith("group"):
+            src_walk_path = os.path.dirname(os.path.dirname(abs_bldinf))
+        else:
+            src_walk_path = os.path.dirname(abs_bldinf)
+
+        sources = []
+        for (path, dirpath, namelist) in os.walk(src_walk_path):
+            for name in namelist:
+                sources.append(os.path.join(path, name)[len(self.epocroot):].lstrip(os.sep))
+        build_data.addSourceFiles(sources)
+        tock = time.time()
+        self.logger.info(" + Content analysis %s in %s seconds" % (bldinf, tock - tick))
+    
+        tick = time.time()
+        key_bldinf = abs_bldinf.replace(os.sep, '/')
+        if link_info.has_key(key_bldinf):
+            self.logger.debug("Found deps for %s" % key_bldinf)
+            for bdfile in link_info[key_bldinf].getDependencies():
+                if bdfile.getPath() in build_data.getTargetFiles():
+                    # no dependency data above, only paths - OK to overwrite
+                    build_data.addDeliverable(bdfile)
+                else:
+                    self.logger.warning("Link data from %s has unlisted target %s" % (abs_bldinf, bdfile.getPath()))
+        tock = time.time()
+        self.logger.info(" + Dependency analysis for %s in %s seconds" % (bldinf, tock - tick))
+        return build_data
+
+    def getHelp(self):
+        help_ = """The sbs datasource will extract component information from the sbs logs. You need a recent version of raptor: e.g 2.8.4.
+Plugin property configuration:
+sbslog                 Location of the sbs log.
+sysdef                 Location of the canonical system definition file.
+        """
+        return help_
+
+DATASOURCES['sbs'] = SBSDataSource
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/lib/packager/io.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,143 @@
+#============================================================================ 
+#Name        : io.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+import xml.dom.minidom
+import logging
+from Blocks.Packaging.BuildData import BdFile, PlainBuildData
+logger = logging.getLogger('io')
+
+class BdFileSerializer:
+    """ Class used to serialize or deserialize the DBFile """
+    def __init__(self, bdfile=None):
+        self.bdfile = bdfile 
+
+    def toXml(self):
+        logger.debug("Serializing DBFile.")
+        document = xml.dom.minidom.Document()
+        component = document.createElement('bdfile')
+        component.setAttribute('path', self.bdfile.getPath())
+        if self.bdfile.variantType  is not None:
+            component.setAttribute('variantType', self.bdfile.variantType)
+        if self.bdfile.variantPlatform is not None:
+            component.setAttribute('variantPlatform', self.bdfile.variantPlatform)
+        # Owner reqs
+        ownerReqs = document.createElement('ownerRequirements')
+        for path in self.bdfile.ownerRequirements:
+            req = document.createElement("ownerRequirement")
+            req.setAttribute('path', path)
+            ownerReqs.appendChild(req)
+        component.appendChild(ownerReqs)
+        # source Requirements
+        srcReqs = document.createElement('sourceRequirements')
+        for path in self.bdfile.sourceRequirements:
+            req = document.createElement("sourceRequirement")
+            req.setAttribute('path', path)
+            srcReqs.appendChild(req)
+        component.appendChild(srcReqs)
+        return component.toxml()
+
+    def fromXml(self, data):
+        logger.debug("Deserializing DBFile.")
+        node = xml.dom.minidom.parseString(data).childNodes[0]
+        if self.bdfile == None:
+            self.bdfile = BdFile(node.getAttribute('path'))
+        
+        self.bdfile.path = node.getAttribute('path')
+        self.bdfile.variantPlatform = node.getAttribute('variantPlatform')
+        self.bdfile.variantType = node.getAttribute('variantType')
+        for src in node.getElementsByTagName('ownerRequirements')[0].getElementsByTagName('ownerRequirement'):
+            self.bdfile.ownerRequirements.append(src.getAttribute('path'))
+        for src in node.getElementsByTagName('sourceRequirements')[0].getElementsByTagName('sourceRequirement'):
+            self.bdfile.sourceRequirements.append(src.getAttribute('path'))
+        return self.bdfile
+        
+class BuildDataSerializer:
+    """ Class used to serialize or deserialize the plain build data """
+    def __init__(self, builddata=None):
+        self.builddata = builddata
+        if  self.builddata is None:
+            self.builddata = PlainBuildData()
+            
+    def toXml(self):
+        logger.debug("Serializing PlainBuildData.")
+        document = xml.dom.minidom.Document()
+        component = document.createElement('component')
+        component.setAttribute('name', self.builddata.getComponentName())
+        component.setAttribute('version', self.builddata.getComponentVersion())
+        # sources
+        sources = document.createElement('sources')
+        sources.setAttribute('root', self.builddata.getSourceRoot())        
+        for path in self.builddata.getSourceFiles():
+            source = document.createElement("source")
+            source.setAttribute('path', path)
+            sources.appendChild(source)
+        component.appendChild(sources)
+        # targets
+        targets = document.createElement('targets')        
+        targets.setAttribute('root', self.builddata.getTargetRoot())
+        for path in self.builddata.targetFiles.keys():
+            target = document.createElement("target")
+            target.setAttribute('path', path)
+            if self.builddata.targetFiles[path] is not None:
+                target.appendChild(document.importNode(xml.dom.minidom.parseString(BdFileSerializer(self.builddata.targetFiles[path]).toXml()).childNodes[0], deep=1))
+            targets.appendChild(target)        
+        component.appendChild(targets)
+        return component.toxml()
+
+    def fromXml(self, data):
+        logger.debug("Deserializing PlainBuildData.")
+        node = xml.dom.minidom.parseString(data).childNodes[0]
+        self.builddata.setComponentName(node.getAttribute('name'))
+        self.builddata.setComponentVersion(node.getAttribute('version'))
+        self.builddata.setSourceRoot(node.getElementsByTagName('sources')[0].getAttribute('root'))
+        self.builddata.setTargetRoot(node.getElementsByTagName('targets')[0].getAttribute('root'))
+        files = []
+        for src in node.getElementsByTagName('sources')[0].getElementsByTagName('source'):
+            files.append(src.getAttribute('path'))
+        self.builddata.addSourceFiles(files)
+
+        files = []
+        for target in node.getElementsByTagName('targets')[0].getElementsByTagName('target'):
+            files.append(target.getAttribute('path'))
+        self.builddata.addTargetFiles(files)
+        for target in node.getElementsByTagName('targets')[0].getElementsByTagName('target'):
+            for bdfile in target.getElementsByTagName('bdfile'):
+                self.builddata.addDeliverable(BdFileSerializer().fromXml(bdfile.toxml()))
+        return self.builddata
+
+
+class BuildDataMerger:
+    """ Class used to merge contents of build data """
+    def __init__(self, output):
+        self.output = output
+
+    def merge(self, bd):
+        """ Merge the content of bd into output. """
+        if bd.getComponentName() != self.output.getComponentName():
+            raise Exception("Trying to merger two different components (different name)")
+        if bd.getComponentVersion() != self.output.getComponentVersion():
+            raise Exception("Trying to merger two different components (different version)")        
+        if bd.getSourceRoot() != self.output.getSourceRoot():
+            raise Exception("Trying to merger two different components (different source root)")
+        if bd.getTargetRoot() != self.output.getTargetRoot():
+            raise Exception("Trying to merger two different components (different target root)")
+        self.output.addSourceFiles(bd.getSourceFiles())
+        self.output.addTargetFiles(bd.getTargetFiles())
+        for dep in bd.getDependencies():
+            self.output.addDeliverable(dep)
+        return self.output
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/setup.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,37 @@
+#============================================================================ 
+#Name        : .py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+import os
+from setuptools import setup, find_packages
+pyfiles = []
+for x in os.listdir('lib'):
+    if x.endswith('.py'):
+        pyfiles.append(x.replace('.py', ''))
+
+setup(
+    name = 'blockspackager',
+    version = '0.1',
+    description = "blockspackager",
+    license = 'EPL',
+    package_dir = {'': 'lib'},
+    py_modules = pyfiles,
+    packages = find_packages('lib', exclude=["*tests"]),
+    test_suite = 'nose.collector',
+    package_data = {'': ['*.xml', '*.conf', '*.xsd', '*.nsi']},
+    zip_safe = False,
+    )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/blockspackager/tests.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : build.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="blockspackager">
+    <description>Helium unittests.</description>
+    <property name="builder.dir" location="../../builder"/>
+    <import file="${builder.dir}/python/test-macros.ant.xml"/>
+    
+</project>
--- a/buildframework/helium/sf/python/pythoncore/ivy.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/ivy.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -39,5 +39,6 @@
       <dependency org="threadpool" name="threadpool" rev="latest.integration" conf="default" />
       <dependency org="dom4j" name="dom4j" rev="latest.integration" conf="default" />
       <dependency org="setuptools" name="setuptools" rev="0.6+" conf="default" />
+      <dependency org="net.sourceforge.docutils" name="docutils" rev="0.5" conf="default" />
   </dependencies>
 </ivy-module>
--- a/buildframework/helium/sf/python/pythoncore/lib/amara.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/amara.py	Wed Oct 13 16:31:27 2010 +0800
@@ -105,24 +105,26 @@
         def __setitem__(self, key, value):
             self.xml_set_attribute(key, value)
             
-        def __getattr__(self, attr):
+        def __getattr__(self, attr):        
+            if attr == 'xml_child_elements':
+                return self._getxml_child_elements()
             if isinstance(attr, basestring):
                 res = self.dom.getElementsByTagName(attr)
                 if len(res) == 0:
                     if hasattr(self.dom, 'documentElement'):
                         val = self.dom.documentElement.getAttribute(attr)
                         if not self.dom.documentElement.hasAttribute(attr):
-                            raise Exception(attr + ' not found')
+                            raise AttributeError(attr + ' not found')
                     else:
                         val = self.dom.getAttribute(attr)
                         if not self.dom.hasAttribute(attr):
-                            raise Exception(attr + ' not found')
+                            raise AttributeError(attr + ' not found')
                     return val
                 return MinidomAmara(res[0], self.dom)
             if self.parent:
                 return MinidomAmara(self.parent.getElementsByTagName(self.dom.tagName)[attr])
             else:
-                raise Exception(str(attr) + ' not found')
+                raise AttributeError(str(attr) + ' not found')
     
         def __setattr__(self, name, value):
             if isinstance(value, basestring):
@@ -134,13 +136,20 @@
             for entry in self.parent.getElementsByTagName(self.dom.tagName):
                 yield MinidomAmara(entry)
     
-        def __str__(self):
+        def _get_text(self, node):
+            """ Recursive method to collate sub-node strings. """
             text = ''
-            for t_text in self.dom.childNodes:
-                if t_text.nodeType == t_text.TEXT_NODE and t_text.data != None:
-                    text = text + t_text.data
-            return text
+            for child in node.childNodes:
+                if child.nodeType == child.TEXT_NODE and child.data != None:
+                    text = text + ' ' + child.data
+                else:
+                    text += self._get_text(child)
+            return text.strip()
         
+        def __str__(self):
+            """ Output a string representing the XML node. """
+            return self._get_text(self.dom)
+
         def xml(self, out=None, indent=False, omitXmlDeclaration=False, encoding='utf-8'):
             """xml"""
             if omitXmlDeclaration:
@@ -169,6 +178,14 @@
                 if elem.nodeType == elem.ELEMENT_NODE:
                     l_attrib.append(MinidomAmara(elem))
             return l_attrib
+
+        def _getxml_child_elements(self):
+            """get xml children"""
+            l_attrib = {}
+            for elem in self.dom.childNodes:
+                if elem.nodeType == elem.ELEMENT_NODE:
+                    l_attrib[elem.tagName] = MinidomAmara(elem)
+            return l_attrib
         
         def _getxml_attributes(self):
             """get aml attributes"""
@@ -209,6 +226,7 @@
         childNodes = property(_getxml_children)
         xml_children = property(_getxml_children)
         xml_attributes = property(_getxml_attributes)
+        xml_child_elements = property(_getxml_child_elements)
         
         def __eq__(self, obj):
             return str(self) == obj
--- a/buildframework/helium/sf/python/pythoncore/lib/archive/mappers.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/archive/mappers.py	Wed Oct 13 16:31:27 2010 +0800
@@ -51,21 +51,25 @@
         self._metadata = None
         if not os.path.exists(self._config['archives.dir']):
             os.makedirs(self._config['archives.dir'])
-        if self._config.has_key("grace.metadata") and self._config.get_boolean("grace.metadata", False):
-            if self._config.has_key("grace.template") and os.path.exists(self._config["grace.template"]) and \
+        
+        if self._config.has_key("grace.metadata"):
+            raise Exception('grace.metadata not supported, see documentation for correct configuration')
+        
+        if self._config.has_key("release.metadata") and self._config.get_boolean("release.metadata", False):
+            if self._config.has_key("release.template") and os.path.exists(self._config["release.template"]) and \
              not os.path.exists(os.path.join(self._config['archives.dir'], self._config['name'] + ".metadata.xml")):
-                shutil.copy(config["grace.template"], os.path.join(self._config['archives.dir'], self._config['name'] + ".metadata.xml"))
+                shutil.copy(config["release.template"], os.path.join(self._config['archives.dir'], self._config['name'] + ".metadata.xml"))
             self._metadata = symrec.ReleaseMetadata(os.path.join(self._config['archives.dir'], self._config['name']+ ".metadata.xml"),
-                                       service=self._config['grace.service'],
-                                       product=self._config['grace.product'],
-                                       release=self._config['grace.release'])
+                                       service=self._config['release.service'],
+                                       product=self._config['release.product'],
+                                       release=self._config['release.name'])
             self._metadata.save()            
         
     def declare_package(self, filename, extract="single"):
         """ Add a package to the metadata file. """
         if self._metadata is None:
             return
-        self._metadata.add_package(os.path.basename(filename), extract=extract, filters=self._config.get_list('grace.filters', None), default=self._config.get_boolean('grace.default', True))
+        self._metadata.add_package(os.path.basename(filename), extract=extract, filters=self._config.get_list('release.filters', None), default=self._config.get_boolean('release.default', True))
         self._metadata.save()
     
     def create_commands(self, manifest):
@@ -99,12 +103,12 @@
             if len(manifests) == 1:
                 filename = os.path.join(self._config['archives.dir'], self._config['name'])
             _logger.info("  * " + filename + self._tool.extension())
-            self.declare_package(filename + self._tool.extension(), self._config.get('grace.extract', 'single'))
+            self.declare_package(filename + self._tool.extension(), self._config.get('release.extract', 'single'))
             result.extend(self._tool.create_command(self._config.get('zip.root.dir', self._config['root.dir']), filename, manifests=[manifest]))
         
         return [result]
 
-    def _split_manifest_file(self, name, manifest_file_path):
+    def _split_manifest_file(self, name, manifest_file_path, key=None):
         """ This method return a list of files that contain the content of the zip parts to create. """
         filenames = []
         
@@ -137,7 +141,10 @@
                             files = 0
                             part += 1
         
-                            filename = "%s_part%02d" % (name, part)
+                            if key is not None:
+                                filename = "%s_part%02d_%s" % (name, part, key)
+                            else:
+                                filename = "%s_part%02d" % (name, part)
                             filenames.append(os.path.join(self._config['temp.build.dir'], filename + ".txt"))
         
                             output = codecs.open(os.path.join(self._config['temp.build.dir'], filename + ".txt"), 'w', "utf-8" )
@@ -156,7 +163,10 @@
                                 files = 0
                                 part += 1
         
-                                filename = "%s_part%02d" % (name, part)
+                                if key is not None:
+                                    filename = "%s_part%02d_%s" % (name, part, key)
+                                else:
+                                    filename = "%s_part%02d" % (name, part)
                                 filenames.append(os.path.join(self._config['temp.build.dir'], filename + ".txt"))
                                 
                                 output = open(os.path.abspath(os.path.join(self._config['temp.build.dir'], filename + ".txt")), 'w')
@@ -178,7 +188,7 @@
         return filenames
 
 
-class PolicyMapper(Mapper):
+class PolicyMapper(DefaultMapper):
     """ Implements a policy content mapper.
     
     It transforms a list of files into a list of commands with their inputs.
@@ -188,7 +198,7 @@
     
     def __init__(self, config, archiver):
         """ Initialization. """
-        Mapper.__init__(self, config, archiver)
+        DefaultMapper.__init__(self, config, archiver)
         self._policies = {}
         self._policy_cache = {}
         self._binary = {}
@@ -233,11 +243,22 @@
         
         # Generating sublists.
         for key in self._policies.keys():
+            manifests = []
             self._policies[key].close()
             manifest = os.path.join(self._config['temp.build.dir'], self._config['name'] + "_%s" % key + ".txt")
-            filename = os.path.join(self._config['archives.dir'], self._config['name'] + "_%s" % key)
-            _logger.info("  * " + filename + self._tool.extension())
-            result.extend(self._tool.create_command(self._config.get('zip.root.dir', self._config['root.dir']), filename, manifests=[manifest]))
+            _logger.info("  * Input manifest: " + manifest)
+            if self._config.has_key("split.on.uncompressed.size.enabled") and self._config.get_boolean("split.on.uncompressed.size.enabled", "false"):
+                manifests = self._split_manifest_file(self._config['name'], manifest, key)
+            else:
+                manifests.append(manifest)
+            for manifest in manifests:
+                _logger.info("  * Creating command for manifest: " + manifest)
+                filename = os.path.join(self._config['archives.dir'], os.path.splitext(os.path.basename(manifest))[0])
+                if len(manifests) == 1:
+                    filename = os.path.join(self._config['archives.dir'], self._config['name'] + "_%s" % key)
+                _logger.info("  * " + filename + self._tool.extension())
+                self.declare_package(filename + self._tool.extension(), self._config.get('release.extract', 'single'))
+                result.extend(self._tool.create_command(self._config.get('zip.root.dir', self._config['root.dir']), filename, manifests=[manifest]))
         stages.append(result)
         
         # See if any internal archives need to be created
--- a/buildframework/helium/sf/python/pythoncore/lib/archive/scanners.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/archive/scanners.py	Wed Oct 13 16:31:27 2010 +0800
@@ -48,11 +48,10 @@
         [self.add_exclude_lst(filename) for filename in self._config.get_list('exclude.lst', [])]
         [self.add_filetype(filetype) for filetype in self._config.get_list('filetype', [])]
         [self.add_selector(archive.selectors.get_selector(selector, self._config)) for selector in self._config.get_list('selector', [])]
-        # To support old features.
-        # TODO: inform customers and remove.
+        
         if 'distribution.policy.s60' in self._config:
             self.add_selector(archive.selectors.get_selector('distribution.policy.s60', self._config))
-
+ 
     def add_exclude_lst(self, filename):
         """ Adding excludes from exclude list. """
         if not os.path.exists(filename):
@@ -76,7 +75,7 @@
             This method need to be overloaded by the specialized class.
             return fullpath name
         """
-        raise  NotImplementedError()
+        raise NotImplementedError()
 
 
 class AbldWhatScanner(Scanner):
--- a/buildframework/helium/sf/python/pythoncore/lib/ats3/__init__.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/__init__.py	Wed Oct 13 16:31:27 2010 +0800
@@ -54,7 +54,11 @@
         # Customize some attributes from how optparse leaves them.
         if hasattr(self._opts, 'build_drive'):
             self.build_drive = path(self._opts.build_drive)
-        self.file_store = path(self._opts.file_store)
+        if os.path.exists(self._opts.file_store):
+            self.file_store = path(self._opts.file_store)
+        else:
+            self.file_store = ''
+            _logger.info(self._opts.file_store + ' not found')
         self.flash_images = split_paths(self._opts.flash_images)
         if hasattr(self._opts, 'sis_files'):
             self.sis_files = split_paths(self._opts.sis_files)
@@ -62,6 +66,8 @@
             self.config_file = self._opts.config
         if hasattr(self._opts, 'obey_pkgfiles'):
             self.obey_pkgfiles = to_bool(self._opts.obey_pkgfiles)
+        if hasattr(self._opts, 'minimum_execution_blocks'):
+            self.minimum_execution_blocks = (self._opts.minimum_execution_blocks == 'true')
         if hasattr(self._opts, 'hti'):
             self.hti = to_bool(self._opts.hti)
         if hasattr(self._opts, 'test_type'):
@@ -91,7 +97,7 @@
                 for t_key, t_value in temp_dict.items():
                     self.tsrc_paths_dict[t_key] = t_value
             else:
-                _logger.error(tsrc + ' not found')
+                _logger.error(tsrc + ' - test source not found')
         
         #preparing a list of main components
         for main_component in self.tsrc_paths_dict.keys():
@@ -166,6 +172,9 @@
         self.ctc_enabled = 'False'
         if hasattr(config, 'ctc_enabled'):
             self.ctc_enabled = to_bool(config.ctc_enabled)
+        self.ats_stf_enabled = 'False'
+        if hasattr(config, 'ats_stf_enabled'):
+            self.ats_stf_enabled = to_bool(config.ats_stf_enabled)
         if hasattr(config, 'multiset_enabled'):
             self.multiset_enabled = to_bool(config.multiset_enabled)
         if hasattr(config, 'monsym_files'):
@@ -180,6 +189,9 @@
             self.flash_images = config.flash_images
         if hasattr(config, 'test_type'):
             self.test_type = config.test_type
+        self.minimum_execution_blocks = False
+        if hasattr(config, 'minimum_execution_blocks'):
+            self.minimum_execution_blocks = config.minimum_execution_blocks
     
     def insert_set(self, data_files=None, config_files=None, 
                    engine_ini_file=None,  image_files=None, sis_files=None,
@@ -230,12 +242,39 @@
         if self.trace_enabled != "":
             if self.trace_enabled.lower() == "true":
                 setd = dict(setd, pmd_files=pmd_files, 
-                            trace_path=self.file_store.joinpath(self.REPORT_PATH, "traces", setd["name"], "tracelog.blx"),
+                            trace_path=os.path.join(self.file_store, self.REPORT_PATH, "traces", setd["name"], "tracelog.blx"),
                             trace_activation_files=trace_activation_files)
             else:
                 setd = dict(setd, pmd_files=[], 
                             trace_path="",trace_activation_files=[])
-        self.sets.append(setd)
+        
+        if self.minimum_execution_blocks:
+            if self.sets == []:
+                self.sets = [setd]
+            else:
+                files = ['component_path',
+                'trace_activation_files',
+                'src_dst',
+                #'trace_path',
+                #'custom_dir',
+                'pmd_files',
+                'dll_files',
+                'config_files',
+                'data_files',
+                'testmodule_files']
+
+                if self.sets[0]['test_harness'] == setd['test_harness'] and setd['engine_ini_file'] == None:
+                    for param in files:
+                        if setd[param]:
+                            if type(setd[param]) == dict:
+                                for key in setd[param].keys():
+                                    self.sets[0][param][key] = setd[param][key]
+                            else:
+                                self.sets[0][param] = self.sets[0][param] + setd[param]
+                else:
+                    self.sets.append(setd)
+        else:
+            self.sets.append(setd)
 
     def set_plan_harness(self):
         """setting up test harness for a plan"""
@@ -272,7 +311,7 @@
         actions = []
         temp_var = ""
         include_ctc_runprocess = False
-        report_path = self.file_store.joinpath(self.REPORT_PATH)
+        report_path = os.path.join(self.file_store, self.REPORT_PATH)
         
         if self.ctc_enabled and adg.CTC_PATHS_LIST != [] and self.monsym_files != "" and not "${" in self.monsym_files:
             include_ctc_runprocess = True
@@ -311,18 +350,18 @@
                              ("send-files", "true"),
                              ("to", self.report_email)))
         ats3_report = ("FileStoreAction", 
-                       (("to-folder", report_path.joinpath("ATS3_REPORT")),
+                       (("to-folder", os.path.join(report_path, "ATS3_REPORT")),
                         ("report-type", "ATS3_REPORT"),
                         ("date-format", "yyyyMMdd"),
                         ("time-format", "HHmmss")))
         stif_report = ("FileStoreAction", 
-                       (("to-folder", report_path.joinpath("STIF_REPORT")),
+                       (("to-folder", os.path.join(report_path, "STIF_REPORT")),
                         ("report-type", "STIF_COMPONENT_REPORT_ALL_CASES"),
                         ("run-log", "true"),
                         ("date-format", "yyyyMMdd"),
                         ("time-format", "HHmmss")))
         eunit_report = ("FileStoreAction", 
-                       (("to-folder", report_path.joinpath("EUNIT_REPORT")),
+                       (("to-folder", os.path.join(report_path, "EUNIT_REPORT")),
                         ("report-type", "EUNIT_COMPONENT_REPORT_ALL_CASES"),
                         ("run-log", "true"),
                         ("date-format", "yyyyMMdd"),
@@ -405,7 +444,9 @@
         tesplan_counter += 1
         exe_flag = False
         for srcanddst in plan_sets['src_dst']:
-            _ext = srcanddst[0].rsplit(".")[1]
+            _ext = ''
+            if '.' in srcanddst[0]:
+                _ext = srcanddst[0].rsplit(".")[1]
             #the list below are the files which are executable
             #if none exists, set is not executable
             for mat in ["dll", "ini", "cfg", "exe", "script"]:
@@ -488,9 +529,11 @@
                    default="")
     cli.add_option("--specific-pkg", help="Text in name of pkg files to use", default='')
     cli.add_option("--ats4-enabled", help="ATS4 enabled", default="False")
+    cli.add_option("--ats-stf-enabled", help="ATS STF enabled", default="False")
     cli.add_option("--obey-pkgfiles", help="If this option is True, then only test components having PKG file are executable and if the compnents don't have PKG files they will be ignored.", default="False")
     cli.add_option("--verbose", help="Increase output verbosity", action="store_true", default=False)
     cli.add_option("--hti", help="HTI enabled", default="True")
+    cli.add_option("--minimum-execution-blocks", help="Create as few as possible execution blocks", default="false")
     
     opts, tsrc_paths = cli.parse_args()
 
--- a/buildframework/helium/sf/python/pythoncore/lib/ats3/aste_template.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/aste_template.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -139,7 +139,7 @@
                <type>InstallSisTask</type>
                <parameters>
                     <parameter name="timeout" value="{{ test_plan["test_timeout"] }}"/>
-                    <parameter name="upgrade-data " value="true"/>
+                    <parameter name="upgrade-data" value="true"/>
                     <parameter name="ignore-ocsp-warnings" value="true"/>
                     <parameter name="ocsp-done" value="true"/>
                     <parameter name="software-package" value="c:\testframework\{{ os.path.basename(sis_file) }}"/>
--- a/buildframework/helium/sf/python/pythoncore/lib/ats3/ats4_template.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/ats4_template.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -77,7 +77,7 @@
             {%- endif %}
             
             {% if setd["ctc_enabled"] == "True" -%}
-            {{ macros.ctc_initialization() }}
+            {{ macros.ctc_initialization(test_plan) }}
             {%- endif %}
             
             <task>
@@ -168,7 +168,7 @@
                <type>InstallSisTask</type>
                <parameters>
                     <parameter name="timeout" value="{{ test_plan["test_timeout"] }}"/>
-                    <parameter name="upgrade-data " value="true"/>
+                    <parameter name="upgrade-data" value="true"/>
                     <parameter name="ignore-ocsp-warnings" value="true"/>
                     <parameter name="ocsp-done" value="true"/>
                     <parameter name="software-package" value="c:\testframework\{{ os.path.basename(sis_file) }}"/>
@@ -272,7 +272,7 @@
         
         <finalization>
         {% if setd["ctc_enabled"] == "True" -%}
-        {{ macros.ctc_finalization(setd) }}
+        {{ macros.ctc_finalization(test_plan) }}
         {%- endif %}
 
             <task>
@@ -311,7 +311,7 @@
             <type>EmailAction</type>
             <parameters>
                 <parameter value="ATS test results {{ test_plan['testrun_name'] }}" name="subject"/>
-                <parameter value="{{ test_plan['report_email'] }}" name="to"/>
+                <parameter value="{{ test_plan['report_email']|e }}" name="to"/>
                 <parameter value="simplelogger" name="format"/>
                 {% if test_plan['report_type'].lower() == 'no_attachment' -%}
                 <parameter value="false" name="attach-report"/>
@@ -319,6 +319,15 @@
             </parameters>
         </action>
         {%- endif %}
+        {% if test_plan['file_store'] -%}
+        <action>
+            <type>FileStoreAction</type>
+            <parameters>
+                <parameter value="{{ test_plan['file_store'] }}\%START_DATE%_%START_TIME%_%SERVER_TOKEN%" name="dst"/>
+                <parameter value="true" name="overwrite"/>
+            </parameters>
+        </action>
+        {% endif %}
         {% if test_plan['diamonds_build_url'] -%}
         <action>
             <type>DiamondsAction</type>
--- a/buildframework/helium/sf/python/pythoncore/lib/ats3/atsconfigparser.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/atsconfigparser.py	Wed Oct 13 16:31:27 2010 +0800
@@ -51,8 +51,11 @@
                 p_temp.value = value
                 changed = True
         if not changed:
-            for device in self.doc.test.target.device:
-                device.xml_append(self.doc.xml_create_element(u"setting", attributes = {u'name': unicode(name), u'value': unicode(value)}))
+            if hasattr(self.doc, 'test'):
+                for device in self.doc.test.target.device:
+                    device.xml_append(self.doc.xml_create_element(u"setting", attributes = {u'name': unicode(name), u'value': unicode(value)}))
+            else:
+                raise Exception("You can't add a setting with ats4")
         
     def containsattribute(self, name, value):
         """ returns true or false """
@@ -74,9 +77,12 @@
                 p_temp.value = value
                 changed = True
         if not changed:
-            for device in self.doc.test.target.device:
-                device.xml_append(self.doc.xml_create_element(u"property", attributes = {u'name': unicode(name), u'value': unicode(value)}))
-
+            if hasattr(self.doc, 'test'):
+                for device in self.doc.test.target.device:
+                    device.xml_append(self.doc.xml_create_element(u"property", attributes = {u'name': unicode(name), u'value': unicode(value)}))
+            else:
+                for device in self.doc.testrun.agents.agent:
+                    device.xml_append(self.doc.xml_create_element(u"property", attributes = {u'name': unicode(name), u'value': unicode(value)}))
 
 class ATSConfigParser:
     """ ATS configuration parser"""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/bootup_testing.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,361 @@
+# -*- encoding: latin-1 -*-
+
+#============================================================================ 
+#Name        : bootup_testing.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+
+"""Bootup test drop generation."""
+
+#W0142 => * and ** were used
+#R* removed during refactoring
+
+from optparse import OptionParser
+from xml.etree import ElementTree as et
+import logging
+import os
+import re
+import tempfile
+import zipfile
+import pkg_resources # pylint: disable-msg=F0401
+from path import path # pylint: disable-msg=F0401
+import amara
+import ntpath as atspath
+import jinja2 # pylint: disable-msg=F0401
+import ats3.parsers as parser
+
+_logger = logging.getLogger('bootup-testing')
+
+# Shortcuts
+E = et.Element
+SE = et.SubElement
+
+class Configuration(object):
+    """
+    Bootup test drop generation configuration.
+    """
+    
+    def __init__(self, opts):
+        """
+        Initialize from optparse configuration options.
+        """
+        
+        self._opts = opts
+        # Customize some attributes from how optparse leaves them.
+        self.build_drive = path(self._opts.build_drive)
+        self.file_store = path(self._opts.file_store)
+        self.flash_images = self.split_paths(self._opts.flash_images)
+        self.template_loc = path(self._opts.template_loc)
+        
+        
+    def split_paths(self, arg, delim=","):
+        """
+        Split the string by delim, removing extra whitespace.
+        """
+        return [path(part.strip()) 
+                for part in arg.split(delim) if part.strip()]
+    
+    def __getattr__(self, attr):
+        return getattr(self._opts, attr)
+    
+    def __str__(self):
+        dump = "Configuration:\n"
+        seen = set()
+        for key, value in vars(self).items():
+            if not key.startswith("_"):
+                dump += "\t%s = %s\n" % (key, value)
+                seen.add(key)
+        for key, value in vars(self._opts).items():
+            if key not in seen:
+                dump += "\t%s = %s\n" % (key, value)
+                seen.add(key)                
+        return dump
+    
+
+class BootupTestPlan(object):
+    """
+    Tells ATS server that images have to be tested if they can start the device.
+    """
+
+    def __init__(self, config):
+        self.pkg_parser = parser.PkgFileParser()
+        self.file_store = config.file_store
+        self.build_drive = config.build_drive
+
+    def insert_execution_block(self, block_count=1, image_files=None):
+        """
+        Insert task and flash files into the execution block
+        """
+        if image_files is None:
+            image_files = []
+
+        exe_dict = dict(name="exe%d" % block_count, image_files=image_files)
+
+        return exe_dict        
+
+
+    def __getitem__(self, key):
+        return self.__dict__[key]
+
+
+
+class BootupTestDropGenerator(object):
+    """
+    Generate test drop zip file for Bootup testing.
+
+    The main responsibility of this class is to create testdrop and 
+    test.xml file.
+    
+    """
+
+    def __init__(self):
+        self.drop_path_root = path("BootupDrop")
+        self.drop_path = None
+        self.defaults = {}
+
+    def generate(self, xml_dict, output_file, template_loc=None):
+        """Generate a test drop file."""
+        xml = self.generate_xml(xml_dict, template_loc)
+        return self.generate_drop(xml_dict, xml, output_file)
+
+    def generate_drop(self, xml_dict, xml, output_file):
+        """Generate test drop zip file."""
+
+        zfile = zipfile.ZipFile(output_file, "w", zipfile.ZIP_DEFLATED)
+        try:
+            for drop_file, src_file in self.drop_files(xml_dict):
+
+                _logger.info("   + Adding: %s" % src_file.strip())
+                try:
+                    zfile.write(src_file.strip(), drop_file.encode('utf-8'))
+                except OSError, expr:
+                    _logger.error(expr)
+            doc = amara.parse(et.tostring(xml.getroot()))
+            _logger.debug("XML output: %s" % doc.xml(indent=u"yes", encoding="ISO-8859-1"))
+            zfile.writestr("test.xml", doc.xml(indent="yes", encoding="ISO-8859-1"))
+        finally:
+            _logger.info("Testdrop for bootup testing created successfully!")
+            zfile.close()
+
+    def generate_xml(self, xml_dict, template_loc):
+        """ generate an XML file"""
+        template_loc = path(template_loc).normpath()
+        loader = jinja2.ChoiceLoader([jinja2.PackageLoader(__name__, 'templates')])
+        env = jinja2.Environment(loader=loader)
+        if template_loc is None or not ".xml" in template_loc.lower():
+            template = env.from_string(pkg_resources.resource_string(__name__, 'bootup_testing_template.xml'))# pylint: disable-msg=E1101
+        else:
+            template = env.from_string(open(template_loc).read())# pylint: disable-msg=E1101
+            
+        xmltext = template.render(xml_dict=xml_dict, os=os, atspath=atspath, atsself=self).encode('ISO-8859-1')
+        #print xmltext
+        return et.ElementTree(et.XML(xmltext))
+
+
+    def drop_files(self, xml_dict):
+        """Yield a list of drop files."""
+        
+        drop_set = set()
+        drop_files = []
+        #Adding test asset, there's an execution block for every test asset
+        for execution_block in xml_dict["execution_blocks"]:
+            drop_dir = path(execution_block["name"])
+            drop_files = execution_block["image_files"]
+            for file_path in drop_files:
+                if file_path != None:
+                    #Adding image files to the top level,                         
+                    drop_file = drop_dir.joinpath("images", file_path.name)
+            
+                    drop_file = drop_file.normpath()
+                    if drop_file not in drop_set:
+                        drop_set.add(drop_file)
+                        yield (drop_file, file_path.normpath())        
+
+
+class ComponentParser(object):
+    """
+    Add information to the XML dictionary
+    """
+    def __init__(self, config):
+        self.flash_images = [path(p) for p in config.flash_images]
+        self.build_drive = config.build_drive
+        self.diamonds_build_url = config.diamonds_build_url
+        self.testrun_name = config.testrun_name
+        self.alias_name = config.alias_name
+        self.device_type = config.device_type
+        self.report_email = config.report_email
+        self.email_format = config.email_format
+        self.email_subject = config.email_subject
+
+        self.xml_dict = {}
+
+        
+    def insert_pre_data(self):
+        """
+        Creates a dictionary for the data before
+        the <execution> block starts.
+        """
+        self.xml_dict = dict(self.xml_dict, temp_directory=path(tempfile.mkdtemp()))
+        self.xml_dict = dict(self.xml_dict, diamonds_build_url=self.diamonds_build_url)
+        self.xml_dict = dict(self.xml_dict, testrun_name=self.testrun_name)
+        self.xml_dict = dict(self.xml_dict, alias_name=self.alias_name)
+        self.xml_dict = dict(self.xml_dict, device_type=self.device_type)
+
+    def create_execution_block(self, config):
+        """Parse flash images """
+        execution_block_list = []
+        test_plan = BootupTestPlan(config)
+        block_count = 1
+        self.flash_images = self.get_sorted_images(self.flash_images)
+        execution_block_list.append(test_plan.insert_execution_block(block_count, self.flash_images))
+
+
+        self.xml_dict = dict(self.xml_dict,  execution_blocks=execution_block_list)
+
+    def insert_post_data(self):
+        """
+        Creates a dictionary for the data after
+        the <execution> block ends. Or, Postaction data
+        """
+        self.xml_dict = dict(self.xml_dict, report_email=self.report_email)
+        self.xml_dict = dict(self.xml_dict, email_format=self.email_format)
+        self.xml_dict = dict(self.xml_dict, email_subject=self.email_subject)
+            
+        return self.xml_dict
+
+    def get_sorted_images(self, image_files):
+        """sort the images """
+        sorted_images = []
+        for image_file in image_files:
+            if 'core' in image_file.name:
+                sorted_images.append(image_file)
+        for image_file in image_files:
+            if 'rofs2' in image_file.name:
+                sorted_images.append(image_file)
+        for image_file in image_files:
+            if 'rofs3' in image_file.name:
+                sorted_images.append(image_file)
+        for image_file in image_files:
+            if 'udaerase' in image_file.name:
+                sorted_images.append(image_file)
+        for image_file in image_files:
+            if 'core' not in image_file.name and 'rofs2' not in image_file.name and 'rofs3' not in image_file.name and 'udaerase' not in image_file.name.lower():
+                sorted_images.append(image_file)
+        if len(sorted_images) > 0 and "rofs" in sorted_images[0]:
+            return image_files
+        return sorted_images
+
+def create_drop(config):
+    """Create a test drop."""
+    xml_dict = {}
+        
+    _logger.debug("initialize configuration dictionary")
+    drop_parser = ComponentParser(config)
+    
+    #Inserting data for test run and global through out the dictionary
+    drop_parser.insert_pre_data()
+    
+    #for every asset path there should be a
+    #separate execution block
+    drop_parser.create_execution_block(config) 
+
+    #Inserting reporting and email data (post actions)
+    xml_dict = drop_parser.insert_post_data()
+    
+
+#    print "-------------------------------------------------"
+#    keys = xml_dict
+#    for key in xml_dict.keys():
+#        if key == "execution_blocks":
+#            for exe in xml_dict[key]:
+#                print key, "->"
+#                print exe['name']
+#                print exe['image_files']
+#                for file1 in exe['image_files']:
+#                    print file1
+#
+#        else:
+#            print key, "->", xml_dict[key]
+#        
+#    print xml_dict['diamonds_build_url']
+#    print xml_dict['testrun_name']
+#    print xml_dict['email_format']
+#    print xml_dict['email_subject']
+#    
+#    print "-------------------------------------------------"
+
+
+    
+    generator = BootupTestDropGenerator()
+    _logger.info("generating drop file: %s" % config.drop_file)
+    generator.generate(xml_dict, output_file=config.drop_file, template_loc=config.template_loc)
+    
+    
+
+def to_bool(param):
+    """setting a true or false based on a param value"""
+    param = str(param).lower()
+    if "true" == param or "t" == param or "1" == param:
+        return "True"
+    else:
+        return "False"
+
+def main():
+    """Main entry point."""    
+    
+    
+    cli = OptionParser(usage="%prog [options] PATH1 [PATH2 [PATH3 ...]]")
+    cli.add_option("--ats4-enabled", help="ATS4 enabled", default="True")
+    cli.add_option("--build-drive", help="Build area root drive")
+    cli.add_option("--drop-file", help="Name for the final drop zip file", default="ATSBootupDrop.zip")
+
+    cli.add_option("--minimum-flash-images", help="Minimum amount of flash images", default=2)
+    cli.add_option("--flash-images", help="Paths to the flash image files", default="")
+
+    cli.add_option("--template-loc", help="Custom template location", default="")
+
+    cli.add_option("--file-store", help="Destination path for reports.", default="")
+    cli.add_option("--report-email", help="Email notification receivers",  default="")
+    cli.add_option("--testrun-name", help="Name of the test run", default="bootup_test")
+    cli.add_option("--alias-name", help="Name of the alias", default="alias")
+    cli.add_option("--device-type", help="Device type (e.g. 'PRODUCT')", default="unknown")    
+    cli.add_option("--diamonds-build-url", help="Diamonds build url")         
+    cli.add_option("--email-format", help="Format of an email", default="")
+    cli.add_option("--email-subject", help="Subject of an email", default="Bootup Testing")
+    cli.add_option("--verbose", help="Increase output verbosity", action="store_true", default=False)
+
+    opts, _ = cli.parse_args()
+
+    ats4_enabled = to_bool(opts.ats4_enabled)
+    
+    if ats4_enabled == "False":
+        cli.error("Bootup test executes on ATS4. Set property 'ats4.enabled'")
+    
+    if not opts.flash_images:
+        cli.error("no flash image files given")
+    if len(opts.flash_images.split(",")) < int(opts.minimum_flash_images):
+        cli.error("Not enough flash files: %i defined, %i needed" % (len(opts.flash_images.split(",")), int(opts.minimum_flash_images) ))
+
+    if opts.verbose:
+        _logger.setLevel(logging.DEBUG)
+        logging.basicConfig(level=logging.DEBUG)
+    _ = tempfile.mkdtemp()
+    config = Configuration(opts)
+    create_drop(config)
+
+if __name__ == "__main__":
+    main()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/bootup_testing_template.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
+<!-- 
+============================================================================ 
+Name        : bootup_testing_template.xml
+Part of     : Helium 
+
+Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+Contains the template for the test.xml file output. The test.xml file contains
+information on the files used to create the drop file.
+============================================================================
+-->
+
+<testrun>
+    <metadata>
+        {% if xml_dict['diamonds_build_url'] -%}
+        <meta name="diamonds-buildid">{{ xml_dict['diamonds_build_url'] }}</meta> 
+        <meta name="diamonds-testtype">Smoke</meta>
+        {% endif %}
+        <meta name="name">{{ xml_dict['testrun_name'] }}</meta> 
+    </metadata>
+    
+    <agents>
+        <agent alias="{{ xml_dict['alias_name'] }}">
+            <property name="hardware" value="{{ xml_dict["device_type"] }}"/>
+        </agent>
+    </agents>
+    
+    
+    {% for exe_block in xml_dict['execution_blocks'] -%}
+    <execution defaultAgent="{{ xml_dict['alias_name'] }}">        
+        <initialization>
+        
+            {% if exe_block['image_files'] -%}
+            <task agents="{{ xml_dict['alias_name'] }}">
+                <type>FlashTask</type>
+                <parameters>
+                {% set i = 1 %}
+                {% for img in exe_block['image_files'] -%}
+                    <parameter name="image-{{ i }}" value="{{ exe_block['name'] }}\images\{{ os.path.basename(img) }}" />
+                    {% set i = i + 1 %}
+                {% endfor -%}
+                </parameters>
+            </task>
+            {% endif %}           
+
+            <task agents="{{ xml_dict['alias_name'] }}">
+                <type>RebootTask</type>
+                <parameters/>                
+            </task>
+            <task agents="{{ xml_dict['alias_name'] }}">
+                <type>CreateDirTask</type>
+                <parameters>                
+                    <parameter value="c:\logs\testability" name="dir"/>
+                </parameters>
+            </task>
+        </initialization>
+        
+        <finalization>
+	      <task agents="{{ xml_dict['alias_name'] }}">
+	        <type>CleanupTask</type>
+	        <parameters>
+	          <parameter value="true" name="upload-files"/>
+	        </parameters>
+	      </task>
+        </finalization>
+    </execution>    
+    {% endfor -%}
+    
+    <postActions>
+    <action>
+      <type>EmailAction</type>
+      <parameters>
+        <parameter value="{{ xml_dict['email_subject'] }}" name="subject"/>
+        <parameter value="{{ xml_dict['report_email'] }}" name="to"/>
+        <parameter value="{{ xml_dict['email_format'] }}" name="format"/>
+      </parameters>
+    </action>
+    </postActions>
+    
+</testrun>
--- a/buildframework/helium/sf/python/pythoncore/lib/ats3/dropgenerator.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/dropgenerator.py	Wed Oct 13 16:31:27 2010 +0800
@@ -440,7 +440,7 @@
             if 'rofs3' in image_file.name:
                 sorted_images.append(image_file)
         for image_file in setd["image_files"]:
-            if 'core' not in image_file.name and 'rofs2' not in image_file.name and 'rofs3' not in image_file.name and 'udaerase' not in image_file.name.lower():
+            if 'core' not in image_file.name and 'rofs2' not in image_file.name and 'rofs3' not in image_file.name:
                 sorted_images.append(image_file)
         if len(sorted_images) > 0 and "rofs" in sorted_images[0]:
             return setd["image_files"]
@@ -1029,7 +1029,11 @@
             template = env.from_string(pkg_resources.resource_string(__name__, 'ats4_template.xml'))# pylint: disable=E1101
 
         xmltext = template.render(test_plan=test_plan, os=os, atspath=atspath, atsself=self).encode('ISO-8859-1')
-        return et.ElementTree(et.XML(xmltext))
+        try:
+            xml = et.ElementTree(et.XML(xmltext))
+        except ExpatError, err:
+            raise ExpatError(str(err) + xmltext)
+        return xml
         
     def get_template(self, directory, template_name):
         if directory:
--- a/buildframework/helium/sf/python/pythoncore/lib/ats3/matti/MattiDrops.py	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,254 +0,0 @@
-# -*- encoding: latin-1 -*-
-
-#============================================================================
-#Name        : MattiDrops.py
-#Part of     : Helium
-    
-#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-#All rights reserved.
-#This component and the accompanying materials are made available
-#under the terms of the License "Eclipse Public License v1.0"
-#which accompanies this distribution, and is available
-#at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-#Initial Contributors:
-#Nokia Corporation - initial contribution.
-#
-#Contributors:
-#
-#Description: Script for test drop generation and sending to execution to 
-#ATS3-system
-#===============================================================================
-
-""" create the MATTI test drop file for use on the test server """
-# pylint: disable=R0902, R0903, R0912
-
-import os
-import re
-import sys
-import string
-import zipfile
-import logging 
-from optparse import OptionParser
-from xml.etree import ElementTree as et
-from jinja2 import Environment, PackageLoader # pylint: disable=F0401
-
-# Shortcuts
-E = et.Element
-SE = et.SubElement
-
-_logger = logging.getLogger('matti')
-
-class Configuration(object):
-    """
-    ATS3 drop generation configuration.
-    """
-    
-    def __init__(self, opts):
-        """
-        Initialize from optparse configuration options.
-        """
-        self._opts = opts
-        
-        # Customize some attributes from how optparse leaves them.
-        self.build_drive = os.path.normpath(self._opts.build_drive)
-        self.file_store = os.path.normpath(self._opts.file_store)
-        self.matti_scripts = os.path.normpath(self._opts.matti_scripts)
-        self.template_location = os.path.normpath(self._opts.template_loc)
-        if self._opts.flash_images:
-            self.flash_images = self._opts.flash_images.split(',')
-        else:
-            self.flash_images = []
-        if not re.search(r'\A\s*?\Z', self._opts.sis_files):
-            self.sis_files = self._opts.sis_files.split(',')
-        else:
-            self.sis_files = None
-        self.step_list = []
-        self.filelist = []
-        self.image_list = []
-        self.sis_list = []
-        self.device_type = self._opts.device_type
-        self.device_hwid = self._opts.device_hwid
-        self.drop_file = self._opts.drop_file
-        self.minimum_flash_images = self._opts.minimum_flash_images
-        self.plan_name = self._opts.plan_name
-        self.test_timeout = self._opts.test_timeout 
-        self.diamonds_build_url = self._opts.diamonds_build_url
-        self.testrun_name = self._opts.testrun_name    
-        self.report_email = self._opts.report_email
-        self.harness = self._opts.harness
-        self.sis_enabled = False
-        if self.sis_files:
-            if len(self.sis_files) >= 1:
-                self.sis_enabled = True
-        
-    
-    def __getattr__(self, attr):
-        return getattr(self._opts, attr)
-    
-    def __str__(self):
-        dump = "Configuration:\n"
-        seen = set()
-        for key, value in vars(self).items():
-            if not key.startswith("_"):
-                dump += "\t%s = %s\n" % (key, value)
-                seen.add(key)
-        for key, value in vars(self._opts).items():
-            if key not in seen:
-                dump += "\t%s = %s\n" % (key, value)
-                seen.add(key)                
-        return dump
-            
-class MattiDrop(object):
-    """
-    ATS3 testdrop generation for MATTI tool
-    """
-    
-    def __init__(self, config=None):
-        self.configuration = config
-        self.matti_cases = {}
-        self.tmp_path = os.getcwd()
-        self.files = []
-        self.test_files = []
-    
-    def fetch_testfiles(self):
-        """Needed flash files, sis-files and testscripts from given matti scripts -folder are added to file list."""
-        tmp_case_list = []
-#        tmp_image_list = []
-        os.chdir(os.path.normpath(self.configuration.matti_scripts))
-        try:
-            for path, _, names in os.walk(os.getcwd()):
-                for name in names:
-                    if re.search(r'.*?[.]rb\Z', name):
-                        tmp_case_list.append((os.path.normpath(os.path.join(path, name)), os.path.join("ats3", "matti", "script", name)))
-            if tmp_case_list:
-                for tmp_case in tmp_case_list:
-                    self.configuration.step_list.append(dict(path=os.path.join("&#x00A7;TEST_RUN_ROOT&#x00A7;", str(tmp_case[1])), name="Test case"))
-            if self.configuration.flash_images:
-                for image in self.configuration.flash_images:
-                    tmp = string.rsplit(image, os.sep)
-                    image_name = tmp[len(tmp)-1] 
-                    self.configuration.image_list.append(os.path.join("ATS3Drop", "images", image_name))
-            if self.configuration.sis_files:
-                for sis in self.configuration.sis_files:
-                    tmp = string.rsplit(sis, os.sep)
-                    sis_name = tmp[len(tmp)-1] 
-                    self.configuration.sis_list.append(dict(path=os.path.join("ATS3Drop", "sis", sis_name), dest=sis_name))
-        except KeyError, error:
-            _logger.error("Error in file reading / fetching!")
-            sys.stderr.write(error)
-        if tmp_case_list:
-            for tmp_case in tmp_case_list:
-                self.configuration.filelist.append(tmp_case[1])
-            return tmp_case_list
-        else:
-            _logger.error("No test cases/files available!")
-            return None
-    
-    
-    def create_testxml(self):
-        """This method will use Jinja2 template engine for test.xml creation"""
-        os.chdir(self.tmp_path)
-        env = Environment(loader=PackageLoader('ats3.matti', 'template'))
-        if os.path.isfile(self.configuration.template_location):
-            template = env.from_string(open(self.configuration.template_location).read())
-            xml_file = open("test.xml", 'w')
-            xml_file.write(template.render(configuration=self.configuration))
-            xml_file.close()
-        else:
-            _logger.error("No template file found")
-                
-    def create_testdrop(self, output_file=None, file_list=None):
-        """Creates testdrop zip-file to given location."""
-        #env = Environment(loader=PackageLoader('MattiDrops', 'template'))
-        os.chdir(self.tmp_path)
-        if output_file and file_list:
-            zfile = zipfile.ZipFile(output_file, "w", zipfile.ZIP_DEFLATED)
-            try:
-                _logger.info("Adding files to testdrop:")
-                for src_file, drop_file in file_list:
-                    _logger.info("   + Adding: %s" % src_file.strip())
-                    if os.path.isfile(src_file):
-                        zfile.write(str(src_file.strip()), str(drop_file))
-                    else:
-                        _logger.error("invalid test file name supplied %s " % drop_file)
-                if self.configuration.flash_images:
-                    for image in self.configuration.flash_images:
-                        tmp = string.rsplit(image, os.sep)
-                        image_name = tmp[len(tmp)-1] 
-                        _logger.info("   + Adding: %s" % image_name)
-                        if  os.path.isfile(image):
-                            zfile.write(image, os.path.join("ATS3Drop", "images", image_name))
-                        else:
-                            _logger.error("invalid flash file name supplied %s " % image_name)
-                if self.configuration.sis_enabled:
-                    if self.configuration.sis_files:
-                        for sis in self.configuration.sis_files:
-                            tmp = string.rsplit(sis, os.sep)
-                            sis_name = tmp[len(tmp)-1] 
-                            _logger.info("   + Adding: %s" % sis_name)
-                            if os.path.isfile(sis):
-                                zfile.write(sis, os.path.join("ATS3Drop", "sis", sis_name))
-                            else:
-                                _logger.error("invalid sis file name supplied %s " % sis_name)
-                zfile.write(os.path.normpath(os.path.join(os.getcwd(),"test.xml")), "test.xml")
-            finally:
-                _logger.info("Testdrop created! %s" % output_file)            	   
-                zfile.close()
-            return zfile
-    
-def create_drop(configuration):
-    """Testdrop creation"""
-    if configuration:
-        m_drop = MattiDrop(configuration)
-        m_drop.fetch_testfiles()
-        m_drop.create_testxml()
-        return m_drop.create_testdrop(configuration.drop_file, m_drop.fetch_testfiles())
-    else:
-        _logger.error("No configuration available for test drop creation")        
-        
-def main():
-    """Main entry point."""    
-    cli = OptionParser(usage="%prog [options] TSRC1 [TSRC2 [TSRC3 ...]]")
-    cli.add_option("--build-drive", help="Build area root drive", default='X:')
-    cli.add_option("--matti-scripts", help="Path to the directory where the MATTI test scripts are saved.", default="")
-    cli.add_option("--flash-images", help="Flash image files as a list",
-                   default="")
-    cli.add_option("--report-email", help="Email notification receivers", 
-                   default="")
-    cli.add_option("--harness", help="Test harness (default: %default)",
-                   default="unknown")
-    cli.add_option("--file-store", help="Destination path for reports.",
-                   default="")
-    cli.add_option("--testrun-name", help="Name of the test run", 
-                   default="run")
-    cli.add_option("--device-type", help="Device type (e.g. 'PRODUCT')", 
-                   default="unknown")
-    cli.add_option("--device-hwid", help="Device hwid", 
-                   default="")
-    cli.add_option("--diamonds-build-url", help="Diamonds build url")
-    cli.add_option("--drop-file", help="Name for the final drop zip file",
-                   default="")
-    cli.add_option("--minimum-flash-images", help="Minimum amount of flash images",
-                   default=2)    
-    cli.add_option("--plan-name", help="Name of the test plan", 
-                   default="plan")
-    cli.add_option("--sis-files", help="Sis files as a list",
-                   default="")
-    cli.add_option("--template-loc", help="location of template file",
-                   default="..\template")
-    cli.add_option("--test-timeout", help="Test execution timeout value (default: %default)",
-                   default="60")
-    cli.add_option("--verbose", help="Increase output verbosity", 
-                   action="store_true", default=True)
-    opts, _ = cli.parse_args()
-
-    if opts.verbose:
-        _logger.setLevel(logging.DEBUG)
-        logging.basicConfig(level=logging.DEBUG)
-    config = Configuration(opts)
-    create_drop(config)
-    
-
-if __name__ == "__main__":
-    main()
--- a/buildframework/helium/sf/python/pythoncore/lib/ats3/matti/__init__.py	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-# -*- coding: latin-1 -*-
-
-#============================================================================ 
-#Name        : __init__.py 
-#Part of     : Helium 
-
-#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-#All rights reserved.
-#This component and the accompanying materials are made available
-#under the terms of the License "Eclipse Public License v1.0"
-#which accompanies this distribution, and is available
-#at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-#Initial Contributors:
-#Nokia Corporation - initial contribution.
-#
-#Contributors:
-#
-#Description:
-#===============================================================================
-""" nothing needed here"""
--- a/buildframework/helium/sf/python/pythoncore/lib/ats3/matti/template/matti_demo.xml	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- 
-============================================================================ 
-Name        : matti.demo.xml 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-Contains the template for the test.xml file output. The test.xml file contains
-information on the files used to create the drop file.
-============================================================================
---><test>
-<name>{{ configuration.testrun_name }}</name>
-    <target>
-      <device alias="{{ configuration.harness }}" rank="none">
-          <property name="HARNESS" value="{{ configuration.harness }}"/>
-          <property name="TYPE" value="{{ configuration.device_type }}"/>
-          <property name="HARDWARE" value="{{ configuration.device_type }}"/>
-      </device>
-    </target>
-    <plan passrate="100" enabled="true" name="MATTI test {{ configuration.plan_name }}" significant="false" harness="{{ configuration.harness }}">
-        <session name="session" harness="{{ configuration.harness }}" enabled="true" passrate="100">
-            {%- set i = 0 -%}
-            <set name="MATTI test set{{ i }}" harness="{{ configuration.harness }}" enabled="true" passrate="100">
-                <target>
-                <device alias="{{ configuration.harness }}" rank="master"/>
-                </target>
-                    <case name="MATTI test case" passrate="100" harness="STIF" enabled="true" significant="false"> 
-              {% if configuration.image_list -%}
-                {% for flash in configuration.image_list -%}
-                <flash target-alias="{{ configuration.harness }}" images="{{ flash }}" />
-                {% endfor -%}
-              {% endif %}
-              <step name="Create logs folder" harness="STIF" enabled="true" passrate="100" significant="false">
-                  <command>makedir</command>
-                  <params>
-                      <param dir="c:\logs\testability"/>
-                  </params>
-              </step>
-              {% if configuration.sis_list -%}
-                {% for sis in configuration.sis_list -%}
-                <step name="Copy sis" harness="STIF" enabled="true" passrate="100" significant="false">
-                    <command>install</command>
-                    <params>
-                        <param src="{{ sis['path'] }}"/>
-                        <param dst="E:\{{ sis['dest'] }}"/>
-                        <param overwrite="false"/>
-                    </params>
-                </step>
-    
-                <step name="Install SIS" harness="STIF" enabled="true" passrate="100" significant="false">
-                    <command>install-software</command>
-                    <params>
-                        <param sisPackageName="E:\{{ sis['dest'] }}"/>
-                        <param upgradeAllowed="true"/>
-                        <param optionalItemsAllowed="true"/>
-                        <param OCSP_Done="true"/>
-                        <param ignoreOCSPWarnings="true"/>
-                        <param untrustedAllowed="true"/>
-                        <param packageInfoAllowed="true"/>
-                        <param userCapGranted="true"/>
-                        <param killApp="true"/>
-                        <param overWriteAllowed="true"/>
-                        <param downloadAllowed="false"/>
-                        <param downloadUsername="user"/>
-                        <param downloadPassword="passwd"/>
-                        <param installDrive="C"/>
-                        <param upgradeData="true"/>
-                        <param timeout="40"/>                           
-                    </params>
-                </step>
-                {% endfor -%}
-              {% endif %}          
-              {% for step in configuration.step_list -%}
-              <step name="{{ step['name'] }}" harness="{{ configuration.harness }}" enabled="true" passrate="100" significant="false">
-                  <command>execute</command>
-                  <params>
-                      <param dir="C:\ruby\bin\"/>
-                      <param file="C:\ruby\bin\ruby.exe"/>
-                      <param parameters="{{ step['path'] }}"/>
-                      <param timeout="60"/>
-                      <param local="true"/>
-                      <param async="false"/>
-                      <param needs-connection="true"/>
-                  </params>
-              </step>
-              {% endfor -%}
-              </case>
-          </set>
-          {%- set i = i + 1 -%}
-        </session>
-    </plan>
-  {% if configuration.report_email %}
-  <postAction>
-        <type>SendEmailAction</type>
-        <params>
-            <param name="subject" value="ATS3 report for &#x00A7;RUN_NAME&#x00A7; &#x00A7;RUN_START_DATE&#x00A7; &#x00A7;RUN_START_TIME&#x00A7;"/>
-            <param name="type" value="ATS3_REPORT"/>
-            <param name="send-files" value="true"/>
-            <param name="to" value="{{ configuration.report_email }}"/>
-        </params>
-    </postAction>
-  {% endif %}
-  {% if configuration.filelist %}
-  <files>
-    {% for img in configuration.image_list -%}
-    <file>{{ img }}</file>
-    {% endfor -%}
-    {% for sis in configuration.sis_list -%}
-    <file>{{ sis['path'] }}</file>
-    {% endfor -%}
-    {% for file in configuration.filelist -%}
-    <file>{{ file }}</file>
-    {% endfor -%}
-  </files>
-  {% endif %}
-</test>
\ No newline at end of file
--- a/buildframework/helium/sf/python/pythoncore/lib/ats3/matti2.py	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,446 +0,0 @@
-# -*- encoding: latin-1 -*-
-
-#============================================================================ 
-#Name        : matti.py 
-#Part of     : Helium 
-
-#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-#All rights reserved.
-#This component and the accompanying materials are made available
-#under the terms of the License "Eclipse Public License v1.0"
-#which accompanies this distribution, and is available
-#at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-#Initial Contributors:
-#Nokia Corporation - initial contribution.
-#
-#Contributors:
-#
-#Description:
-#===============================================================================
-
-"""MATTI test drop generation."""
-
-# pylint: disable=R0201,R0903,R0902,W0142
-#W0142 => * and ** were used
-#R* removed during refactoring
-
-from optparse import OptionParser
-from xml.etree import ElementTree as et
-import logging
-import os
-import re
-import tempfile
-import zipfile
-import pkg_resources # pylint: disable=F0401
-from path import path # pylint: disable=F0401
-import amara
-import ntpath as atspath
-import jinja2 # pylint: disable=F0401
-import ats3.parsers as parser
-
-_logger = logging.getLogger('matti')
-
-# Shortcuts
-E = et.Element
-SE = et.SubElement
-
-class Configuration(object):
-    """
-    MATTI drop generation configuration.
-    """
-    
-    def __init__(self, opts):
-        """
-        Initialize from optparse configuration options.
-        """
-        
-        self._opts = opts
-        # Customize some attributes from how optparse leaves them.
-        self.build_drive = path(self._opts.build_drive)
-        self.file_store = path(self._opts.file_store)
-        self.flash_images = self.split_paths(self._opts.flash_images)
-        self.matti_sis_files = self.split_paths(self._opts.matti_sis_files)
-        self.test_assets = self.split_paths(self._opts.testasset_location)
-        self.template_loc = path(self._opts.template_loc)
-        
-        
-    def split_paths(self, arg, delim=","):
-        """
-        Split the string by delim, removing extra whitespace.
-        """
-        return [path(part.strip()) 
-                for part in arg.split(delim) if part.strip()]
-    
-    def __getattr__(self, attr):
-        return getattr(self._opts, attr)
-    
-    def __str__(self):
-        dump = "Configuration:\n"
-        seen = set()
-        for key, value in vars(self).items():
-            if not key.startswith("_"):
-                dump += "\t%s = %s\n" % (key, value)
-                seen.add(key)
-        for key, value in vars(self._opts).items():
-            if key not in seen:
-                dump += "\t%s = %s\n" % (key, value)
-                seen.add(key)                
-        return dump
-    
-
-class MattiTestPlan(object):
-    """
-    Tells MATTI server what to test and how.
-    
-    The MATTI test plan from which the test.xml file can be written. The test
-    plan requires TestAsset(s) to perform the tests
-    """
-
-    def __init__(self, config):
-        self.pkg_parser = parser.PkgFileParser()
-        self.file_store = config.file_store
-        self.matti_timeout = config.matti_timeout
-        self.test_profiles = config.test_profiles
-        self.sierra_enabled = to_bool(config.sierra_enabled)
-        self.sierra_parameters = config.sierra_parameters
-        self.test_profiles = config.test_profiles.strip().split(",")
-        self.build_drive = config.build_drive
-        self.matti_sis_files = ""
-        self.install_files = []
-        self.matti_task_files = None
-
-    def insert_execution_block(self, block_count=1, image_files=None, matti_sis_files=None, test_asset_path=None, matti_parameters=None):
-        """
-        Insert Matti tasks and test data files into execution block
-        """
-        self.matti_sis_files = matti_sis_files
-        temp_sis_files = [] 
-        if self.matti_sis_files != None:
-            for sis_file in self.matti_sis_files:
-                temp_sis_files.append(sis_file.split("#"))
-        
-        test_asset_path = test_asset_path
-        if image_files is None:
-            image_files = []
-
-        exe_dict = dict(name="exe%d" % block_count, asset_path=test_asset_path, image_files=image_files, matti_sis_files=temp_sis_files)
-        exe_dict = dict(exe_dict, test_timeout=self.matti_timeout)
-        exe_dict = dict(exe_dict, matti_parameters=matti_parameters)
-        exe_dict = dict(exe_dict, sierra_enabled=self.sierra_enabled.lower())
-        exe_dict = dict(exe_dict, sierra_parameters=self.sierra_parameters)
-        
-
-        self.matti_task_files = self.create_matti_task_files_list(self.sierra_enabled, test_asset_path)
-        exe_dict = dict(exe_dict, matti_task_files=self.matti_task_files)
-
-        self.install_files = self.create_install_files_list(test_asset_path)
-        exe_dict = dict(exe_dict, install_files=self.install_files)
-        return exe_dict        
-
-    def create_matti_task_files_list(self, enabler=None, asset_path=None):
-        """
-        Creates list of files needed to include in MATTI execution tasks
-        if sierra.enabled then 
-            profiles (.sip files) are included
-        else
-            all ruby (.rb) files are included
-        """
-
-        profiles = []
-        rb_files = []
-
-        #If sierra engine is enabled (set to True)
-        if self.sierra_enabled.lower() == "true":
-            profile_path = path(os.path.join(asset_path, "profile"))
-            if os.path.exists(profile_path):
-                for profile_name in self.test_profiles: 
-                    item = list(profile_path.walkfiles("%s.sip"%profile_name.lower().strip()))
-                    if len(item) > 0:
-                        #profiles.append(os.path.join(profile_path, item[0]))
-                        profiles.append(asset_path.rsplit(os.sep, 1)[1] + "/" + "profile" + "/" + item[0].rsplit(os.sep, 1)[1])
-                return profiles
-        else: #If sierra engine is not enabled (set to False)
-            if os.path.exists(asset_path):
-                #returns list(asset_path.walkfiles("*.rb")):
-                for item in list(asset_path.walkfiles("*.rb")):
-                    rb_files.append(asset_path.rsplit(os.sep, 1)[1] + "/" + item.rsplit(os.sep, 1)[1])
-                # Sorting the result, so we ensure they are always in similar order.
-                rb_files.sort()
-                return rb_files                      
-
-    def create_install_files_list(self, asset_path=None):
-        """
-        Collects all the .pkg files and extract data
-        Creates  a list of src, dst files.
-        """
-        pkg_files = []
-        if os.path.exists(asset_path):
-            pkg_files =  list(asset_path.walkfiles("*.pkg"))
-            return self.pkg_parser.get_data_files(pkg_files, self.build_drive)
-        else:
-            return None
-         
-    def __getitem__(self, key):
-        return self.__dict__[key]
-
-
-
-class MattiTestDropGenerator(object):
-    """
-    Generate test drop zip file for Matti.
-
-    Generates drop zip files file from Test Assets. The main
-    responsibility of this class is to create testdrop and test.xml
-    file and build a zip file for the MATTI drop.
-    
-    """
-
-    def __init__(self):
-        self.drop_path_root = path("MATTIDrop")
-        self.drop_path = None
-        self.defaults = {}
-
-    def generate(self, xml_dict, output_file, template_loc=None):
-        """Generate a test drop file."""
-        xml = self.generate_xml(xml_dict, template_loc)
-        return self.generate_drop(xml_dict, xml, output_file)
-
-    def generate_drop(self, xml_dict, xml, output_file):
-        """Generate test drop zip file."""
-
-        zfile = zipfile.ZipFile(output_file, "w", zipfile.ZIP_DEFLATED)
-        try:
-            for drop_file, src_file in self.drop_files(xml_dict):
-
-                _logger.info("   + Adding: %s" % src_file.strip())
-                try:
-                    zfile.write(src_file.strip(), drop_file.encode('utf-8'))
-                except OSError, expr:
-                    _logger.error(expr)
-            doc = amara.parse(et.tostring(xml.getroot()))
-            _logger.debug("XML output: %s" % doc.xml(indent=u"yes", encoding="ISO-8859-1"))
-            zfile.writestr("test.xml", doc.xml(indent="yes", encoding="ISO-8859-1"))
-        finally:
-            _logger.info("Matti testdrop created successfully!")
-            zfile.close()
-
-    def generate_xml(self, xml_dict, template_loc):
-        """ generate an XML file"""
-        template_loc = path(template_loc).normpath()
-        loader = jinja2.ChoiceLoader([jinja2.PackageLoader(__name__, 'templates')])
-        env = jinja2.Environment(loader=loader)
-        if template_loc is None or not ".xml" in template_loc.lower():
-            template = env.from_string(pkg_resources.resource_string(__name__, 'matti_template.xml'))# pylint: disable=E1101
-        else:
-            template = env.from_string(open(template_loc).read())# pylint: disable=E1101
-            
-        xmltext = template.render(xml_dict=xml_dict, os=os, atspath=atspath, atsself=self).encode('ISO-8859-1')
-        #print xmltext
-        return et.ElementTree(et.XML(xmltext))
-
-
-    def generate_testasset_zip(self, xml_dict, output_file=None):
-        """Generate TestAsset.zip for the MATTI server"""
-        filename = xml_dict["temp_directory"].joinpath(r"TestAsset.zip")
-        
-        if output_file != None:
-            filename = output_file
-            
-        for exe_block in xml_dict["execution_blocks"]:
-            testasset_location = path(exe_block["asset_path"])
-
-            zfile = zipfile.ZipFile(filename, "w", zipfile.ZIP_DEFLATED)
-            try:
-                for file_ in list(testasset_location.walkfiles()):
-                    file_mod = file_.replace(testasset_location, "")
-                    zfile.write(file_, file_mod.encode('utf-8'))
-            finally:
-                zfile.close()
-        return filename
-            
-    def drop_files(self, xml_dict):
-        """Yield a list of drop files."""
-        
-        drop_set = set()
-        drop_files = []
-
-        #Adding test asset, there's an execution block for every test asset
-        for execution_block in xml_dict["execution_blocks"]:
-            testasset_location = path(execution_block["asset_path"])
-            asset_files = list(testasset_location.walkfiles())
-
-            drop_path = path(execution_block["name"])
-            
-            drop_files = ((drop_path.parent, "images", execution_block["image_files"]),
-                          (drop_path.parent,  "sisfiles", execution_block["matti_sis_files"]),
-                          (drop_path.parent,  "mattiparameters", execution_block["matti_parameters"]),
-                          (drop_path.parent,  execution_block["name"], asset_files))
-    
-            for drop_dir, sub_dir, files in drop_files:
-                for file_path in files:
-                    if file_path != None:
-                        
-                        #Adding image files to the top level,                         
-                        #Also adding mattiparameters.xml file
-                        if  sub_dir.lower() == "images" or sub_dir.lower() == "mattiparameters":
-                            drop_file = drop_dir.joinpath(sub_dir, file_path.name)
-                        
-                        #Adding sisfiles, installation of matti sisfiles is a bit different
-                        #than normal sisfiles
-                        elif sub_dir.lower() == "sisfiles":
-                            drop_file = drop_dir.joinpath(sub_dir, path(file_path[0]).name)
-                            file_path = path(file_path[0])
-                                                    
-                        #Adding test asset files                        
-                        else:
-                            temp_file = file_path.rsplit(os.sep, 1)[0]
-                            replace_string = testasset_location.rsplit(os.sep, 1)[0]
-                            drop_file = drop_dir.joinpath(sub_dir + "\\" + temp_file.replace(replace_string, ""), file_path.name)
-                            
-                        drop_file = drop_file.normpath()
-                        if drop_file not in drop_set:
-                            drop_set.add(drop_file)
-                            yield (drop_file, file_path.normpath())        
-       
-
-class MattiComponentParser(object):
-    """
-    Add information to the XML dictionary
-    """
-    def __init__(self, config):
-        self.flash_images = [path(p) for p in config.flash_images]
-        self.matti_parameters = [path(config.matti_parameters).normpath()]
-        self.matti_sis_files = config.matti_sis_files
-        self.build_drive = config.build_drive
-        self.test_timeout = config.matti_timeout
-        self.diamonds_build_url = config.diamonds_build_url
-        self.testrun_name = config.testrun_name
-        self.alias_name = config.alias_name
-        self.device_type = config.device_type
-        self.report_email = config.report_email
-        self.email_format = config.email_format
-        self.email_subject = config.email_subject
-
-        self.xml_dict = {}
-
-        
-    def insert_pre_data(self):
-        """
-        Creates a dictionary for the data before
-        the <execution> block starts.
-        """
-        self.xml_dict = dict(self.xml_dict, temp_directory=path(tempfile.mkdtemp()))
-        self.xml_dict = dict(self.xml_dict, diamonds_build_url=self.diamonds_build_url)
-        self.xml_dict = dict(self.xml_dict, testrun_name=self.testrun_name)
-        self.xml_dict = dict(self.xml_dict, alias_name=self.alias_name)
-        self.xml_dict = dict(self.xml_dict, device_type=self.device_type)
-
-    def create_execution_block(self, config):
-        """Parse flash images and creates execution block for matti"""
-        execution_block_list = []
-        block_count = 0
-        for test_asset in config.test_assets:
-            if os.path.exists(test_asset):
-                test_plan = MattiTestPlan(config)
-                block_count += 1
-                execution_block_list.append(test_plan.insert_execution_block(block_count, self.flash_images, self.matti_sis_files, test_asset, self.matti_parameters))
-
-
-        self.xml_dict = dict(self.xml_dict,  execution_blocks=execution_block_list)
-
-    def insert_post_data(self):
-        """
-        Creates a dictionary for the data after
-        the <execution> block ends. Or, Postaction data
-        """
-        self.xml_dict = dict(self.xml_dict, report_email=self.report_email)
-        self.xml_dict = dict(self.xml_dict, email_format=self.email_format)
-        self.xml_dict = dict(self.xml_dict, email_subject=self.email_subject)
-            
-        return self.xml_dict
-    
-def create_drop(config):
-    """Create a test drop."""
-    xml_dict = {}
-        
-    _logger.debug("initialize Matti dictionary")
-    drop_parser = MattiComponentParser(config)
-    
-    #Inserting data for test run and global through out the dictionary
-    drop_parser.insert_pre_data()
-    
-    #for every asset path there should be a
-    #separate execution block
-    drop_parser.create_execution_block(config) 
-
-    #Inserting reporting and email data (post actions)
-    xml_dict = drop_parser.insert_post_data()    
-    
-    generator = MattiTestDropGenerator()
-    
-    _logger.info("generating drop file: %s" % config.drop_file)
-    generator.generate(xml_dict, output_file=config.drop_file, template_loc=config.template_loc)
-
-def to_bool(param):
-    """setting a true or false based on a param value"""
-    param = str(param).lower()
-    if "true" == param or "t" == param or "1" == param:
-        return "True"
-    else:
-        return "False"
-
-def main():
-    """Main entry point."""    
-    
-    
-    cli = OptionParser(usage="%prog [options] PATH1 [PATH2 [PATH3 ...]]")
-    cli.add_option("--ats4-enabled", help="ATS4 enabled", default="True")
-    cli.add_option("--build-drive", help="Build area root drive")
-    cli.add_option("--drop-file", help="Name for the final drop zip file", default="MATTIDrop.zip")
-
-    cli.add_option("--minimum-flash-images", help="Minimum amount of flash images", default=2)
-    cli.add_option("--flash-images", help="Paths to the flash image files", default="")
-    cli.add_option("--matti-sis-files", help="Sis files location", default="")
-
-    cli.add_option("--testasset-location", help="MATTI test assets location", default="")
-    cli.add_option("--template-loc", help="Custom template location", default="")
-    cli.add_option("--sierra-enabled", help="Enabled or disabled Sierra", default=True)
-    cli.add_option("--test-profiles", help="Test profiles e.g. bat, fute", default="")
-    cli.add_option("--matti-parameters", help="Location of xml file contains additional parameters for Matti", default="")
-
-    cli.add_option("--matti-timeout", help="Test execution timeout value (default: %default)", default="60")
-    cli.add_option("--sierra-parameters", help="Additional sierra parameters for matti task", default="")
-    cli.add_option("--file-store", help="Destination path for reports.", default="")
-    cli.add_option("--report-email", help="Email notification receivers",  default="")
-    cli.add_option("--testrun-name", help="Name of the test run", default="run")
-    cli.add_option("--alias-name", help="Name of the alias", default="sut_s60")
-    cli.add_option("--device-type", help="Device type (e.g. 'PRODUCT')", default="unknown")    
-    cli.add_option("--diamonds-build-url", help="Diamonds build url")         
-    cli.add_option("--email-format", help="Format of an email", default="")
-    cli.add_option("--email-subject", help="Subject of an email", default="Matti Testing")
-    
-
-    cli.add_option("--verbose", help="Increase output verbosity", action="store_true", default=False)
-
-    opts, _ = cli.parse_args()
-
-    ats4_enabled = to_bool(opts.ats4_enabled)
-    
-    if ats4_enabled == "False":
-        cli.error("MATTI tests execute on ATS4. Set property 'ats4.enabled'")
-    
-    if not opts.flash_images:
-        cli.error("no flash image files given")
-    if len(opts.flash_images.split(",")) < int(opts.minimum_flash_images):
-        cli.error("Not enough flash files: %i defined, %i needed" % (len(opts.flash_images.split(",")), int(opts.minimum_flash_images) ))
-
-    if opts.verbose:
-        _logger.setLevel(logging.DEBUG)
-        logging.basicConfig(level=logging.DEBUG)
-    _ = tempfile.mkdtemp()
-    config = Configuration(opts)
-    create_drop(config)
-
-if __name__ == "__main__":
-    main()
--- a/buildframework/helium/sf/python/pythoncore/lib/ats3/matti_template.xml	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
-<!-- 
-============================================================================ 
-Name        : matti_template.xml
-Part of     : Helium 
-
-Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-Contains the template for the test.xml file output. The test.xml file contains
-information on the files used to create the drop file.
-============================================================================
--->
-
-<testrun>
-    <metadata>
-        {% if xml_dict['diamonds_build_url'] -%}
-        <meta name="diamonds-buildid">{{ xml_dict['diamonds_build_url'] }}</meta> 
-        <meta name="diamonds-testtype">Smoke</meta>
-        {% endif %}
-        <meta name="name">{{ xml_dict['testrun_name'] }}</meta> 
-    </metadata>
-    
-    <agents>
-        <agent alias="{{ xml_dict['alias_name'] }}">
-            <property name="hardware" value="{{ xml_dict["device_type"] }}"/>
-        </agent>
-    </agents>
-    
-    
-    {% for exe_block in xml_dict['execution_blocks'] -%}
-    <execution defaultAgent="{{ xml_dict['alias_name'] }}">        
-        <initialization>
-        
-            {% if exe_block['image_files'] -%}
-            <task agents="{{ xml_dict['alias_name'] }}">
-                <type>FlashTask</type>
-                <parameters>
-                {% set i = 1 %}
-                {% for img in exe_block['image_files'] -%}
-                    <parameter name="image-{{ i }}" value="images\{{ os.path.basename(img) }}" />
-                    {% set i = i + 1 %}
-                {% endfor -%}
-                </parameters>
-            </task>
-            {% endif %}
-                     
-
-            {% if exe_block['install_files'] != [] -%}
-              {% for file in exe_block['install_files'] -%}            
-            <task agents="{{ xml_dict['alias_name'] }}">
-                <type>FileUploadTask</type>
-                <parameters>
-                    <parameter name="src" value="{{exe_block['name']}}{{ atspath.normpath(atspath.normpath(file[0]).replace(atspath.normpath(exe_block['asset_path']).rsplit("\\", 1)[0], "")) }}"/>
-                    <parameter name="dst" value="{{ atspath.normpath(file[1]) }}"/>
-                </parameters>
-            </task>
-              {% endfor -%}
-            {% endif %}
-            
-            {% if exe_block['matti_sis_files'] != [] -%}
-              {% for sisfile in exe_block['matti_sis_files'] -%}            
-            <task agents="{{ xml_dict['alias_name'] }}">
-                <type>FileUploadTask</type>
-                <parameters>
-                    <parameter name="src" value="sisfiles\{{ os.path.basename(sisfile[0]) }}"/>
-                    <parameter name="dst" value="{{ sisfile[2] }}"/>
-                </parameters>
-            </task>
-              {% endfor -%}
-            {% endif %}
-
-          {% for sis_file in exe_block["matti_sis_files"] -%}
-            <task agents="{{ xml_dict['alias_name'] }}">
-               <type>InstallSisTask</type>
-               <parameters>
-                    <parameter name="software-package" value="{{ sis_file[2] }}"/>
-                    <parameter name="timeout" value="{{ exe_block["test_timeout"] }}"/>
-                    <parameter name="upgrade-data " value="true"/>
-                    <parameter name="ignore-ocsp-warnings" value="true"/>
-                    <parameter name="ocsp-done" value="true"/>
-                    <parameter name="install-drive" value="{{ sis_file[2].split(":")[0] }}"/>
-                    <parameter name="overwrite-allowed" value="true"/>
-                    <parameter name="download-allowed" value="false"/>
-                    <parameter name="download-username" value="user"/>
-                    <parameter name="download-password" value="passwd"/>
-                    <parameter name="upgrade-allowed" value="true"/>
-                    <parameter name="optional-items-allowed" value="true"/>
-                    <parameter name="untrusted-allowed" value="true"/>
-                    <parameter name="package-info-allowed" value="true"/>
-                    <parameter name="user-capabilities-granted" value="true"/>
-                    <parameter name="kill-app" value="true"/>
-               </parameters>
-            </task>
-          {%- endfor -%}
-
-            <task agents="{{ xml_dict['alias_name'] }}">
-                <type>RebootTask</type>
-                <parameters/>                
-            </task>
-            <task agents="{{ xml_dict['alias_name'] }}">
-                <type>CreateDirTask</type>
-                <parameters>                
-                    <parameter value="c:\logs\testability" name="dir"/>
-                </parameters>
-            </task>
-        </initialization>
-
-        {% for task_file in exe_block["matti_task_files"] -%}
-        <task agents="{{ xml_dict['alias_name'] }}">
-           <type>MATTITask</type>
-           <parameters>
-              <parameter value="{{ exe_block["name"] }}\matti_testcases\" name="script"/>
-              <parameter value="{{ exe_block["name"] }}\matti_testcases\mattiparameters\{{ os.path.basename(exe_block["matti_parameters"][0]) }}" name="xml"/>
-              <parameter value="{{ exe_block['test_timeout'] }}" name="timeout"/>
-              <parameter value="{{ exe_block["sierra_enabled"] }}" name="sierra"/>
-              <parameter value="{{ exe_block["sierra_parameters"] }} -e %TEST_RUN_SANDBOX%/{{ exe_block["name"] }}/{{ task_file }} test_unit" name="executable-parameters"/>
-           </parameters>
-        </task>
-        {% endfor -%}
-        
-        <finalization>
-	      <task agents="{{ xml_dict['alias_name'] }}">
-	        <type>CleanupTask</type>
-	        <parameters>
-	          <parameter value="true" name="upload-files"/>
-	        </parameters>
-	      </task>
-        </finalization>
-    </execution>    
-    {% endfor -%}
-    
-    <postActions>
-    <action>
-      <type>EmailAction</type>
-      <parameters>
-        <parameter value="{{ xml_dict['email_subject'] }}" name="subject"/>
-        <parameter value="{{ xml_dict['report_email'] }}" name="to"/>
-        <parameter value="{{ xml_dict['email_format'] }}" name="format"/>
-      </parameters>
-    </action>
-    </postActions>
-    
-</testrun>
--- a/buildframework/helium/sf/python/pythoncore/lib/ats3/parsers.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/parsers.py	Wed Oct 13 16:31:27 2010 +0800
@@ -222,7 +222,7 @@
                 _logger.debug(itm)
             for itm in test_cases:
                 _logger.debug(itm)
-            _logger.error(path_to_bld + ' test_sets are empty')
+            _logger.error(path_to_bld + ' - test sets are empty')
         return test_sets
 
     
@@ -553,7 +553,7 @@
             elif harness is "STIF":
                 dll_type = "executable"
 
-        except:
+        except IOError:
             traceback.print_exc()
         else:
             returnvals = None
@@ -596,7 +596,6 @@
         self.drive = drive
         self._files = []
         self.pkg_files = []
-        self.pkg_file_path = None
         self.exclude = ""
         self.location = None
         self.bldpath = bldpath
@@ -638,7 +637,7 @@
 
         return self.pkg_files
 
-    def get_data_files(self, location = [], drive = "", exclude = ""):
+    def get_data_files(self, location=None, drive="", exclude=""):
         """
         Returns data files, source and destination of the files to be installed 
         on the phone 
@@ -656,7 +655,9 @@
         
         if pkg file is not given, the function will try to find the file(s) on the given location with extension ".pkg"
         """
-
+        if location == None:
+            location = []
+            
         self.drive = drive
         self.exclude = exclude
         self._files = []
@@ -681,15 +682,13 @@
 
         return self.read_pkg_file(self._files)
 
-    def __map_pkg_path(self, pkg_line, pkg_file_path, pkg_file):
+    def __map_pkg_path(self, pkg_line, pkg_file_path, pkg_file, test_type, libraries):
         """Parse package file to get the src and dst paths" for installing files"""
-        mmp_parser = MmpFileParser(self.bldpath)
         ext = ""
         val1 = ""
         val2 = ""
         map_src = ""
         map_dst = ""
-        self.pkg_file_path = pkg_file_path
         
         if not self.exclude == "":
             if re.search(r'%s' % self.exclude, pkg_line) is not None:
@@ -712,19 +711,20 @@
             if "$(target)" in val1.lower() and self.build_target is not None:
                 val1 = val1.lower().replace("$(target)", self.build_target)
 
-            #For MATTI PKG files in which location of the data files are unknown or can be changed
+            #For TDriver PKG files in which location of the data files are unknown or can be changed
             if "[PKG_LOC]" in val1.upper():
-                val1 = val1.replace("[PKG_LOC]", self.pkg_file_path)
+                val1 = val1.replace("[PKG_LOC]", pkg_file_path)
 
-            if os.path.exists(val1):
-                map_src = os.path.abspath(val1)
+            if os.path.isabs(os.path.normpath(val1)):
+                map_src = os.path.normpath(os.path.join(self.drive, val1))
+            elif re.search(r"\A\w", val1, 1):
+                map_src = os.path.normpath(os.path.join(pkg_file_path + os.sep, os.path.normpath(val1)))
             else:
-                if os.path.isabs(os.path.normpath(val1)):
-                    map_src = os.path.normpath(os.path.join(self.drive, val1))
-                elif re.search(r"\A\w", val1, 1):
-                    map_src = os.path.normpath(os.path.join(self.pkg_file_path + os.sep, os.path.normpath(val1)))
-                else:
-                    map_src = os.path.normpath(os.path.join(self.pkg_file_path, val1))
+                map_src = os.path.normpath(os.path.join(pkg_file_path, val1))
+
+            if os.sep == '\\': 
+                if os.path.splitunc(val1)[0].strip() != "":
+                    map_src = os.path.normpath(val1)
             map_dst = os.path.normpath(val2)
         else:
             map_src, map_dst = val1, val2
@@ -739,14 +739,6 @@
             ext = indx[1]
         else:
             _logger.warning("File extension not found for " + map_dst)
-
-        _test_type_ = ""
-        _target_filename_ = ""
-        
-        _target_filename_ = mmp_parser.get_target_filename(self.pkg_file_path)
-        _test_type_ = mmp_parser.get_dll_type(self.pkg_file_path)
-        _harness_ = mmp_parser.get_harness(self.pkg_file_path)
-        _libraries_ = mmp_parser.get_libraries(self.pkg_file_path)
         
         if ext == "ini":
             file_type = "engine_ini"
@@ -754,24 +746,24 @@
             file_type = "conf"
         elif ext == "dll":
             #adding type of dll (executable or dependent), if file type is dll
-            if _test_type_ == "dependent":
-                file_type = "data" + ":%s" % _test_type_
+            if test_type == "dependent":
+                file_type = "data" + ":%s" % test_type
             else:
-                if "qttest.lib" in _libraries_:
+                if "qttest.lib" in libraries:
                     file_type = "data" + ":qt:dependent" 
                 else:
-                    if 'symbianunittestfw.lib' in _libraries_:
+                    if 'symbianunittestfw.lib' in libraries:
                         file_type = "testmodule:sut"
                     else:
                         file_type = "testmodule"
                     
-        elif ext == 'exe' and 'rtest' in _libraries_:
+        elif ext == 'exe' and 'rtest' in libraries:
             file_type = "testmodule:rtest"
         elif ext == "exe":
-            if _test_type_ == "dependent":
-                file_type = "data" + ":%s" % _test_type_
+            if test_type == "dependent":
+                file_type = "data" + ":%s" % test_type
             else:
-                if "qttest.lib" in _libraries_:
+                if "qttest.lib" in libraries:
                     file_type = "testmodule:qt"
                 else:
                     file_type = "testmodule"
@@ -783,7 +775,7 @@
         elif ext == "pmd":
             file_type = "pmd"
         elif ext == "script":
-            if "testframeworkclient.lib" in _libraries_:
+            if "testframeworkclient.lib" in libraries:
                 file_type = "testscript:mtf:testframework.exe"
             else:
                 file_type = "testscript:testexecute.exe"
@@ -796,7 +788,7 @@
                 elif exename == 'testexecute.exe':
                     file_type = "testscript:" + exename
                 else:
-                    if "testframeworkclient.lib" in _libraries_:
+                    if "testframeworkclient.lib" in libraries:
                         file_type = "testscript:mtf:" + exename
                     else:
                         file_type = "testscript:" + exename
@@ -817,8 +809,8 @@
             pkg_files = [pkg_files]
             
         for pkg_file in pkg_files:
-            if not os.path.exists( pkg_file ):
-                _logger.error("No PKG -file in path specified")
+            if not os.path.exists(pkg_file):
+                _logger.error(pkg_file + ' not found')
                 continue
             else:
                 file1 = codecs.open(pkg_file, 'r', 'utf16')
@@ -829,11 +821,13 @@
                     lines = file1.readlines()
 
                 pkg_file_path = path((pkg_file.rsplit(os.sep, 1))[0])
+                
+                mmp_parser = MmpFileParser(self.bldpath)
+                test_type = mmp_parser.get_dll_type(pkg_file_path)
+                libraries = mmp_parser.get_libraries(pkg_file_path)
                 for line in lines:
-                    pkg_path = self.__map_pkg_path(line, pkg_file_path, os.path.basename(pkg_file))
-                    if pkg_path is None:
-                        continue
-                    else:
+                    pkg_path = self.__map_pkg_path(line, pkg_file_path, os.path.basename(pkg_file), test_type, libraries)
+                    if pkg_path:
                         pkg_paths.append(pkg_path)
 
         return pkg_paths
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/tdriver.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,454 @@
+# -*- encoding: latin-1 -*-
+
+#============================================================================ 
+#Name        : tdriver.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+
+"""TDriver test drop generation."""
+
+
+#W0142 => * and ** were used
+#R* removed during refactoring
+
+from optparse import OptionParser
+from xml.etree import ElementTree as et
+import pkg_resources
+from path import path # pylint: disable=F0401
+import logging
+import os
+import re
+import tempfile
+import zipfile
+import amara
+import ntpath as atspath
+import jinja2 # pylint: disable=F0401
+import ats3.parsers
+
+_logger = logging.getLogger('tdriver')
+
+# Shortcuts
+E = et.Element
+SE = et.SubElement
+
+class Configuration(object):
+    """
+    TDriver drop generation configuration.
+    """
+    
+    def __init__(self, opts):
+        """
+        Initialize from optparse configuration options.
+        """
+        
+        self._opts = opts
+        # Customize some attributes from how optparse leaves them.
+        self.build_drive = path(self._opts.build_drive)
+        self.file_store = path(self._opts.file_store)
+        self.flash_images = self.split_paths(self._opts.flash_images)
+        self.tdriver_sis_files = self.split_paths(self._opts.tdriver_sis_files)
+        self.test_assets = self.split_paths(self._opts.testasset_location)
+        self.template_loc = path(self._opts.template_loc)
+        
+        
+    def split_paths(self, arg, delim=","):
+        """
+        Split the string by delim, removing extra whitespace.
+        """
+        return [path(part.strip()) 
+                for part in arg.split(delim) if part.strip()]
+    
+    def __getattr__(self, attr):
+        return getattr(self._opts, attr)
+    
+    def __str__(self):
+        dump = "Configuration:\n"
+        seen = set()
+        for key, value in vars(self).items():
+            if not key.startswith("_"):
+                dump += "\t%s = %s\n" % (key, value)
+                seen.add(key)
+        for key, value in vars(self._opts).items():
+            if key not in seen:
+                dump += "\t%s = %s\n" % (key, value)
+                seen.add(key)                
+        return dump
+    
+
+class TDriverTestPlan(object):
+    """ Tells TDriver server what to test and how.
+    
+    The TDriver test plan from which the test.xml file can be written. The test
+    plan requires TestAsset(s) to perform the tests
+    """
+
+    def __init__(self, config):
+        self.pkg_parser = ats3.parsers.PkgFileParser()
+        self.file_store = config.file_store
+        self.tdriver_timeout = config.tdriver_timeout
+        self.test_profiles = config.test_profiles
+        self.tdrunner_enabled = to_bool(config.tdrunner_enabled)
+        self.tdrunner_parameters = config.tdrunner_parameters
+        self.test_profiles = config.test_profiles.strip().split(",")
+        self.build_drive = config.build_drive
+        self.tdriver_sis_files = ""
+        self.install_files = []
+        self.tdriver_task_files = None
+        self.ctc_enabled = 'False'
+        if hasattr(config, 'ctc_enabled'):
+            self.ctc_enabled = to_bool(config.ctc_enabled)
+
+    def insert_execution_block(self, block_count=1, image_files=None, tdriver_sis_files=None, test_asset_path=None, tdriver_parameters=None):
+        """
+        Insert TDriver tasks and test data files into execution block
+        """
+        self.tdriver_sis_files = tdriver_sis_files
+        temp_sis_files = [] 
+        if self.tdriver_sis_files != None:
+            for sis_file in self.tdriver_sis_files:
+                temp_sis_files.append(sis_file.split("#"))
+        
+        test_asset_path = test_asset_path
+        if image_files is None:
+            image_files = []
+
+        exe_dict = dict(name="exe%d" % block_count, asset_path=test_asset_path, image_files=image_files, tdriver_sis_files=temp_sis_files, ctc_enabled=self.ctc_enabled)
+        exe_dict = dict(exe_dict, test_timeout=self.tdriver_timeout)
+        exe_dict = dict(exe_dict, tdriver_parameters=tdriver_parameters)
+        exe_dict = dict(exe_dict, tdrunner_enabled=self.tdrunner_enabled.lower())
+        exe_dict = dict(exe_dict, tdrunner_parameters=self.tdrunner_parameters)
+        
+
+        self.tdriver_task_files = self._create_tdriver_task_files_list(test_asset_path)
+        exe_dict = dict(exe_dict, tdriver_task_files=self.tdriver_task_files)
+
+        self.install_files = self.create_install_files_list(test_asset_path)
+        exe_dict = dict(exe_dict, install_files=self.install_files)
+        return exe_dict        
+
+    def _create_tdriver_task_files_list(self, asset_path=None):
+        """
+        Creates list of files needed to include in TDriver execution tasks
+        if tdrunner.enabled then 
+            profiles (.sip files) are included
+        else
+            all ruby (.rb) files are included
+        """
+
+        profiles = []
+        rb_files = []
+
+        #If TDrunner engine is enabled (set to True)
+        if self.tdrunner_enabled.lower() == "true":
+            profile_path = path(os.path.join(asset_path, "profile"))
+            if os.path.exists(profile_path):
+                for profile_name in self.test_profiles: 
+                    item = list(profile_path.walkfiles("%s.sip"%profile_name.lower().strip()))
+                    if len(item) > 0:
+                        #profiles.append(os.path.join(profile_path, item[0]))
+                        profiles.append(asset_path.rsplit(os.sep, 1)[1] + "/" + "profile" + "/" + item[0].rsplit(os.sep, 1)[1])
+                return profiles
+            else:
+                _logger.warning(profile_path + ' not found')
+        else: #If TDruner engine is not enabled (set to False)
+            if os.path.exists(asset_path):
+                #returns list(asset_path.walkfiles("*.rb")):
+                for item in list(asset_path.walkfiles("*.rb")):
+                    rb_files.append(asset_path.rsplit(os.sep, 1)[1] + "/" + item.rsplit(os.sep, 1)[1])
+                # Sorting the result, so we ensure they are always in similar order.
+                rb_files.sort()
+                return rb_files
+            else:
+                _logger.warning(asset_path + ' not found')
+
+    def create_install_files_list(self, asset_path=None):
+        """
+        Collects all the .pkg files and extract data
+        Creates  a list of src, dst files.
+        """
+        pkg_files = []
+        if os.path.exists(asset_path):
+            pkg_files =  list(asset_path.walkfiles("*.pkg"))
+            return self.pkg_parser.get_data_files(pkg_files, self.build_drive)
+        else:
+            return None
+         
+    def __getitem__(self, key):
+        return self.__dict__[key]
+
+
+
+class TDriverTestDropGenerator(object):
+    """
+    Generate test drop zip file for TDriver.
+
+    Generates drop zip files file from Test Assets. The main
+    responsibility of this class is to create testdrop and test.xml
+    file and build a zip file for the TDriver drop.
+    
+    """
+
+    def __init__(self):
+        self.drop_path_root = path("TDriverDrop")
+        self.drop_path = None
+        self.defaults = {}
+        self.CTC_LOG_DIR = r"c:\data\ctc"
+
+    def generate(self, xml_dict, output_file, template_loc=None):
+        """Generate a test drop file."""
+        xml = self.generate_xml(xml_dict, template_loc)
+        return self.generate_drop(xml_dict, xml, output_file)
+
+    def generate_drop(self, xml_dict, xml, output_file):
+        """Generate test drop zip file."""
+
+        zfile = zipfile.ZipFile(output_file, "w", zipfile.ZIP_DEFLATED)
+        try:
+            for drop_file, src_file in self.drop_files(xml_dict):
+
+                _logger.info("   + Adding: %s" % src_file.strip())
+                try:
+                    zfile.write(src_file.strip(), drop_file.encode('utf-8'))
+                except OSError, expr:
+                    _logger.error(expr)
+            doc = amara.parse(et.tostring(xml.getroot()))
+            _logger.debug("XML output: %s" % doc.xml(indent=u"yes", encoding="ISO-8859-1"))
+            zfile.writestr("test.xml", doc.xml(indent="yes", encoding="ISO-8859-1"))
+        finally:
+            _logger.info("TDriver testdrop created successfully!")
+            zfile.close()
+
+    def generate_xml(self, xml_dict, template_loc):
+        """ generate an XML file"""
+        template_loc = path(template_loc).normpath()
+        loader = jinja2.ChoiceLoader([jinja2.PackageLoader(__package__, 'templates')])
+        env = jinja2.Environment(loader=loader)
+        if template_loc is None or not ".xml" in template_loc.lower():
+            template = env.from_string(pkg_resources.resource_string(__name__, 'tdriver_template.xml'))# pylint: disable=E1101
+        else:
+            template = env.from_string(open(template_loc).read())# pylint: disable=E1101
+            
+        xmltext = template.render(xml_dict=xml_dict, test_plan=xml_dict, os=os, atspath=atspath, atsself=self).encode('ISO-8859-1')
+        _logger.info(xmltext)
+        return et.ElementTree(et.XML(xmltext))
+
+
+    def generate_testasset_zip(self, xml_dict, output_file=None):
+        """Generate TestAsset.zip for the TDriver server"""
+        filename = xml_dict["temp_directory"].joinpath(r"TestAsset.zip")
+        
+        if output_file != None:
+            filename = output_file
+            
+        for exe_block in xml_dict["execution_blocks"]:
+            testasset_location = path(exe_block["asset_path"])
+
+            zfile = zipfile.ZipFile(filename, "w", zipfile.ZIP_DEFLATED)
+            try:
+                for file_ in list(testasset_location.walkfiles()):
+                    file_mod = file_.replace(testasset_location, "")
+                    zfile.write(file_, file_mod.encode('utf-8'))
+            finally:
+                zfile.close()
+        return filename
+            
+    def drop_files(self, xml_dict):
+        """Yield a list of drop files."""
+        
+        drop_set = set()
+        drop_files = []
+
+        #Adding test asset, there's an execution block for every test asset
+        for execution_block in xml_dict["execution_blocks"]:
+            testasset_location = path(execution_block["asset_path"])
+            asset_files = list(testasset_location.walkfiles())
+
+            drop_path = path(execution_block["name"])
+            
+            drop_files = ((drop_path.parent, "images", execution_block["image_files"]),
+                          (drop_path.parent,  "sisfiles", execution_block["tdriver_sis_files"]),
+                          (drop_path.parent,  "tdriverparameters", execution_block["tdriver_parameters"]),
+                          (drop_path.parent,  execution_block["name"], asset_files))
+    
+            for drop_dir, sub_dir, files in drop_files:
+                for file_path in files:
+                    if file_path != None:
+                        
+                        #Adding image files to the top level,                         
+                        #Also adding tdriverparameters.xml file
+                        if  sub_dir.lower() == "images" or sub_dir.lower() == "tdriverparameters":
+                            drop_file = drop_dir.joinpath(sub_dir, file_path.name)
+                        
+                        #Adding sisfiles, installation of tdriver sisfiles is a bit different
+                        #than normal sisfiles
+                        elif sub_dir.lower() == "sisfiles":
+                            drop_file = drop_dir.joinpath(sub_dir, path(file_path[0]).name)
+                            file_path = path(file_path[0])
+                                                    
+                        #Adding test asset files                        
+                        else:
+                            temp_file = file_path.rsplit(os.sep, 1)[0]
+                            replace_string = testasset_location.rsplit(os.sep, 1)[0]
+                            drop_file = drop_dir.joinpath(sub_dir + "\\" + temp_file.replace(replace_string, ""), file_path.name)
+                            
+                        drop_file = drop_file.normpath()
+                        if drop_file not in drop_set:
+                            drop_set.add(drop_file)
+                            yield (drop_file, file_path.normpath())        
+       
+
+class TDriverComponentParser(object):
+    """
+    Add information to the XML dictionary
+    """
+    def __init__(self, config):
+        self.flash_images = [path(p) for p in config.flash_images]
+        self.tdriver_parameters = [path(config.tdriver_parameters).normpath()]
+        self.tdriver_sis_files = config.tdriver_sis_files
+        self.build_drive = config.build_drive
+        self.test_timeout = config.tdriver_timeout
+        self.diamonds_build_url = config.diamonds_build_url
+        self.testrun_name = config.testrun_name
+        self.alias_name = config.alias_name
+        self.device_type = config.device_type
+        self.report_email = config.report_email
+        self.email_format = config.email_format
+        self.email_subject = config.email_subject
+        self.file_store = config.file_store
+
+        self.xml_dict = {}
+
+        
+    def insert_pre_data(self):
+        """
+        Creates a dictionary for the data before
+        the <execution> block starts.
+        """
+        self.xml_dict = dict(self.xml_dict, temp_directory=path(tempfile.mkdtemp()))
+        self.xml_dict = dict(self.xml_dict, diamonds_build_url=self.diamonds_build_url)
+        self.xml_dict = dict(self.xml_dict, testrun_name=self.testrun_name)
+        self.xml_dict = dict(self.xml_dict, alias_name=self.alias_name)
+        self.xml_dict = dict(self.xml_dict, device_type=self.device_type)
+
+    def create_execution_block(self, config):
+        """Parse flash images and creates execution block for TDriver"""
+        execution_block_list = []
+        block_count = 0
+        for test_asset in config.test_assets:
+            if os.path.exists(test_asset):
+                test_plan = TDriverTestPlan(config)
+                block_count += 1
+                execution_block_list.append(test_plan.insert_execution_block(block_count, self.flash_images, self.tdriver_sis_files, test_asset, self.tdriver_parameters))
+
+
+        self.xml_dict = dict(self.xml_dict,  execution_blocks=execution_block_list)
+
+    def insert_post_data(self):
+        """
+        Creates a dictionary for the data after
+        the <execution> block ends. Or, Postaction data
+        """
+        self.xml_dict = dict(self.xml_dict, report_email=self.report_email)
+        self.xml_dict = dict(self.xml_dict, email_format=self.email_format)
+        self.xml_dict = dict(self.xml_dict, email_subject=self.email_subject)
+        self.xml_dict = dict(self.xml_dict, report_location=self.file_store)
+            
+        return self.xml_dict
+    
+def create_drop(config):
+    """Create a test drop."""
+    xml_dict = {}
+        
+    _logger.debug("initialize TDriver dictionary")
+    drop_parser = TDriverComponentParser(config)
+    
+    #Inserting data for test run and global through out the dictionary
+    drop_parser.insert_pre_data()
+    
+    #for every asset path there should be a
+    #separate execution block
+    drop_parser.create_execution_block(config) 
+
+    #Inserting reporting and email data (post actions)
+    xml_dict = drop_parser.insert_post_data()    
+    
+    generator = TDriverTestDropGenerator()
+    
+    _logger.info("generating drop file: %s" % config.drop_file)
+    generator.generate(xml_dict, output_file=config.drop_file, template_loc=config.template_loc)
+
+def to_bool(param):
+    """setting a true or false based on a param value"""
+    param = str(param).lower()
+    if "true" == param or "t" == param or "1" == param:
+        return "True"
+    else:
+        return "False"
+
+def main():
+    """Main entry point."""    
+    
+    
+    cli = OptionParser(usage="%prog [options] PATH1 [PATH2 [PATH3 ...]]")
+    cli.add_option("--ats4-enabled", help="ATS4 enabled", default="True")
+    cli.add_option("--build-drive", help="Build area root drive")
+    cli.add_option("--drop-file", help="Name for the final drop zip file", default="TDriverDrop.zip")
+
+    cli.add_option("--minimum-flash-images", help="Minimum amount of flash images", default=2)
+    cli.add_option("--flash-images", help="Paths to the flash image files", default="")
+    cli.add_option("--tdriver-sis-files", help="Sis files location", default="")
+
+    cli.add_option("--testasset-location", help="TDriver test assets location", default="")
+    cli.add_option("--template-loc", help="Custom template location", default="")
+    cli.add_option("--tdrunner-enabled", help="Enabled or disabled TDrunner", default=True)
+    cli.add_option("--test-profiles", help="Test profiles e.g. bat, fute", default="")
+    cli.add_option("--tdriver-parameters", help="Location of xml file contains additional parameters for TDriver", default="")
+
+    cli.add_option("--tdriver-timeout", help="Test execution timeout value (default: %default)", default="60")
+    cli.add_option("--tdrunner-parameters", help="Additional TDrunner parameters for TDriver task", default="")
+    cli.add_option("--file-store", help="Destination path for reports.", default="")
+    cli.add_option("--report-email", help="Email notification receivers",  default="")
+    cli.add_option("--testrun-name", help="Name of the test run", default="run")
+    cli.add_option("--alias-name", help="Name of the alias", default="sut_s60")
+    cli.add_option("--device-type", help="Device type (e.g. 'PRODUCT')", default="unknown")    
+    cli.add_option("--diamonds-build-url", help="Diamonds build url")         
+    cli.add_option("--email-format", help="Format of an email", default="")
+    cli.add_option("--email-subject", help="Subject of an email", default="TDriver Testing")
+    cli.add_option("--ctc-enabled", help="CTC enabled", default="False")
+
+    cli.add_option("--verbose", help="Increase output verbosity", action="store_true", default=False)
+
+    opts, _ = cli.parse_args()
+
+    ats4_enabled = to_bool(opts.ats4_enabled)
+    
+    if ats4_enabled == "False":
+        cli.error("TDriver tests execute on ATS4. Set property 'ats4.enabled'")
+    
+    if not opts.flash_images:
+        cli.error("no flash image files given")
+    if len(opts.flash_images.split(",")) < int(opts.minimum_flash_images):
+        cli.error("Not enough flash files: %i defined, %i needed" % (len(opts.flash_images.split(",")), int(opts.minimum_flash_images) ))
+
+    if opts.verbose:
+        _logger.setLevel(logging.DEBUG)
+        logging.basicConfig(level=logging.DEBUG)
+    config = Configuration(opts)
+    create_drop(config)
+
+if __name__ == "__main__":
+    main()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/tdriver_template.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
+<!-- 
+============================================================================ 
+Name        : tdriver_template.xml
+Part of     : Helium 
+
+Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+Contains the template for the test.xml file output. The test.xml file contains
+information on the files used to create the drop file.
+============================================================================
+-->
+
+{% import 'ats4_macros.xml' as macros with context %}
+
+<testrun>
+    <metadata>
+        {% if xml_dict['diamonds_build_url'] -%}
+        <meta name="diamonds-buildid">{{ xml_dict['diamonds_build_url'] }}</meta> 
+        <meta name="diamonds-testtype">Smoke</meta>
+        {% endif %}
+        <meta name="name">{{ xml_dict['testrun_name'] }}</meta> 
+    </metadata>
+    
+    <agents>
+        <agent alias="{{ xml_dict['alias_name'] }}">
+            <property name="hardware" value="{{ xml_dict["device_type"] }}"/>
+        </agent>
+    </agents>
+    
+    
+    {% for exe_block in xml_dict['execution_blocks'] -%}
+    <execution defaultAgent="{{ xml_dict['alias_name'] }}">        
+        <initialization>
+        
+            {% if exe_block['image_files'] -%}
+            <task agents="{{ xml_dict['alias_name'] }}">
+                <type>FlashTask</type>
+                <parameters>
+                {% set i = 1 %}
+                {% for img in exe_block['image_files'] -%}
+                    <parameter name="image-{{ i }}" value="images\{{ os.path.basename(img) }}" />
+                    {% set i = i + 1 %}
+                {% endfor -%}
+                </parameters>
+            </task>
+            {% endif %}
+
+            {% if exe_block['install_files'] != [] -%}
+              {% for file in exe_block['install_files'] -%}            
+            <task agents="{{ xml_dict['alias_name'] }}">
+                <type>FileUploadTask</type>
+                <parameters>
+                    <parameter name="src" value="{{exe_block['name']}}{{ atspath.normpath(atspath.normpath(file[0]).replace(atspath.normpath(exe_block['asset_path']).rsplit("\\", 1)[0], "")) }}"/>
+                    <parameter name="dst" value="{{ atspath.normpath(file[1]) }}"/>
+                </parameters>
+            </task>
+              {% endfor -%}
+            {% endif %}
+            
+            {% if exe_block['tdriver_sis_files'] != [] -%}
+              {% for sisfile in exe_block['tdriver_sis_files'] -%}            
+            <task agents="{{ xml_dict['alias_name'] }}">
+                <type>FileUploadTask</type>
+                <parameters>
+                    <parameter name="src" value="sisfiles\{{ os.path.basename(sisfile[0]) }}"/>
+                    <parameter name="dst" value="{{ sisfile[2] }}"/>
+                </parameters>
+            </task>
+              {% endfor -%}
+            {% endif %}
+
+          {% for sis_file in exe_block["tdriver_sis_files"] -%}
+            <task agents="{{ xml_dict['alias_name'] }}">
+               <type>InstallSisTask</type>
+               <parameters>
+                    <parameter name="software-package" value="{{ sis_file[2] }}"/>
+                    <parameter name="timeout" value="{{ exe_block["test_timeout"] }}"/>
+                    <parameter name="upgrade-data" value="true"/>
+                    <parameter name="ignore-ocsp-warnings" value="true"/>
+                    <parameter name="ocsp-done" value="true"/>
+                    <parameter name="install-drive" value="{{ sis_file[2].split(":")[0] }}"/>
+                    <parameter name="overwrite-allowed" value="true"/>
+                    <parameter name="download-allowed" value="false"/>
+                    <parameter name="download-username" value="user"/>
+                    <parameter name="download-password" value="passwd"/>
+                    <parameter name="upgrade-allowed" value="true"/>
+                    <parameter name="optional-items-allowed" value="true"/>
+                    <parameter name="untrusted-allowed" value="true"/>
+                    <parameter name="package-info-allowed" value="true"/>
+                    <parameter name="user-capabilities-granted" value="true"/>
+                    <parameter name="kill-app" value="true"/>
+               </parameters>
+            </task>
+          {%- endfor -%}
+
+            <task agents="{{ xml_dict['alias_name'] }}">
+                <type>RebootTask</type>
+                <parameters/>                
+            </task>
+            <task agents="{{ xml_dict['alias_name'] }}">
+                <type>CreateDirTask</type>
+                <parameters>                
+                    <parameter value="c:\logs\testability" name="dir"/>
+                </parameters>
+            </task>
+            
+            {% if exe_block["ctc_enabled"] == "True" -%}
+            {{ macros.ctc_initialization(exe_block) }}
+            {%- endif %}
+        </initialization>
+
+        {% if exe_block["tdriver_task_files"] -%}
+            {% for task_file in exe_block["tdriver_task_files"] -%}
+        <task agents="{{ xml_dict['alias_name'] }}">
+           <type>TestabilityTask</type>
+           <parameters>
+              <parameter value="{{ exe_block["name"] }}\tdriver_testcases\" name="script"/>
+              <parameter value="{{ exe_block["name"] }}\tdriver_testcases\tdriverparameters\{{ os.path.basename(exe_block["tdriver_parameters"][0]) }}" name="xml"/>
+              <parameter value="{{ exe_block['test_timeout'] }}" name="timeout"/>
+              <parameter value="{{ exe_block["tdrunner_enabled"] }}" name="tdrunner"/>
+              <parameter value="{{ exe_block["tdrunner_parameters"] }} -e %TEST_RUN_SANDBOX%/{{ exe_block["name"] }}/{{ task_file }} test_unit" name="executable-parameters"/>
+           </parameters>
+        </task>
+            {% endfor -%}
+        {% endif %}
+        
+        <finalization>
+        {% if exe_block["ctc_enabled"] == "True" -%}
+        {{ macros.ctc_finalization(exe_block) }}
+        {%- endif %}
+          
+	      <task agents="{{ xml_dict['alias_name'] }}">
+	        <type>CleanupTask</type>
+	        <parameters>
+	          <parameter value="true" name="upload-files"/>
+	        </parameters>
+	      </task>
+        </finalization>
+    </execution>    
+    {% endfor -%}
+    
+    <postActions>
+        <action>
+          <type>EmailAction</type>
+          <parameters>
+            <parameter value="{{ xml_dict['email_subject'] }}" name="subject"/>
+            <parameter value="{{ xml_dict['report_email'] }}" name="to"/>
+            <parameter value="{{ xml_dict['email_format'] }}" name="format"/>
+          </parameters>
+        </action>
+        {% if xml_dict['report_location'] -%}
+        <action>
+          <type>FileStoreAction</type>
+          <parameters>
+            <parameter value="{{ xml_dict['report_location'] }}\%START_DATE%_%START_TIME%_%SERVER_TOKEN%" name="dst"/>
+            <parameter value="true" name="overwrite"/>
+          </parameters>
+        </action>
+        {% endif %}
+        {% if xml_dict['diamonds_build_url'] -%}
+        <action>
+            <type>DiamondsAction</type>
+            {% if xml_dict['execution_blocks'] != [] and xml_dict['execution_blocks'][0]["ctc_enabled"] == "True" -%}
+            <parameters>
+                <parameter value="true" name="send-ctc-data" /> 
+            </parameters>
+            {%- endif %}
+        </action>
+        {%- endif %}
+    </postActions>
+    
+</testrun>
--- a/buildframework/helium/sf/python/pythoncore/lib/ats3/templates/ats4_macros.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/templates/ats4_macros.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -19,7 +19,7 @@
 
 ============================================================================
 -->
-{% macro ctc_initialization() -%}
+{% macro ctc_initialization(test_plan) -%}
             <task>
                 <type>CreateDirTask</type>
                 <parameters>
@@ -35,7 +35,7 @@
             </task>
 {%- endmacro %}
 
-{% macro ctc_finalization(setd) -%}
+{% macro ctc_finalization(test_plan) -%}
             <task>
                 <type>NonTestExecuteTask</type>
                 <parameters>
@@ -68,6 +68,7 @@
 {% macro generate_runsteps_stif(setd) -%}
             {% set ini_file = atsself.stif_init_file(setd['src_dst']) %}
             {% if ini_file -%}
+            {% set ini_file_module_name = atsself.stifmodulename(ini_file[0])  %}
         {% if test_plan['hti'] == 'True' -%}
         <task>
             <type>StifRunCasesTask</type>
@@ -90,7 +91,8 @@
             </parameters>
         </task>
         {%- endif %}
-            {% else -%}
+        {%- endif %}
+            
                 {% for file in setd['src_dst'] -%}
                     {% if setd["test_harness"] == "STIF" or setd["test_harness"] == "STIFUNIT" -%}
                         {% if file[2] == "conf" and ".dll" not in file[1].lower() -%}
@@ -98,10 +100,17 @@
         <task>
             <type>StifRunCasesTask</type>
             <parameters>
+                {% if ini_file_module_name.upper() == 'TEFTESTMODULE' -%}
+                <parameter name="module" value="{{ ini_file_module_name }}"/>
+                {% else -%}
                 <parameter name="module" value="TESTSCRIPTER"/>
+                {%- endif %}
                 <parameter name="filter" value="*"/>
                 <parameter name="timeout" value="{{ test_plan["test_timeout"] }}"/>
                 <parameter name="testcase-file" value="{{ file[1] }}"/>
+                {% if ini_file_module_name.upper() == 'TEFTESTMODULE' and test_plan['ats_stf_enabled'].lower() == "true" -%}                
+                <parameter name="result-file" value="{{ atsself.AtsInterface_LOG_DIR }}\{{ ini_file_module_name }}.xml" />
+                {%- endif %}
             </parameters>
         </task>
         {% else -%}
@@ -110,8 +119,13 @@
             <parameters>
                 <parameter name="timeout" value="{{ test_plan["test_timeout"] }}"/>
                 <parameter name="file" value="atsinterface.exe" />
+                {% if ini_file_module_name.upper() == 'TEFTESTMODULE' -%}
+                <parameter name="parameters" value="-testmodule {{ ini_file_module_name }}" />
+                <parameter name="result-file" value="{{ atsself.AtsInterface_LOG_DIR }}\{{ ini_file_module_name }}.xml" />
+                {% else -%}
                 <parameter name="parameters" value="-testmodule TESTSCRIPTER" />
                 <parameter name="result-file" value="{{ atsself.AtsInterface_LOG_DIR }}\TESTSCRIPTER.xml" />
+                {%- endif %}
                 <parameter name="result-download-retry-count" value="1" />
                 <parameter name="result-download-reboot-retry-count" value="1" />
             </parameters>
@@ -123,7 +137,7 @@
         <task>
             <type>StifRunCasesTask</type>
             <parameters>
-                <parameter name="module" value="{{ os.path.basename(file[1]) }}"/>
+                <parameter name="module" value="{{ atspath.basename(file[1]) }}"/>
                 <parameter name="filter" value="*"/>
                 <parameter name="timeout" value="{{ test_plan["test_timeout"] }}"/>
             </parameters>
@@ -144,11 +158,13 @@
                         {%- endif %}
                     {%- endif %}
                 {%- endfor %}
-            {%- endif %}
 {%- endmacro %}
 
 {% macro generate_runsteps_stif_single_set(setd) -%}
             {% if setd["engine_ini_file"] != None -%}
+
+            {% set ini_file_module_name = atsself.stifmodulename(setd["engine_ini_file"])  %}
+            
         {% if test_plan['hti'] == 'True' -%}
         <task>
             <type>StifRunCasesTask</type>
@@ -171,16 +187,24 @@
             </parameters>
         </task>
         {%- endif %}
-            {% elif setd["config_files"] != [] -%}
+        {%- endif %}
+            {% if setd["config_files"] != [] -%}
                  {% for config_file in setd["config_files"] -%}
         {% if test_plan['hti'] == 'True' -%}
         <task>
             <type>StifRunCasesTask</type>
             <parameters>
+                {% if ini_file_module_name.upper() == 'TEFTESTMODULE' -%}
+                <parameter name="module" value="{{ ini_file_module_name }}"/>
+                {% else -%}
                 <parameter name="module" value="TESTSCRIPTER"/>
+                {%- endif %}
                 <parameter name="filter" value="*"/>
                 <parameter name="timeout" value="{{ test_plan["test_timeout"] }}"/>
                 <parameter name="testcase-file" value="e:\testing\conf\{{ os.path.basename(config_file) }}"/>
+                {% if ini_file_module_name.upper() == 'TEFTESTMODULE' and test_plan['ats_stf_enabled'].lower() == "true" -%}
+                <parameter name="result-file" value="e:\testing\conf\{{ os.path.basename(config_file) }}.xml" />
+                {%- endif %}
             </parameters>
         </task>
         {% else -%}
@@ -223,4 +247,4 @@
         {%- endif %}
                 {%- endfor %}
             {%- endif %}
-{%- endmacro %}
\ No newline at end of file
+{%- endmacro %}
--- a/buildframework/helium/sf/python/pythoncore/lib/atsant.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/atsant.py	Wed Oct 13 16:31:27 2010 +0800
@@ -56,7 +56,7 @@
             return None
         if noncust:
             return noncust
-        raise Exception('iconfig not found in ' + self.imagesdir)
+        raise IOError('iconfig not found in ' + self.imagesdir)
     
     def getimage(self, name):
         """get image"""
@@ -64,7 +64,7 @@
             for fname in files:
                 if fname.lower() == name.lower():
                     return os.path.join(root, fname)
-        raise Exception(name + ' not found in ' + self.imagesdir)
+        raise IOError(name + ' not found in ' + self.imagesdir)
     
     def findimages(self): 
         """find images"""
@@ -82,10 +82,10 @@
                 if os.path.exists(image):
                     output = output + image + ','
                 else:
-                    raise Exception(image + ' not found')
+                    raise IOError(image + ' not found')
             else:
                 if imagetype == 'core':
-                    raise Exception(imagetypename + '_FLASH not found in iconfig.xml in ' + self.imagesdir)
+                    raise IOError(imagetypename + '_FLASH not found in iconfig.xml in ' + self.imagesdir)
                 print imagetypename + '_FLASH not found in iconfig.xml'
         return output
 
@@ -120,7 +120,10 @@
                             for unit in component.unit:
                                 if group not in modules:
                                     modules[group] = []
-                                modules[group].append(builddrive + os.sep + unit.bldFile)
+                                if os.sep == '\\':
+                                    modules[group].append(builddrive + os.sep + unit.bldFile)
+                                else:
+                                    modules[group].append(unit.bldFile)
     else:
         sdf = sysdef.api.SystemDefinition(canonicalsysdeffile)
         
--- a/buildframework/helium/sf/python/pythoncore/lib/build/model.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/build/model.py	Wed Oct 13 16:31:27 2010 +0800
@@ -199,13 +199,7 @@
         """ Initialisation. """
         self._ccm_project = ccm_project
         self._baselines = {}
-        #TODO : could querying release attribute return the ccm object? Or add a release attribute to Project
-        # class
-        release = self._ccm_project['release']
-        _logger.debug("Project release: '%s'" % release)
-        self._ccm_release = None
-        if release != '':
-            self._ccm_project.session.create(release)
+        _logger.debug("Project release: '%s'" % self._ccm_project.release)
 
         # capturing the frozen baseline.
         _logger.debug('Capture baselines')
@@ -309,8 +303,8 @@
         
     def _getsupplier(self):
         """get supplier"""
-        if self._ccm_release != None:
-            component = self._ccm_release.component
+        if self._ccm_project.release != None:
+            component = self._ccm_project.release.component
             comparisons = {'MC': '^mc',
                            'S60': 'S60',
                            'SPP/NCP': '^spp_config|spp_psw|spp_tools|ncp_sw$',
@@ -458,12 +452,12 @@
                             for name in folder.name:
                                 folder_name = unicode(name)
                                 _logger.debug('folder_name: %s' % folder_name)
-                            if not old_folders.has_key(unicode(folder_name)):
-                                old_folders[unicode(folder_name)] = {}
-                            if hasattr(name, 'xml_attributes'):
-                                for attr_name, _ in sorted(name.xml_attributes.iteritems()):
-                                    _logger.debug('attr_name: %s' % attr_name)
-                                    old_folders[unicode(folder_name)][unicode(attr_name)] = unicode(getattr(name, attr_name))
+                                if not old_folders.has_key(unicode(folder_name)):
+                                    old_folders[unicode(folder_name)] = {}
+                                if hasattr(name, 'xml_attributes'):
+                                    for attr_name, _ in sorted(name.xml_attributes.iteritems()):
+                                        _logger.debug('attr_name: %s' % attr_name)
+                                        old_folders[unicode(folder_name)][unicode(attr_name)] = unicode(getattr(name, attr_name))
         for task in recursive_node_scan(bom_log.bom.content, u'task'):
             _logger.debug('task: %s' % task)
             _logger.debug('task: %s' % task.id)
@@ -629,6 +623,14 @@
                     fix_node = doc.xml_create_element(u'fix', content=(unicode(task)), attributes = {u'type': unicode(fix.__class__.__name__)})
                     project_node.xml_append(fix_node)
 
+        self.write_icd_icfs(doc)
+        self.write_release_info(doc)
+            
+        out = open(path, 'w')
+        doc.xml(out, indent='yes')
+        out.close()
+        
+    def write_icd_icfs(self, doc):
         if self._bom.icd_icfs != []:
             # Add ICD info to BOM
             doc.bom.content.xml_append(doc.xml_create_element(u'input'))
@@ -642,12 +644,13 @@
             doc.bom.content.input.xml_append(doc.xml_create_element(u'version', content=(unicode(empty_bom_str))))
     
             doc.bom.content.input.xml_append(doc.xml_create_element(u'icds'))
-
-        # pylint: disable=R0914
-        for i, icd in enumerate(self._bom.icd_icfs):
-            doc.bom.content.input.icds.xml_append(doc.xml_create_element(u'icd'))
-            doc.bom.content.input.icds.icd[i].xml_append(doc.xml_create_element(u'name', content=(unicode(icd))))
-        #If currentRelease.xml exists then send s60 <input> tag to diamonds
+            
+            for i, icd in enumerate(self._bom.icd_icfs):
+                doc.bom.content.input.icds.xml_append(doc.xml_create_element(u'icd'))
+                doc.bom.content.input.icds.icd[i].xml_append(doc.xml_create_element(u'name', content=(unicode(icd))))
+            
+    def write_release_info(self, doc):
+        # If currentRelease.xml exists then send s60 <input> tag to diamonds
         current_release_xml_path = self._bom.config['currentRelease.xml']
         # data from the metadata will go first as they must be safer than the one
         # given by the user 
@@ -730,12 +733,6 @@
             s60_input_source.xml_append(doc.xml_create_element(u'type', content=(unicode("unknown"))))
             s60_input_node.xml_append(s60_input_source)
             doc.bom.content.xml_append(s60_input_node)
-            
-            
-        out = open(path, 'w')
-        doc.xml(out, indent='yes')
-        out.close()
-        
     def parse_status_log(self, log):
         """parse status log"""
         _log_array = log.split('\r')
--- a/buildframework/helium/sf/python/pythoncore/lib/ccm/__init__.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/ccm/__init__.py	Wed Oct 13 16:31:27 2010 +0800
@@ -202,10 +202,11 @@
             if mresult != None:
                 project = self._session.create(mresult.group(1))
                 self._output[project] = []
-            mresult = re.match(r"^(.*)\s+(\w+#\d+)\s+(.+)$", line)
+            mresult = re.match(r"^(.*?)\s+(\w+#\d+(?:,\s+\w+#\d+)*)\s+(.+)$", line)
             if mresult != None and project != None:
-                self._output[project].append({'object': self._session.create(mresult.group(1)),
-                                              'task': self._session.create("Task %s" % mresult.group(2)),
+                for task in mresult.group(2).split(','):
+                    self._output[project].append({'object': self._session.create(mresult.group(1)),
+                                              'task': self._session.create("Task %s" % task),
                                               'comment': mresult.group(3)})
             mresult = re.match(r"^(\w+#\d+)\s+(.+)$", line)
             if mresult != None and project != None:
@@ -340,7 +341,6 @@
         match_warning = re.compile(r"^Warning:(.*)")
         match_failed = re.compile(r"(Update failed)")
         
-        # TODO: cleanup the parsing to do that in a more efficient way.
         for line in output.splitlines():
             _logger.info(line)
             res = match_object_update.match(line)
@@ -723,9 +723,6 @@
         
     def __repr__(self):
         return self.__str__()
-    
-    def __del__(self):
-        self.close()
 
     def purposes(self, role=None):
         """ Returns available purposes. """
@@ -922,7 +919,7 @@
             
         try:
             for session in self._free_sessions:
-                session.role = session._set_role(role)
+                session.role = role
         finally:                
             self._lock_pool = False
             self._pool_lock.notifyAll()
@@ -1349,11 +1346,13 @@
         
     def _getrelease(self):
         """ Get the release of the current object. Returns a Releasedef object. """
-        self._release = Releasedef(self._session, self['release'])
+        if self._release == None and (self['release'] != None and self['release'] != ''):
+            self._release = Releasedef(self._session, self['release'])
         return self._release
 
     def _setrelease(self, release):
         """ Set the release of the current object. """
+        self._release = release
         self['release'] = release['displayname']
     
     def refresh(self):
@@ -1381,7 +1380,7 @@
         if result.status != None and result.status != 0:
             raise CCMException("Error setting basline of project '%s'\n%s" % (self.objectname, result.output))
 
-    def set_update_method(self, name, recurse = False):
+    def set_update_method(self, name, recurse=False):
         """ Set the update method for the project (and subproject if recurse is True). """
         assert name != None, "name must not be None."
         assert len(name) > 0, "name must not be an empty string."
@@ -1392,7 +1391,7 @@
         if result.status != None and result.status != 0:
             raise CCMException("Error setting reconfigure properties to %s for project '%s'\nStatus: %s\n%s" % (name, self.objectname, result.status, result.output))
    
-    def apply_update_properties(self, baseline = True, tasks_and_folders = True, recurse=True):
+    def apply_update_properties(self, baseline=True, tasks_and_folders=True, recurse=True):
         """ Apply update properties to subprojects. """
         args = ""
         if not baseline:
@@ -1423,7 +1422,7 @@
                 return result.output
         raise CCMException("Error creation snapshot of %s,\n%s" % (self.objectname, result.output), result)
     
-    def checkout(self, release, version=None, purpose=None, subprojects=True):
+    def checkout(self, release, version=None, purpose=None, subprojects=True, path=None):
         """ Create a checkout of this project. 
         
         This will only checkout the project in Synergy. It does not create a work area.
@@ -1448,6 +1447,9 @@
             self._session.role = get_role_for_purpose(self._session, purpose)
             
             args += " -purpose \"%s\"" % purpose
+        if path:
+            args += " -path \"%s\"" % path
+            
         if subprojects:
             args += " -subprojects"
         result = self._session.execute("checkout -project \"%s\" -release \"%s\" -no_wa %s" \
@@ -1456,47 +1458,7 @@
             self._session.role = role
         if result.project == None:
             raise CCMException("Error checking out project %s,\n%s" % (self.objectname, result.output), result)
-        return result
-    
-    def create_release_tag(self, release, new_tag):
-        """ creates new release tag """
-        role = self._session.role
-        
-        if role is None:
-            self._session.role = "developer"
-            role = self._session.role
-
-        args = "release -create %s -from %s -bl %s -active -allow_parallel_check_out" % (new_tag, release, release)
-        self._session.role = "build_mgr"
-
-        result = self._session.execute(" %s" \
-                                  % (args), Result(self._session))
-        self._session.role = role
-
-        return result.output
-
-    def delete_release_tag(self, release, new_tag):
-        """ deletes new release tag """
-
-        role = self._session.role
-        if role is None:
-            self._session.role = "developer"
-            role = self._session.role
-        
-
-        self._session.role = "build_mgr"
-
-        result = self._session.execute("pg -l -r %s -u" \
-                                  % (new_tag), Result(self._session))
-        result = self._session.execute("pg -d \"%s\" -m" \
-                                  % (result.output), Result(self._session))
-        result = self._session.execute("release -d %s -force" \
-                                  % (new_tag), Result(self._session))
-
-        self._session.role = role
-
-        return result.output
-        
+        return result        
         
     def work_area(self, maintain, recursive=None, relative=None, path=None, pst=None, wat=False):
         """ Configure the work area. This allow to enable it or disable it, set the path, recursion... """
@@ -1629,6 +1591,44 @@
         return self.name
             
     component = property(_getcomponent)
+    
+    def create_tag(self, new_tag):
+        """ creates new release tag """
+        role = self._session.role
+        
+        if role is None:
+            self._session.role = "developer"
+            role = self._session.role
+
+        args = "release -create %s -from %s -bl %s -active -allow_parallel_check_out" % (new_tag, self.objectname, self.objectname)
+        self._session.role = "build_mgr"
+
+        result = self._session.execute(" %s" \
+                                  % (args), Result(self._session))
+        self._session.role = role
+
+        return result.output
+
+    def delete_tag(self, new_tag):
+        """ deletes new release tag """
+
+        role = self._session.role
+        if role is None:
+            self._session.role = "developer"
+            role = self._session.role
+        
+        self._session.role = "build_mgr"
+
+        result = self._session.execute("pg -l -r %s -u" \
+                                  % (new_tag), Result(self._session))
+        result = self._session.execute("pg -d \"%s\" -m" \
+                                  % (result.output), Result(self._session))
+        result = self._session.execute("release -d \"%s\" -force" \
+                                  % (new_tag), Result(self._session))
+
+        self._session.role = role
+
+        return result.output
 
 
 class Folder(CCMObject):
@@ -1751,7 +1751,6 @@
     objects = property(_getobjects)
     
     def __unicode__(self):
-        # TODO: use optimised query that makes only 1 ccm query with suitable format
         if self.__unicode_str_text == None:
             self.__unicode_str_text = u'%s: %s' % (self['displayname'], self['task_synopsis'])
         return self.__unicode_str_text
@@ -1771,6 +1770,7 @@
 
     release = property(get_release_tag, set_release_tag)
 
+
 class UpdateTemplate:
     """ Allow to access Update Template property using Release and Purpose. """
     def __init__(self, releasedef, purpose):
--- a/buildframework/helium/sf/python/pythoncore/lib/ccm/extra.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/ccm/extra.py	Wed Oct 13 16:31:27 2010 +0800
@@ -105,7 +105,7 @@
         _logger.error( "Exception occurred in request #%s: %s" % (request.requestID, exc_info[1]))
         exceptions.append(exc_info[1])
 
-    def handle_result(result):
+    def handle_result(_, result):
         """ append the result"""
         results.append(result)
    
@@ -133,7 +133,7 @@
         _logger.error( "Exception occured in request #%s: %s\n%s" % (request.requestID, exc_info[1], traceback.format_exception(exc_info[0], exc_info[1], exc_info[2])))
         exceptions.append(exc_info[1])
     
-    def handle_result(request, result):
+    def handle_result(_, result):
         """append  the result"""
         results.append(result)
 
--- a/buildframework/helium/sf/python/pythoncore/lib/configuration.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/configuration.py	Wed Oct 13 16:31:27 2010 +0800
@@ -558,10 +558,7 @@
         A ConfigurationSet represents a number of Configuration objects
         that all may need to be processed.
         """
-        try:
-            dom = xml.dom.minidom.parse(self.inputfile)
-        except Exception, exc:
-            raise Exception("XML file '%s' cannot be parsed properly: %s" % (self.inputfile, exc))
+        dom = xml.dom.minidom.parse(self.inputfile)
 
         # The root element is typically <build> but can be anything
         self.rootNode = dom.documentElement
--- a/buildframework/helium/sf/python/pythoncore/lib/convertpkg.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/convertpkg.py	Wed Oct 13 16:31:27 2010 +0800
@@ -64,6 +64,8 @@
             submmpfile.write('//rtest\n')
         elif testtype == 'stif':
             submmpfile.write('LIBRARY stiftestinterface.lib\n')
+        elif testtype == 'sut':
+            submmpfile.write('LIBRARY symbianunittestfw.lib\n')
         else:
             raise Exception('Test type unknown: ' + testtype)
         submmpfile.close()
--- a/buildframework/helium/sf/python/pythoncore/lib/dependancygraph.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/dependancygraph.py	Wed Oct 13 16:31:27 2010 +0800
@@ -139,17 +139,18 @@
                     
                 if os.path.isfile(filename) and fname.endswith('.egg'):
                     eggfile = zipfile.ZipFile(filename, 'r', zipfile.ZIP_DEFLATED)
-                    
-                    data = eggfile.read('EGG-INFO/PKG-INFO')
-                    
-                    library = readPkgInfo(data.split('\n'))
-                    
-                    if 'EGG-INFO/requires.txt' in eggfile.namelist():
-                        requiresdata = eggfile.read('EGG-INFO/requires.txt')
-                        readRequiresFile(requiresdata.split('\n'), library)
+                    if 'EGG-INFO/PKG-INFO' in eggfile.namelist():
+                        data = eggfile.read('EGG-INFO/PKG-INFO')
+                        
+                        library = readPkgInfo(data.split('\n'))
                         
-                    libraries.addLibrary(notinsubcon, library)
-                    
+                        if 'EGG-INFO/requires.txt' in eggfile.namelist():
+                            requiresdata = eggfile.read('EGG-INFO/requires.txt')
+                            readRequiresFile(requiresdata.split('\n'), library)
+                            
+                        libraries.addLibrary(notinsubcon, library)
+                    else:
+                        print 'EGG-INFO/PKG-INFO not in ' + filename
                     eggfile.close()
 
 def readRequiresFile(data, library):
@@ -326,8 +327,9 @@
             if macro:
                 output.append("\"%s\" [fontname=\"Times-Italic\"];" % str(targ.name))
             output.append('subgraph \"cluster%s\" {label = \"%s\"; \"%s\"}\n' % (str(proj.name), str(proj.name), str(targ.name)))
-            splt = str(signal).split(',')
+            splt = str(signal).split('(')
             if len(splt) > 1:
+                splt[1] = splt[1].replace(')', '')
                 if splt[1] == 'now':
                     color = 'red'
                 elif splt[1] == 'defer':
--- a/buildframework/helium/sf/python/pythoncore/lib/fileutils.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/fileutils.py	Wed Oct 13 16:31:27 2010 +0800
@@ -310,7 +310,7 @@
     except OSError:
         if os.path.isdir(src):
             if destinsrc(src, dst):
-                raise Exception, "Cannot move a directory '%s' into itself '%s'." % (src, dst)
+                raise OSError, "Cannot move a directory '%s' into itself '%s'." % (src, dst)
             shutil.copytree(src, dst, symlinks=True)
             rmtree(src)
         else:
@@ -376,10 +376,15 @@
             except os.error:
                 continue
             # Check if the path is a regular file
-            if stat.S_ISREG(status[stat.ST_MODE]):
-                mode = stat.S_IMODE(status[stat.ST_MODE])
-                if mode & 0111:
+            if os.sep == '\\':
+                if os.path.isfile(filename):
                     return os.path.normpath(filename)
+            else:
+                # On Unix also check the executable rigths
+                if stat.S_ISREG(status[stat.ST_MODE]):
+                    mode = stat.S_IMODE(status[stat.ST_MODE])
+                    if mode & 0111:
+                        return os.path.normpath(filename)
     return None
 
 
@@ -407,8 +412,8 @@
 def load_policy_content(filename):
     """ Testing policy content loading. """
     data = ''
+    fileh = codecs.open(filename, 'r', 'ascii')
     try:
-        fileh = codecs.open(filename, 'r', 'ascii')
         data = fileh.read()
     except ValueError:
         raise IOError("Error loading '%s' as an ASCII file." % filename)
@@ -607,7 +612,7 @@
         if drive_type == win32con.DRIVE_REMOTE:
             win32wnet.WNetCancelConnection2(drive, win32netcon.CONNECT_UPDATE_PROFILE, 1)
         else:
-            raise Exception("%s couldn't be umount." % drive)
+            raise OSError("%s couldn't be umount." % drive)
 
 else:
     def rmdir(path):
@@ -653,14 +658,14 @@
         p_subst = subprocess.Popen("subst %s %s" % (drive, path),  shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
         errmsg = p_subst.communicate()[0]
         if p_subst.returncode != 0:
-            raise Exception("Error substing '%s' under '%s': %s" % (path, drive, errmsg))
+            raise OSError("Error substing '%s' under '%s': %s" % (path, drive, errmsg))
     
     def unsubst(drive):
         """ Unsubsting the drive. """
         p_subst = subprocess.Popen("subst /D %s" % (drive), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
         errmsg = p_subst.communicate()[0]
         if p_subst.returncode != 0:
-            raise Exception("Error unsubsting '%s': %s" % (drive, errmsg))
+            raise OSError("Error unsubsting '%s': %s" % (drive, errmsg))
     
     def getSubstedDrives():
         """get substituted drive"""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/lib/fileutils.py.orig	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,698 @@
+#============================================================================ 
+#Name        : fileutils.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+
+"""
+File manipulation related functionalities:
+ * Filescanner
+ * rmtree (fixed version)
+ * move (fixed version)
+"""
+import codecs
+import locale
+import logging
+import os
+import re
+import sys
+import shutil
+import hashlib
+import subprocess
+import string
+
+import pathaddition.match
+import stat
+
+if os.name == 'nt':
+    import win32api
+
+LOGGER = logging.getLogger('fileutils')
+LOGGER_LOCK = logging.getLogger('fileutils.lock')
+#LOGGER.addHandler(logging.FileHandler('default.log'))
+#logging.basicConfig(level=logging.DEBUG)
+#LOGGER.setLevel(logging.DEBUG)
+
+class AbstractScanner(object):
+    """ This class implements all the required infrastructure for filescanning. """
+
+    def __init__(self):
+        """ Initialization. """
+        self.includes = []
+        self.excludes = []
+        self.includes_files = []
+        self.excludes_files = []
+        self.selectors = []
+        self.filetypes = []
+
+    def add_include(self, include):
+        """ Adds an include path to the scanner. """
+        if include.endswith('/') or include.endswith('\\'):
+            include = include + '**'
+
+        self.includes.append(include)
+
+    def add_exclude(self, exclude):
+        """ Adds an exclude path to the scanner. """
+        if exclude.endswith('/') or exclude.endswith('\\'):
+            exclude = exclude + '**'
+
+        self.excludes.append(exclude)
+        
+    def add_exclude_file(self, exclude):
+        """ Adds an exclude file to the scanner. """
+        self.excludes_files.append(exclude)
+    
+    def add_selector(self, selector):
+        """ Add selector to the scanner. """
+        self.selectors.append(selector)
+        
+    def add_filetype(self, filetype):
+        """ Adds a filetype selection to the scanner. """
+        self.filetypes.append(filetype)
+
+    def is_included(self, path):
+        """ Returns if path is included by the scanner. """
+        LOGGER.debug("is_included: path = " + path)
+        if path.replace('\\', '/') in self.includes_files or path in self.includes_files:
+            return True
+        for inc in self.includes:
+            if self.match(path, inc):
+                LOGGER.debug("Included: " + path + " by " + inc)
+                return True
+        return False
+
+    def is_excluded(self, path):
+        """ Returns if path is excluded by the scanner. """
+        LOGGER.debug("is_excluded: path = " + path)
+        if path.replace('\\', '/') in self.excludes_files or path in self.excludes_files:
+            return True
+        for ex in self.excludes:
+            if self.match(path, ex):
+                LOGGER.debug("Excluded: " + path + " by " + ex)
+                return True
+        return False
+    
+    def is_selected(self, path):
+        """ Returns if path is selected by all selectors in the scanner. """
+        LOGGER.debug("is_selected: path = " + path)
+        for selector in self.selectors:
+            if not selector.is_selected(path):
+                return False
+        LOGGER.debug("Selected: " + path)
+        return True
+
+    def is_filetype(self, path):
+        """ Test if a file matches one filetype. """
+        if len(self.filetypes) == 0:
+            return True
+        LOGGER.debug("is_filetype: path = " + path)
+        for filetype in self.filetypes:
+            if self.match(path, filetype):
+                LOGGER.debug("Filetype: " + path + " by " + filetype)
+                return True
+        return False
+
+    def match(self, filename, pattern):
+        """ Is filename matching pattern? """
+        return pathaddition.match.ant_match(filename, pattern, casesensitive=(os.sep != '\\'))
+
+    def test_path(self, root, relpath):
+        """ Test if a path matches filetype, include, exclude, and selection process."""
+        return self.is_filetype(relpath) and self.is_included(relpath) \
+                         and not self.is_excluded(relpath) and \
+                         self.is_selected(os.path.join(root, relpath))
+
+    def __str__(self):
+        """ Returns a string representing this instance. """
+        content = []
+        for inc in self.includes:
+            content.append('include:' + os.path.normpath(inc))
+        for ex in self.excludes:
+            content.append('exclude:' + os.path.normpath(ex))
+        return ';'.join(content)
+
+    def __repr__(self):
+        """ Returns a string representing this instance. """
+        return self.__str__()
+
+    def scan(self):
+        """ Abstract method which much be overriden to implement the scanning process. """
+        raise Exception("scan method must be overriden")
+
+
+class FileScanner(AbstractScanner):
+    """Scans the filesystem for files that match the selection paths.
+
+    The scanner is configured with a root directory. Any number of include
+    and exclude paths can be added. The scan() method is a generator that
+    returns matching files one at a time when called as an iterator.
+
+    This is a revisited implementation of the filescanner. It now relies on
+    the module pathaddition.match that implements a Ant-like regular expression matcher.
+    
+    Rules:
+    - Includes and excludes should not start with *
+    - Includes and excludes should not have wildcard searches ending with ** (e.g. wildcard**)
+    
+    Supported includes and excludes:
+    - filename.txt
+    - filename.*
+    - dir/
+    - dir/*
+    - dir/**    
+    """
+    def __init__(self, root_dir):
+        """ Initialization. """
+        AbstractScanner.__init__(self)
+        self.root_dir = os.path.normpath(root_dir)
+        if not self.root_dir.endswith(os.sep):
+            self.root_dir = self.root_dir + os.sep
+        # Add 1 so the final path separator is removed
+        #self.root_dirLength = len(self.root_dir) + 1
+
+    def scan(self):
+        """ Scans the files required to zip"""
+        #paths_cache = []
+        
+        excludescopy = self.excludes[:]
+        for f_file in excludescopy:
+            if os.path.exists(os.path.normpath(os.path.join(self.root_dir, f_file))):
+                self.excludes_files.append(f_file)
+                self.excludes.remove(f_file)
+        
+        includescopy = self.includes[:]
+        for f_file in includescopy:
+            if os.path.exists(os.path.normpath(os.path.join(self.root_dir, f_file))):
+                self.includes_files.append(f_file)
+                self.includes.remove(f_file)
+        
+        LOGGER.debug('Scanning sub-root directories')
+        for root_dir in self.find_subroots():
+            for dirpath, subdirs, files in os.walk(unicode(root_dir)):
+                # Let's save the len before it's getting modified.
+                subdirsLen = len(subdirs)
+                subroot = dirpath[len(self.root_dir):]
+
+                dirs_to_remove = []
+                for subdir in subdirs:
+                    if self.is_excluded(os.path.join(subroot, subdir)):
+                        dirs_to_remove.append(subdir)
+                
+                for dir_remove in dirs_to_remove:
+                    subdirs.remove(dir_remove)
+                
+                LOGGER.debug('Scanning directory: ' + dirpath)
+                for file_ in files:
+                    path = os.path.join(subroot, file_)
+                    if self.is_filetype(path) and self.is_included(path) and \
+                        self.is_selected(os.path.join(dirpath, file_)) and not self.is_excluded(path):
+                        ret_path = os.path.join(dirpath, file_)
+                        yield ret_path
+            
+                LOGGER.debug('Checking for empty directory: ' + dirpath)
+                # Check for including empty directories
+                if self.is_included(subroot) and not self.is_excluded(subroot):
+                    if len(files) == 0 and subdirsLen == 0:
+                        LOGGER.debug('Including empty dir: ' + dirpath)
+                        yield dirpath
+                    
+
+    def find_subroots(self):
+        """Finds all the subdirectory roots based on the include paths.
+
+        Often large archive operations define a number of archives from the root
+        of the drive. Walking the tree from the root is very time-consuming, so
+        selecting more specific subdirectory roots improves performance.
+        """
+        def splitpath(path):
+            """ Returns the splitted path"""
+            return path.split(os.sep)
+
+        root_dirs = []
+        
+        # Look for includes that start with wildcards.
+        subdirs_not_usable = False
+        for inc in self.includes + self.includes_files:
+            first_path_segment = splitpath(os.path.normpath(inc))[0]
+            if first_path_segment.find('*') != -1:
+                subdirs_not_usable = True
+                
+        # Parse all includes for sub-roots
+        if not subdirs_not_usable:
+            for inc in self.includes + self.includes_files:
+                include = None
+                LOGGER.debug("===> inc %s" % inc)
+                contains_globs = False                
+                for pathcomp in splitpath(os.path.normpath(inc)):
+                    if pathcomp.find('*') != -1:
+                        contains_globs = True
+                        break
+                    else:
+                        if include == None:
+                            include = pathcomp
+                        else:
+                            include = os.path.join(include, pathcomp)
+                if not contains_globs:
+                    include = os.path.dirname(include) 
+    
+                LOGGER.debug("include %s" % include)
+                if include != None:
+                    root_dir = os.path.normpath(os.path.join(self.root_dir, include))
+                    is_new_root = True
+                    for root in root_dirs[:]:
+                        if destinsrc(root, root_dir):
+                            LOGGER.debug("root contains include, skip it")
+                            is_new_root = False
+                            break
+                        if destinsrc(root_dir, root):
+                            LOGGER.debug("include contains root, so remove root")
+                            root_dirs.remove(root)
+                    if is_new_root:
+                        root_dirs.append(root_dir)    
+
+        if len(root_dirs) == 0:
+            root_dirs = [os.path.normpath(self.root_dir)]
+        LOGGER.debug('Roots = ' + str(root_dirs))
+        return root_dirs
+
+    def __str__(self):
+        return os.path.normpath(self.root_dir) + ';' + AbstractScanner.__str__(self) 
+
+    def __repr__(self):
+        return self.__str__()
+
+        
+def move(src, dst):
+    """Recursively move a file or directory to another location.
+
+    If the destination is on our current filesystem, then simply use
+    rename.  Otherwise, copy src to the dst and then remove src.
+    A lot more could be done here...  A look at a mv.c shows a lot of
+    the issues this implementation glosses over.
+
+    """
+    try:
+        os.rename(src, dst)
+    except OSError:
+        if os.path.isdir(src):
+            if destinsrc(src, dst):
+                raise Exception, "Cannot move a directory '%s' into itself '%s'." % (src, dst)
+            shutil.copytree(src, dst, symlinks=True)
+            rmtree(src)
+        else:
+            shutil.copy2(src, dst)
+            os.unlink(src)
+
+def rmtree(rootdir):
+    """ Catch shutil.rmtree failures on Windows when files are read-only. Thanks Google!""" 
+    if sys.platform == 'win32':
+        rootdir = os.path.normpath(rootdir)
+        if not os.path.isabs(rootdir):
+            rootdir = os.path.join(os.path.abspath('.'), rootdir)
+        if not rootdir.startswith('\\\\'):
+            rootdir = u"\\\\?\\" + rootdir
+
+    def cb_handle_error(fcn, path, excinfo):
+        """ Error handler, removing readonly and deleting the file. """
+        os.chmod(path, 0666)
+        if os.path.isdir(path):
+            rmdir(path)
+        elif os.path.isfile(path):
+            remove(path)
+        else:
+            fcn(path)
+    
+    if 'java' in sys.platform:
+        import java.io
+        import org.apache.commons.io.FileUtils
+        f_file = java.io.File(rootdir)
+        org.apache.commons.io.FileUtils.deleteDirectory(f_file)
+    else:
+        return shutil.rmtree(rootdir, onerror=cb_handle_error)
+
+def destinsrc(src, dst):
+    """ Fixed version of destinscr, that doesn't match dst with same root name."""
+    if os.sep == '\\':
+        src = src.lower()
+        dst = dst.lower()
+    src = os.path.abspath(src)
+    dst = os.path.abspath(dst)
+    if not src.endswith(os.path.sep):
+        src += os.path.sep
+    if not dst.endswith(os.path.sep):
+        dst += os.path.sep
+    return dst.startswith(src)
+
+
+def which(executable):
+    """ Search for executable in the PATH."""
+    pathlist = os.environ['PATH'].split(os.pathsep)
+    pathexts = ['']
+    if os.sep == '\\':
+        pathexts = os.environ['PATHEXT'].split(os.pathsep)
+
+    for folder in pathlist:
+        for pathext in pathexts:
+            exename = executable
+            if os.sep == '\\' and not exename.lower().endswith(pathext.lower()):
+                exename = exename + pathext
+            filename = os.path.join(folder, exename)
+            try:
+                status = os.stat(filename)
+            except os.error:
+                continue
+            # Check if the path is a regular file
+            if stat.S_ISREG(status[stat.ST_MODE]):
+                mode = stat.S_IMODE(status[stat.ST_MODE])
+                if mode & 0111:
+                    return os.path.normpath(filename)
+    return None
+
+
+def read_policy_content(filename):
+    """ Read the policy number from the policy file.
+        strict allows to activate the new policy scanning.
+    """
+    value = None
+    error = ""
+    try:
+        LOGGER.debug('Opening policy file: ' + filename)
+        policy_data = load_policy_content(filename)
+        match = re.match(r'^((?:\d+)|(?:0842[0-9a-zA-Z]{3}))\s*$', policy_data, re.M|re.DOTALL)
+        if match != None:
+            value = match.group(1)
+        else:
+            error = "Content of '%s' doesn't match r'^\d+|0842[0-9a-zA-Z]{3}\s*$'." % filename
+    except Exception, exc:
+        error = str(exc)
+    if value is not None:
+        return value
+    # worse case....
+    raise Exception(error)
+
+def load_policy_content(filename):
+    """ Testing policy content loading. """
+    data = ''
+    try:
+        fileh = codecs.open(filename, 'r', 'ascii')
+        data = fileh.read()
+    except:
+        raise Exception("Error loading '%s' as an ASCII file." % filename)
+    finally:
+        fileh.close()
+    return data
+
+ENCODING_MATRIX = {
+   codecs.BOM_UTF8: 'utf_8',
+   codecs.BOM_UTF16: 'utf_16',
+   codecs.BOM_UTF16_BE: 'utf_16_be',
+   codecs.BOM_UTF16_LE: 'utf_16_le',
+}
+
+def guess_encoding(data):
+    """Given a byte string, guess the encoding.
+
+    First it tries for UTF8/UTF16 BOM.
+
+    Next it tries the standard 'UTF8', 'ISO-8859-1', and 'cp1252' encodings,
+    Plus several gathered from locale information.
+
+    The calling program *must* first call locale.setlocale(locale.LC_ALL, '')
+
+    If successful it returns (decoded_unicode, successful_encoding)
+    If unsuccessful it raises a ``UnicodeError``.
+
+    This was taken from http://www.voidspace.org.uk/python/articles/guessing_encoding.shtml
+    """
+    for bom, enc in ENCODING_MATRIX.items():
+        if data.startswith(bom):
+            return data.decode(enc), enc
+    encodings = ['ascii', 'UTF-8']
+    successful_encoding = None
+    try:
+        encodings.append(locale.getlocale()[1])
+    except (AttributeError, IndexError):
+        pass
+    try:
+        encodings.append(locale.getdefaultlocale()[1])
+    except (AttributeError, IndexError):
+        pass
+    # latin-1
+    encodings.append('ISO8859-1')
+    encodings.append('cp1252')
+    for enc in encodings:
+        if not enc:
+            continue
+        try:
+            decoded = unicode(data, enc)
+            successful_encoding = enc
+            break
+        except (UnicodeError, LookupError):
+            pass
+    if successful_encoding is None:
+        raise UnicodeError('Unable to decode input data. Tried the'
+                           ' following encodings: %s.' %
+                           ', '.join([repr(enc) for enc in encodings if enc]))
+    else:
+        if successful_encoding == 'ascii':
+            # our default ascii encoding
+            successful_encoding = 'ISO8859-1'
+        return (decoded, successful_encoding)
+        
+def getmd5(fullpath, chunk_size=2**16):
+    """ returns the md5 value"""
+    file_handle = open(fullpath, "rb")
+    file_handle.seek(0, os.SEEK_END)
+    size = file_handle.tell()
+    file_handle.seek(0, os.SEEK_SET)
+    md5 = hashlib.md5()
+    while size > 0:
+        toread = chunk_size
+        if size < chunk_size:
+            toread = size
+        chunk = file_handle.read(toread)
+        size = size - len(chunk)
+        md5.update(chunk)
+    file_handle.close()
+    return md5.hexdigest()
+
+def read_symbian_policy_content(filename):
+    """ Read the policy category from the policy file. """
+    value = None
+    error = ""
+    try:
+        LOGGER.debug('Opening symbian policy file: ' + filename)
+        try:
+            fileh = codecs.open(filename, 'r', 'ascii')
+        except:
+            raise Exception("Error loading '%s' as an ASCII file." % filename)        
+        for line in fileh:
+            match = re.match(r'^Category\s+([A-Z])\s*$', line, re.M|re.DOTALL)
+            if match != None:
+                value = match.group(1)
+                fileh.close()
+                return value
+        fileh.close()
+        if match == None:
+            error = "Content of '%s' doesn't match r'^Category\s+([A-Z])\s*$'." % filename
+    except Exception, exc:
+        error = str(exc)
+    if value is not None:
+        return value
+    # worse case....
+    raise Exception(error)
+
+
+class LockFailedException(Exception):
+    """ This class is used to indicate the failure in obtaining a Lock. """
+    pass
+
+if os.name == 'nt':
+    import win32file
+    import win32con
+    import winerror
+    import time
+    import win32netcon
+    import win32wnet
+    
+    class Lock:
+        """ This object implement file locking for windows. """
+        
+        def __init__(self, filename):
+            LOGGER_LOCK.debug("__init__")
+            self._filename = filename
+            self.f_desc = None
+
+        def lock(self, wait=False):
+            """lock the file"""
+            LOGGER_LOCK.debug("lock")
+            # Open the file
+            if self.f_desc == None:
+                self.f_desc = open(self._filename, "w+")
+            wfd = win32file._get_osfhandle(self.f_desc.fileno())
+            if not wait:
+                try:
+                    win32file.LockFile(wfd, 0, 0, 0xffff, 0)
+                except:
+                    raise LockFailedException()
+            else:    
+                while True:
+                    try:
+                        win32file.LockFile(wfd, 0, 0, 0xffff, 0)
+                        break
+                    except win32file.error, exc:
+                        if exc[0] != winerror.ERROR_LOCK_VIOLATION:
+                            raise exc
+                    LOGGER_LOCK.debug("waiting")
+                    time.sleep(1)
+                    
+        def unlock(self):
+            """unlock the file"""
+            LOGGER_LOCK.debug("unlock")
+            if self.f_desc == None:
+                LOGGER_LOCK.debug("already unlocked")
+                return
+            wfd = win32file._get_osfhandle(self.f_desc.fileno())
+            try:
+                # pylint: disable-msg=E1101
+                win32file.UnlockFile(wfd, 0 , 0, 0xffff, 0)
+                self.f_desc.close()
+                self.f_desc = None
+            except win32file.error, exc:
+                if exc[0] != 158:
+                    raise
+            
+            
+        def __del__(self):
+            LOGGER_LOCK.debug("__del__")
+            self.unlock()
+
+    def rmdir(path):
+        """ Catch os.rmdir failures on Windows when path is too long (more than 256 chars)."""
+        path = win32api.GetShortPathName(path)
+        win32file.RemoveDirectory(path)
+
+    def remove(filename):
+        """ Catch os.rmdir failures on Windows when path is too long (more than 256 chars)."""
+        filename = win32api.GetShortPathName(filename)
+        filename = filename.lstrip("\\\\?\\")
+        os.remove(filename)
+
+    def mount(drive, unc, username=None, password=None, persistent=False):
+        """ Windows helper function to map a network drive. """
+        flags = 0
+        if persistent:
+            flags = win32netcon.CONNECT_UPDATE_PROFILE
+        win32wnet.WNetAddConnection2(win32netcon.RESOURCETYPE_DISK, drive, unc, None, username, password, flags)
+
+
+    def umount(drive):
+        """ Windows helper function to map a network drive. """
+        drive_type = win32file.GetDriveType(drive)
+        if drive_type == win32con.DRIVE_REMOTE:
+            win32wnet.WNetCancelConnection2(drive, win32netcon.CONNECT_UPDATE_PROFILE, 1)
+        else:
+            raise Exception("%s couldn't be umount." % drive)
+
+else:
+    def rmdir(path):
+        """remove directory"""
+        return os.rmdir(path)
+
+    def remove(path):
+        """remove the files and folders"""
+        return os.remove(path)
+
+    class Lock:
+        """ This class represents a dummy lock """
+        def __init__(self, filename):
+            pass
+        def lock(self, wait=False):
+            """lock file - do nothing """
+            pass
+        def unlock(self):
+            """un lock file -do nothing """
+            pass
+            
+if os.sep == '\\':
+    def get_next_free_drive():
+        """ Return the first free drive found else it raise an exception. """
+        if os.name == 'nt':
+            drive_labels = sorted(list(set(string.ascii_uppercase) - set(win32api.GetLogicalDriveStrings())), reverse=True)
+            if len(drive_labels) != 0 :
+                return drive_labels[0] + ":"
+            raise OSError("No free drive left.")
+        if 'java' in sys.platform:
+            import java.io
+            used = []
+            for _xx in java.io.File.listRoots():
+                used.append(str(_xx).replace(':\\', ''))
+            drive_labels = sorted(list(set(string.ascii_uppercase) - set(used)), reverse=True)
+            if len(drive_labels) != 0 :
+                return drive_labels[0] + ":"
+            raise OSError("No free drive left.")
+
+    def subst(drive, path):
+        """ Substing path as a drive. """
+        path = os.path.normpath(path)
+        p_subst = subprocess.Popen("subst %s %s" % (drive, path),  shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+        errmsg = p_subst.communicate()[0]
+        if p_subst.returncode != 0:
+            raise Exception("Error substing '%s' under '%s': %s" % (path, drive, errmsg))
+    
+    def unsubst(drive):
+        """ Unsubsting the drive. """
+        p_subst = subprocess.Popen("subst /D %s" % (drive), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+        errmsg = p_subst.communicate()[0]
+        if p_subst.returncode != 0:
+            raise Exception("Error unsubsting '%s': %s" % (drive, errmsg))
+    
+    def getSubstedDrives():
+        """get substituted drive"""
+        driveInformation = {}
+        subStedDriveList = []
+        p_subst = subprocess.Popen("subst",  shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+        subStedDriveList = re.split('\\n', p_subst.communicate()[0])
+        del subStedDriveList[len(subStedDriveList)-1]
+        for path in subStedDriveList:
+            subStedDrivePath = []
+            if(re.search(r'UNC', path) is not None):
+                subStedDrivePath = re.split('=>', path)
+                (drive_to_unsubst, _) = os.path.splitdrive(os.path.normpath(subStedDrivePath[0]))
+                uncPath = re.sub('UNC', r'\\', subStedDrivePath[1].strip())
+                if(uncPath != subStedDrivePath[1].strip()):
+                    driveInformation[drive_to_unsubst] = uncPath
+            else:
+                subStedDrivePath = re.split('=>', path)
+                (drive_to_unsubst, _) = os.path.splitdrive(os.path.normpath(subStedDrivePath[0]))
+                driveInformation[drive_to_unsubst] = os.path.normpath(subStedDrivePath[1].strip())
+    
+        return driveInformation
+
+def touch(srcdir):
+    """
+    Recursively touches all the files in the source path mentioned.
+    It does not touch the directories.
+    """
+    srcnames = os.listdir(srcdir)
+    for name in srcnames:
+        srcfname = os.path.join(srcdir, name)
+        if os.path.isdir(srcfname):
+            touch(srcfname)
+        else:
+            if os.path.exists(srcfname):
+                os.utime(srcfname, None)
--- a/buildframework/helium/sf/python/pythoncore/lib/idoprep.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/idoprep.py	Wed Oct 13 16:31:27 2010 +0800
@@ -28,23 +28,9 @@
 
 logging.basicConfig(level=logging.INFO)
 _logger = logging.getLogger("check_latest_release")
-
-def validate(grace, service, product, release):
-    """ Validate s60 grace server, s60 grace service, s60 grace product and 
-        s60 grace release are set.
-    """    
-    if not grace:
-        raise EnvironmentError("Property 's60.grace.server' is not defined.")
-    if not service:
-        raise EnvironmentError("Property 's60.grace.service' is not defined.")
-    if not product:
-        raise EnvironmentError("Property 's60.grace.product' is not defined.")
-    if not release:
-        raise EnvironmentError("Property 's60.grace.release' is not defined.")
             
-def get_s60_env_details(grace, service, product, release, rev, cachefilename, s60gracecheckmd5, s60graceusetickler):
+def get_s60_env_details(server, service, product, release, rev, cachefilename, checkmd5, usetickler):
     """ Return s60 environ details """
-    validate(grace, service, product, release)
     revision = r'(_\d{3})?'
     if rev != None:
         revision = rev
@@ -53,11 +39,11 @@
         _logger.info(str("Using cache file: %s" % cachefilename))
     
     checkmd5 = False
-    if s60gracecheckmd5 != None:
-        checkmd5 = str(s60gracecheckmd5).lower()
+    if checkmd5 != None:
+        checkmd5 = str(checkmd5).lower()
         checkmd5 = ((checkmd5 == "true") or (checkmd5 == "1") or (checkmd5 == "on"))
                 
-    branch = os.path.join(grace, service, product)
+    branch = os.path.join(server, service, product)
     if not os.path.exists(branch):
         raise IOError("Error occurred: Could not find directory %s" % branch)
         
@@ -71,7 +57,7 @@
             result.append(relpath)
     result.sort(reverse=True)
     use_tickler = False
-    tickler_validation = str(s60graceusetickler).lower()
+    tickler_validation = str(usetickler).lower()
     if tickler_validation != None:
         use_tickler = ((tickler_validation == "true") or (tickler_validation == "1"))
     validresults = []
@@ -99,7 +85,7 @@
     
     result = validresults
     if len(result) == 0:
-        raise EnvironmentError("Error finding GRACE release.")
+        raise EnvironmentError("Error finding release.")
     print result[0]
     return result
     
@@ -117,11 +103,11 @@
         _logger.info("Version file not found getting new environment...")
     return version
         
-def create_ado_mapping(sysdefconfig, adomappingfile, adoqualitymappingfile, builddrive, adoqualitydirs):
+def create_ado_mapping(sysdefconfig, adomappingfile, qualityMapping, builddrive, adoqualitydirs):
     """ Creates ado mapping and ado quality mapping files """
     input_ = open(sysdefconfig, 'r')
     output = open(adomappingfile, 'w')
-    outputquality = open(adoqualitymappingfile, 'w')
+    print "ado mapping file: %s" % adomappingfile
     for sysdef in input_.readlines():
         sysdef = sysdef.strip()
         if len(sysdef) > 0:
@@ -139,18 +125,11 @@
                     else:
                         component = os.path.normpath(os.path.join(builddrive, location)).replace('\\','/')
                 print "%s=%s\n" % (sysdef, component)
-                output.write("%s=%s\n" % (sysdef, component))
-                if adoqualitydirs == None:
-                    outputquality.write("%s=%s\n" % (sysdef, component))
+                if adoqualitydirs == None or qualityMapping == 'false':
+                    output.write("%s=%s\n" % (sysdef, component))
                 else:
                     for dir_ in adoqualitydirs.split(','):
                         if os.path.normpath(dir_) == os.path.normpath(os.path.join(builddrive, os.environ['EPOCROOT'], location)):
-                            outputquality.write("%s=%s\n" % (sysdef, component))
-
-
-    outputquality.close()
+                            output.write("%s=%s\n" % (sysdef, component))
     output.close()
-    input_.close()
-
-
-    
+    input_.close()
\ No newline at end of file
--- a/buildframework/helium/sf/python/pythoncore/lib/integration/quality.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/integration/quality.py	Wed Oct 13 16:31:27 2010 +0800
@@ -33,6 +33,7 @@
 import fileutils
 import pathaddition.match
 import logging
+import traceback
 
 #logging.basicConfig(level=logging.DEBUG)
 _logger = logging.getLogger("integration.quality")
@@ -111,7 +112,7 @@
 
 class PolicyValidator(object):
     """ Validate policy files on a hierarchy. """
-    def __init__(self, policyfiles=None, csvfile=None, ignoreroot=False, excludes=None):
+    def __init__(self, policyfiles=None, ignoreroot=False, excludes=None):
         """The constructor """
         if policyfiles is None:
             policyfiles = ['distribution.policy.s60']
@@ -135,7 +136,16 @@
                 self._ids[row[0]] = row
                 if row[1].lower() != "yes" and row[1].lower() != "no" and row[1].lower() != "bin":
                     yield ["unknownstatus", row[0], row[2]]
-
+    
+    def epl_load_policy_ids(self, csvfile):
+        """ Load the icds from the CSV file for epl check."""
+        self._ids = {}
+        reader = csv.reader(open(csvfile, "rU"))
+        for row in reader:
+            if len(row)>=3 and re.match(r"^\s*\d+\s*$", row[0]):
+                if row[1].lower() == "yes" or row[1].lower() == "bin":
+                    self._ids[row[0]] = row
+    
     def validate_content(self, filename):
         """  Validating the policy file content. If it cannot be decoded, 
             it reports an 'invalidencoding'.
@@ -151,6 +161,20 @@
                 if value not in self._ids:
                     yield ["notinidlist", filename, value]
     
+    def epl_validate_content(self, filename):
+        """  Validating the policy file content for epl"""
+        value = None
+        try:
+            value = fileutils.read_policy_content(filename)
+        except IOError, exc:
+            traceback.print_exc()
+            raise exc
+        if value is not None:
+            if self._ids != None:
+                if value not in self._ids:
+                    return False
+        return True
+    
     def find_policy(self, path):
         """ find the policy file under path using filenames under the list. """
         for filename in self._policyfiles:
--- a/buildframework/helium/sf/python/pythoncore/lib/log2xml.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/log2xml.py	Wed Oct 13 16:31:27 2010 +0800
@@ -174,9 +174,11 @@
             print exc
 
 
-def convert(inputfile, outputfile, fulllogging=True, configuration=DEFAULT_CONFIGURATION):
+def convert(inputfile, outputfile, fulllogging=True, configuration=None):
     """ Convert an input log into an XML log and write an outputfile. """
-    
+    if configuration == None:
+        configuration = DEFAULT_CONFIGURATION
+        
     # Compiling the regexp  
     built_config = {}
     for category in configuration.keys():
@@ -243,9 +245,11 @@
     # end file
     xmllog.close()
     
-def convert_old(inputfile, outputfile, fulllogging=True, configuration=DEFAULT_CONFIGURATION):
+def convert_old(inputfile, outputfile, fulllogging=True, configuration=None):
     """ Convert an input log into an XML log and write an outputfile. """
-    
+    if configuration == None:
+        configuration = DEFAULT_CONFIGURATION
+        
     # Compiling the regexp  
     built_config = {}
     for category in configuration.keys():
--- a/buildframework/helium/sf/python/pythoncore/lib/nokia/gscm.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/nokia/gscm.py	Wed Oct 13 16:31:27 2010 +0800
@@ -35,7 +35,7 @@
     """ Runs a command and returns the result data. """
     process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
     output = process.stdout.read()
-    process.poll()
+    process.wait()
     status = process.returncode
     return (output, status)
 
@@ -53,9 +53,11 @@
     _logger.debug("Status: %s" % status)
     _logger.debug("Output: %s" % output)
     if status == 0 or status == None and not ("Can't locate" in output):
+        _logger.debug("Returning output")
         return output.strip()
     if not 'HLM_SUBCON' in os.environ:
-        raise Exception("Error retrieving get_db_path info for '%s' database.\nOUTPUT:%s" % (dbname, output.strip()))
+        _logger.debug("Raising exception")
+        raise IOError("Error retrieving get_db_path info for '%s' database.\nOUTPUT:%s" % (dbname, output.strip()))
     return None
 
 def get_db_path(dbname):
--- a/buildframework/helium/sf/python/pythoncore/lib/pkg2iby.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pkg2iby.py	Wed Oct 13 16:31:27 2010 +0800
@@ -52,10 +52,16 @@
     atsautoexec.write(r'md c:\logs\testresults' + '\n')
     atsautoexec.write(r'md c:\logs\testexecute' + '\n')
     
+    for _, dst, _, _ in pkgfiles:
+        (_, dstsplit) = os.path.splitdrive(dst)
+        dst_nodrive = 'atsdata' + dstsplit
+        zdst = 'z:\\' + dst_nodrive
+        atsautoexec.write(r'md ' + os.path.dirname(dst) + '\n')
+        atsautoexec.write(r'copy ' + zdst + ' ' + dst + '\n')
+    
     for src, dst, filetype, _ in pkgfiles:
-        (_, dst) = os.path.splitdrive(dst)
-        dst_nodrive = 'atsdata' + dst
-        dst = r'z:\atsdata' + dst
+        (_, dstsplit) = os.path.splitdrive(dst)
+        dst_nodrive = 'atsdata' + dstsplit
         myiby.write('data=' + src + ' ' + dst_nodrive + '\n')
         if 'testscript' in filetype and testtype == 'tef':
             atsautoexec.write('testexecute.exe ' + dst + '\n')
@@ -75,7 +81,6 @@
             atsautoexec.write(r'runtests \sys\bin\atsrtestexec.bat' + '\n')
             myiby.write(r'data=' + rtestexecfilename + r' \sys\bin\atsrtestexec.bat' + '\n')
             
-        
         myiby.write(r'data=' + dummyexecfilename + r' z:\dummytest.txt' + '\n')
         atsautoexec.write(r'RUNTESTS z:\dummytest.txt -p')
     myiby.write("#endif\n")
--- a/buildframework/helium/sf/python/pythoncore/lib/preparation.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/preparation.py	Wed Oct 13 16:31:27 2010 +0800
@@ -125,6 +125,10 @@
         session = self.get_session()
         project = session.create(self._config.name)
 
+        session.home = self._config['dir']
+        path = os.path.join(session.home, project.name)
+        project.work_area(False, True, True, path=path)
+
         target_dir = os.path.normpath(os.path.join(self._config['dir'], project.name))
         _logger.info("Deleting snapshot under %s." % target_dir)
         if os.path.exists(target_dir):
@@ -209,13 +213,9 @@
         
         for project in self.__get_subbaselines():
             self._check_object(project)
-        
-        try:
-            if (not os.path.exists(self._config['dir'])):
-                os.makedirs(self._config['dir'])
-        except Exception:
-            _logger.info("ERROR: Not able to create the synergy workarea %s " % (self._config['dir']))
-            raise Exception("ERROR: Not able to create the synergy workarea %s" % self._config.name)
+
+        if (not os.path.exists(self._config['dir'])):
+            os.makedirs(self._config['dir'])
             
         # checking if the purpose exists
         if self._config.has_key('purpose'):
@@ -241,6 +241,10 @@
         session.home = self._config['dir']
         
         result = self.__find_project(project)
+        
+        path = os.path.join(session.home, project.name)
+        project.work_area(False, True, True, path=path)
+        
         if (result != None):
             _logger.info("Project found: '%s'" % result)
             role = session.role
@@ -308,9 +312,14 @@
                 _logger.info("Using version: '%s'" % version)
 
             try:
+                if (not self._config.get_boolean('use.default_wa_path', True)):
+                    wa_path = self._config['dir']
+                    _logger.info("Using work area path to checkout directly")
+                    result = project.checkout(session.create(self._config['release']), version=version, purpose=purpose, path=wa_path)
+                else:
+                    result = project.checkout(session.create(self._config['release']), version=version, purpose=purpose)
+                ccm.log_result(result, ccm.CHECKOUT_LOG_RULES, _logger)
                 self.__setRole(session)
-                result = project.checkout(session.create(self._config['release']), version=version, purpose=purpose)
-                ccm.log_result(result, ccm.CHECKOUT_LOG_RULES, _logger)
             except ccm.CCMException, exc:
                 ccm.log_result(exc.result, ccm.CHECKOUT_LOG_RULES, _logger)
                 raise exc
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_archive.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_archive.py	Wed Oct 13 16:31:27 2010 +0800
@@ -266,13 +266,14 @@
             content = [s.strip() for s in content]
         content.sort()
 
-        print content
         if os.sep == '\\':
             expected_paths = [s.strip().lower() for s in expected_paths]
         else:
             expected_paths = [s.strip() for s in expected_paths]
         expected_paths.sort()
-        print expected_paths
+        
+        _logger.info("expected_paths:\n" + str("\n".join(expected_paths)))
+        _logger.info("content:\n" + str("\n".join(content)))
         assert content == expected_paths
         
     def test_split_manifest_file_unicode(self):
@@ -890,6 +891,66 @@
         self.assert_(content == expectedPaths)
         self.assert_(content1 == expectedPaths1)
         self.assert_(content2 == expectedPaths2)
+        
+    def test_split_on_uncompressed_size_enabled(self):
+        """ Testing the policy mapper with split on uncompressed size enabled. """
+        configDict = {'root.dir': root_test_dir,
+                  'temp.build.dir': os.path.abspath(os.path.join(root_test_dir, 'temp_build_files')),
+                  'archives.dir': root_test_dir,
+                  'name': 's60_policy_mapper_test',
+                  'include': 's60/',
+                  'archive.tool': '7za',
+                  'mapper': 'policy',
+                  'max.files.per.archive': '1',
+                  'split.on.uncompressed.size.enabled': 'true',
+                  'policy.csv': os.path.join(os.environ['TEST_DATA'], 'data/distribution.policy.id_status.csv'),
+                 }
+        config = configuration.Configuration(configDict)
+
+        builder = archive.ArchivePreBuilder(configuration.ConfigurationSet([config]), "config", index=0)
+        manifest_file_path = builder.build_manifest(config)
+        cmds = builder.manifest_to_commands(config, manifest_file_path)
+        
+        expectedPaths0 = ['s60' + os.sep + 'component_private' + os.sep + 'Distribution.Policy.S60\n']
+        expectedPaths1 = ['s60' + os.sep + 'component_private' + os.sep + 'component_private_file.txt\n']
+        expectedPaths2 = ['s60' + os.sep + 'Distribution.Policy.S60\n']
+        expectedPaths3 = ['s60' + os.sep + 'component_public' + os.sep + 'Distribution.Policy.S60\n']
+        expectedPaths4 = ['s60' + os.sep + 'component_public' + os.sep + 'component_public_file.txt\n']
+        expectedPaths5 = ['s60' + os.sep + 'missing' + os.sep + 'subdir' + os.sep + 'Distribution.Policy.S60\n']
+                
+        includeFilePath0 = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_part01_1.txt')
+        includeFilePath1 = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_part02_1.txt')
+        includeFilePath2 = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_part01_0.txt')
+        includeFilePath3 = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_part02_0.txt')
+        includeFilePath4 = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_part03_0.txt')
+        includeFilePath5 = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_part04_0.txt')
+        
+        with open(includeFilePath0) as f_file:
+            content0 = f_file.readlines()
+        with open(includeFilePath1) as f_file:
+            content1 = f_file.readlines()
+        with open(includeFilePath2) as f_file:
+            content2 = f_file.readlines()
+        with open(includeFilePath3) as f_file:
+            content3 = f_file.readlines()
+        with open(includeFilePath4) as f_file:
+            content4 = f_file.readlines()
+        with open(includeFilePath5) as f_file:
+            content5 = f_file.readlines()
+            
+        print "content0: ", content0
+        print "content1: ", content1
+        print "content2: ", content2
+        print "content3: ", content3
+        print "content4: ", content4
+        print "content5: ", content5
+        
+        self.assert_(content0 == expectedPaths0 or content0 == expectedPaths1)
+        self.assert_(content1 == expectedPaths1 or content1 == expectedPaths0)
+        self.assert_(content2 == expectedPaths2)
+        self.assert_(content3 == expectedPaths3 or content3 == expectedPaths4)
+        self.assert_(content4 == expectedPaths4 or content4 == expectedPaths3)
+        self.assert_(content5 == expectedPaths5)
 
 class CheckRootDirValueTest(unittest.TestCase):
     """test root drive value"""
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats3.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats3.py	Wed Oct 13 16:31:27 2010 +0800
@@ -20,7 +20,6 @@
 #===============================================================================
 
 """ Testing ATS3 framework. """
-# pylint: disable=E1101,C0302,w0142,w0603,R0912,R0902,R0903,R0201,W0404, R0915
 #w0142 => * and ** were used
 #w0603 => global variables used TSRC_PATH etc
 #R*    => will be fixed while refactoring
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats3_aste.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats3_aste.py	Wed Oct 13 16:31:27 2010 +0800
@@ -20,8 +20,6 @@
 #===============================================================================
 
 """ Testing ATS3 ASTE framework. """
-
-# pylint: disable=W0603,W0142,R0903,R0911,R0912,R0902,R0901,R0201
 # pylint: disable=E1101
 #E1101 => Mocker shows mockery
 #R* remove during refactoring
@@ -61,6 +59,7 @@
         self.__dict__.update(kwargs)
     
 
+# pylint: disable=R0911
 def equal_xml(xml1, xml2):
     """Check the equality of the given XML snippets.
     
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats4.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats4.py	Wed Oct 13 16:31:27 2010 +0800
@@ -20,7 +20,6 @@
 #===============================================================================
 
 """ Testing ats4 framework. """
-# pylint: disable=E1101, C0302, W0142, W0603, R0902,R0903,R0912,R0915
 #E1101 => Mocker shows mockery
 #C0302 => too many lines
 #W0142 => used * or ** magic 
@@ -271,6 +270,11 @@
 TestReportFileName= TestReport
 
 TestReportFormat= TXT            # Possible values: TXT or HTML
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+[New_Module]
+ModuleName= testscripter 
         
         """)
 
@@ -294,7 +298,7 @@
     assert params[0].get("value") == "writefile"
     assert params[1].get("value") == path(r"z:\sys\bin\ctcman.exe")
 
-def check_ctc_log(steps, testtype=""):
+def check_ctc_log(steps):
     """Fetches CTC Log"""
     #For the ctcdata.txt to be published on the ATS network drive
     step = steps.next()
@@ -772,6 +776,7 @@
         mocker.expect(test_plan["report_email"]).result(self.report_email)
         mocker.expect(test_plan["ctc_run_process_params"]).result(self.ctc_run_process_params)
         mocker.expect(test_plan["report_type"]).result("")
+        mocker.expect(test_plan["file_store"]).result("")
                 
         if self.trace_enabled.lower() == "true":
             mocker.expect(test_plan["trace_enabled"]).result("True")
@@ -937,6 +942,20 @@
         assert params[0].get("value") == "*"
         assert params[1].get("value") == "60"
         assert params[2].get("value") == "c:\\testframework\\" + ntpath.basename(self.engine_ini_file)
+        step = steps.next()
+        assert step.findtext("./type") == "StifRunCasesTask"
+        params = step.findall("./parameters/parameter")
+        assert params[0].get("value") == "TESTSCRIPTER"
+        assert params[1].get("value") == "*"
+        assert params[2].get("value") == "60"
+        assert params[3].get("value") == r"e:\testing\conf\file1.cfg"
+        step = steps.next()
+        assert step.findtext("./type") == "StifRunCasesTask"
+        params = step.findall("./parameters/parameter")
+        assert params[0].get("value") == "TESTSCRIPTER"
+        assert params[1].get("value") == "*"
+        assert params[2].get("value") == "60"
+        assert params[3].get("value") == r"e:\testing\conf\file2.cfg"
 
     def test_steps_trace_enabled(self):
         """ Test steps trace enabled. """
@@ -1113,8 +1132,9 @@
         self.custom_files = None
         self.component_path = None
         self.ctc_run_process_params = None
+        self.ats_stf_enabled = None
         
-    def generate_xml(self, harness, trace_enabled="False"):
+    def generate_xml(self, harness, trace_enabled="False", tef_test_module=None, ats_stf_enabled="False"):
         """Generates XML"""
         def files(*paths):
             """generates paths for the files"""
@@ -1125,6 +1145,59 @@
         self.config_files = files("conf/file1.cfg", "conf/file2.cfg")
         self.testmodule_files = files("testmodules/file1.dll", "testmodules/file2.dll")
         self.image_files = files("output/images/file1.fpsx", "output/images/file2.fpsx")
+        if tef_test_module:
+            TEST_PATH.joinpath(r"tsrc" + os.sep + "init" + os.sep + "TestFramework.ini").write_text(
+                r"""
+#     - Sets a device reset module's dll name(Reboot).
+#        + If Nokia specific reset module is not available or it is not correct one
+#          StifHWResetStub module may use as a template for user specific reset
+#          module. 
+
+[Engine_Defaults]
+
+TestReportMode= FullReport        # Possible values are: 'Empty', 'Summary', 'Environment',
+                                                               'TestCases' or 'FullReport'
+
+CreateTestReport= YES            # Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\TestFramework\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT            # Possible values: TXT or HTML
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+[New_Module]
+ModuleName= teftestmodule 
+        
+        """)
+        else:
+            TEST_PATH.joinpath(r"tsrc" + os.sep + "init" + os.sep + "TestFramework.ini").write_text(        
+                r"""
+#     - Sets a device reset module's dll name(Reboot).
+#        + If Nokia specific reset module is not available or it is not correct one
+#          StifHWResetStub module may use as a template for user specific reset
+#          module. 
+
+[Engine_Defaults]
+
+TestReportMode= FullReport        # Possible values are: 'Empty', 'Summary', 'Environment',
+                                                               'TestCases' or 'FullReport'
+
+CreateTestReport= YES            # Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\TestFramework\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT            # Possible values: TXT or HTML
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+[New_Module]
+ModuleName= testscripter
+        
+        """)
+
         self.engine_ini_file = files("init/TestFramework.ini")[0]
         self.report_email = "test.receiver@company.com"
         self.file_store = path("path/to/reports")
@@ -1133,6 +1206,7 @@
         self.pmd_files = TEST_FILES["pmd_file"]
         self.trace_activation_files = files("trace_init/trace_activation_1.xml")
         self.ctc_enabled = "True"
+        self.ats_stf_enabled = ats_stf_enabled
         self.eunitexerunner_flags = "/E S60AppEnv /R Off"
         self.custom_dir = "custom"
         self.custom_files = files("custom/postpostaction.xml", "custom/prepostaction.xml")
@@ -1184,11 +1258,13 @@
         mocker.expect(test_plan["device_hwid"]).result("5425")
         mocker.expect(test_plan["trace_enabled"]).result(self.trace_enabled)
         mocker.expect(test_plan["ctc_enabled"]).result(self.ctc_enabled)
+        mocker.expect(test_plan["ats_stf_enabled"]).result(self.ats_stf_enabled)
         mocker.expect(test_plan["custom_dir"]).result("custom1A")
         mocker.expect(test_plan.custom_dir).result(path(r"self.custom_dir"))
         mocker.expect(test_plan["ctc_run_process_params"]).result(self.ctc_run_process_params)
         mocker.expect(test_plan["report_email"]).result(self.report_email)
         mocker.expect(test_plan["report_type"]).result("")
+        mocker.expect(test_plan["file_store"]).result("")
         if self.trace_enabled == "False":
             mocker.expect(test_plan.sets).result([
                 dict(name="set0", image_files=self.image_files, data_files=self.data_files,
@@ -1314,7 +1390,7 @@
                 self.check_install_step(steps, "EUNIT", set_count="1")
                 self.check_run_cases(steps, "EUNIT")
                 check_ctc_write(steps)
-                check_ctc_log(steps, "withpkgfiles")
+                check_ctc_log(steps)
                 check_fetch_logs(steps, "EUNIT")
             else:
                 self.check_install_step(steps, thar)
@@ -1322,6 +1398,66 @@
                 check_ctc_write(steps)
                 check_ctc_log(steps)
                 check_fetch_logs(steps, thar)
+                
+    def test_case_steps_teftestmodule(self):
+        """Checks cases in steps in the test.xml file for TEFTESTMODULE"""
+        test_harness = ["STIF", "EUNIT", "MULTI_HARNESS"]
+        for thar in test_harness:
+            xml = self.generate_xml(thar, tef_test_module=True, ats_stf_enabled="True")
+            #print et.tostring(xml.getroot())
+            steps = iter(xml.findall(".//task"))
+            steps.next() # Flash images
+            check_ctc_start(steps)
+            check_log_dir(steps)
+            if "MULTI_HARNESS" in thar:
+                self.check_install_step(steps, "STIF")
+                self.check_run_cases(steps, "STIF", tef_test_module=True, ats_stf_enabled="True")
+                check_ctc_write(steps)
+                check_ctc_log(steps)
+                check_fetch_logs(steps, "STIF")
+                
+                steps.next() # Flash images
+                check_ctc_start(steps)
+                check_log_dir(steps)
+                self.check_install_step(steps, "EUNIT", set_count="1")
+                self.check_run_cases(steps, "EUNIT")
+                check_ctc_write(steps)
+                check_ctc_log(steps)
+                check_fetch_logs(steps, "EUNIT")
+            else:
+                self.check_install_step(steps, thar)
+                self.check_run_cases(steps, thar, tef_test_module=True)
+                check_ctc_write(steps)
+                check_ctc_log(steps)
+                check_fetch_logs(steps, thar)
+        for thar in test_harness:
+            xml = self.generate_xml(thar, tef_test_module=True)
+            #print et.tostring(xml.getroot())
+            steps = iter(xml.findall(".//task"))
+            steps.next() # Flash images
+            check_ctc_start(steps)
+            check_log_dir(steps)
+            if "MULTI_HARNESS" in thar:
+                self.check_install_step(steps, "STIF")
+                self.check_run_cases(steps, "STIF", tef_test_module=True)
+                check_ctc_write(steps)
+                check_ctc_log(steps)
+                check_fetch_logs(steps, "STIF")
+                
+                steps.next() # Flash images
+                check_ctc_start(steps)
+                check_log_dir(steps)
+                self.check_install_step(steps, "EUNIT", set_count="1")
+                self.check_run_cases(steps, "EUNIT")
+                check_ctc_write(steps)
+                check_ctc_log(steps)
+                check_fetch_logs(steps, "EUNIT")
+            else:
+                self.check_install_step(steps, thar)
+                self.check_run_cases(steps, thar, tef_test_module=True)
+                check_ctc_write(steps)
+                check_ctc_log(steps)
+                check_fetch_logs(steps, thar)
 
     def check_install_step(self, steps, harness, set_count="0"):
         """Checks install steps in the test.xml file"""
@@ -1348,7 +1484,7 @@
                 assert ntpath.basename(dst) == filename
                 assert ntpath.dirname(dst) == drive + "\\sys\\bin"
 
-    def check_run_cases(self, steps, harness="STIF"):
+    def check_run_cases(self, steps, harness="STIF", tef_test_module=None, ats_stf_enabled="False"):
         """Checks run cases in the test.xml file"""
         step = steps.next()
         if harness == "STIF":
@@ -1358,6 +1494,45 @@
             assert params[0].get("value") == "*"
             assert params[1].get("value") == "60"
             assert params[2].get("value") == "c:\\sys\\bin\\" + ntpath.basename(self.engine_ini_file)
+            step = steps.next()
+            assert step.findtext("./type") == "StifRunCasesTask"
+            params = step.findall("./parameters/parameter")
+            assert params[0].get("value") == "file1.dll"
+            assert params[1].get("value") == "*"
+            assert params[2].get("value") == "60"
+            step = steps.next()
+            assert step.findtext("./type") == "StifRunCasesTask"
+            params = step.findall("./parameters/parameter")
+            assert params[0].get("value") == "file2.dll"
+            assert params[1].get("value") == "*"
+            assert params[2].get("value") == "60"
+            step = steps.next()
+            assert step.findtext("./type") == "StifRunCasesTask"
+            params = step.findall("./parameters/parameter")
+            if tef_test_module:
+                assert params[0].get("value") == "teftestmodule"
+            else:
+                assert params[0].get("value") == "TESTSCRIPTER"
+            assert params[1].get("value") == "*"
+            assert params[2].get("value") == "60"
+            assert params[3].get("value") == r"c:\sys\bin\file1.cfg"
+            if tef_test_module  and ats_stf_enabled.lower() == "true":
+                assert params[4].get("value") == r"c:\spd_logs\xml\teftestmodule.xml"
+            
+            step = steps.next()
+            assert step.findtext("./type") == "StifRunCasesTask"
+            params = step.findall("./parameters/parameter")
+            if tef_test_module:
+                assert params[0].get("value") == "teftestmodule"
+            else:                
+                assert params[0].get("value") == "TESTSCRIPTER"
+            assert params[1].get("value") == "*"
+            assert params[2].get("value") == "60"
+            assert params[3].get("value") == r"c:\sys\bin\file2.cfg"
+            if tef_test_module  and ats_stf_enabled.lower() == "true":
+                assert params[4].get("value") == r"c:\spd_logs\xml\teftestmodule.xml"
+            
+            
         elif harness == "EUNIT":
             _ = self.testmodule_files[0]
             assert step.findtext("./type") == "EUnitTask"
@@ -1569,6 +1744,7 @@
         mocker.expect(test_plan["ctc_run_process_params"]).result(self.ctc_run_process_params)
         mocker.expect(test_plan["report_email"]).result(self.report_email)
         mocker.expect(test_plan["report_type"]).result("")
+        mocker.expect(test_plan["file_store"]).result("")
         mocker.expect(test_plan.sets).result([
             dict(name="set0", image_files=self.image_files, sis_files=self.sis_files,
                  engine_ini_file=self.engine_ini_file, test_harness=self.harness, ctc_enabled="False", component_path=self.component_path, custom_dir=None),
@@ -1613,6 +1789,7 @@
             assert params[-1].get("value") == "c:\\testframework\\" + ntpath.basename(filename)
 
 def test_ats_sut():
+    """Test SymbianUnitTest"""
     opts = Bunch(file_store='', flash_images='', diamonds_build_url='', testrun_name='', device_type='', report_email='', test_timeout='', drop_file='', config_file='', target_platform='', data_dir='', build_drive='', sis_files='', harness='', trace_enabled='', specific_pkg='', ats4_enabled='true', device_hwid='')
 
     test_plan = ats3.Ats3TestPlan(opts)
@@ -1631,4 +1808,4 @@
     step = steps.next()
     assert step.findtext("./type") == "SymbianUnitTestTask"
     params = step.findall("./parameters/parameter")
-    assert params[1].get("value") == r"-tests=c:\sys\bin\file1.dll -noprompt"
\ No newline at end of file
+    assert params[1].get("value") == r"-tests=c:\sys\bin\file1.dll -noprompt"
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats4_aste.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats4_aste.py	Wed Oct 13 16:31:27 2010 +0800
@@ -21,7 +21,6 @@
 
 """ Testing ATS4 ASTE framework. """
 
-# pylint: disable=E1101, R0903, R0911, R0912, W0603, W0142, R0902, R0201
 #E1101 => Mocker shows mockery
 #C0302 => too many lines
 #W0142 => used * or ** magic 
@@ -44,6 +43,8 @@
 
 import ats3.aste
 
+import pythoncorecpythontests.test_ats3_aste
+
 TEST_PATH = None
 TEST_FILES = {}
 TEST_ASSET_FILES = {}
@@ -63,75 +64,7 @@
         self.__dict__.update(kwargs)
 
 def equal_xml(xml1, xml2):
-    """Check the equality of the given XML snippets.
-    
-    Tag name equality:
-    
-    >>> equal_xml('<a/>', '<a/>')
-    True
-    >>> equal_xml('<a/>', '<b/>')
-    False
-    
-    Attribute equality:
-    
-    >>> equal_xml('<a k="v"/>', '<a k="v"/>')
-    True
-    >>> equal_xml('<a k="v"/>', '<a k="w"/>')
-    False
-    
-    Text content equality:
-    
-    >>> equal_xml('<a>v</a>', '<a>v</a>')
-    True
-    >>> equal_xml('<a>v</a>', '<a>w</a>')
-    False
-    >>> equal_xml('<a>v</a>', '<a></a>')
-    False
-    
-    Text content equality when whitespace differs:
-    >>> equal_xml('<a>v</a>', '<a>v </a>')
-    True
-
-    Equality of child elements:
-    
-    >>> equal_xml('<a><b><c k="v"/></b></a>', '<a><b><c k="v"/></b></a>')
-    True
-    >>> equal_xml('<a><b><c k="v"/></b></a>', '<a><b><c k="w"/></b></a>')
-    False
-    >>> equal_xml('<a><b><c k="v"/>v</b></a>', '<a><b><c k="v"/>w</b></a>')
-    False
-    >>> equal_xml('<a><b><c k="v"/>v</b></a>', '<a><b><c k="v"/>v </b></a>')
-    True
-    
-    """
-    if isinstance(xml1, basestring):
-        xml1 = fromstring(xml1)
-    if isinstance(xml2, basestring):
-        xml2 = fromstring(xml2)
-    if xml1.tag != xml2.tag:
-        return False
-    if xml1.attrib != xml2.attrib:
-        return False
-    if xml1.text:
-        if not xml2.text:
-            return False
-    if xml2.text:
-        if not xml1.text:
-            return False
-    if xml1.text and xml2.text and xml1.text.strip() != xml2.text.strip():
-        return False
-    if xml1.tail is not None and xml2.tail is not None:
-        if xml1.tail.strip() != xml2.tail.strip():
-            return False
-    elif xml1.tail != xml2.tail:
-        return False
-    children1 = list(xml1.getchildren())
-    children2 = list(xml2.getchildren())
-    if len(children1) != len(children2):
-        return False
-    for child1, child2 in zip(children1, children2):
-        return equal_xml(child1, child2)
-    return True        
+    return pythoncorecpythontests.test_ats3_aste.equal_xml(xml1, xml2)    
 
 
 def setup_module():
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_atsconfigparser.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_atsconfigparser.py	Wed Oct 13 16:31:27 2010 +0800
@@ -100,3 +100,64 @@
         self.assert_( '<property name="HARNESS2" value="STIF2"/>' in output)
         self.assert_( '<property name="HARNESS2" value="STIF3"/>' not in output)
         self.assert_( '<property name="HARNESS3" value="STIF2"/>' in output)
+
+
+    def test_converttestxml_ats4(self):
+        spectext = """<ATSConfigData>
+    <config name="common" abstract="true">
+
+        <!-- Properties to add/modify -->
+        <config type="properties">
+           <set name="HARNESS" value="STIFx" />
+           <set name="HARNESS2" value="STIF2"/>
+           <set name="HARNESS3" value="STIF2"/>
+           <set name="2" value="3" />
+        </config>
+
+        <!-- Attributes to modify -->
+        <config type="attributes">
+           <set name="xyz" value="2" />
+           <set name="significant" value="true" />
+        </config>
+
+    </config>
+</ATSConfigData>
+        """
+        testxmldataats4 = """<testrun>
+    <metadata>
+        <meta name="name">mybuild</meta> 
+    </metadata>
+    
+    <agents>
+        <agent alias="DEFAULT_GENERIC">
+            <property name="hardware" value="product"/>
+        </agent>
+    </agents>
+
+    <execution defaultAgent="DEFAULT_GENERIC">
+        <initialization>
+        </initialization>    
+
+        <finalization>
+        </finalization>    
+    </execution>    
+    
+    <postActions>        
+    </postActions>
+</testrun>
+        """
+        
+        (file_descriptor, filename) = tempfile.mkstemp()
+        file_handle = os.fdopen(file_descriptor, 'w')
+        file_handle.write(spectext)
+        file_handle.close()
+
+        output = ats3.atsconfigparser.converttestxml(filename, testxmldataats4)
+        os.remove(filename)
+        
+        self.assert_( '<property name="2" value="3"/>' in output)
+        self.assert_( '<property name="HARNESS" value="STIFx"/>' in output)
+        self.assert_( '<property name="HARNESS" value="STIF"/>' not in output)
+        self.assert_( '<property name="HARNESS2" value="STIF2"/>' in output)
+        self.assert_( '<property name="HARNESS2" value="STIF3"/>' not in output)
+        self.assert_( '<property name="HARNESS3" value="STIF2"/>' in output)
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_bootup_testing.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,147 @@
+# -*- coding: latin-1 -*-
+
+#============================================================================ 
+#Name        : test_bootup_testing.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+
+""" Testing Bootup tests framework. """
+
+# pylint: disable=E1101
+
+import logging
+logging.getLogger().setLevel(logging.INFO)
+import os
+#import shutil
+from path import path
+import ats3.bootup_testing
+import tempfile
+import zipfile
+import platform
+
+TEST_PATH = None
+TEST_FILES = {}
+OUTPUT = None
+TOTAL_TESTS_COUNT = 3
+
+
+class Bunch(object):
+    """ Configuration object. Argument from constructor are converted into class attributes. """
+    def __init__(self, **kwargs):
+        self.__dict__.update(kwargs)
+        
+class SetUp(object):
+    """ Setup the module. """
+    
+    def __init__(self):
+        """ Setup test environment. """
+        global TEST_PATH, OUTPUT
+
+        TEST_PATH = path(tempfile.mkdtemp())
+        component = TEST_PATH
+        component.joinpath("ats_build_drive").makedirs()
+        for path_parts in (("output", "images", "image1.fpsx"),
+                           ("output", "images", "image2.fpsx"),
+                           ("output", "ats", "temp.txt")):
+            filepath = component.joinpath(*path_parts)
+            if not filepath.parent.exists():
+                filepath.parent.makedirs()
+            filepath.touch()
+            TEST_FILES.setdefault(path_parts[1], []).append(filepath)
+        
+        OUTPUT = component.joinpath(r"output")
+        
+        if not filepath.parent.exists():
+            filepath.parent.makedirs()
+        filepath.touch()
+
+
+def teardown_module(test_run_count):
+    """ stuff to do after running the tests """
+
+    if test_run_count == 0:
+        path(TEST_PATH).rmtree()  
+
+class TestBootupTestPlan(SetUp):
+    """ test BootupTestDrop.py """
+
+    def __init__(self):
+        """initialize bootup Tests"""
+        SetUp.__init__(self)
+        self.file_store = OUTPUT
+        self.build_drive = "j:"
+        self.drop_file = path(r"%s/ats/ATSBootupDrop.zip" %OUTPUT).normpath()
+
+        image_files = r"%s/images/image1.fpsx, %s/images/image2.fpsx " % (OUTPUT, OUTPUT)
+        self.flash_images = image_files 
+        self.config = None
+
+    def read_xml(self, file_location, zip_file=False):
+        """reads test.xml file if a path is given"""
+
+        xml_text = ""
+        file_location = path(file_location)
+        if zip_file:
+            if zipfile.is_zipfile(file_location):
+                myzip = zipfile.ZipFile(file_location, 'r')
+                xml_text = myzip.read('test.xml')
+                myzip.close()
+
+        else:
+            hnd = open(file_location, 'r')
+            for line in hnd.readlines():
+                xml_text = xml_text + line
+
+        return xml_text
+
+    def test_xml_file(self):
+        """ test bootup_testing.py generates correct test.xml file"""
+        global TOTAL_TESTS_COUNT
+        opts = Bunch(build_drive=self.build_drive,
+                     drop_file=path(r"%s/ats/ATSBootupDrop.zip" %OUTPUT).normpath(),
+                     flash_images=self.flash_images,
+                     template_loc="",
+                     file_store=self.file_store,
+                     report_email="firstname.lastname@domain.com",
+                     testrun_name="Bootup test run",
+                     alias_name="alias",
+                     device_type="new_device",
+                     diamonds_build_url="http://diamonds.com/1234",
+                     email_format="simplelogger",
+                     email_subject="Bootup test report",
+                     verbose="false")
+
+        self.config = ats3.bootup_testing.Configuration(opts)
+        ats3.bootup_testing.create_drop(self.config)
+
+        xml_loc = os.path.join(os.environ['TEST_DATA'], 'data/bootup_testing/test_bootup.xml')
+        stored_xml = self.read_xml(xml_loc, False).strip()
+        drop_loc = os.path.join(OUTPUT, 'ats/ATSBootupDrop.zip')
+        generated_xml = self.read_xml(drop_loc, True).strip()
+
+        if platform.system().lower() == "linux":
+            assert stored_xml.replace('\r', '') in generated_xml
+        else:
+            assert stored_xml in generated_xml
+            
+        TOTAL_TESTS_COUNT -= 1
+        teardown_module(TOTAL_TESTS_COUNT)
+
+        
+        
+        
+        
\ No newline at end of file
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_buildmodel.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_buildmodel.py	Wed Oct 13 16:31:27 2010 +0800
@@ -77,7 +77,7 @@
 class BOMTest(unittest.TestCase):
     """ Test BOM and related classes. """
     
-# TODO - removed until non-Synergy dependent tests can be provided.
+# Removed until non-Synergy dependent tests can be provided.
 
 #    def test_bom_output(self):
 #        """ Test basic BOM execution. Only new spec format will be covered!"""
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_logger.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_logger.py	Wed Oct 13 16:31:27 2010 +0800
@@ -21,6 +21,7 @@
 import logging
 import os
 import unittest
+import urllib2
 
 import helium.logger
 import helium.outputer
@@ -88,10 +89,13 @@
         mclogger.WriteToFile('log.xml')
         
         _logger.info(mclogger)
-        
-        out = helium.outputer.XML2XHTML('log.xml')
-        out.generate()
-        out.WriteToFile('log.html')
+
+        try:
+            out = helium.outputer.XML2XHTML('log.xml')
+            out.generate()
+            out.WriteToFile('log.html')
+        except urllib2.URLError, e:
+            _logger.warning('Test cannont run properly as the configuration url cannot be accessed properly.')
         
         os.unlink('log.xml')
         os.unlink('log.html')
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_matti.py	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,209 +0,0 @@
-# -*- coding: latin-1 -*-
-
-#============================================================================ 
-#Name        : test_matti.py 
-#Part of     : Helium 
-
-#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-#All rights reserved.
-#This component and the accompanying materials are made available
-#under the terms of the License "Eclipse Public License v1.0"
-#which accompanies this distribution, and is available
-#at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-#Initial Contributors:
-#Nokia Corporation - initial contribution.
-#
-#Contributors:
-#
-#Description:
-#===============================================================================
-
-""" Testing MATTI framework. """
-
-# pylint: disable=E1101
-
-import logging
-logging.getLogger().setLevel(logging.ERROR)
-import os
-#import shutil
-from path import path
-import ats3.aste
-import ats3.matti.MattiDrops
-import tempfile
-
-TEST_FILE_NAME = 'test.xml'
-ZIP_FILE_NAME = os.path.join(tempfile.mkdtemp(), 'MATTIDrop.zip')
-
-class Bunch(object):
-    """do something with the paramerters passed to it"""    
-    def __init__(self, **kwargs): 
-        self.__dict__.update(kwargs)
-    
-
-def equal_xml(result, expect):
-    """Check the equality of the given XML snippets. """
-#    logging.info(" expect %s" % expect)
-#    xml1 = objectify.fromstring(expect)
-#    expect1 = etree.tostring(xml1)
-#    logging.info(" expect1 %s" % expect1)
-#    logging.info(" expect2 -------------%s" % expect2)
-#            
-#    xml2 = objectify.fromstring(result)
-#    result2 = etree.tostring(xml2)        
-#    self.assertEquals(expect1, result1)
-#
-#    if xml1.tag != xml2.tag:
-#        return False
-#    if xml1.attrib != xml2.attrib:
-#        return False
-#    if xml1.text:
-#        if not xml2.text:
-#            return False
-#    if xml2.text:
-#        if not xml1.text:
-#            return False
-#    if xml1.text and xml2.text and xml1.text.strip() != xml2.text.strip():
-#        return False
-#    if xml1.tail is not None and xml2.tail is not None:
-#        if xml1.tail.strip() != xml2.tail.strip():
-#            return False
-#    elif xml1.tail != xml2.tail:
-#        return False
-#    children1 = list(xml1.getchildren())
-#    children2 = list(xml2.getchildren())
-#    if len(children1) != len(children2):
-#        return False
-#    for child1, child2 in zip(children1, children2):
-#        return equal_xml(child1, child2)
-#    return True
-    if expect:
-        return result   
-
-
-def setup_module():
-    """ stuff to do before running the tests """
-    pass    
-    
-def teardown_module():
-    """ stuff to do after running the tests """
-    if os.path.exists(TEST_FILE_NAME):
-        os.remove(TEST_FILE_NAME)
-    if os.path.exists(ZIP_FILE_NAME):
-        os.remove(ZIP_FILE_NAME)
-    
-    
-class TestPlanMatti():
-    """ test MattiDrop.py """
-    def __init__(self): 
-        self.config = None
-        self.tp_result = None
-        
-        (_, self.image1) = tempfile.mkstemp()
-        (_, self.image2) = tempfile.mkstemp()
-        (_, self.image3) = tempfile.mkstemp()
-        (_, self.sis1) = tempfile.mkstemp()
-        (_, self.sis2) = tempfile.mkstemp()
-            
-    def test_all_present(self):
-        """ test mattiDrops.py with all parameters present and correct"""
-        teardown_module()
-        opts = Bunch(build_drive="z:", 
-             matti_scripts=os.path.join(os.environ['TEST_DATA'], 'data/matti'),
-             flash_images = '%s,%s,%s' % (self.image1, self.image2, self.image3),
-             report_email="", harness="STIF", 
-             file_store=path(), testrun_name="testrun",  
-             device_type="product", device_hwid="5425", diamonds_build_url="", drop_file=ZIP_FILE_NAME, 
-             minimum_flash_images="2", plan_name="matti_test_plan", 
-             sis_files = '%s,%s' % (self.sis1, self.sis2),
-             template_loc=os.path.join(os.path.dirname(__file__), '../ats3/matti/template/matti_demo.xml'), 
-             test_timeout="60", verbose="false")
-       
-        self.config = ats3.matti.MattiDrops.Configuration(opts)
-        self.tp_result = ats3.matti.MattiDrops.create_drop(self.config)
-        assert os.path.exists(ZIP_FILE_NAME)
-        assert os.path.exists(TEST_FILE_NAME)
-        #shutil.copy(TEST_FILE_NAME, os.path.join(TMPDIR, 'test_all_present.xml'))
-        #equal_xml(TEST_FILE_NAME, os.path.join(TMPDIR, 'test_all_present.xml'))
-        
-    def test_no_sis_or_flash_files(self):
-        """test mattiDrops.py with no sis or flash files in the parameters"""
-        teardown_module()
-        opts = Bunch(build_drive="z:", 
-             matti_scripts=os.path.join(os.environ['TEST_DATA'], 'data/matti'),
-             flash_images = "",
-             report_email="", harness="STIF", 
-             file_store=path(), testrun_name="testrun",  
-             device_type="product", device_hwid="5425", diamonds_build_url="", drop_file=ZIP_FILE_NAME, 
-             minimum_flash_images="2", plan_name="matti_test_plan", 
-             sis_files= "", 
-             template_loc=os.path.join(os.path.dirname(__file__), '../ats3/matti/template/matti_demo.xml'), 
-             test_timeout="60", verbose="true")
-       
-        self.config = ats3.matti.MattiDrops.Configuration(opts)
-        self.tp_result = ats3.matti.MattiDrops.create_drop(self.config)
-        assert os.path.exists(ZIP_FILE_NAME)
-        assert os.path.exists(TEST_FILE_NAME)
-        #shutil.copy(TEST_FILE_NAME, os.path.join(TMPDIR, 'test_no_sis_or_flash.xml'))
-        #equal_xml(TEST_FILE_NAME, os.path.join(TMPDIR, 'test_no_sis_or_flash.xml'))
-
-
-    def test_no_files(self):
-        """ test mattiDtops.py with no filespresent at all"""
-        teardown_module()
-        opts = Bunch(build_drive="z:", 
-             matti_scripts=tempfile.mkdtemp(), 
-             flash_images = "",
-             report_email="", harness="STIF", 
-             file_store=path(), testrun_name="testrun",  
-             device_type="product", device_hwid="5425", diamonds_build_url="", drop_file=ZIP_FILE_NAME, 
-             minimum_flash_images="2", plan_name="matti_test_plan", 
-             sis_files= "", 
-             template_loc=os.path.join(os.path.dirname(__file__), '../ats3/matti/template/matti_demo.xml'), 
-             test_timeout="60", verbose="true")
-        self.config = ats3.matti.MattiDrops.Configuration(opts)
-        self.tp_result = ats3.matti.MattiDrops.create_drop(self.config)
-        assert not os.path.exists(ZIP_FILE_NAME)
-        assert os.path.exists(TEST_FILE_NAME)
-        #shutil.copy(TEST_FILE_NAME, os.path.join(TMPDIR, 'test_no_files.xml'))
-        #equal_xml(TEST_FILE_NAME, os.path.join(TMPDIR, 'test_no_files.xml'))
-
-    def test_no_params(self):
-        """test MattiDrops.py with no parameters present at all"""
-        teardown_module()
-        opts = Bunch(build_drive="", 
-             matti_scripts="", 
-             flash_images = "",
-             report_email="", harness="", 
-             file_store="", testrun_name="",  
-             device_type="", device_hwid="", diamonds_build_url="", drop_file="", 
-             minimum_flash_images="", plan_name="", 
-             sis_files= "", 
-             template_loc="", 
-             test_timeout="", verbose="true")
-       
-        self.config = ats3.matti.MattiDrops.Configuration(opts)
-        self.tp_result = ats3.matti.MattiDrops.create_drop(self.config)
-        assert not os.path.exists(ZIP_FILE_NAME)
-        assert not os.path.exists(TEST_FILE_NAME)
-
-    def test_some_not_present(self):
-        """ test MattiDrops.py with an extra file not present in the dir"""
-        teardown_module()
-        opts = Bunch(build_drive="z:", 
-             matti_scripts=os.path.join(os.environ['TEST_DATA'], 'data/matti'),
-             flash_images = '%s,%s,%s' % (self.image1, self.image2, self.image3),
-             report_email="", harness="STIF", 
-             file_store=path(), testrun_name="testrun",  
-             device_type="product", device_hwid="5425", diamonds_build_url="", drop_file=ZIP_FILE_NAME, 
-             minimum_flash_images="2", plan_name="matti_test_plan", 
-             sis_files = '%s,%s' % (self.sis1, self.sis2),
-             template_loc=os.path.join(os.path.dirname(__file__), '../ats3/matti/template/matti_demo.xml'), 
-             test_timeout="60", verbose="false")
-       
-        self.config = ats3.matti.MattiDrops.Configuration(opts)
-        self.tp_result = ats3.matti.MattiDrops.create_drop(self.config)
-        assert os.path.exists(ZIP_FILE_NAME)
-        assert os.path.exists(TEST_FILE_NAME)
-        #shutil.copy(TEST_FILE_NAME, os.path.join(TMPDIR, 'test_some_not_present.xml'))
-        #equal_xml(TEST_FILE_NAME, os.path.join(TMPDIR, 'test_some_not_present.xml'))
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_matti2.py	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,294 +0,0 @@
-# -*- coding: latin-1 -*-
-
-#============================================================================ 
-#Name        : test_matti2.py 
-#Part of     : Helium 
-
-#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-#All rights reserved.
-#This component and the accompanying materials are made available
-#under the terms of the License "Eclipse Public License v1.0"
-#which accompanies this distribution, and is available
-#at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-#Initial Contributors:
-#Nokia Corporation - initial contribution.
-#
-#Contributors:
-#
-#Description:
-#===============================================================================
-
-""" Testing MATTI framework. """
-
-# pylint: disable=E1101
-
-import logging
-logging.getLogger().setLevel(logging.INFO)
-import os
-#import shutil
-from path import path
-import ats3.matti2
-import tempfile
-import zipfile
-import platform
-
-TEST_PATH = None
-TEST_FILES = {}
-MATTI = None
-OUTPUT = None
-SISFILES = None
-TOTAL_TESTS_COUNT = 3
-
-
-class Bunch(object):
-    """ Configuration object. Argument from constructor are converted into class attributes. """
-    def __init__(self, **kwargs):
-        self.__dict__.update(kwargs)
-        
-class SetUp(object):
-    """ Setup the module. """
-    
-    def __init__(self):
-        """ Setup test environment. """
-        global TEST_PATH, MATTI, OUTPUT, SISFILES
-
-        TEST_PATH = path(tempfile.mkdtemp())
-        component = TEST_PATH
-        component.joinpath("matti").makedirs()
-        for path_parts in (("matti_testcases", "profile", "all.sip"),
-                           ("matti_testcases", "profile", "bat.sip"),
-                           ("matti_testcases", "profile", "fute.sip"),
-                           ("matti_testcases", "hwdata", "paths.pkg"),
-                           ("matti_testcases", "hwdata", "file1.txt"),
-                           ("matti_testcases", "hwdata", "settings.ini"),
-                           ("matti_testcases", "matti_parameters", "matti_parameters.xml"),
-                           ("matti_testcases", "unit_test1.rb"),
-                           ("matti_testcases", "unit_test2.rb"),
-                           ("output", "images", "image1.fpsx"),
-                           ("output", "images", "image2.fpsx"),
-                           ("sisfiles", "abc.sis"),
-                           ("sisfiles", "xyz.sis"),
-                           ("output", "ats", "temp.txt")):
-            filepath = component.joinpath(*path_parts)
-            if not filepath.parent.exists():
-                filepath.parent.makedirs()
-            filepath.touch()
-            TEST_FILES.setdefault(path_parts[1], []).append(filepath)
-        
-        OUTPUT = component.joinpath(r"output")
-        MATTI = component.joinpath("matti_testcases")
-        SISFILES = component.joinpath(r"sisfiles")
-        
-        if not filepath.parent.exists():
-            filepath.parent.makedirs()
-        filepath.touch()
-        
-        #mtc => matti_testcases
-        mtc = component.joinpath("matti_testcases")
-        mtc.joinpath("unit_test1.rb").write_text("unit_tests")
-        mtc.joinpath("unit_test2.rb").write_text("unit_tests")
-    
-        # profiles
-        profiles = component.joinpath("matti_testcases", "profile")
-        profiles.joinpath("all.sip").write_text("sip profile")
-        profiles.joinpath("bat.sip").write_text("sip profile")
-        profiles.joinpath("fute.sip").write_text("sip profile")
-        
-        #hwdata => hardware data
-        profiles = component.joinpath("matti_testcases", "hwdata")
-        profiles.joinpath("file1.txt").write_text("data file")
-        profiles.joinpath("settings.ini").write_text("settings initialization file")
-        profiles.joinpath("paths.pkg").write_text(
-            r"""
-            ;Language - standard language definitions
-            &EN
-            
-            ; standard SIS file header
-            #{"BTEngTestApp"},(0x04DA27D5),1,0,0
-            
-            ;Supports Series 60 v 3.0
-            (0x101F7961), 0, 0, 0, {"Series60ProductID"}
-            
-            ;Localized Vendor Name
-            %{"BTEngTestApp"}
-            
-            ;Unique Vendor name
-            :"Nokia"
-            
-            ; Files to copy
-    
-            "[PKG_LOC]\file1.txt"-"C:\Private\10202BE9\PERSISTS\file1.txt"
-            "[PKG_LOC]\settings.ini"-"c:\sys\settings.ini"
-            """.replace('\\', os.sep))
-
-
-def teardown_module(test_run_count):
-    """ stuff to do after running the tests """
-
-    if test_run_count == 0:
-        path(TEST_PATH).rmtree()  
-
-class TestMattiTestPlan(SetUp):
-    """ test MattiDrop.py """
-    global OUTPUT, MATTI, SISFILES
-
-    def __init__(self):
-        """initialize Matti Tests"""
-        SetUp.__init__(self)
-        self.file_store = OUTPUT
-        self.test_asset_path = MATTI
-        self.matti_sis_files = r"%s/abc.sis#f:\data\abc.sis#c:\abc.sis, %s/xyz.sis#f:\data\abc.sis#f:\xyz.sis" % (SISFILES, SISFILES)
-        self.build_drive = "j:"
-        self.drop_file = path(r"%s/ats/ATSMattiDrop.zip" %OUTPUT).normpath()
-
-        image_files = r"%s/images/image1.fpsx, %s/images/image2.fpsx " % (OUTPUT, OUTPUT)
-        self.flash_images = image_files 
-
-        self.template_loc = os.path.join(os.environ['TEST_DATA'], 'data/matti/matti_template.xml')
-        self.template_loc = os.path.normpath(self.template_loc)
-        self.matti_parameters = ""
-        self.config = None
-
-    def read_xml(self, file_location, zip_file=False):
-        """reads test.xml file if a path is given"""
-
-        xml_text = ""
-        file_location = path(file_location)
-        if zip_file:
-            if zipfile.is_zipfile(file_location):
-                myzip = zipfile.ZipFile(file_location, 'r')
-                xml_text = myzip.read('test.xml')
-                myzip.close()
-
-        else:
-            hnd = open(file_location, 'r')
-            for line in hnd.readlines():
-                xml_text = xml_text + line
-
-        return xml_text
-
-    def test_xml_with_all_parameters(self):
-        """ test Matti2.py with all parameters present and correct and sierra is enabled"""
-        global TOTAL_TESTS_COUNT
-        opts = Bunch(build_drive=self.build_drive,
-                     drop_file=path(r"%s/ats/ATSMattiDrop1.zip" %OUTPUT).normpath(),
-                     flash_images=self.flash_images,
-                     matti_sis_files=self.matti_sis_files,
-                     testasset_location=self.test_asset_path,
-                     template_loc=self.template_loc,
-                     sierra_enabled="True",
-                     test_profiles="bat, fute",
-                     matti_parameters="",
-                     matti_timeout="1200",
-                     sierra_parameters="--teardown",
-                     file_store=self.file_store,
-                     report_email="firstname.lastname@domain.com",
-                     testrun_name="matti test run",
-                     alias_name="alias",
-                     device_type="new_device",
-                     diamonds_build_url="http://diamonds.com/1234",
-                     email_format="simplelogger",
-                     email_subject="Matti test report",
-                     verbode="false")
-
-        self.config = ats3.matti2.Configuration(opts)
-        ats3.matti2.create_drop(self.config)
-
-        xml_loc = os.path.join(os.environ['TEST_DATA'], 'data/matti/test_all_present.xml')
-        stored_xml = self.read_xml(xml_loc, False).strip()
-        drop_loc = os.path.join(OUTPUT, 'ats/ATSMattiDrop1.zip')
-        generated_xml = self.read_xml(drop_loc, True).strip()
-
-        if platform.system().lower() == "linux":
-            assert stored_xml.replace('\r', '') in generated_xml
-        else:
-            assert stored_xml in generated_xml
-            
-        TOTAL_TESTS_COUNT -= 1
-        teardown_module(TOTAL_TESTS_COUNT)
-
-    def test_xml_if_sierra_is_not_enabled(self):
-        """ test Matti2.py with all parameters present and correct and sierra is not enabled (or false)"""
-        global TOTAL_TESTS_COUNT
-        opts = Bunch(build_drive=self.build_drive,
-                     drop_file=path(r"%s/ats/ATSMattiDrop2.zip" %OUTPUT).normpath(),
-                     flash_images=self.flash_images,
-                     matti_sis_files=self.matti_sis_files,
-                     testasset_location=self.test_asset_path,
-                     template_loc=self.template_loc,
-                     sierra_enabled="False",
-                     test_profiles="bat, fute",
-                     matti_parameters="",
-                     matti_timeout="1200",
-                     sierra_parameters="--teardown",
-                     file_store=self.file_store,
-                     report_email="firstname.lastname@domain.com",
-                     testrun_name="matti test run",
-                     alias_name="alias",
-                     device_type="new_device",
-                     diamonds_build_url="http://diamonds.com/1234",
-                     email_format="simplelogger",
-                     email_subject="Matti test report",
-                     verbode="false")
-
-        self.config = ats3.matti2.Configuration(opts)
-        ats3.matti2.create_drop(self.config)
-
-        xml_loc = os.path.join(os.environ['TEST_DATA'], 'data/matti/test_all_present_sierra_disabled.xml')
-        stored_xml = self.read_xml(xml_loc, False).strip()
-        drop_loc = os.path.join(OUTPUT, 'ats/ATSMattiDrop2.zip')
-        generated_xml = self.read_xml(drop_loc, True).strip()
-
-        if platform.system().lower() == "linux":
-            assert stored_xml.replace('\r', '') in generated_xml
-        else:
-            assert stored_xml in generated_xml
-        
-        TOTAL_TESTS_COUNT -= 1
-        teardown_module(TOTAL_TESTS_COUNT)
-
-    def test_xml_if_sierra_is_enabled_template_location_is_missing(self):
-        """ test Matti2.py with all parameters present and correct and if sierra is enabled but template location is used as default one"""
-        global TOTAL_TESTS_COUNT
-        opts = Bunch(build_drive=self.build_drive,
-                     drop_file=path(r"%s/ats/ATSMattiDrop3.zip" %OUTPUT).normpath(),
-                     flash_images=self.flash_images,
-                     matti_sis_files=self.matti_sis_files,
-                     testasset_location=self.test_asset_path,
-                     template_loc="",
-                     sierra_enabled="True",
-                     test_profiles="bat, fute",
-                     matti_parameters="",
-                     matti_timeout="1200",
-                     sierra_parameters="--teardown",
-                     file_store=self.file_store,
-                     report_email="firstname.lastname@domain.com",
-                     testrun_name="matti test run",
-                     alias_name="alias",
-                     device_type="new_device",
-                     diamonds_build_url="http://diamonds.com/1234",
-                     email_format="simplelogger",
-                     email_subject="Matti test report",
-                     verbode="false")
-        
-        self.config = ats3.matti2.Configuration(opts)
-        ats3.matti2.create_drop(self.config)
-
-        xml_loc = os.path.join(os.environ['TEST_DATA'], 'data/matti/test_all_present.xml')
-        stored_xml = self.read_xml(xml_loc, False).strip()
-        drop_loc = os.path.join(OUTPUT, 'ats/ATSMattiDrop3.zip')
-        generated_xml = self.read_xml(drop_loc, True).strip()
-
-        if platform.system().lower() == "linux":
-            assert stored_xml.replace('\r', '') in generated_xml
-        else:
-            assert stored_xml in generated_xml
-        
-        TOTAL_TESTS_COUNT -= 1
-        teardown_module(TOTAL_TESTS_COUNT)        
-        
-        
-        
-        
-        
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_quality.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,59 @@
+#============================================================================ 
+#Name        : test_quality.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+
+"""Test the archive.py module."""
+
+from __future__ import with_statement
+import os
+import unittest
+import logging
+import fileutils
+import pythoncorecpythontests.test_fileutils
+import integration.quality
+
+_logger = logging.getLogger('test.quality')
+    
+    
+root_test_dir = pythoncorecpythontests.test_fileutils.root_test_dir
+
+def setup_module():
+    """ Creates some test data files for file-related testing. """
+    pythoncorecpythontests.test_fileutils.setup_module()
+    
+def teardown_module():
+    """ Cleans up test data files for file-related testing. """
+    pythoncorecpythontests.test_fileutils.teardown_module()
+    
+    
+class QualityTest(unittest.TestCase):
+    
+    def test_epl_validate_content(self):
+        """Tests loading policy ID's from CSV file for EPL"""
+        pattern = "distribution.policy.s60,distribution.policy,distribution.policy.pp"
+        ignoreroot = False
+        excludes = ".static_wa,_ccmwaid.inf"
+        validator = integration.quality.PolicyValidator(pattern, ignoreroot=ignoreroot, excludes=excludes)
+        
+        validator.epl_load_policy_ids(os.path.join(os.environ['TEST_DATA'], 'data/distribution.policy.extended_for_sf.id_status.csv'))
+        
+        assert validator.epl_validate_content(os.path.join(os.environ['TEST_DATA'], 'data/distribution.policy.S60')) == True
+        assert validator.epl_validate_content(os.path.join(os.environ['TEST_DATA'], 'data/Invalid_distribution.policy.S60')) == False
+
+if __name__ == "__main__":
+    unittest.main()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_sphinx_ext.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,121 @@
+#============================================================================ 
+#Name        : test_sphinx_ext.py 
+#Part of     : Helium 
+
+#Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+
+""" Test sphinx_ext module. """
+import re
+
+import logging
+import os
+import time
+import unittest
+import sys
+import mocker
+import sphinx_ext
+
+_logger = logging.getLogger('test.sphinx_ext')
+random_number = 10
+
+class SphinxTest(mocker.MockerTestCase):
+    """ Class for testing sphinx_ext module """
+    def __init__(self, methodName="runTest"):
+        mocker.MockerTestCase.__init__(self, methodName)
+        
+    def setUp(self):
+        # some dummy input
+        self.inlineDocument = r'<document source="C:\helium-working\helium\build\temp\doc\api\helium\macros_list.rst"><section ids="macros-list" names="macros\ list"><title>Macros list</title></section></document>'
+        sphinx_ext.exit_with_failure = 0
+        sphinx_ext.database_path = os.path.join(os.environ['TEST_DATA'], "data", "test_database.xml")
+        
+    def test_handle_hlm_role_callback(self):
+        """ Check roles and description unit."""
+        obj = _MockApp()
+        sphinx_ext.setup(obj)
+        assert 'hlm-t' in obj.dict.keys()
+        assert 'hlm-p' in obj.dict.keys()
+        assert 'hlm-m' in obj.dict.keys()
+        assert sphinx_ext.handle_hlm_role == obj.dict['hlm-t']
+        assert sphinx_ext.handle_hlm_role == obj.dict['hlm-p']
+        assert sphinx_ext.handle_hlm_role == obj.dict['hlm-m']
+        assert ['property', 'ant-prop', 'pair: %s; property'] in obj.descUnit
+        assert ['target', 'ant-target', 'pair: %s; target'] in obj.descUnit  
+     
+    def test_handle_hlm_role_target(self):
+        """ Check target to build the link """
+        obj = self.mocker.mock(count=False)
+        mocker.expect(obj.document).result(self.inlineDocument) 
+        self.mocker.replay()              
+        response = sphinx_ext.handle_hlm_role('hlm-t' , "", 'cmaker-install', random_number, obj)
+        assert "../../api/helium/project-compile.cmaker.html#cmaker-install" in response[0][0].children[0].attributes['refuri']
+        
+    def test_handle_hlm_role_property(self):
+        """ Check property to build the link """
+        obj = self.mocker.mock(count=False)
+        mocker.expect(obj.document).result(self.inlineDocument) 
+        self.mocker.replay()              
+        response = sphinx_ext.handle_hlm_role('hlm-p' , "", 'cmaker-export', random_number, obj)
+        assert "../../api/helium/project-compile.cmaker.html#cmaker-export" in response[0][0].children[0].attributes['refuri']
+        
+        
+    def test_handle_hlm_role_macro(self):
+        """ Check macro to build the link """
+        obj = self.mocker.mock(count=False)
+        mocker.expect(obj.document).result(self.inlineDocument) 
+        self.mocker.replay()              
+        response = sphinx_ext.handle_hlm_role('hlm-m' , "", 'cmaker-export', random_number, obj)
+        assert "../../api/helium/project-compile.cmaker.html#cmaker-export" in response[0][0].children[0].attributes['refuri']
+        
+    def test_handle_hlm_role_missing_api(self):
+        """ Check for failure when there are missing api's """
+        error = ""
+        line = ""
+        obj = self.mocker.mock(count=False)
+        mocker.expect(obj.document).result(self.inlineDocument) 
+        mocker.expect(obj.reporter.error('Missing API doc for "cmaker-clean".', line=random_number)).result('Missing API doc for "cmaker-clean".') 
+        self.mocker.replay()
+        sphinx_ext.handle_hlm_role('hlm-t' , "", 'cmaker-clean', random_number, obj)
+        
+    def test_handle_hlm_role_missing_field_value(self):
+        """ Check for failure when there are missing fields for api's """
+        error = ""
+        line = ""
+        obj = self.mocker.mock(count=False)
+        mocker.expect(obj.document).result(self.inlineDocument) 
+        mocker.expect(obj.reporter.error('Field value cannot be found for API field: "cmaker-export[summary]".', line=random_number)).result('Field value cannot be found for API field: "cmaker-export[summary]".') 
+        self.mocker.replay()
+        sphinx_ext.handle_hlm_role('hlm-t' , "", 'cmaker-export[summary]', random_number, obj)
+        
+    def test_handle_hlm_role_valid_field_value(self):
+        """ Check when there is '[' present """
+        obj = self.mocker.mock(count=False)
+        mocker.expect(obj.document).result(self.inlineDocument)
+        self.mocker.replay()
+        response = sphinx_ext.handle_hlm_role('hlm-t' , "", 'cmaker-export[location]', random_number, obj)
+        assert r"C:\Helium_svn\helium\tools\compile\cmaker.ant.xml:87:" in response[0][0].data
+       
+class _MockApp:
+
+    def __init__(self):
+        self.dict = {}
+        self.descUnit = []
+        
+    def add_role(self, role, ref):
+        self.dict[role] = ref
+        
+    def add_description_unit(self, text1, text2, text3):
+        self.descUnit.append([text1, text2, text3])
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_tdriver.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,314 @@
+# -*- coding: latin-1 -*-
+
+#============================================================================ 
+#Name        : test_tdriver.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+
+""" Testing TDriver framework. """
+
+# pylint: disable=E1101
+
+import logging
+logging.getLogger().setLevel(logging.INFO)
+import os
+#import shutil
+from path import path
+import ats3.tdriver
+import tempfile
+import zipfile
+import platform
+import unittest
+
+TEST_PATH = None
+TEST_FILES = {}
+TDRIVER = None
+OUTPUT = None
+SISFILES = None
+
+
+class Bunch(object):
+    """ Configuration object. Argument from constructor are converted into class attributes. """
+    def __init__(self, **kwargs):
+        self.__dict__.update(kwargs)
+        
+def setup_module(_):
+    """ Setup the module. """
+    global TEST_PATH
+    global OUTPUT
+    global TDRIVER
+    global SISFILES
+
+    TEST_PATH = path(tempfile.mkdtemp())
+    component = TEST_PATH
+    component.joinpath("tdriver").makedirs()
+    for path_parts in (("tdriver_testcases", "profile", "all.sip"),
+                       ("tdriver_testcases", "profile", "bat.sip"),
+                       ("tdriver_testcases", "profile", "fute.sip"),
+                       ("tdriver_testcases", "hwdata", "paths.pkg"),
+                       ("tdriver_testcases", "hwdata", "file1.txt"),
+                       ("tdriver_testcases", "hwdata", "settings.ini"),
+                       ("tdriver_testcases", "tdriver_parameters", "tdriver_parameters.xml"),
+                       ("tdriver_testcases", "unit_test1.rb"),
+                       ("tdriver_testcases", "unit_test2.rb"),
+                       ("output", "images", "image1.fpsx"),
+                       ("output", "images", "image2.fpsx"),
+                       ("sisfiles", "abc.sis"),
+                       ("sisfiles", "xyz.sis"),
+                       ("output", "ats", "temp.txt")):
+        filepath = component.joinpath(*path_parts)
+        if not filepath.parent.exists():
+            filepath.parent.makedirs()
+        filepath.touch()
+        TEST_FILES.setdefault(path_parts[1], []).append(filepath)
+    
+    OUTPUT = component.joinpath(r"output")
+    TDRIVER = component.joinpath("tdriver_testcases")
+    SISFILES = component.joinpath(r"sisfiles")
+    
+    if not filepath.parent.exists():
+        filepath.parent.makedirs()
+    filepath.touch()
+    
+    #mtc => tdriver_testcases
+    mtc = component.joinpath("tdriver_testcases")
+    mtc.joinpath("unit_test1.rb").write_text("unit_tests")
+    mtc.joinpath("unit_test2.rb").write_text("unit_tests")
+
+    # profiles
+    profiles = component.joinpath("tdriver_testcases", "profile")
+    profiles.joinpath("all.sip").write_text("sip profile")
+    profiles.joinpath("bat.sip").write_text("sip profile")
+    profiles.joinpath("fute.sip").write_text("sip profile")
+    
+    #hwdata => hardware data
+    profiles = component.joinpath("tdriver_testcases", "hwdata")
+    profiles.joinpath("file1.txt").write_text("data file")
+    profiles.joinpath("settings.ini").write_text("settings initialization file")
+    profiles.joinpath("paths.pkg").write_text(
+        r"""
+        ;Language - standard language definitions
+        &EN
+        
+        ; standard SIS file header
+        #{"BTEngTestApp"},(0x04DA27D5),1,0,0
+        
+        ;Supports Series 60 v 3.0
+        (0x101F7961), 0, 0, 0, {"Series60ProductID"}
+        
+        ;Localized Vendor Name
+        %{"BTEngTestApp"}
+        
+        ;Unique Vendor name
+        :"Nokia"
+        
+        ; Files to copy
+
+        "[PKG_LOC]\file1.txt"-"C:\Private\10202BE9\PERSISTS\file1.txt"
+        "[PKG_LOC]\settings.ini"-"c:\sys\settings.ini"
+        """.replace('\\', os.sep))
+
+
+def teardown_module():
+    """ stuff to do after running the tests """
+    path(TEST_PATH).rmtree()  
+
+class TestTDriverTestPlan(unittest.TestCase):
+    """ test TDriverDrop.py """
+
+    def setUp(self):
+        """initialize TDriver Tests"""
+        self.file_store = OUTPUT
+        self.test_asset_path = TDRIVER
+        self.tdriver_sis_files = r"%s/abc.sis#f:\data\abc.sis#c:\abc.sis, %s/xyz.sis#f:\data\abc.sis#f:\xyz.sis" % (SISFILES, SISFILES)
+        self.build_drive = "j:"
+        self.drop_file = path(r"%s/ats/ATSTDriverDrop.zip" %OUTPUT).normpath()
+
+        image_files = r"%s/images/image1.fpsx, %s/images/image2.fpsx " % (OUTPUT, OUTPUT)
+        self.flash_images = image_files 
+
+        self.template_loc = os.path.join(os.environ['TEST_DATA'], 'data/tdriver/tdriver_template.xml')
+        self.template_loc = os.path.normpath(self.template_loc)
+        self.tdriver_parameters = ""
+        self.config = None
+
+    def read_xml(self, file_location, zip_file=False):
+        """reads test.xml file if a path is given"""
+
+        xml_text = ""
+        file_location = path(file_location)
+        if zip_file:
+            if zipfile.is_zipfile(file_location):
+                myzip = zipfile.ZipFile(file_location, 'r')
+                xml_text = myzip.read('test.xml')
+                myzip.close()
+                xml_text = xml_text.replace("\n", "")
+                xml_text = xml_text.replace("\t", "")
+
+        else:
+            hnd = open(file_location, 'r')
+            for line in hnd.readlines():
+                xml_text = xml_text + line.strip()
+
+        return xml_text
+    
+    def test_xml_with_all_parameters(self):
+        """ test tdriver.py with all parameters present and correct and tdrunner is enabled"""
+        opts = Bunch(build_drive=self.build_drive,
+                     drop_file=path(r"%s/ats/ATSTDriverDrop1.zip" %OUTPUT).normpath(),
+                     flash_images=self.flash_images,
+                     tdriver_sis_files=self.tdriver_sis_files,
+                     testasset_location=self.test_asset_path,
+                     template_loc=self.template_loc,
+                     tdrunner_enabled="True",
+                     test_profiles="bat, fute",
+                     tdriver_parameters="",
+                     tdriver_timeout="1200",
+                     tdrunner_parameters="--teardown",
+                     file_store="",
+                     report_email="firstname.lastname@domain.com",
+                     testrun_name="TDriver test run",
+                     alias_name="alias",
+                     device_type="new_device",
+                     diamonds_build_url="http://diamonds.com/1234",
+                     email_format="simplelogger",
+                     email_subject="TDriver test report",
+                     verbode="false")
+
+        self.config = ats3.tdriver.Configuration(opts)
+        ats3.tdriver.create_drop(self.config)
+
+        xml_loc = os.path.join(os.environ['TEST_DATA'], 'data/tdriver/test_all_present.xml')
+        stored_xml = self.read_xml(xml_loc, False).strip()
+        drop_loc = os.path.join(OUTPUT, 'ats/ATSTDriverDrop1.zip')
+        generated_xml = self.read_xml(drop_loc, True).strip()
+
+        if platform.system().lower() == "linux":
+            assert stored_xml.replace('\r', '') in generated_xml
+        else:
+            assert stored_xml in generated_xml
+            
+
+    def test_xml_if_tdrunner_is_not_enabled(self):
+        """ test tdriver.py with all parameters present and correct and tdrunner is not enabled (or false)"""
+        opts = Bunch(build_drive=self.build_drive,
+                     drop_file=path(r"%s/ats/ATSTDriverDrop2.zip" %OUTPUT).normpath(),
+                     flash_images=self.flash_images,
+                     tdriver_sis_files=self.tdriver_sis_files,
+                     testasset_location=self.test_asset_path,
+                     template_loc=self.template_loc,
+                     tdrunner_enabled="False",
+                     test_profiles="bat, fute",
+                     tdriver_parameters="",
+                     tdriver_timeout="1200",
+                     tdrunner_parameters="--teardown",
+                     file_store=r"\\network\drive",
+                     report_email="firstname.lastname@domain.com",
+                     testrun_name="TDriver test run",
+                     alias_name="alias",
+                     device_type="new_device",
+                     diamonds_build_url="http://diamonds.com/1234",
+                     email_format="simplelogger",
+                     email_subject="TDriver test report",
+                     verbode="false")
+
+        self.config = ats3.tdriver.Configuration(opts)
+        ats3.tdriver.create_drop(self.config)
+
+        xml_loc = os.path.join(os.environ['TEST_DATA'], 'data/tdriver/test_all_present_tdrunner_disabled.xml')
+        stored_xml = self.read_xml(xml_loc, False).strip()
+        drop_loc = os.path.join(OUTPUT, 'ats/ATSTDriverDrop2.zip')
+        generated_xml = self.read_xml(drop_loc, True).strip()
+
+        if platform.system().lower() == "linux":
+            assert stored_xml.replace('\r', '') in generated_xml
+        else:
+            assert stored_xml in generated_xml
+        
+
+    def test_xml_if_tdrunner_is_enabled_template_location_is_missing(self):
+        """ test tdriver.py with all parameters present and correct and if tdrunner is enabled but template location is used as default one"""
+        opts = Bunch(build_drive=self.build_drive,
+                     drop_file=path(r"%s/ats/ATSTDriverDrop3.zip" %OUTPUT).normpath(),
+                     flash_images=self.flash_images,
+                     tdriver_sis_files=self.tdriver_sis_files,
+                     testasset_location=self.test_asset_path,
+                     template_loc="",
+                     tdrunner_enabled="True",
+                     test_profiles="bat, fute",
+                     tdriver_parameters="",
+                     tdriver_timeout="1200",
+                     tdrunner_parameters="--teardown",
+                     file_store="",
+                     report_email="firstname.lastname@domain.com",
+                     testrun_name="TDriver test run",
+                     alias_name="alias",
+                     device_type="new_device",
+                     diamonds_build_url="http://diamonds.com/1234",
+                     email_format="simplelogger",
+                     email_subject="TDriver test report",
+                     verbode="false")
+        
+        self.config = ats3.tdriver.Configuration(opts)
+        ats3.tdriver.create_drop(self.config)
+
+        xml_loc = os.path.join(os.environ['TEST_DATA'], 'data/tdriver/test_all_present.xml')
+        stored_xml = self.read_xml(xml_loc, False).strip()
+        drop_loc = os.path.join(OUTPUT, 'ats/ATSTDriverDrop3.zip')
+        generated_xml = self.read_xml(drop_loc, True).strip()
+
+        if platform.system().lower() == "linux":
+            assert stored_xml.replace('\r', '') in generated_xml
+        else:
+            assert stored_xml in generated_xml
+                
+    def test_ctc(self):
+        """ test ctc """
+        opts = Bunch(build_drive=self.build_drive,
+                     drop_file=path(r"%s/ats/ATSTDriverDrop3.zip" %OUTPUT).normpath(),
+                     flash_images=self.flash_images,
+                     tdriver_sis_files=self.tdriver_sis_files,
+                     testasset_location=self.test_asset_path,
+                     template_loc="",
+                     tdrunner_enabled="True",
+                     test_profiles="bat, fute",
+                     tdriver_parameters="",
+                     tdriver_timeout="1200",
+                     tdrunner_parameters="--teardown",
+                     file_store="",
+                     report_email="firstname.lastname@domain.com",
+                     testrun_name="TDriver test run",
+                     alias_name="alias",
+                     device_type="new_device",
+                     diamonds_build_url="http://diamonds.com/1234",
+                     email_format="simplelogger",
+                     email_subject="TDriver test report",
+                     verbode="false",
+                     ctc_enabled=True)
+        
+        self.config = ats3.tdriver.Configuration(opts)
+        ats3.tdriver.create_drop(self.config)
+
+        xml_loc = os.path.join(os.environ['TEST_DATA'], 'data/tdriver/test_ctc.xml')
+        stored_xml = self.read_xml(xml_loc, False).strip()
+        drop_loc = os.path.join(OUTPUT, 'ats/ATSTDriverDrop3.zip')
+        generated_xml = self.read_xml(drop_loc, True).strip()
+
+        if platform.system().lower() == "linux":
+            assert stored_xml.replace('\r', '') in generated_xml
+        else:
+            assert stored_xml in generated_xml
\ No newline at end of file
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_timeout_launcher.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_timeout_launcher.py	Wed Oct 13 16:31:27 2010 +0800
@@ -32,9 +32,9 @@
 # Platform
 WINDOWS = False
 if sys.platform == "win32":
-    import win32process
+#    import win32process
     import win32con
-    import win32api
+#    import win32api
     WINDOWS = True
 
 
@@ -175,6 +175,6 @@
         failed = False
         try:
             timeout_launcher.main()
-        except Exception:
+        except (OSError, IOError):
             failed = True
         assert failed
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_amara.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_amara.py	Wed Oct 13 16:31:27 2010 +0800
@@ -31,12 +31,16 @@
     """test amara"""
     xxx = amara.parse(r'<commentLog><branchInfo category="" error="kkk" file="tests/data/comments_test.txt" originator="sanummel" since="07-03-22">Add rofsfiles for usage in paged images</branchInfo></commentLog>')
     assert str(xxx.commentLog.branchInfo) == 'Add rofsfiles for usage in paged images'
+    print "xxx: '" + str(xxx) + "'"
+    print xxx.xml()
     
     xxx = amara.parse(r'<commentLog><branchInfo>1</branchInfo><branchInfo>2</branchInfo></commentLog>')
     for yyy in xxx.commentLog.branchInfo:
         assert str(yyy) == '1'
         break
-          
+    print "xxx: '" + str(xxx) + "'"
+    print xxx.xml()
+    
     myxml = """<DpComponent DpType="File" name="dp.cfg.xml" fileType="Binary" fileSubType="1" fileIndex="1" owner="SwUpdate" extract="true" signed="true" optional="true" crc="true" useCases="Refurbish,BackupRestore" variantPackage="true" include="true" EnableCRCVerification="true" parameters="test"/>"""
     xcf = amara.parse(myxml)
     assert xcf.DpComponent['name'] == 'dp.cfg.xml'
@@ -118,6 +122,8 @@
     newppxml = amara.parse(ppxml)
     oldppxml = amara.parse(ppxml)
     
+    assert 'SettingsData' in newppxml.xml_child_elements
+    
     oldppdata = {}
     for oldfeature in oldppxml.SettingsData.ProductProfile.Feature:
         oldppdata[str(oldfeature.Index)] = oldfeature.Value
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccm_results.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccm_results.py	Wed Oct 13 16:31:27 2010 +0800
@@ -332,6 +332,30 @@
         assert len(result.output[subproj]) == 2, "%s should contain 2 conflicts" % subproj.objectname
 
 
+
+    def test_ConflictsResult_object_result(self):
+        """ Validating ConflictsResult with object checking output."""
+        behave = {'test_update' : """
+Project: Cartman-Release_v4
+
+header.h-8.1.1:incl:tr1test1#1   tr1test1#30010, tr1test1#42792    Implicitly required by multiple tasks - parallel
+header2.h-5.2.1:prj_spec:tr1test1#2    tr1test1#28554  Implicitly required but not included - parallel
+
+Project: Cartman_sub03-next
+
+         No conflicts detected.
+
+        """}
+        session = MockResultSession(behave)
+        result = session.execute('test_update', ccm.ConflictsResult(session))
+        #_logger.debug(result.output)
+        # pylint: disable=E1103
+        assert len(result.output.keys()) == 2, "Should detect 2 projects."
+        subproj = session.create("Cartman-Release_v4:project:%s#1" % session.database())
+        # 3 conflicts will be detected one per tasks.
+        assert len(result.output[subproj]) == 3, "%s should contain 3 conflicts" % subproj.objectname
+
+
     def test_DataMapperListResult_result(self):
         """ Validating DataMapperListResult."""
         behave = {'test_query' : """>>>objectname>>>task5204-1:task:tr1test1>>>task_synopsis>>>Create Cartman_sub03>>>
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccmutil.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccmutil.py	Wed Oct 13 16:31:27 2010 +0800
@@ -27,9 +27,8 @@
 _logger = logging.getLogger('test.ccmutil')
 logging.basicConfig(level=logging.INFO)
 
-def open_session(username=None, password=None, engine=None, dbpath=None, database=None, reuse=True):
+def open_session(username=None, password=None, engine=None, dbpath=None, database=None):
     """open session"""
-    reuse = True        #just for pylint
     return MockSession(None, username, password, engine, dbpath, database)
 
 nokia.nokiaccm.open_session = open_session
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_configuration.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_configuration.py	Wed Oct 13 16:31:27 2010 +0800
@@ -157,8 +157,8 @@
     <set name="root.dir" value="X:/rootdir" />
     <set name="name" value="PF5250_200832_internal_code" />
     <set name="include" value="**/internal/**" />
-    <set name="grace.filters" value="tsrc" />
-    <set name="grace.default" value="false" />
+    <set name="release.filters" value="tsrc" />
+    <set name="release.default" value="false" />
    </config>
    <config>
     <set name="root.dir" value="X:/rootdir" />
@@ -166,8 +166,8 @@
     <append name="include" value="**/doc/**" />
     <set name="include" value="**/docs/**" />
     <append name="exclude" value="**/internal/**" />                            <!-- set changed to append -->
-    <set name="grace.filters" value="tsrc" />
-    <set name="grace.default" value="false" />
+    <set name="release.filters" value="tsrc" />
+    <set name="release.default" value="false" />
    </config>
   </config>
 </build>
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_gscm.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_gscm.py	Wed Oct 13 16:31:27 2010 +0800
@@ -53,7 +53,7 @@
         try:        
             _logger.info("get_db_path('not_valid_db'): %s" % nokia.gscm.get_db_path('not_valid_db'))
             assert False, "Should raise Exception when giving unexisting db.'"
-        except Exception, exc:
+        except IOError, exc:
             _logger.info(exc)
 
     def test_get_engine_host(self):
@@ -66,7 +66,7 @@
         try:        
             _logger.info("get_engine_host('not_valid_db'): %s" % nokia.gscm.get_engine_host('not_valid_db'))
             assert False, "Should raise Exception when giving unexisting db.'"
-        except Exception, exc:
+        except IOError, exc:
             _logger.info(exc)
 
     def test_get_router_address(self):
@@ -78,5 +78,5 @@
         try:        
             _logger.info("get_router_address('not_valid_db'): %s" % nokia.gscm.get_router_address('not_valid_db'))
             assert False, "Should raise Exception when giving unexisting db.'"
-        except Exception, exc:
+        except IOError, exc:
             _logger.info(exc)
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_idoprep.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_idoprep.py	Wed Oct 13 16:31:27 2010 +0800
@@ -34,22 +34,6 @@
         """called before any of the tests are run"""
         self.server = os.path.join(os.environ['TEST_DATA'], "data/symrec/GRACE/")
 
-    def test_validate_grace(self):
-        """Verifiying validate(grace) method"""
-        self.assertRaises(Exception, idoprep.validate, None, 'test', 'test', 'test')
-
-    def test_validate_service(self):
-        """Verifiying validate(service) method"""
-        self.assertRaises(Exception, idoprep.validate, 'test', None, 'test', 'test')
-
-    def test_validate_product(self):
-        """Verifiying validate(product) method"""
-        self.assertRaises(Exception, idoprep.validate, 'test', 'test', None, 'test')
-
-    def test_validate_release(self):
-        """Verifiying validate(release) method"""
-        self.assertRaises(Exception, idoprep.validate, 'test', 'test', 'test', None) 
-
     def test_get_s60_env_details_valid(self):
         """Verifiying get_s60_env_details(valid args) method"""
         (fileDes, cacheFilename) = tempfile.mkstemp()
@@ -91,47 +75,16 @@
         """Verifiying create_ado_mapping method"""
         (sysdefFileDes, sysdefConfig) = tempfile.mkstemp()
         (adoFileDes, adoMappingFile) = tempfile.mkstemp()
-        (adoqtyFileDes, adoQualityMappingFile) = tempfile.mkstemp()
         buildDrive = tempfile.gettempdir() 
         adoQualityDirs = None
         testSysdefFile = os.path.join(os.environ['TEST_DATA'], 'data', 'packageiad', 'layers.sysdef.xml')
         os.write(sysdefFileDes, testSysdefFile)
         os.close(sysdefFileDes)
-        idoprep.create_ado_mapping(sysdefConfig, adoMappingFile, adoQualityMappingFile, buildDrive, adoQualityDirs)
+        idoprep.create_ado_mapping(sysdefConfig, adoMappingFile, 'false', buildDrive, adoQualityDirs)
         os.unlink(sysdefConfig)
         os.close(adoFileDes)
-        os.close(adoqtyFileDes)
         adoFile = open(adoMappingFile, 'r')
         adoMappingFileContents = adoFile.readlines()
         adoFile.close()
-        adoQtyFile = open(adoQualityMappingFile, 'r')
-        adoQualityMappingFileContents = adoQtyFile.readlines()
-        adoQtyFile.close()
         os.unlink(adoMappingFile)
-        os.unlink(adoQualityMappingFile)
-        assert len(adoMappingFileContents) >= 1 and  len(adoQualityMappingFileContents) >= 1 
-
-    def test_create_ado_mapping_adoqualitydirs(self):
-        """Verifiying create_ado_mapping (with valid adoqualitydirs) method"""
-        (sysdefFileDes, sysdefConfig) = tempfile.mkstemp()
-        (adoFileDes, adoMappingFile) = tempfile.mkstemp()
-        (adoqtyFileDes, adoQualityMappingFile) = tempfile.mkstemp()
-        buildDrive = tempfile.gettempdir() 
-        testSysdefFile = os.path.join(os.environ['TEST_DATA'], 'data', 'packageiad', 'layers.sysdef.xml')
-        location = ido.get_sysdef_location(testSysdefFile)
-        adoQualityDirs = (os.path.normpath(os.path.join(buildDrive, os.environ['EPOCROOT'], location))) 
-        os.write(sysdefFileDes, testSysdefFile)
-        os.close(sysdefFileDes)
-        idoprep.create_ado_mapping(sysdefConfig, adoMappingFile, adoQualityMappingFile, buildDrive, adoQualityDirs)
-        os.unlink(sysdefConfig)
-        os.close(adoFileDes)
-        os.close(adoqtyFileDes)
-        adoFile = open(adoMappingFile, 'r')
-        adoMappingFileContents = adoFile.readlines()
-        adoFile.close()
-        adoQtyFile = open(adoQualityMappingFile, 'r')
-        adoQualityMappingFileContents = adoQtyFile.readlines()
-        adoQtyFile.close()
-        os.unlink(adoMappingFile)
-        os.unlink(adoQualityMappingFile)
-        assert len(adoMappingFileContents) >= 1 and  len(adoQualityMappingFileContents) >= 1 
+        assert len(adoMappingFileContents) >= 1
\ No newline at end of file
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_preparation.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_preparation.py	Wed Oct 13 16:31:27 2010 +0800
@@ -18,8 +18,6 @@
 #===============================================================================
 """ Testing preparation module """  
 
-# pylint: disable=R0201
-
 import tempfile
 from shutil import rmtree
 import os
@@ -496,9 +494,9 @@
         """Emulating project.exists method"""
         return True                
 
-    def snapshot(self, target_dir, status):
+    def snapshot(self, target_dir, _):
         """Emulating project.snapshot method"""
-        print "Snapshot created"
+        print "Snapshot created: target_dir = " + str(target_dir)
 
     def update(self, status, replace_subprojects, update_keepgoing, result): 
         """Emulating project.update method"""
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_sysdef_io.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_sysdef_io.py	Wed Oct 13 16:31:27 2010 +0800
@@ -26,41 +26,45 @@
 import unittest
 from sysdef.io import FlashImageSizeWriter
 
+
 _logger = logging.getLogger('test.sysdef.io')
 logging.basicConfig(level=logging.INFO)
 
+
 class FlashImageSizeWriterTest(unittest.TestCase):
     """Verifiying sysdef/io module"""
         
     def test_write(self):
         """Verifiying write method"""
-        (fileDes, filename) = tempfile.mkstemp()
-        flashWriter = FlashImageSizeWriter(filename)
-        oldOut = flashWriter._out
-        flashWriter._out = duppedOut = StringIO()
+        output = StringIO()
+        flashWriter = FlashImageSizeWriter(output)
         config_list = ("testconfig1","testconfig2")
         flashWriter.write(_sysdef(), config_list)
-        flashWriter._out = oldOut  
+        assert len(output.getvalue().splitlines()) == 9
         flashWriter.close()
-        os.close(fileDes)
-        os.unlink(filename)
-        assert len(duppedOut.getvalue().splitlines()) == 9
+
 
 # dummy classes to emulate sysdef configuration
 class _sysdef():
     """Emulate sysdef """
     def __init__(self):
         self.configurations = {"name1": _config("testconfig1"), "name2" : _config("testconfig2")}
+        
+        
 class _config():
     """Emulate config"""
     def __init__(self, name):
         self.name = name
         self.units = (_unit(), _unit())
+        
+        
 class _unit():
     """Emulate unit"""
     def __init__(self):
         self.name = "testUnit"
         self.binaries = (_binary(), _binary())
+
+
 class _binary():
     """Emulate binary"""
     def __init__(self):
--- a/buildframework/helium/sf/python/pythoncore/lib/sphinx_ext.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/sphinx_ext.py	Wed Oct 13 16:31:27 2010 +0800
@@ -1,7 +1,7 @@
 #============================================================================ 
 #Name        : sphinx_ext.py 
 #Part of     : Helium 
-
+#
 #Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 #All rights reserved.
 #This component and the accompanying materials are made available
@@ -16,61 +16,126 @@
 #
 #Description:
 #===============================================================================
-""" aids to creating the API documentation"""
+""" Custom Sphinx operations to help with Helium doc linking. """
+
 import os
 import re
+import atexit
 
 from docutils import nodes, utils
 from docutils.parsers.rst import directives
 
 import amara
 
+tree = None
 treecache = None
+database_path = os.path.abspath(os.path.join(os.getcwd() + '/build', 'public_database.xml'))
+
+# Error count for custom sphinx operations
+exit_with_failure = 0 
 
-def handle_hlm_role(role, rawtext, text, lineno, inliner,
-                       options=None, content=None):
+def check_cached_database():
+    """ Check the Ant database XML data is cached as needed. """
+    global tree
+    global treecache    
+    
+    if tree == None or treecache == None:
+        f = open(database_path)
+        tree = amara.parse(f)
+    
+        treecache = {}
+        for project in tree.antDatabase.project:
+            for x in project.xml_children:
+                if hasattr(x, 'name'):
+                    treecache[str(x.name)] = [str(project.name),'project']
+        if hasattr(tree.antDatabase, "antlib"):
+            for antlib in tree.antDatabase.antlib:
+                for x in antlib.xml_children:
+                    if hasattr(x, 'name'):
+                        treecache[str(x.name)] = [str(antlib.name),'antlib']
+        
+def handle_hlm_role(role, _, text, lineno, inliner, options=None, content=None): # pylint: disable=W0613
     """ Process a custom Helium ReStructuredText role to link to a target, property or macro. """
     if options == None:
         options = {}
     if content == None:
         content = []
+        
+    # See if the role is used to embed a API element field
+    if '[' in text:
+        role_data = _embed_role_field(role, text, lineno, inliner)
+    else:
+        role_data = _build_link(text, lineno, inliner, options)
+        
+    return role_data
+    
+def _embed_role_field(role, text, lineno, inliner):
+    """ Insert the contents of an element field. 
+    
+    These take the form of e.g. hlm-p:`build.drive[summary]`
+    """
+    messages = []
+    node = nodes.Text('', '')
+    
+    field_match = re.search("(.*?)\[(.*?)\]", text)
+    if field_match != None:
+        element_name = field_match.group(1)
+        field_name = field_match.group(2)
+        if field_name != None and len(field_name) > 0:
+            field_value = find_field_value(role, element_name, field_name)
+            if field_value != None and len(field_value) > 0:
+                node = nodes.Text(field_value, utils.unescape(field_value))
+            else:
+                messages.append(inliner.reporter.error(('Field value cannot be found for API field: "%s".' % text), line=lineno))
+        else:
+            messages.append(inliner.reporter.error(('Invalid field name for API value replacement: "%s".' % text), line=lineno))
+        return [node], messages
+
+def find_field_value(role, element_name, field_name):
+    """ Gets the value of a field from an API element. """
+    check_cached_database()
+    
+    field_value = None
+    element = tree.xml_xpath('//' + roles[role] + "[name='" + element_name + "']")
+    
+    if element != None and len(element) == 1:
+        field_value_list = element[0].xml_xpath(field_name)
+        if field_value_list != None and len(field_value_list) == 1:
+            field_value = str(field_value_list[0])
+    return field_value
+    
+
+def _build_link(text, lineno, inliner, options):
+    """ Build an HTML link to the API doc location for API element. """
+    global exit_with_failure
     full_path_match = re.search(r"<document source=\"(.*?)\"", str(inliner.document))
     full_path = full_path_match.group(1)
     path_segment = full_path[full_path.index('\\doc\\') + 5:]
     dir_levels = path_segment.count('\\')
     (parent_type, parent_name) = get_root_element_name(text)
     messages = []
-#    f = open('docs.log', 'a')
+    
+    # See if link can be built
     if parent_type != None and parent_name != None:
         href_text = text.replace('.', '-').lower()
-#        f.write(href_text + "\n")
         api_path_segment = 'api/helium/' + parent_type + '-' + parent_name  + '.html#' + href_text
         relative_path = ('../' * dir_levels) + api_path_segment
         api_doc_path = os.path.abspath(os.path.join(os.getcwd() + '/build/doc', api_path_segment))
         node = nodes.reference(text, utils.unescape(text), refuri=relative_path, **options)
-#        f.write(str(node) + "\n")
         node = nodes.literal(text, '', node, **options)
+    # Or just insert the basic property text
     else:
         messages.append(inliner.reporter.error(('Missing API doc for "%s".' % text), line=lineno))
         node = nodes.literal(text, utils.unescape(text))
-#    f.close()
+        # Error occurred so record this in order to return the total number as a failure when exiting the program
+        exit_with_failure += 1 
     return [node], messages
 
 def get_root_element_name(text):
-    global treecache
-    if treecache == None:
-        database_path = os.path.abspath(os.path.join(os.getcwd() + '/build', 'public_database.xml'))
-        f = open(database_path)
-        tree = amara.parse(f)
-        
-        treecache = {}
-        for project in tree.antDatabase.project:
-            for x in project.xml_children:
-                if hasattr(x, 'name'):
-                    treecache[str(x.name)] = str(project.name)
-                    
+    check_cached_database()
+    
     if text in treecache:
-        return ('project', treecache[text])
+        return (treecache[text][1], treecache[text][0])
     return (None, None)
 
 roles = {'hlm-t': 'target',
@@ -87,5 +152,11 @@
     app.add_description_unit('target', 'ant-target', 'pair: %s; target')
 
     
-    
-    
\ No newline at end of file
+def check_for_failure():
+    """ Check whether we need to exit the program with a failure due to one or more errors in a custom Sphinx operation. """
+    if exit_with_failure:
+        raise SystemExit("EXCEPTION: Found %d error(s) of type '(ERROR/3) Missing API doc for <property>'" % (exit_with_failure) )
+
+# Register a cleanup routine to handle exit with failure
+atexit.register(check_for_failure)
+
--- a/buildframework/helium/sf/python/pythoncore/lib/symrec.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/symrec.py	Wed Oct 13 16:31:27 2010 +0800
@@ -306,7 +306,10 @@
             result.append(ServicePack(spack))
         return result
 
-    filename = property(lambda self:self._filename)
+    @property
+    def filename(self):
+        return self._filename
+    
     service = property(lambda self:self.get_releasedetails_info('service'), lambda self, value:self.set_releasedetails_info('service', value))
     product = property(lambda self:self.get_releasedetails_info('product'), lambda self, value:self.set_releasedetails_info('product', value))
     release = property(lambda self:self.get_releasedetails_info('release'), lambda self, value:self.set_releasedetails_info('release', value))
@@ -346,6 +349,8 @@
     
     def is_valid(self, checkmd5=True, checkPath=True):
         """ Run the validation mechanism. """
+        valid = True
+        
         status = os.path.join(os.path.dirname(self._filename), 'HYDRASTATUS.xml')
         if os.path.exists(status):
             hydraxml = xml.dom.minidom.parse(open(status, "r"))
@@ -353,53 +358,63 @@
                 if t_name.nodeType == t_name.TEXT_NODE:
                     if t_name.nodeValue != 'Ready':
                         LOGGER.error("HYDRASTATUS.xml is not ready")
-                        return False
-        if checkPath:
+                        valid = False
+                        
+        if valid and checkPath:
             if os.path.basename(self.location) != self.release:
                 LOGGER.error("Release doesn't match.")
-                return False
+                valid = False
             if os.path.basename(os.path.dirname(self.location)) != self.product:
                 LOGGER.error("Product doesn't match.")
-                return False
+                valid = False
             if os.path.basename(os.path.dirname(os.path.dirname(self.location))) != self.service:
                 LOGGER.error("Service doesn't match.")
-                return False
+                valid = False
         
-        for name in self.keys():
-            path = os.path.join(self.location, name)
-            if not os.path.exists(path):
-                LOGGER.error("%s doesn't exist." % path)
-                return False
-            try:
-                LOGGER.debug("Trying to open %s" % path)
-                content_file = open(path)
-                content_file.read(1)
-            except IOError:
-                LOGGER.error("%s is not available yet" % path)
-                return False
-                
-            if checkmd5 and self[name].has_key('md5checksum'):
-                if self[name]['md5checksum'] != None:
-                    if fileutils.getmd5(path).lower() != self[name]['md5checksum']:
-                        LOGGER.error("%s md5checksum missmatch." % path)
-                        return False
-
-        for spack in self.servicepacks:
-            for name in spack.files:
+        if valid:
+            for name in self.keys():
                 path = os.path.join(self.location, name)
                 if not os.path.exists(path):
                     LOGGER.error("%s doesn't exist." % path)
-                    return False
-            for name in spack.instructions:
-                path = os.path.join(self.location, name)
-                if not os.path.exists(path):
-                    LOGGER.error("%s doesn't exist." % path)
-                    return False
+                    valid = False
+                    break
+                try:
+                    LOGGER.debug("Trying to open %s" % path)
+                    content_file = open(path)
+                    content_file.read(1)
+                except IOError:
+                    LOGGER.error("%s is not available yet" % path)
+                    valid = False
+                    break
+                    
+                if checkmd5 and self[name].has_key('md5checksum'):
+                    if self[name]['md5checksum'] != None:
+                        if fileutils.getmd5(path).lower() != self[name]['md5checksum']:
+                            LOGGER.error("%s md5checksum missmatch." % path)
+                            valid = False
+
+        if valid:
+            for spack in self.servicepacks:
+                if valid:
+                    for name in spack.files:
+                        path = os.path.join(self.location, name)
+                        if not os.path.exists(path):
+                            LOGGER.error("%s doesn't exist." % path)
+                            valid = False
+                            break
+                    for name in spack.instructions:
+                        path = os.path.join(self.location, name)
+                        if not os.path.exists(path):
+                            LOGGER.error("%s doesn't exist." % path)
+                            valid = False
+                            break
         
-        dependency = self.get_dependsof()
-        if dependency != None:
-            return ValidateReleaseMetadata(dependency.filename).is_valid(checkmd5)
-        return True
+        if valid:
+            dependency = self.get_dependsof()
+            if dependency != None:
+                return ValidateReleaseMetadata(dependency.filename).is_valid(checkmd5)
+            
+        return valid
 
 
 class MetadataMerger(object):
@@ -549,11 +564,11 @@
         ValidateReleaseMetadataCached.__init__(self, filename)
         self.location = os.path.dirname(filename)
     
-    def is_valid(self, checkmd5=True):
+    def is_valid(self, checkmd5=True, checkPath=True):
         """ Run the validation mechanism. """
         tickler_path = os.path.join(self.location,"TICKLER")
         if not os.path.exists(tickler_path):
             LOGGER.error("Release not available yet")
             return False
         else:
-            return ValidateReleaseMetadataCached.is_valid(self, checkmd5)
+            return ValidateReleaseMetadataCached.is_valid(self, checkmd5, checkPath)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/lib/symrec.py.orig	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,564 @@
+#============================================================================ 
+#Name        : symrec.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+
+""" SYMREC metadata file generation. """
+import xml.dom.minidom
+import codecs
+import os
+import re
+import logging
+import fileutils
+import csv
+
+LOGGER = logging.getLogger("symrec")
+logging.basicConfig(level=logging.INFO)
+
+def _cleanup_list(input):
+    """cleanup  list"""
+    result = []
+    for chars in input:
+        if chars is not None and chars.strip() != "":
+            result.append(chars)
+    return result
+
+def xml_setattr(node, attr, value):
+    """ Create the attribute if needed. """
+    node.setAttribute(attr, value)
+
+def is_child_text_only(node):
+    """ Returns true if child node are all from TEXT_NODE type. """
+    for child in node.childNodes:
+        if child.nodeType != xml.dom.minidom.Node.TEXT_NODE:
+            return False
+    return True
+
+
+def ignore_whitespace_writexml(self, writer, indent="", addindent="", newl=""):
+    """ This version of writexml will ignore whitespace text to alway render
+    the output in a structure way.
+    indent = current indentation
+    addindent = indentation to add to higher levels
+    newl = newline string
+    """
+    writer.write(indent + "<" + self.tagName)
+
+    attrs = self._get_attributes()
+    a_names = attrs.keys()
+    a_names.sort()
+
+    for a_name in a_names:
+        writer.write(" %s=\"" % a_name)
+        xml.dom.minidom._write_data(writer, attrs[a_name].value)
+        writer.write("\"")
+    if self.childNodes:
+        writer.write(">")
+        if is_child_text_only(self):
+            for node in self.childNodes:
+                node.writexml(writer, '', '', '')
+            writer.write("</%s>%s" % (self.tagName, newl))
+        else:
+            writer.write(newl)
+            for node in self.childNodes:
+                if node.nodeType == xml.dom.minidom.Node.TEXT_NODE and node.data.isspace():
+                    pass
+                else:
+                    node.writexml(writer, indent + addindent, addindent, newl)
+            writer.write("%s</%s>%s" % (indent, self.tagName, newl))
+    else:
+        writer.write("/>%s" % (newl))
+
+xml.dom.minidom.Element.writexml = ignore_whitespace_writexml
+
+
+class ServicePack(object):
+    """ Create a ServicePack """
+    def __init__(self, node):
+        self.__xml = node
+    
+    @property
+    def name(self):
+        """name"""
+        return self.__xml.getAttribute('name')
+    
+    @property
+    def files(self):
+        """files"""
+        result = []
+        for filen in self.__xml.getElementsByTagName('file'):
+            result.append(filen.getAttribute('name'))
+        return result
+
+    @property
+    def instructions(self):
+        """instructions"""
+        result = []
+        for instr in self.__xml.getElementsByTagName('instructions'):
+            result.append(instr.getAttribute('name'))
+        return result
+
+class ReleaseMetadata(object):
+    """ Create or read Metadata XML from SYMREC/SYMDEC. """
+    
+    def __init__(self, filename, service=None, product=None, release=None):
+        self._filename = filename
+        if filename and os.path.exists(filename):
+            self._xml = xml.dom.minidom.parse(open(filename, "r"))
+            releaseInformation = self._xml.getElementsByTagName(u"releaseInformation")
+            if releaseInformation != []:
+                self._releaseInformation = releaseInformation[0]
+            else:
+                self._releaseInformation = self._xml.createElement(u"releaseInformation")
+            releaseDetails = self._xml.getElementsByTagName(u'releaseDetails')
+            if releaseDetails != []:
+                self._releaseDetails = releaseDetails[0]
+            else:
+                self._releaseDetails = self._xml.createElement(u'releaseDetails')
+            releaseFiles = self._xml.getElementsByTagName(u'releaseFiles')
+            if releaseFiles != []:
+                self._releaseFiles = releaseFiles[0]
+            else:
+                self._releaseFiles = self._xml.createElement(u'releaseFiles')
+                
+            if service != None:
+                self.service = service
+            if product != None:
+                self.product = product
+            if release != None:
+                self.release = release
+        elif service!=None and product!=None and release!=None:
+            self._xml = xml.dom.minidom.Document()
+            self._releaseInformation = self._xml.createElement(u"releaseInformation")
+            self._xml.appendChild(self._releaseInformation)
+            self._releaseDetails = self._xml.createElement(u'releaseDetails')
+            self._releaseInformation.appendChild(self._releaseDetails)
+            releaseID = self._xml.createElement(u'releaseID')
+            self._releaseDetails.appendChild(releaseID)
+            
+            #           service
+            serv = self._xml.createElement(u'service')
+            xml_setattr(serv, 'name', unicode(service))
+            releaseID.appendChild(serv)
+            #           product
+            prod = self._xml.createElement(u'product')
+            xml_setattr(prod, 'name', unicode(product))
+            releaseID.appendChild(prod)
+            #           release
+            rel = self._xml.createElement(u'release')
+            xml_setattr(rel, 'name', unicode(release))
+            releaseID.appendChild(rel)
+            
+            #    releaseFiles
+            self._releaseFiles = self._xml.createElement(u'releaseFiles')
+            self._releaseInformation.appendChild(self._releaseFiles)
+
+            #    releaseFiles
+            self._releaseInformation.appendChild(self._xml.createElement(u'externalFiles'))
+        else:
+            raise Exception("Error metadata file doesn't exists.")
+
+
+    def get_dependsof(self):
+        """ Return a ReleaseMetada object pointing to the dependency release. """
+        if self.dependsof_service != None and self.dependsof_product != None and self.dependsof_release != None:
+            filename = os.path.join(os.path.dirname(self._filename), "../../..",
+                                self.dependsof_service,
+                                self.dependsof_product,
+                                self.dependsof_release)
+            return ReleaseMetadata(find_latest_metadata(filename))
+        else:
+            return None
+
+
+    def set_dependsof(self, filename):
+        """ Setting the dependency release. """
+        metadata  = ReleaseMetadata(filename)
+        self.dependsof_service  = metadata.service
+        self.dependsof_product  = metadata.product
+        self.dependsof_release  = metadata.release
+
+    def add_package(self, name, type=None, default=True, filters=None, extract="single", md5checksum=None, size=None):
+        """ Adding a package to the metadata file. """
+        # check if update mode
+        package = None
+        
+        for pkg in self._xml.getElementsByTagName('package'):
+            if (pkg.getAttribute('name').lower() == os.path.basename(name).lower()):
+                package = pkg
+                break
+        
+        # if not found create new package.
+        if package is None:
+            package = self._xml.createElement(u'package')
+            self._releaseFiles.appendChild(package)
+            
+        xml_setattr(package, 'name', os.path.basename(name))
+        if type != None:
+            xml_setattr(package, 'type', type)
+        else:
+            xml_setattr(package, 'type', os.path.splitext(name)[1].lstrip('.'))
+        xml_setattr(package, 'default', str(default).lower())
+        xml_setattr(package, 'extract', extract)
+        if filters and len(filters)>0:
+            xml_setattr(package, 'filters', ','.join(filters))
+            xml_setattr(package, 's60filter', ','.join(filters))
+        else:
+            xml_setattr(package, 'filters', '')
+            xml_setattr(package, 's60filter', '')
+        if md5checksum != None:
+            xml_setattr(package, unicode("md5checksum"), unicode(md5checksum))
+        if size != None:
+            xml_setattr(package, unicode("size"), unicode(size))
+        
+
+    def keys(self):
+        """keys"""
+        keys = []
+        for pkg in self._releaseFiles.getElementsByTagName('package'):
+            keys.append(pkg.getAttribute('name'))
+        return keys
+
+    def __getitem__(self, key):
+        for pkg in self._releaseFiles.getElementsByTagName('package'):
+            if pkg.getAttribute('name').lower() == key.lower():
+                filters = []
+                s60filters = []
+                md5checksum = None
+                size = None
+                if pkg.hasAttribute(u'filters'):
+                    filters = _cleanup_list(pkg.getAttribute('filters').split(','))
+                if pkg.hasAttribute(u's60filter'):
+                    s60filters = _cleanup_list(pkg.getAttribute('s60filter').split(','))
+                if pkg.hasAttribute(u'md5checksum'):
+                    md5checksum = pkg.getAttribute('md5checksum')
+                if pkg.hasAttribute(u'size'):
+                    size = pkg.getAttribute('size')
+                return {'type': pkg.getAttribute('type'), 'extract': pkg.getAttribute('extract'), 'default': (pkg.getAttribute('default')=="true"), \
+                         'filters': filters, 's60filter': s60filters, 'md5checksum': md5checksum, 'size': size}
+        raise Exception("Key '%s' not found." % key)
+
+    def __setitem__(self, key, value):
+        self.add_package(key, value['type'], value['default'], value['filters'], value['extract'], value['md5checksum'], value['size'])
+
+    def set_releasedetails_info(self, name, value, details="releaseID"):
+        """ Generic function to set releaseid info. """
+        detailsnode = None
+        if self._releaseDetails.getElementsByTagName(details) == []:
+            detailsnode = self._xml.createElement(details)
+            self._releaseDetails.appendChild(detailsnode)
+        else:
+            detailsnode = self._releaseDetails.getElementsByTagName(details)[0]
+        namenode = None
+        if detailsnode.getElementsByTagName(name) == []:
+            namenode = self._xml.createElement(name)
+            namenode.setAttribute(u'name', unicode(value))
+            detailsnode.appendChild(namenode)
+        else:  
+            namenode = detailsnode.getElementsByTagName(name)[0]
+            namenode.setAttribute('name', value)
+
+    
+    def get_releasedetails_info(self, name, details="releaseID"):
+        """ Generic function to extract releaseid info. """
+        for group in self._releaseDetails.getElementsByTagName(details):
+            for i in group.getElementsByTagName(name):
+                return i.getAttribute('name')
+        return None
+
+    def getVariantPackage(self, variant_name):
+        """get variant package"""
+        for variant in self._xml.getElementsByTagName('variant'):
+            if variant.getAttribute('name').lower() == variant_name.lower():
+                for xxx in variant.getElementsByTagName('file'):
+                    return xxx.getAttribute('name')
+
+    def xml(self):
+        """ Returning the XML as a string. """
+        return self._xml.toprettyxml()
+        
+    def save(self, filename = None):
+        """ Saving the XML into the provided filename. """
+        if filename == None:
+            filename = self._filename
+        file_object = codecs.open(os.path.join(filename), 'w', "utf_8")
+        file_object.write(self.xml())
+        file_object.close()
+
+    @property
+    def servicepacks(self):
+        """ Getting the service pack names. """
+        result = []
+        for spack in self._releaseInformation.getElementsByTagName('servicePack'):
+            result.append(ServicePack(spack))
+        return result
+
+    filename = property(lambda self:self._filename)
+    service = property(lambda self:self.get_releasedetails_info('service'), lambda self, value:self.set_releasedetails_info('service', value))
+    product = property(lambda self:self.get_releasedetails_info('product'), lambda self, value:self.set_releasedetails_info('product', value))
+    release = property(lambda self:self.get_releasedetails_info('release'), lambda self, value:self.set_releasedetails_info('release', value))
+    dependsof_service = property(lambda self:self.get_releasedetails_info('service', 'dependsOf'), lambda self, value:self.set_releasedetails_info('service', value, 'dependsOf'))
+    dependsof_product = property(lambda self:self.get_releasedetails_info('product', 'dependsOf'), lambda self, value:self.set_releasedetails_info('product', value, 'dependsOf'))
+    dependsof_release = property(lambda self:self.get_releasedetails_info('release', 'dependsOf'), lambda self, value:self.set_releasedetails_info('release', value, 'dependsOf'))
+    baseline_service = property(lambda self:self.get_releasedetails_info('service', 'previousBaseline'), lambda self, value:self.set_releasedetails_info('service', value, 'previousBaseline'))
+    baseline_product = property(lambda self:self.get_releasedetails_info('product', 'previousBaseline'), lambda self, value:self.set_releasedetails_info('product', value, 'previousBaseline'))
+    baseline_release = property(lambda self:self.get_releasedetails_info('release', 'previousBaseline'), lambda self, value:self.set_releasedetails_info('release', value, 'previousBaseline'))
+
+
+class MD5Updater(ReleaseMetadata):
+    """ Update Metadata XML already created from SYMREC/SYMDEC. """
+    def __init__(self, filename):
+        ReleaseMetadata.__init__(self, filename)
+        self._filepath = os.path.dirname(filename)
+                  
+    def update(self):
+        """ Update each existing package md5checksum and size attribute."""
+        for name in self.keys():
+            fullname = os.path.join(self._filepath, name)                
+            if os.path.exists(fullname):
+                LOGGER.info("Updating %s MD5." % fullname)
+                md5value = None
+                for trial in range(3):
+                    try:
+                        md5value = fileutils.getmd5(fullname)
+                        result = self[name]
+                        result['md5checksum'] = unicode(md5value)
+                        result['size'] = unicode(os.path.getsize(fullname))
+                        self[name] = result
+                        break
+                    except Exception, e:
+                        LOGGER.warning(str(e))
+                else:
+                    raise Exception('Error determining %s MD5' % fullname)
+
+class ValidateReleaseMetadata(ReleaseMetadata):
+    """ This class validate if a metadata file is stored in the correct location and
+        if all deps exists.
+    """
+    def __init__(self, filename):
+        ReleaseMetadata.__init__(self, filename)
+        self.location = os.path.dirname(filename)
+    
+    def is_valid(self, checkmd5=True, checkPath=True):
+        """ Run the validation mechanism. """
+        status = os.path.join(os.path.dirname(self._filename), 'HYDRASTATUS.xml')
+        if os.path.exists(status):
+            hydraxml = xml.dom.minidom.parse(open(status, "r"))
+            for t_name in hydraxml.getElementsByTagName('state')[0].childNodes:
+                if t_name.nodeType == t_name.TEXT_NODE:
+                    if t_name.nodeValue != 'Ready':
+                        LOGGER.error("HYDRASTATUS.xml is not ready")
+                        return False
+        if checkPath:
+            if os.path.basename(self.location) != self.release:
+                LOGGER.error("Release doesn't match.")
+                return False
+            if os.path.basename(os.path.dirname(self.location)) != self.product:
+                LOGGER.error("Product doesn't match.")
+                return False
+            if os.path.basename(os.path.dirname(os.path.dirname(self.location))) != self.service:
+                LOGGER.error("Service doesn't match.")
+                return False
+        
+        for name in self.keys():
+            path = os.path.join(self.location, name)
+            if not os.path.exists(path):
+                LOGGER.error("%s doesn't exist." % path)
+                return False
+            try:
+                LOGGER.debug("Trying to open %s" % path)
+                content_file = open(path)
+                content_file.read(1)
+            except IOError:
+                LOGGER.error("%s is not available yet" % path)
+                return False
+                
+            if checkmd5 and self[name].has_key('md5checksum'):
+                if self[name]['md5checksum'] != None:
+                    if fileutils.getmd5(path).lower() != self[name]['md5checksum']:
+                        LOGGER.error("%s md5checksum missmatch." % path)
+                        return False
+
+        for spack in self.servicepacks:
+            for name in spack.files:
+                path = os.path.join(self.location, name)
+                if not os.path.exists(path):
+                    LOGGER.error("%s doesn't exist." % path)
+                    return False
+            for name in spack.instructions:
+                path = os.path.join(self.location, name)
+                if not os.path.exists(path):
+                    LOGGER.error("%s doesn't exist." % path)
+                    return False
+        
+        dependency = self.get_dependsof()
+        if dependency != None:
+            return ValidateReleaseMetadata(dependency.filename).is_valid(checkmd5)
+        return True
+
+class MetadataMerger(object):
+    """ Merge packages definition to the root metadata. """
+    
+    def __init__(self, metadata):
+        """ Construct a metadata merger providing root metadata filename. """ 
+        self._metadata = ReleaseMetadata(metadata)
+                
+    def merge(self, filename):
+        """ Merge the content of filename into the root metadata. """
+        metadata = ReleaseMetadata(filename)
+        for name in metadata.keys():
+            if name in self._metadata.keys():
+                LOGGER.warning('Package %s already declared, overriding previous definition!' % name)        
+            self._metadata[name] = metadata[name]
+
+    def xml(self):
+        """ Returning the XML as a string. """
+        return self._metadata.xml()
+
+    def save(self, filename = None):
+        """ Saving the XML into the provided filename. """
+        return self._metadata.save(filename)
+ 
+class Metadata2TDD(ReleaseMetadata):
+    """ Convert Metadata to a TDD file """
+    def __init__(self, filename, includes=None, excludes=None):
+        ReleaseMetadata.__init__(self, filename)
+        if includes is None:
+            includes = []
+        if excludes is None:
+            excludes = []
+        self.location = os.path.dirname(filename)
+        self.includes = includes
+        self.excludes = excludes
+
+    def archives_to_tdd(self, metadata):
+        """archives"""
+        tdd = "\t[\n"
+        for name in metadata.keys():
+            path_ = os.path.join(os.path.dirname(metadata.filename), name)
+            if (((len(self.includes) == 0) and metadata[name]['extract']) or (self.includes in metadata[name]['s60filter'])) and self.excludes not in metadata[name]['s60filter']:
+                tdd += "\t\t{\n"
+                tdd += "\t\t\t\"command\": \"unzip_%s\",\n" % metadata[name]['extract']
+                tdd += "\t\t\t\"src\": \"%s\",\n" % os.path.normpath(path_).replace('\\', '/')
+                tdd += "\t\t},\n"
+        tdd += "\t],\n"
+        return tdd
+        
+    def to_tdd(self):
+        """ Generating a TDD file that contains a list of list of filenames. """
+        tdd = "[\n"
+        # generates unarchiving steps for dependency
+        dependency = self.get_dependsof()
+        if dependency != None:
+            tdd += self.archives_to_tdd(dependency)
+        # generates unarchiving steps
+        tdd += self.archives_to_tdd(self)
+        tdd += "]\n"
+        return tdd
+
+
+
+def find_latest_metadata(releasedir):
+    """ Finding the release latest release metadata file. """ 
+    try:
+        metadatas = []
+        for filename in os.listdir(releasedir):
+            if re.match(r'^release_metadata(_\d+)?\.xml$', filename, re.I) is not None:
+                LOGGER.debug("Found %s" % filename)
+                metadatas.append(filename)
+        # reverse the order...
+        metadatas.sort(reverse=True)
+        if len(metadatas) > 0:
+            return os.path.normpath(os.path.join(releasedir, metadatas[0]))
+    except Exception, exc:
+        LOGGER.error(exc)
+        return None
+    return None
+
+class ValidateReleaseMetadataCached(ValidateReleaseMetadata):
+    """ Cached version of the metadata validation. """
+    def __init__(self, filename, cachefile=None):
+        ValidateReleaseMetadata.__init__(self, filename)
+        self.__cachefile = cachefile
+
+    def is_valid(self, checkmd5=True, checkPath=True):
+        """ Check if file is in the local cache.
+            Add valid release to the cache.
+        """
+        metadatas = self.load_cache()
+        if self.in_cache(metadatas, os.path.normpath(self._filename)):
+            LOGGER.debug("Release found in cache.")
+            return self.value_from_cache(metadatas, os.path.normpath(self._filename))
+        else:
+            result = ValidateReleaseMetadata.is_valid(self, checkmd5, checkPath)        
+            LOGGER.debug("Updating the cache.")
+            metadatas.append([os.path.normpath(self._filename), result])
+            self.update_cache(metadatas)
+        return result
+
+    def in_cache(self, metadatas, key):
+        """in cache"""
+        for metadata in metadatas:
+            if metadata[0] == key:
+                return True 
+        return False
+    
+    def value_from_cache(self, metadatas, key):
+        """value from cache"""
+        for metadata in metadatas:
+            if metadata[0] == key:
+                return metadata[1]
+        return None
+    
+    def load_cache(self):
+        """load cache"""
+        metadatas = []
+        if self.__cachefile is not None and os.path.exists(self.__cachefile):
+            f_file = open(self.__cachefile, "rb")
+            for row in csv.reader(f_file):
+                if len(row) == 2:
+                    metadatas.append([os.path.normpath(row[0]), row[1].lower() == "true"])
+                elif len(row) == 1:
+                    # backward compatibility with old cache.
+                    metadatas.append([os.path.normpath(row[0]), True])
+            f_file.close()
+        return metadatas
+
+    def update_cache(self, metadatas):
+        """update cache"""
+        if self.__cachefile is not None and os.path.exists(os.path.dirname(self.__cachefile)):
+            f_file = open(self.__cachefile, "wb")
+            writer = csv.writer(f_file)
+            writer.writerows(metadatas)
+            f_file.close()
+
+class ValidateTicklerReleaseMetadata(ValidateReleaseMetadataCached):
+    """ This class validate if a metadata file is stored in the correct location and
+        if all deps exists.
+    """
+    def __init__(self, filename):
+        ReleaseMetadata.__init__(self, filename)
+        self.location = os.path.dirname(filename)
+    
+    def is_valid(self, checkmd5=True):
+        """ Run the validation mechanism. """
+        tickler_path = os.path.join(self.location,"TICKLER")
+        if not os.path.exists(tickler_path):
+            LOGGER.error("Release not available yet")
+            return False
+        else:
+            return ValidateReleaseMetadataCached.is_valid(self, checkmd5)
--- a/buildframework/helium/sf/python/pythoncore/lib/sysdef/api.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/sysdef/api.py	Wed Oct 13 16:31:27 2010 +0800
@@ -382,7 +382,6 @@
                     reason = filter_out(self.filters, unit.filters)
                     if reason == None:
                         # Get the unit object from the cache if this is a string
-                        # TODO - remove once unitlist returns list of Unit objects
                         if isinstance(unit, types.UnicodeType):
                             unit = self._sysDef[unit]
                         result.append(unit)
@@ -458,7 +457,6 @@
         """ Initialisation """
         self.__xml = xml.dom.minidom.parse(open(filename, "r"))
         self._cache = {}
-        #TODO - why store these as hashes?
         self._units = {}
         self._layers = {}
         self._modules = {}
@@ -551,7 +549,6 @@
             
     def addElement(self, element):
         """ Adds SysDef element to cache. """
-        #TODO - handle duplicate names of different types
         if not self._cache.has_key(element.get_id()):
             self._cache[element.get_id()] = element
             #_logger.info('Adding SysDef element to cache: %s' % str(element))
--- a/buildframework/helium/sf/python/pythoncore/lib/sysdef/io.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/sysdef/io.py	Wed Oct 13 16:31:27 2010 +0800
@@ -26,8 +26,11 @@
     def __init__(self, output):
         """ Initialisation. """
         self.output = output
-        self._out = file(output, 'w')
-        
+        if isinstance(output, basestring):
+            self._out = file(output, 'w')
+        else:
+            self._out = output
+            
     def write(self, sys_def, config_list):
         """ Write the .csv data to a file for the given System Definition and configuration name. """
         self._out.write('component,binary,rom,rofs1,rofs2,rofs3\n')
--- a/buildframework/helium/sf/python/pythoncore/lib/timeout_launcher.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/timeout_launcher.py	Wed Oct 13 16:31:27 2010 +0800
@@ -61,14 +61,15 @@
         print "e.g: timeout_launcher.py --timeout=1 -- cmd /c sleep 10"
         sys.exit(-1)
     else:
-        _logger.debug("Start command")
+        command = ' '.join(cmdline)
+        _logger.debug("Start command: " + command)
         shell = True
         if _windows:
             shell = False
         if timeout != None:
             finish = time.time() + timeout
             timedout = False
-            p_file = subprocess.Popen(' '.join(cmdline), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=shell)
+            p_file = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=shell)
             while (p_file.poll() == None):
                 if time.time() > finish:
                     timedout = True
@@ -82,12 +83,12 @@
                         handle = win32api.OpenProcess(True, win32con.PROCESS_TERMINATE, p_file.pid)
                         win32process.TerminateProcess(handle, -1)
                         print "ERROR: Process killed..."
-                    except Exception, exc:
+                    except Exception, exc: # pylint: disable=W0703
                         print "ERROR: %s" % exc
                 else:
                     os.kill(p_file.pid, 9) # pylint: disable=E1101
                 print "ERROR: exiting..."
-                raise Exception("Timeout exception.")
+                raise IOError("Timeout exception.")
             else:
                 print p_file.communicate()[0]
                 sys.exit(p_file.returncode)
--- a/buildframework/helium/sf/python/pythoncore/lib/unittestadditions.py	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/sf/python/pythoncore/lib/unittestadditions.py	Wed Oct 13 16:31:27 2010 +0800
@@ -41,7 +41,7 @@
 
     def __call__(self, f_file):
         """ Returns the function f_file if  shouldSkip is False. Else a stub function is returned. """
-        def __skiptest(*args, **kargs):
+        def __skiptest(*args, **kargs): # pylint: disable=W0613
             """skip test"""
             _logger.warning("Skipping test %s" % f_file.__name__)
             return self.returns
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/tests/data/Invalid_distribution.policy.S60	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,1 @@
+1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/tests/data/bootup_testing/test_bootup.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<testrun>
+	<metadata>
+		<meta name="diamonds-buildid">http://diamonds.com/1234</meta>
+		<meta name="diamonds-testtype">Smoke</meta>
+		<meta name="name">Bootup test run</meta>
+	</metadata>
+	<agents>
+		<agent alias="alias">
+			<property name="hardware" value="new_device"/>
+		</agent>
+	</agents>
+	<execution defaultAgent="alias">
+		<initialization>
+			<task agents="alias">
+				<type>FlashTask</type>
+				<parameters>
+					<parameter name="image-1" value="exe1\images\image1.fpsx"/>
+					<parameter name="image-2" value="exe1\images\image2.fpsx"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>RebootTask</type>
+				<parameters/>
+			</task>
+			<task agents="alias">
+				<type>CreateDirTask</type>
+				<parameters>
+					<parameter name="dir" value="c:\logs\testability"/>
+				</parameters>
+			</task>
+		</initialization>
+		<finalization>
+			<task agents="alias">
+				<type>CleanupTask</type>
+				<parameters>
+					<parameter name="upload-files" value="true"/>
+				</parameters>
+			</task>
+		</finalization>
+	</execution>
+	<postActions>
+		<action>
+			<type>EmailAction</type>
+			<parameters>
+				<parameter name="subject" value="Bootup test report"/>
+				<parameter name="to" value="firstname.lastname@domain.com"/>
+				<parameter name="format" value="simplelogger"/>
+			</parameters>
+		</action>
+	</postActions>
+</testrun>
\ No newline at end of file
--- a/buildframework/helium/sf/python/pythoncore/tests/data/matti/matti_template.xml	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
-<!-- 
-============================================================================ 
-Name        : matti_template.xml
-Part of     : Helium 
-
-Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-Contains the template for the test.xml file output. The test.xml file contains
-information on the files used to create the drop file.
-============================================================================
--->
-
-<testrun>
-    <metadata>
-        {% if xml_dict['diamonds_build_url'] -%}
-        <meta name="diamonds-buildid">{{ xml_dict['diamonds_build_url'] }}</meta> 
-        <meta name="diamonds-testtype">Smoke</meta>
-        {% endif %}
-        <meta name="name">{{ xml_dict['testrun_name'] }}</meta> 
-    </metadata>
-    
-    <agents>
-        <agent alias="{{ xml_dict['alias_name'] }}">
-            <property name="hardware" value="{{ xml_dict["device_type"] }}"/>
-        </agent>
-    </agents>
-    
-    
-    {% for exe_block in xml_dict['execution_blocks'] -%}
-    <execution defaultAgent="{{ xml_dict['alias_name'] }}">        
-        <initialization>
-        
-            {% if exe_block['image_files'] -%}
-            <task agents="{{ xml_dict['alias_name'] }}">
-                <type>FlashTask</type>
-                <parameters>
-                {% set i = 1 %}
-                {% for img in exe_block['image_files'] -%}
-                    <parameter name="image-{{ i }}" value="images\{{ os.path.basename(img) }}" />
-                    {% set i = i + 1 %}
-                {% endfor -%}
-                </parameters>
-            </task>
-            {% endif %}
-                     
-
-            {% if exe_block['install_files'] != [] -%}
-              {% for file in exe_block['install_files'] -%}            
-            <task agents="{{ xml_dict['alias_name'] }}">
-                <type>FileUploadTask</type>
-                <parameters>
-                    <parameter name="src" value="{{exe_block['name']}}{{ atspath.normpath(atspath.normpath(file[0]).replace(atspath.normpath(exe_block['asset_path']).rsplit("\\", 1)[0], "")) }}"/>
-                    <parameter name="dst" value="{{ atspath.normpath(file[1]) }}"/>
-                </parameters>
-            </task>
-              {% endfor -%}
-            {% endif %}
-            
-            {% if exe_block['matti_sis_files'] != [] -%}
-              {% for sisfile in exe_block['matti_sis_files'] -%}            
-            <task agents="{{ xml_dict['alias_name'] }}">
-                <type>FileUploadTask</type>
-                <parameters>
-                    <parameter name="src" value="sisfiles\{{ os.path.basename(sisfile[0]) }}"/>
-                    <parameter name="dst" value="{{ sisfile[2] }}"/>
-                </parameters>
-            </task>
-              {% endfor -%}
-            {% endif %}
-
-          {% for sis_file in exe_block["matti_sis_files"] -%}
-            <task agents="{{ xml_dict['alias_name'] }}">
-               <type>InstallSisTask</type>
-               <parameters>
-                    <parameter name="software-package" value="{{ sis_file[2] }}"/>
-                    <parameter name="timeout" value="{{ exe_block["test_timeout"] }}"/>
-                    <parameter name="upgrade-data " value="true"/>
-                    <parameter name="ignore-ocsp-warnings" value="true"/>
-                    <parameter name="ocsp-done" value="true"/>
-                    <parameter name="install-drive" value="{{ sis_file[2].split(":")[0] }}"/>
-                    <parameter name="overwrite-allowed" value="true"/>
-                    <parameter name="download-allowed" value="false"/>
-                    <parameter name="download-username" value="user"/>
-                    <parameter name="download-password" value="passwd"/>
-                    <parameter name="upgrade-allowed" value="true"/>
-                    <parameter name="optional-items-allowed" value="true"/>
-                    <parameter name="untrusted-allowed" value="true"/>
-                    <parameter name="package-info-allowed" value="true"/>
-                    <parameter name="user-capabilities-granted" value="true"/>
-                    <parameter name="kill-app" value="true"/>
-               </parameters>
-            </task>
-          {%- endfor -%}
-
-            <task agents="{{ xml_dict['alias_name'] }}">
-                <type>RebootTask</type>
-                <parameters/>                
-            </task>
-            <task agents="{{ xml_dict['alias_name'] }}">
-                <type>CreateDirTask</type>
-                <parameters>                
-                    <parameter value="c:\logs\testability" name="dir"/>
-                </parameters>
-            </task>
-        </initialization>
-
-        {% for task_file in exe_block["matti_task_files"] -%}
-        <task agents="{{ xml_dict['alias_name'] }}">
-           <type>MATTITask</type>
-           <parameters>
-              <parameter value="{{ exe_block["name"] }}\matti_testcases\" name="script"/>
-              <parameter value="{{ exe_block["name"] }}\matti_testcases\mattiparameters\{{ os.path.basename(exe_block["matti_parameters"][0]) }}" name="xml"/>
-              <parameter value="{{ exe_block['test_timeout'] }}" name="timeout"/>
-              <parameter value="{{ exe_block["sierra_enabled"] }}" name="sierra"/>
-              <parameter value="{{ exe_block["sierra_parameters"] }} -e %TEST_RUN_SANDBOX%/{{ exe_block["name"] }}/{{ task_file }} test_unit" name="executable-parameters"/>
-           </parameters>
-        </task>
-        {% endfor -%}
-        
-        <finalization>
-	      <task agents="{{ xml_dict['alias_name'] }}">
-	        <type>CleanupTask</type>
-	        <parameters>
-	          <parameter value="true" name="upload-files"/>
-	        </parameters>
-	      </task>
-        </finalization>
-    </execution>    
-    {% endfor -%}
-    
-    <postActions>
-    <action>
-      <type>EmailAction</type>
-      <parameters>
-        <parameter value="{{ xml_dict['email_subject'] }}" name="subject"/>
-        <parameter value="{{ xml_dict['report_email'] }}" name="to"/>
-        <parameter value="{{ xml_dict['email_format'] }}" name="format"/>
-      </parameters>
-    </action>
-    </postActions>
-    
-</testrun>
--- a/buildframework/helium/sf/python/pythoncore/tests/data/matti/test.rb	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-# require needed Ruby, MATTI and Orbit files
-require 'test/unit'
-require 'otest/testcase'
-
-    
-  #TODO: Give suitable name for test class 
-class TestClassName < Test::Unit::TestCase
-    
-    #no need to do anything for initialize method
-  def initialize (args)
-    super(args)
-    # TODO define application name
-    app_path("hbinputtest.exe")
-  end 
-  
-  # Test case method
-  #TODO: name test method with suitable name
-  # Must: Test method must start test_
-  # Recomended: really descriping name
-  def test_do_something
-
-  # create test object app from defined sut
-    app = @sut.run(:name => @app_name)  
-      sleep(10)
-  
-  #Application is closed after test
-  app.close
-  #Verifies it is closed
-      
-  end #End of test case test_do_something
- 
-
-end#Testsuite
-
--- a/buildframework/helium/sf/python/pythoncore/tests/data/matti/test_all_present.xml	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<testrun>
-	<metadata>
-		<meta name="diamonds-buildid">http://diamonds.com/1234</meta>
-		<meta name="diamonds-testtype">Smoke</meta>
-		<meta name="name">matti test run</meta>
-	</metadata>
-	<agents>
-		<agent alias="alias">
-			<property name="hardware" value="new_device"/>
-		</agent>
-	</agents>
-	<execution defaultAgent="alias">
-		<initialization>
-			<task agents="alias">
-				<type>FlashTask</type>
-				<parameters>
-					<parameter name="image-1" value="images\image1.fpsx"/>
-					<parameter name="image-2" value="images\image2.fpsx"/>
-				</parameters>
-			</task>
-			<task agents="alias">
-				<type>FileUploadTask</type>
-				<parameters>
-					<parameter name="src" value="exe1\matti_testcases\hwdata\file1.txt"/>
-					<parameter name="dst" value="C:\Private\10202BE9\PERSISTS\file1.txt"/>
-				</parameters>
-			</task>
-			<task agents="alias">
-				<type>FileUploadTask</type>
-				<parameters>
-					<parameter name="src" value="exe1\matti_testcases\hwdata\settings.ini"/>
-					<parameter name="dst" value="c:\sys\settings.ini"/>
-				</parameters>
-			</task>
-			<task agents="alias">
-				<type>FileUploadTask</type>
-				<parameters>
-					<parameter name="src" value="sisfiles\abc.sis"/>
-					<parameter name="dst" value="c:\abc.sis"/>
-				</parameters>
-			</task>
-			<task agents="alias">
-				<type>FileUploadTask</type>
-				<parameters>
-					<parameter name="src" value="sisfiles\xyz.sis"/>
-					<parameter name="dst" value="f:\xyz.sis"/>
-				</parameters>
-			</task>
-			<task agents="alias">
-				<type>InstallSisTask</type>
-				<parameters>
-					<parameter name="software-package" value="c:\abc.sis"/>
-					<parameter name="timeout" value="1200"/>
-					<parameter name="upgrade-data " value="true"/>
-					<parameter name="ignore-ocsp-warnings" value="true"/>
-					<parameter name="ocsp-done" value="true"/>
-					<parameter name="install-drive" value="c"/>
-					<parameter name="overwrite-allowed" value="true"/>
-					<parameter name="download-allowed" value="false"/>
-					<parameter name="download-username" value="user"/>
-					<parameter name="download-password" value="passwd"/>
-					<parameter name="upgrade-allowed" value="true"/>
-					<parameter name="optional-items-allowed" value="true"/>
-					<parameter name="untrusted-allowed" value="true"/>
-					<parameter name="package-info-allowed" value="true"/>
-					<parameter name="user-capabilities-granted" value="true"/>
-					<parameter name="kill-app" value="true"/>
-				</parameters>
-			</task>
-			<task agents="alias">
-				<type>InstallSisTask</type>
-				<parameters>
-					<parameter name="software-package" value="f:\xyz.sis"/>
-					<parameter name="timeout" value="1200"/>
-					<parameter name="upgrade-data " value="true"/>
-					<parameter name="ignore-ocsp-warnings" value="true"/>
-					<parameter name="ocsp-done" value="true"/>
-					<parameter name="install-drive" value="f"/>
-					<parameter name="overwrite-allowed" value="true"/>
-					<parameter name="download-allowed" value="false"/>
-					<parameter name="download-username" value="user"/>
-					<parameter name="download-password" value="passwd"/>
-					<parameter name="upgrade-allowed" value="true"/>
-					<parameter name="optional-items-allowed" value="true"/>
-					<parameter name="untrusted-allowed" value="true"/>
-					<parameter name="package-info-allowed" value="true"/>
-					<parameter name="user-capabilities-granted" value="true"/>
-					<parameter name="kill-app" value="true"/>
-				</parameters>
-			</task>
-			<task agents="alias">
-				<type>RebootTask</type>
-				<parameters/>
-			</task>
-			<task agents="alias">
-				<type>CreateDirTask</type>
-				<parameters>
-					<parameter name="dir" value="c:\logs\testability"/>
-				</parameters>
-			</task>
-		</initialization>
-		<task agents="alias">
-			<type>MATTITask</type>
-			<parameters>
-				<parameter name="script" value="exe1\matti_testcases\"/>
-				<parameter name="xml" value="exe1\matti_testcases\mattiparameters\."/>
-				<parameter name="timeout" value="1200"/>
-				<parameter name="sierra" value="true"/>
-				<parameter name="executable-parameters" value="--teardown -e %TEST_RUN_SANDBOX%/exe1/matti_testcases/profile/bat.sip test_unit"/>
-			</parameters>
-		</task>
-		<task agents="alias">
-			<type>MATTITask</type>
-			<parameters>
-				<parameter name="script" value="exe1\matti_testcases\"/>
-				<parameter name="xml" value="exe1\matti_testcases\mattiparameters\."/>
-				<parameter name="timeout" value="1200"/>
-				<parameter name="sierra" value="true"/>
-				<parameter name="executable-parameters" value="--teardown -e %TEST_RUN_SANDBOX%/exe1/matti_testcases/profile/fute.sip test_unit"/>
-			</parameters>
-		</task>
-		<finalization>
-			<task agents="alias">
-				<type>CleanupTask</type>
-				<parameters>
-					<parameter name="upload-files" value="true"/>
-				</parameters>
-			</task>
-		</finalization>
-	</execution>
-	<postActions>
-		<action>
-			<type>EmailAction</type>
-			<parameters>
-				<parameter name="subject" value="Matti test report"/>
-				<parameter name="to" value="firstname.lastname@domain.com"/>
-				<parameter name="format" value="simplelogger"/>
-			</parameters>
-		</action>
-	</postActions>
-</testrun>
\ No newline at end of file
--- a/buildframework/helium/sf/python/pythoncore/tests/data/matti/test_all_present_sierra_disabled.xml	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<testrun>
-	<metadata>
-		<meta name="diamonds-buildid">http://diamonds.com/1234</meta>
-		<meta name="diamonds-testtype">Smoke</meta>
-		<meta name="name">matti test run</meta>
-	</metadata>
-	<agents>
-		<agent alias="alias">
-			<property name="hardware" value="new_device"/>
-		</agent>
-	</agents>
-	<execution defaultAgent="alias">
-		<initialization>
-			<task agents="alias">
-				<type>FlashTask</type>
-				<parameters>
-					<parameter name="image-1" value="images\image1.fpsx"/>
-					<parameter name="image-2" value="images\image2.fpsx"/>
-				</parameters>
-			</task>
-			<task agents="alias">
-				<type>FileUploadTask</type>
-				<parameters>
-					<parameter name="src" value="exe1\matti_testcases\hwdata\file1.txt"/>
-					<parameter name="dst" value="C:\Private\10202BE9\PERSISTS\file1.txt"/>
-				</parameters>
-			</task>
-			<task agents="alias">
-				<type>FileUploadTask</type>
-				<parameters>
-					<parameter name="src" value="exe1\matti_testcases\hwdata\settings.ini"/>
-					<parameter name="dst" value="c:\sys\settings.ini"/>
-				</parameters>
-			</task>
-			<task agents="alias">
-				<type>FileUploadTask</type>
-				<parameters>
-					<parameter name="src" value="sisfiles\abc.sis"/>
-					<parameter name="dst" value="c:\abc.sis"/>
-				</parameters>
-			</task>
-			<task agents="alias">
-				<type>FileUploadTask</type>
-				<parameters>
-					<parameter name="src" value="sisfiles\xyz.sis"/>
-					<parameter name="dst" value="f:\xyz.sis"/>
-				</parameters>
-			</task>
-			<task agents="alias">
-				<type>InstallSisTask</type>
-				<parameters>
-					<parameter name="software-package" value="c:\abc.sis"/>
-					<parameter name="timeout" value="1200"/>
-					<parameter name="upgrade-data " value="true"/>
-					<parameter name="ignore-ocsp-warnings" value="true"/>
-					<parameter name="ocsp-done" value="true"/>
-					<parameter name="install-drive" value="c"/>
-					<parameter name="overwrite-allowed" value="true"/>
-					<parameter name="download-allowed" value="false"/>
-					<parameter name="download-username" value="user"/>
-					<parameter name="download-password" value="passwd"/>
-					<parameter name="upgrade-allowed" value="true"/>
-					<parameter name="optional-items-allowed" value="true"/>
-					<parameter name="untrusted-allowed" value="true"/>
-					<parameter name="package-info-allowed" value="true"/>
-					<parameter name="user-capabilities-granted" value="true"/>
-					<parameter name="kill-app" value="true"/>
-				</parameters>
-			</task>
-			<task agents="alias">
-				<type>InstallSisTask</type>
-				<parameters>
-					<parameter name="software-package" value="f:\xyz.sis"/>
-					<parameter name="timeout" value="1200"/>
-					<parameter name="upgrade-data " value="true"/>
-					<parameter name="ignore-ocsp-warnings" value="true"/>
-					<parameter name="ocsp-done" value="true"/>
-					<parameter name="install-drive" value="f"/>
-					<parameter name="overwrite-allowed" value="true"/>
-					<parameter name="download-allowed" value="false"/>
-					<parameter name="download-username" value="user"/>
-					<parameter name="download-password" value="passwd"/>
-					<parameter name="upgrade-allowed" value="true"/>
-					<parameter name="optional-items-allowed" value="true"/>
-					<parameter name="untrusted-allowed" value="true"/>
-					<parameter name="package-info-allowed" value="true"/>
-					<parameter name="user-capabilities-granted" value="true"/>
-					<parameter name="kill-app" value="true"/>
-				</parameters>
-			</task>
-			<task agents="alias">
-				<type>RebootTask</type>
-				<parameters/>
-			</task>
-			<task agents="alias">
-				<type>CreateDirTask</type>
-				<parameters>
-					<parameter name="dir" value="c:\logs\testability"/>
-				</parameters>
-			</task>
-		</initialization>
-		<task agents="alias">
-			<type>MATTITask</type>
-			<parameters>
-				<parameter name="script" value="exe1\matti_testcases\"/>
-				<parameter name="xml" value="exe1\matti_testcases\mattiparameters\."/>
-				<parameter name="timeout" value="1200"/>
-				<parameter name="sierra" value="false"/>
-				<parameter name="executable-parameters" value="--teardown -e %TEST_RUN_SANDBOX%/exe1/matti_testcases/unit_test1.rb test_unit"/>
-			</parameters>
-		</task>
-		<task agents="alias">
-			<type>MATTITask</type>
-			<parameters>
-				<parameter name="script" value="exe1\matti_testcases\"/>
-				<parameter name="xml" value="exe1\matti_testcases\mattiparameters\."/>
-				<parameter name="timeout" value="1200"/>
-				<parameter name="sierra" value="false"/>
-				<parameter name="executable-parameters" value="--teardown -e %TEST_RUN_SANDBOX%/exe1/matti_testcases/unit_test2.rb test_unit"/>
-			</parameters>
-		</task>
-		<finalization>
-			<task agents="alias">
-				<type>CleanupTask</type>
-				<parameters>
-					<parameter name="upload-files" value="true"/>
-				</parameters>
-			</task>
-		</finalization>
-	</execution>
-	<postActions>
-		<action>
-			<type>EmailAction</type>
-			<parameters>
-				<parameter name="subject" value="Matti test report"/>
-				<parameter name="to" value="firstname.lastname@domain.com"/>
-				<parameter name="format" value="simplelogger"/>
-			</parameters>
-		</action>
-	</postActions>
-</testrun>
Binary file buildframework/helium/sf/python/pythoncore/tests/data/packageiad/sis/testPackage.zip has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/tests/data/tdriver/tdriver_template.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
+<!-- 
+============================================================================ 
+Name        : tdriver_template.xml
+Part of     : Helium 
+
+Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+Contains the template for the test.xml file output. The test.xml file contains
+information on the files used to create the drop file.
+============================================================================
+-->
+
+<testrun>
+    <metadata>
+        {% if xml_dict['diamonds_build_url'] -%}
+        <meta name="diamonds-buildid">{{ xml_dict['diamonds_build_url'] }}</meta> 
+        <meta name="diamonds-testtype">Smoke</meta>
+        {% endif %}
+        <meta name="name">{{ xml_dict['testrun_name'] }}</meta> 
+    </metadata>
+    
+    <agents>
+        <agent alias="{{ xml_dict['alias_name'] }}">
+            <property name="hardware" value="{{ xml_dict["device_type"] }}"/>
+        </agent>
+    </agents>
+    
+    
+    {% for exe_block in xml_dict['execution_blocks'] -%}
+    <execution defaultAgent="{{ xml_dict['alias_name'] }}">        
+        <initialization>
+        
+            {% if exe_block['image_files'] -%}
+            <task agents="{{ xml_dict['alias_name'] }}">
+                <type>FlashTask</type>
+                <parameters>
+                {% set i = 1 %}
+                {% for img in exe_block['image_files'] -%}
+                    <parameter name="image-{{ i }}" value="images\{{ os.path.basename(img) }}" />
+                    {% set i = i + 1 %}
+                {% endfor -%}
+                </parameters>
+            </task>
+            {% endif %}
+                     
+
+            {% if exe_block['install_files'] != [] -%}
+              {% for file in exe_block['install_files'] -%}            
+            <task agents="{{ xml_dict['alias_name'] }}">
+                <type>FileUploadTask</type>
+                <parameters>
+                    <parameter name="src" value="{{exe_block['name']}}{{ atspath.normpath(atspath.normpath(file[0]).replace(atspath.normpath(exe_block['asset_path']).rsplit("\\", 1)[0], "")) }}"/>
+                    <parameter name="dst" value="{{ atspath.normpath(file[1]) }}"/>
+                </parameters>
+            </task>
+              {% endfor -%}
+            {% endif %}
+            
+            {% if exe_block['tdriver_sis_files'] != [] -%}
+              {% for sisfile in exe_block['tdriver_sis_files'] -%}            
+            <task agents="{{ xml_dict['alias_name'] }}">
+                <type>FileUploadTask</type>
+                <parameters>
+                    <parameter name="src" value="sisfiles\{{ os.path.basename(sisfile[0]) }}"/>
+                    <parameter name="dst" value="{{ sisfile[2] }}"/>
+                </parameters>
+            </task>
+              {% endfor -%}
+            {% endif %}
+
+          {% for sis_file in exe_block["tdriver_sis_files"] -%}
+            <task agents="{{ xml_dict['alias_name'] }}">
+               <type>InstallSisTask</type>
+               <parameters>
+                    <parameter name="software-package" value="{{ sis_file[2] }}"/>
+                    <parameter name="timeout" value="{{ exe_block["test_timeout"] }}"/>
+                    <parameter name="upgrade-data" value="true"/>
+                    <parameter name="ignore-ocsp-warnings" value="true"/>
+                    <parameter name="ocsp-done" value="true"/>
+                    <parameter name="install-drive" value="{{ sis_file[2].split(":")[0] }}"/>
+                    <parameter name="overwrite-allowed" value="true"/>
+                    <parameter name="download-allowed" value="false"/>
+                    <parameter name="download-username" value="user"/>
+                    <parameter name="download-password" value="passwd"/>
+                    <parameter name="upgrade-allowed" value="true"/>
+                    <parameter name="optional-items-allowed" value="true"/>
+                    <parameter name="untrusted-allowed" value="true"/>
+                    <parameter name="package-info-allowed" value="true"/>
+                    <parameter name="user-capabilities-granted" value="true"/>
+                    <parameter name="kill-app" value="true"/>
+               </parameters>
+            </task>
+          {%- endfor -%}
+
+            <task agents="{{ xml_dict['alias_name'] }}">
+                <type>RebootTask</type>
+                <parameters/>                
+            </task>
+            <task agents="{{ xml_dict['alias_name'] }}">
+                <type>CreateDirTask</type>
+                <parameters>                
+                    <parameter value="c:\logs\testability" name="dir"/>
+                </parameters>
+            </task>
+        </initialization>
+
+        {% for task_file in exe_block["tdriver_task_files"] -%}
+        <task agents="{{ xml_dict['alias_name'] }}">
+           <type>TestabilityTask</type>
+           <parameters>
+              <parameter value="{{ exe_block["name"] }}\tdriver_testcases\" name="script"/>
+              <parameter value="{{ exe_block["name"] }}\tdriver_testcases\tdriverparameters\{{ os.path.basename(exe_block["tdriver_parameters"][0]) }}" name="xml"/>
+              <parameter value="{{ exe_block['test_timeout'] }}" name="timeout"/>
+              <parameter value="{{ exe_block["tdrunner_enabled"] }}" name="tdrunner"/>
+              <parameter value="{{ exe_block["tdrunner_parameters"] }} -e %TEST_RUN_SANDBOX%/{{ exe_block["name"] }}/{{ task_file }} test_unit" name="executable-parameters"/>
+           </parameters>
+        </task>
+        {% endfor -%}
+        
+        <finalization>
+	      <task agents="{{ xml_dict['alias_name'] }}">
+	        <type>CleanupTask</type>
+	        <parameters>
+	          <parameter value="true" name="upload-files"/>
+	        </parameters>
+	      </task>
+        </finalization>
+    </execution>    
+    {% endfor -%}
+    
+    <postActions>
+    <action>
+      <type>EmailAction</type>
+      <parameters>
+        <parameter value="{{ xml_dict['email_subject'] }}" name="subject"/>
+        <parameter value="{{ xml_dict['report_email'] }}" name="to"/>
+        <parameter value="{{ xml_dict['email_format'] }}" name="format"/>
+      </parameters>
+    </action>
+    {% if xml_dict['report_location'] -%}
+    <action>
+      <type>FileStoreAction</type>
+      <parameters>
+       <parameter value="{{ xml_dict['report_location'] }}\%START_DATE%_%START_TIME%_%SERVER_TOKEN%" name="dst"/>
+       <parameter value="true" name="overwrite"/>
+      </parameters>
+    </action>
+    {% endif %}
+    {% if xml_dict['diamonds_build_url'] -%}
+    <action>
+      <type>DiamondsAction</type>
+    </action>
+    {% endif %}
+    </postActions>
+    
+</testrun>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/tests/data/tdriver/test.rb	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,34 @@
+# require needed Ruby, MATTI and Orbit files
+require 'test/unit'
+require 'otest/testcase'
+
+    
+  #TODO: Give suitable name for test class 
+class TestClassName < Test::Unit::TestCase
+    
+    #no need to do anything for initialize method
+  def initialize (args)
+    super(args)
+    # TODO define application name
+    app_path("hbinputtest.exe")
+  end 
+  
+  # Test case method
+  #TODO: name test method with suitable name
+  # Must: Test method must start test_
+  # Recomended: really descriping name
+  def test_do_something
+
+  # create test object app from defined sut
+    app = @sut.run(:name => @app_name)  
+      sleep(10)
+  
+  #Application is closed after test
+  app.close
+  #Verifies it is closed
+      
+  end #End of test case test_do_something
+ 
+
+end#Testsuite
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/tests/data/tdriver/test_all_present.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<testrun>
+	<metadata>
+		<meta name="diamonds-buildid">http://diamonds.com/1234</meta>
+		<meta name="diamonds-testtype">Smoke</meta>
+		<meta name="name">TDriver test run</meta>
+	</metadata>
+	<agents>
+		<agent alias="alias">
+			<property name="hardware" value="new_device"/>
+		</agent>
+	</agents>
+	<execution defaultAgent="alias">
+		<initialization>
+			<task agents="alias">
+				<type>FlashTask</type>
+				<parameters>
+					<parameter name="image-1" value="images\image1.fpsx"/>
+					<parameter name="image-2" value="images\image2.fpsx"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>FileUploadTask</type>
+				<parameters>
+					<parameter name="src" value="exe1\tdriver_testcases\hwdata\file1.txt"/>
+					<parameter name="dst" value="C:\Private\10202BE9\PERSISTS\file1.txt"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>FileUploadTask</type>
+				<parameters>
+					<parameter name="src" value="exe1\tdriver_testcases\hwdata\settings.ini"/>
+					<parameter name="dst" value="c:\sys\settings.ini"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>FileUploadTask</type>
+				<parameters>
+					<parameter name="src" value="sisfiles\abc.sis"/>
+					<parameter name="dst" value="c:\abc.sis"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>FileUploadTask</type>
+				<parameters>
+					<parameter name="src" value="sisfiles\xyz.sis"/>
+					<parameter name="dst" value="f:\xyz.sis"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>InstallSisTask</type>
+				<parameters>
+					<parameter name="software-package" value="c:\abc.sis"/>
+					<parameter name="timeout" value="1200"/>
+					<parameter name="upgrade-data" value="true"/>
+					<parameter name="ignore-ocsp-warnings" value="true"/>
+					<parameter name="ocsp-done" value="true"/>
+					<parameter name="install-drive" value="c"/>
+					<parameter name="overwrite-allowed" value="true"/>
+					<parameter name="download-allowed" value="false"/>
+					<parameter name="download-username" value="user"/>
+					<parameter name="download-password" value="passwd"/>
+					<parameter name="upgrade-allowed" value="true"/>
+					<parameter name="optional-items-allowed" value="true"/>
+					<parameter name="untrusted-allowed" value="true"/>
+					<parameter name="package-info-allowed" value="true"/>
+					<parameter name="user-capabilities-granted" value="true"/>
+					<parameter name="kill-app" value="true"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>InstallSisTask</type>
+				<parameters>
+					<parameter name="software-package" value="f:\xyz.sis"/>
+					<parameter name="timeout" value="1200"/>
+					<parameter name="upgrade-data" value="true"/>
+					<parameter name="ignore-ocsp-warnings" value="true"/>
+					<parameter name="ocsp-done" value="true"/>
+					<parameter name="install-drive" value="f"/>
+					<parameter name="overwrite-allowed" value="true"/>
+					<parameter name="download-allowed" value="false"/>
+					<parameter name="download-username" value="user"/>
+					<parameter name="download-password" value="passwd"/>
+					<parameter name="upgrade-allowed" value="true"/>
+					<parameter name="optional-items-allowed" value="true"/>
+					<parameter name="untrusted-allowed" value="true"/>
+					<parameter name="package-info-allowed" value="true"/>
+					<parameter name="user-capabilities-granted" value="true"/>
+					<parameter name="kill-app" value="true"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>RebootTask</type>
+				<parameters/>
+			</task>
+			<task agents="alias">
+				<type>CreateDirTask</type>
+				<parameters>
+					<parameter name="dir" value="c:\logs\testability"/>
+				</parameters>
+			</task>
+		</initialization>
+		<task agents="alias">
+			<type>TestabilityTask</type>
+			<parameters>
+				<parameter name="script" value="exe1\tdriver_testcases\"/>
+				<parameter name="xml" value="exe1\tdriver_testcases\tdriverparameters\."/>
+				<parameter name="timeout" value="1200"/>
+				<parameter name="tdrunner" value="true"/>
+				<parameter name="executable-parameters" value="--teardown -e %TEST_RUN_SANDBOX%/exe1/tdriver_testcases/profile/bat.sip test_unit"/>
+			</parameters>
+		</task>
+		<task agents="alias">
+			<type>TestabilityTask</type>
+			<parameters>
+				<parameter name="script" value="exe1\tdriver_testcases\"/>
+				<parameter name="xml" value="exe1\tdriver_testcases\tdriverparameters\."/>
+				<parameter name="timeout" value="1200"/>
+				<parameter name="tdrunner" value="true"/>
+				<parameter name="executable-parameters" value="--teardown -e %TEST_RUN_SANDBOX%/exe1/tdriver_testcases/profile/fute.sip test_unit"/>
+			</parameters>
+		</task>
+		<finalization>
+			<task agents="alias">
+				<type>CleanupTask</type>
+				<parameters>
+					<parameter name="upload-files" value="true"/>
+				</parameters>
+			</task>
+		</finalization>
+	</execution>
+	<postActions>
+		<action>
+			<type>EmailAction</type>
+			<parameters>
+				<parameter name="subject" value="TDriver test report"/>
+				<parameter name="to" value="firstname.lastname@domain.com"/>
+				<parameter name="format" value="simplelogger"/>
+			</parameters>
+		</action>
+		<action>
+			<type>DiamondsAction</type>
+		</action>
+	</postActions>
+</testrun>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/tests/data/tdriver/test_all_present_tdrunner_disabled.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<testrun>
+	<metadata>
+		<meta name="diamonds-buildid">http://diamonds.com/1234</meta>
+		<meta name="diamonds-testtype">Smoke</meta>
+		<meta name="name">TDriver test run</meta>
+	</metadata>
+	<agents>
+		<agent alias="alias">
+			<property name="hardware" value="new_device"/>
+		</agent>
+	</agents>
+	<execution defaultAgent="alias">
+		<initialization>
+			<task agents="alias">
+				<type>FlashTask</type>
+				<parameters>
+					<parameter name="image-1" value="images\image1.fpsx"/>
+					<parameter name="image-2" value="images\image2.fpsx"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>FileUploadTask</type>
+				<parameters>
+					<parameter name="src" value="exe1\tdriver_testcases\hwdata\file1.txt"/>
+					<parameter name="dst" value="C:\Private\10202BE9\PERSISTS\file1.txt"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>FileUploadTask</type>
+				<parameters>
+					<parameter name="src" value="exe1\tdriver_testcases\hwdata\settings.ini"/>
+					<parameter name="dst" value="c:\sys\settings.ini"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>FileUploadTask</type>
+				<parameters>
+					<parameter name="src" value="sisfiles\abc.sis"/>
+					<parameter name="dst" value="c:\abc.sis"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>FileUploadTask</type>
+				<parameters>
+					<parameter name="src" value="sisfiles\xyz.sis"/>
+					<parameter name="dst" value="f:\xyz.sis"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>InstallSisTask</type>
+				<parameters>
+					<parameter name="software-package" value="c:\abc.sis"/>
+					<parameter name="timeout" value="1200"/>
+					<parameter name="upgrade-data" value="true"/>
+					<parameter name="ignore-ocsp-warnings" value="true"/>
+					<parameter name="ocsp-done" value="true"/>
+					<parameter name="install-drive" value="c"/>
+					<parameter name="overwrite-allowed" value="true"/>
+					<parameter name="download-allowed" value="false"/>
+					<parameter name="download-username" value="user"/>
+					<parameter name="download-password" value="passwd"/>
+					<parameter name="upgrade-allowed" value="true"/>
+					<parameter name="optional-items-allowed" value="true"/>
+					<parameter name="untrusted-allowed" value="true"/>
+					<parameter name="package-info-allowed" value="true"/>
+					<parameter name="user-capabilities-granted" value="true"/>
+					<parameter name="kill-app" value="true"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>InstallSisTask</type>
+				<parameters>
+					<parameter name="software-package" value="f:\xyz.sis"/>
+					<parameter name="timeout" value="1200"/>
+					<parameter name="upgrade-data" value="true"/>
+					<parameter name="ignore-ocsp-warnings" value="true"/>
+					<parameter name="ocsp-done" value="true"/>
+					<parameter name="install-drive" value="f"/>
+					<parameter name="overwrite-allowed" value="true"/>
+					<parameter name="download-allowed" value="false"/>
+					<parameter name="download-username" value="user"/>
+					<parameter name="download-password" value="passwd"/>
+					<parameter name="upgrade-allowed" value="true"/>
+					<parameter name="optional-items-allowed" value="true"/>
+					<parameter name="untrusted-allowed" value="true"/>
+					<parameter name="package-info-allowed" value="true"/>
+					<parameter name="user-capabilities-granted" value="true"/>
+					<parameter name="kill-app" value="true"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>RebootTask</type>
+				<parameters/>
+			</task>
+			<task agents="alias">
+				<type>CreateDirTask</type>
+				<parameters>
+					<parameter name="dir" value="c:\logs\testability"/>
+				</parameters>
+			</task>
+		</initialization>
+		<task agents="alias">
+			<type>TestabilityTask</type>
+			<parameters>
+				<parameter name="script" value="exe1\tdriver_testcases\"/>
+				<parameter name="xml" value="exe1\tdriver_testcases\tdriverparameters\."/>
+				<parameter name="timeout" value="1200"/>
+				<parameter name="tdrunner" value="false"/>
+				<parameter name="executable-parameters" value="--teardown -e %TEST_RUN_SANDBOX%/exe1/tdriver_testcases/unit_test1.rb test_unit"/>
+			</parameters>
+		</task>
+		<task agents="alias">
+			<type>TestabilityTask</type>
+			<parameters>
+				<parameter name="script" value="exe1\tdriver_testcases\"/>
+				<parameter name="xml" value="exe1\tdriver_testcases\tdriverparameters\."/>
+				<parameter name="timeout" value="1200"/>
+				<parameter name="tdrunner" value="false"/>
+				<parameter name="executable-parameters" value="--teardown -e %TEST_RUN_SANDBOX%/exe1/tdriver_testcases/unit_test2.rb test_unit"/>
+			</parameters>
+		</task>
+		<finalization>
+			<task agents="alias">
+				<type>CleanupTask</type>
+				<parameters>
+					<parameter name="upload-files" value="true"/>
+				</parameters>
+			</task>
+		</finalization>
+	</execution>
+	<postActions>
+		<action>
+			<type>EmailAction</type>
+			<parameters>
+				<parameter name="subject" value="TDriver test report"/>
+				<parameter name="to" value="firstname.lastname@domain.com"/>
+				<parameter name="format" value="simplelogger"/>
+			</parameters>
+		</action>
+		<action>
+			<type>FileStoreAction</type>
+			<parameters>
+				<parameter name="dst" value="\\network\drive\%START_DATE%_%START_TIME%_%SERVER_TOKEN%"/>
+				<parameter name="overwrite" value="true"/>
+			</parameters>
+		</action>
+		<action>
+			<type>DiamondsAction</type>
+		</action>
+	</postActions>
+</testrun>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/python/pythoncore/tests/data/tdriver/test_ctc.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<testrun>
+	<metadata>
+		<meta name="diamonds-buildid">http://diamonds.com/1234</meta>
+		<meta name="diamonds-testtype">Smoke</meta>
+		<meta name="name">TDriver test run</meta>
+	</metadata>
+	<agents>
+		<agent alias="alias">
+			<property name="hardware" value="new_device"/>
+		</agent>
+	</agents>
+	<execution defaultAgent="alias">
+		<initialization>
+			<task agents="alias">
+				<type>FlashTask</type>
+				<parameters>
+					<parameter name="image-1" value="images\image1.fpsx"/>
+					<parameter name="image-2" value="images\image2.fpsx"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>FileUploadTask</type>
+				<parameters>
+					<parameter name="src" value="exe1\tdriver_testcases\hwdata\file1.txt"/>
+					<parameter name="dst" value="C:\Private\10202BE9\PERSISTS\file1.txt"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>FileUploadTask</type>
+				<parameters>
+					<parameter name="src" value="exe1\tdriver_testcases\hwdata\settings.ini"/>
+					<parameter name="dst" value="c:\sys\settings.ini"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>FileUploadTask</type>
+				<parameters>
+					<parameter name="src" value="sisfiles\abc.sis"/>
+					<parameter name="dst" value="c:\abc.sis"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>FileUploadTask</type>
+				<parameters>
+					<parameter name="src" value="sisfiles\xyz.sis"/>
+					<parameter name="dst" value="f:\xyz.sis"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>InstallSisTask</type>
+				<parameters>
+					<parameter name="software-package" value="c:\abc.sis"/>
+					<parameter name="timeout" value="1200"/>
+					<parameter name="upgrade-data" value="true"/>
+					<parameter name="ignore-ocsp-warnings" value="true"/>
+					<parameter name="ocsp-done" value="true"/>
+					<parameter name="install-drive" value="c"/>
+					<parameter name="overwrite-allowed" value="true"/>
+					<parameter name="download-allowed" value="false"/>
+					<parameter name="download-username" value="user"/>
+					<parameter name="download-password" value="passwd"/>
+					<parameter name="upgrade-allowed" value="true"/>
+					<parameter name="optional-items-allowed" value="true"/>
+					<parameter name="untrusted-allowed" value="true"/>
+					<parameter name="package-info-allowed" value="true"/>
+					<parameter name="user-capabilities-granted" value="true"/>
+					<parameter name="kill-app" value="true"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>InstallSisTask</type>
+				<parameters>
+					<parameter name="software-package" value="f:\xyz.sis"/>
+					<parameter name="timeout" value="1200"/>
+					<parameter name="upgrade-data" value="true"/>
+					<parameter name="ignore-ocsp-warnings" value="true"/>
+					<parameter name="ocsp-done" value="true"/>
+					<parameter name="install-drive" value="f"/>
+					<parameter name="overwrite-allowed" value="true"/>
+					<parameter name="download-allowed" value="false"/>
+					<parameter name="download-username" value="user"/>
+					<parameter name="download-password" value="passwd"/>
+					<parameter name="upgrade-allowed" value="true"/>
+					<parameter name="optional-items-allowed" value="true"/>
+					<parameter name="untrusted-allowed" value="true"/>
+					<parameter name="package-info-allowed" value="true"/>
+					<parameter name="user-capabilities-granted" value="true"/>
+					<parameter name="kill-app" value="true"/>
+				</parameters>
+			</task>
+			<task agents="alias">
+				<type>RebootTask</type>
+				<parameters/>
+			</task>
+			<task agents="alias">
+				<type>CreateDirTask</type>
+				<parameters>
+					<parameter name="dir" value="c:\logs\testability"/>
+				</parameters>
+			</task>
+      <task>
+          <type>CreateDirTask</type>
+          <parameters>
+              <parameter name="dir" value="c:\data\ctc"/>
+          </parameters>
+      </task>
+      <task>
+          <type>NonTestExecuteTask</type>
+          <parameters>
+              <parameter name="file" value="z:\sys\bin\ctcman.exe"/>
+              <parameter name="timeout" value="1200"/>
+          </parameters>
+      </task>
+		</initialization>
+		<task agents="alias">
+			<type>TestabilityTask</type>
+			<parameters>
+				<parameter name="script" value="exe1\tdriver_testcases\"/>
+				<parameter name="xml" value="exe1\tdriver_testcases\tdriverparameters\."/>
+				<parameter name="timeout" value="1200"/>
+				<parameter name="tdrunner" value="true"/>
+				<parameter name="executable-parameters" value="--teardown -e %TEST_RUN_SANDBOX%/exe1/tdriver_testcases/profile/bat.sip test_unit"/>
+			</parameters>
+		</task>
+		<task agents="alias">
+			<type>TestabilityTask</type>
+			<parameters>
+				<parameter name="script" value="exe1\tdriver_testcases\"/>
+				<parameter name="xml" value="exe1\tdriver_testcases\tdriverparameters\."/>
+				<parameter name="timeout" value="1200"/>
+				<parameter name="tdrunner" value="true"/>
+				<parameter name="executable-parameters" value="--teardown -e %TEST_RUN_SANDBOX%/exe1/tdriver_testcases/profile/fute.sip test_unit"/>
+			</parameters>
+		</task>
+		<finalization>
+        <task>
+        <type>NonTestExecuteTask
+        </type>
+        <parameters>
+        <parameter name="parameters" value="writelocal"/>
+        <parameter name="file" value="z:\sys\bin\ctcman.exe"/>
+        <parameter name="timeout" value="1200"/>
+        </parameters>
+        </task>
+        <task>
+        <type>NonTestExecuteTask</type>
+        <parameters>
+        <parameter name="parameters" value="writefile"/>
+        <parameter name="file" value="z:\sys\bin\ctcman.exe"/>
+        <parameter name="timeout" value="1200"/>
+        </parameters>
+        </task>
+        <task>
+        <metadata>
+        <meta name="file-type">CTCDATA</meta>
+        </metadata>
+        <type>FileDownloadTask</type>
+        <parameters>
+        <parameter name="src" value="c:\data\ctc\ctcdata.txt"/>
+        <parameter name="reboot-retry-count" value="1"/>
+        <parameter name="retry-count" value="1"/>
+        </parameters>
+        </task>
+		  
+			<task agents="alias">
+				<type>CleanupTask</type>
+				<parameters>
+					<parameter name="upload-files" value="true"/>
+				</parameters>
+			</task>
+		</finalization>
+	</execution>
+	<postActions>
+		<action>
+			<type>EmailAction</type>
+			<parameters>
+				<parameter name="subject" value="TDriver test report"/>
+				<parameter name="to" value="firstname.lastname@domain.com"/>
+				<parameter name="format" value="simplelogger"/>
+			</parameters>
+		</action>
+    <action>
+        <type>DiamondsAction</type>
+        <parameters>
+            <parameter name="send-ctc-data" value="true"/>
+        </parameters>
+    </action>
+	</postActions>
+</testrun>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/data/diamonds/build_roms_sample.log	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,281 @@
+Starting build: 75090
+mkdir epoc32\rombuild\temp
+Number of threads: 4
+
+++ Started at Thu May 6 13:08:38 2010
++++ HiRes Start 1273147718
+-- cmd /c imaker WORKDIR=epoc32\rombuild\temp/config_482  -f /epoc32/rom/config/platform/productexample/image_conf_productexample_ui.mk TYPE=prd rofs3-dir  
+iMaker 10.12.01, 23-Mar-2010.
+===============================================================================
+Target: rofs3-dir  Duration: 00:02  Status: OK
+iMaker log    = `Y:/output/release_flash_images/productexample/prd/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_prd_imaker_rofs3-dir.log'
+ROFS3 dir     = `y:/output/release_flash_images/productexample/prd/customer/vanilla/rofs3'
+ROFS3 image   = `y:/output/release_flash_images/productexample/prd/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_prd.rofs3.img' - DOESN'T EXIST
+ROFS3 symbols = `y:/output/release_flash_images/productexample/prd/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_prd.rofs3.symbol' - DOESN'T EXIST
+ROFS3 flash   = `y:/output/release_flash_images/productexample/prd/customer/vanilla/RM-XXX_010.014_00.01_79.92_prd.rofs3.fpsx' - DOESN'T EXIST
+-------------------------------------------------------------------------------
+Total duration: 00:03  Status: OK
+===============================================================================
++++ HiRes End 1273147721
+++ Finished at Thu May 6 13:08:41 2010
+++ Started at Thu May 6 13:08:41 2010
++++ HiRes Start 1273147721
+-- cmd /c imaker WORKDIR=epoc32\rombuild\temp/config_484  -f /epoc32/rom/config/platform/productexample/image_conf_productexample_ui.mk TYPE=rnd udaerase-dir  
+iMaker 10.12.01, 23-Mar-2010.
+===============================================================================
+Target: udaerase-dir  Duration: 00:01  Status: OK
+iMaker log      = `Y:/output/release_flash_images/productexample/rnd/uda/udaerase/udadata/RM-XXX_010.014_79.92.2010.15_rnd_imaker_udaerase-dir.log'
+UDA Erase flash = `y:/output/release_flash_images/productexample/rnd/uda/RM-XXX_010.014_79.92.2010.15_rnd.udaerase.fpsx' - DOESN'T EXIST
+-------------------------------------------------------------------------------
+Total duration: 00:02  Status: OK
+===============================================================================
++++ HiRes End 1273147723
+++ Finished at Thu May 6 13:08:43 2010
+++ Started at Thu May 6 13:08:41 2010
++++ HiRes Start 1273147721
+-- cmd /c imaker WORKDIR=epoc32\rombuild\temp/config_485  -f /epoc32/rom/config/platform/productexample/image_conf_productexample_ui.mk TYPE=prd udaerase-dir  
+iMaker 10.12.01, 23-Mar-2010.
+===============================================================================
+Target: udaerase-dir  Duration: 00:01  Status: OK
+iMaker log      = `Y:/output/release_flash_images/productexample/prd/uda/udaerase/udadata/RM-XXX_010.014_79.92_prd_imaker_udaerase-dir.log'
+UDA Erase flash = `y:/output/release_flash_images/productexample/prd/uda/RM-XXX_010.014_79.92_prd.udaerase.fpsx' - DOESN'T EXIST
+-------------------------------------------------------------------------------
+Total duration: 00:02  Status: OK
+===============================================================================
++++ HiRes End 1273147723
+++ Finished at Thu May 6 13:08:43 2010
+++ Started at Thu May 6 13:08:41 2010
++++ HiRes Start 1273147721
+-- cmd /c imaker WORKDIR=epoc32\rombuild\temp/config_486  -f /epoc32/rom/config/platform/productexample/image_conf_productexample_ui.mk TYPE=subcon udaerase-dir  
+iMaker 10.12.01, 23-Mar-2010.
+===============================================================================
+Target: udaerase-dir  Duration: 00:01  Status: OK
+iMaker log      = `Y:/output/release_flash_images/productexample/subcon/uda/udaerase/udadata/RM-XXX_010.014_79.92_subcon_imaker_udaerase-dir.log'
+UDA Erase flash = `y:/output/release_flash_images/productexample/subcon/uda/RM-XXX_010.014_79.92_subcon.udaerase.fpsx' - DOESN'T EXIST
+-------------------------------------------------------------------------------
+Total duration: 00:02  Status: OK
+===============================================================================
++++ HiRes End 1273147723
+++ Finished at Thu May 6 13:08:43 2010
+++ Started at Thu May 6 13:08:40 2010
++++ HiRes Start 1273147720
+-- cmd /c imaker WORKDIR=epoc32\rombuild\temp/config_483  -f /epoc32/rom/config/platform/productexample/image_conf_productexample_ui.mk TYPE=subcon rofs3-dir  
+iMaker 10.12.01, 23-Mar-2010.
+===============================================================================
+Target: rofs3-dir  Duration: 00:02  Status: OK
+iMaker log    = `Y:/output/release_flash_images/productexample/subcon/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_subcon_imaker_rofs3-dir.log'
+ROFS3 dir     = `y:/output/release_flash_images/productexample/subcon/customer/vanilla/rofs3'
+ROFS3 image   = `y:/output/release_flash_images/productexample/subcon/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_subcon.rofs3.img' - DOESN'T EXIST
+ROFS3 symbols = `y:/output/release_flash_images/productexample/subcon/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_subcon.rofs3.symbol' - DOESN'T EXIST
+ROFS3 flash   = `y:/output/release_flash_images/productexample/subcon/customer/vanilla/RM-XXX_010.014_00.01_79.92_subcon.rofs3.fpsx' - DOESN'T EXIST
+-------------------------------------------------------------------------------
+Total duration: 00:03  Status: OK
+===============================================================================
++++ HiRes End 1273147724
+++ Finished at Thu May 6 13:08:44 2010
+-- imaker -f /epoc32/rom/config/platform/productexample/image_conf_productexample_ui.mk TYPE=rnd core-image
+++ Started at Thu May  6 13:08:45 2010
++++ HiRes Start  1273147725.83
+imaker WORKDIR=epoc32\rombuild\temp/config_16  -f /epoc32/rom/config/platform/productexample/image_conf_productexample_ui.mk TYPE=rnd core-image
+iMaker 10.12.01, 23-Mar-2010.
+Generating file(s) for Core (ROM & ROFS1) image creation
+Generating Feature manager file(s)
+Creating Core (ROM & ROFS1) SOS image
+
+Missing file(s):
+1) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(1686): Missing file: '/epoc32/data/Z/resource/apps/MPSettingsROPModel.rsc' in statement 'data='
+2) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(1824): Missing file: '/epoc32/data/Z/private/20021377/backup_registration.xml' in statement 'data='
+3) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2596): Missing file: '/epoc32/data/z/data/system/application/licenses/product/data.xml' in statement 'data='
+4) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2597): Missing file: '/epoc32/data/z/data/system/application/licenses/product/key' in statement 'data='
+5) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2614): Missing file: '/epoc32/data/Z/Resource/wappush/si.dtd' in statement 'data='
+6) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2615): Missing file: '/epoc32/data/Z/Resource/wappush/sl.dtd' in statement 'data='
+7) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2616): Missing file: '/epoc32/data/Z/Resource/wappush/si10.tok' in statement 'data='
+8) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2617): Missing file: '/epoc32/data/Z/Resource/wappush/sl10.tok' in statement 'data='
+9) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(4905): Missing file: '/epoc32/data/Z/resource/help/juicehelp.hlp' in statement 'data='
+
+Warning(s):
+  1) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x000003f5
+  2) WARNING: the value of attribute statusflags has been overridden in original feature 0x000003f5
+  3) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000000b
+  4) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000000b
+  5) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000584
+  6) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000584
+  7) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000019b
+  8) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000019b
+  9) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000007
+ 10) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x000005ff
+ 11) WARNING: the value of attribute statusflags has been overridden in original feature 0x000005ff
+ 12) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x000001f8
+ 13) WARNING: the value of attribute statusflags has been overridden in original feature 0x000001f8
+ 14) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000000c
+ 15) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000000c
+ 16) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000007a
+ 17) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000007a
+ 18) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000059
+ 19) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000059
+ 20) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000003
+ 21) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000003
+ 22) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000126
+ 23) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000126
+ 24) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000005b
+ 25) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000066
+ 26) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000066
+ 27) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000001
+ 28) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000001
+ 29) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000006b
+ 30) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000006b
+ 31) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x000005f9
+ 32) WARNING: the value of attribute statusflags has been overridden in original feature 0x000005f9
+ 33) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000072
+ 34) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000000d
+ 35) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000000d
+ 36) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x000006a9
+ 37) WARNING: the value of attribute statusflags has been overridden in original feature 0x000006a9
+ 38) WARNING: Error in reading features database file "/epoc32/include/s60customswfeatures.xml"
+ 39) WARNING: Unknown keyword 'LOCALISE_ALL_RESOURCES_BEGIN'.  Line 2133 ignored
+ 40) WARNING: Unknown keyword 'LOCALISE_ALL_RESOURCES_END'.  Line 2134 ignored
+ 41) WARNING: Unknown keyword '-----------------------------------------------------------'.  Line 2210 ignored
+ 42) WARNING: Unknown keyword '-----------------------------------------------------------'.  Line 2337 ignored
+ 43) WARNING: Unknown keyword '-----------------------------------------------------------'.  Line 2338 ignored
+ 44) WARNING: Unknown keyword '***'.  Line 2602 ignored
+ 45) WARNING: Unknown keyword 'LOCALISE_ALL_RESOURCES_BEGIN'.  Line 2133 ignored
+ 46) WARNING: Unknown keyword 'LOCALISE_ALL_RESOURCES_END'.  Line 2134 ignored
+ 47) WARNING: Unknown keyword '-----------------------------------------------------------'.  Line 2210 ignored
+ 48) WARNING: Unknown keyword '-----------------------------------------------------------'.  Line 2337 ignored
+ 49) WARNING: Unknown keyword '-----------------------------------------------------------'.  Line 2338 ignored
+ 50) WARNING: Unknown keyword '***'.  Line 2602 ignored
+ 51) WARNING: Kernel/variant/extension
+ 52) WARNING: Kernel/variant/extension
+ 53) WARNING: Kernel/variant/extension
+ 54) Warning: Can't open "\epoc32\release\ARMV5\urel\AR_LServer.exe.map" or "\epoc32\release\ARMV5\urel\AR_LServer.map"
+ 55) Warning: Can't open "\epoc32\release\ARMV5\urel\AP_CES_CoreComponents.dll.map" or "\epoc32\release\ARMV5\urel\AP_CES_CoreComponents.map"
+ 56) Warning: Can't open "\epoc32\release\ARMV5\urel\AP_HDMetafile2.dll.map" or "\epoc32\release\ARMV5\urel\AP_HDMetafile2.map"
+ 57) Warning: Can't open "\epoc32\release\ARMV5\urel\AP_HDOfficeCommon2.dll.map" or "\epoc32\release\ARMV5\urel\AP_HDOfficeCommon2.map"
+ 58) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_QORecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_QORecognizer.map"
+ 59) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_S60_CoreComponents.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_S60_CoreComponents.map"
+ 60) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_DeviceTransport.DLL.map" or "\epoc32\release\ARMV5\urel\ap_CES_DeviceTransport.map"
+ 61) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_zip.dll.map" or "\epoc32\release\ARMV5\urel\ap_zip.map"
+ 62) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_syb_XMLarchive.dll.map" or "\epoc32\release\ARMV5\urel\ap_syb_XMLarchive.map"
+ 63) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_FMPluginBase.dll.map" or "\epoc32\release\ARMV5\urel\ap_FMPluginBase.map"
+ 64) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_FILELISTFMPLUGIN.DLL.map" or "\epoc32\release\ARMV5\urel\ap_CES_FILELISTFMPLUGIN.map"
+ 65) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_QO_FileManager.exe.map" or "\epoc32\release\ARMV5\urel\ap_QO_FileManager.map"
+ 66) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_ces_ziprecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_ces_ziprecognizer.map"
+ 67) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_PptRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_PptRecognizer.map"
+ 68) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_PptXRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_PptXRecognizer.map"
+ 69) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_XlsRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_XlsRecognizer.map"
+ 70) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_XlsXRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_XlsXRecognizer.map"
+ 71) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_TxtRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_TxtRecognizer.map"
+ 72) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_WrdRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_WrdRecognizer.map"
+ 73) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_WrdXRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_WrdXRecognizer.map"
+ 74) Warning: Can't open "\epoc32\release\ARMV5\urel\AP_CES_QPDFDescriptor.DLL.map" or "\epoc32\release\ARMV5\urel\AP_CES_QPDFDescriptor.map"
+ 75) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_PdfRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_PdfRecognizer.map"
+ 76) Warning: Can't open "\epoc32\release\ARMV5\urel\AP_CES_PDFFILTERINFO.DLL.map" or "\epoc32\release\ARMV5\urel\AP_CES_PDFFILTERINFO.map"
+ 77) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_applicationStub.exe.map" or "\epoc32\release\ARMV5\urel\ap_applicationStub.map"
+ 78) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_quickpdf.exe.map" or "\epoc32\release\ARMV5\urel\ap_quickpdf.map"
+ 79) WARNING: File \epoc32\data\Z\Resource\APPS\ap_registration.rom does not exist or is 0 bytes in length.
+ 80) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_HTTP.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_HTTP.map"
+ 81) WARNING: File \epoc32\data\Z\private\102033E6\installer\inst_plugins.cfg does not exist or is 0 bytes in length.
+ 82) Warning: Can't open "\epoc32\release\ARMV5\urel\arcimagefundamental.dll.map" or "\epoc32\release\ARMV5\urel\arcimagefundamental.map"
+ 83) Warning: Can't open "\epoc32\release\ARMV5\urel\arcplatform.dll.map" or "\epoc32\release\ARMV5\urel\arcplatform.map"
+ 84) Warning: Can't open "\epoc32\release\ARMV5\urel\arcimagecodecs.dll.map" or "\epoc32\release\ARMV5\urel\arcimagecodecs.map"
+ 85) Warning: Can't open "\epoc32\release\ARMV5\urel\photoeditor.exe.map" or "\epoc32\release\ARMV5\urel\photoeditor.map"
+ 86) Warning: Can't open "\epoc32\release\ARMV5\urel\arcamui.dll.map" or "\epoc32\release\ARMV5\urel\arcamui.map"
+ 87) Warning: Can't open "\epoc32\release\ARMV5\urel\arcpebasictool.dll.map" or "\epoc32\release\ARMV5\urel\arcpebasictool.map"
+ 88) Warning: Can't open "\epoc32\release\ARMV5\urel\arcpebase.dll.map" or "\epoc32\release\ARMV5\urel\arcpebase.map"
+ 89) Warning: Can't open "\epoc32\release\ARMV5\urel\arcpemanager.dll.map" or "\epoc32\release\ARMV5\urel\arcpemanager.map"
+ 90) Warning: Can't open "\epoc32\release\ARMV5\urel\arcampe.dll.map" or "\epoc32\release\ARMV5\urel\arcampe.map"
+ 91) Warning: Can't open "\epoc32\release\ARMV5\urel\photoeditoraiwplugin.dll.map" or "\epoc32\release\ARMV5\urel\photoeditoraiwplugin.map"
+ 92) WARNING: File \epoc32\data\Z\Resource\APPS\registration.rom does not exist or is 0 bytes in length.
+ 93) Warning: Can't open "\epoc32\release\ARMV5\urel\QO_LServer.exe.map" or "\epoc32\release\ARMV5\urel\QO_LServer.map"
+ 94) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_devicetransport.dll.map" or "\epoc32\release\ARMV5\urel\ces_devicetransport.map"
+ 95) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_CoreComponents.dll.map" or "\epoc32\release\ARMV5\urel\CES_CoreComponents.map"
+ 96) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pdfrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_pdfrecognizer.map"
+ 97) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_OGLES_Charts.dll.map" or "\epoc32\release\ARMV5\urel\CES_OGLES_Charts.map"
+ 98) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_filelistfmplugin.dll.map" or "\epoc32\release\ARMV5\urel\ces_filelistfmplugin.map"
+ 99) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pptfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_pptfilterinfo.map"
+100) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pptfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_pptfilter.map"
+101) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pptrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_pptrecognizer.map"
+102) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pptxfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_pptxfilterinfo.map"
+103) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_ziprecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_ziprecognizer.map"
+104) Warning: Can't open "\epoc32\release\ARMV5\urel\QO_PPTX_Engine_Conv.dll.map" or "\epoc32\release\ARMV5\urel\QO_PPTX_Engine_Conv.map"
+105) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pptxrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_pptxrecognizer.map"
+106) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_qorecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_qorecognizer.map"
+107) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_qshdescriptor.dll.map" or "\epoc32\release\ARMV5\urel\ces_qshdescriptor.map"
+108) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_qwddescriptor.dll.map" or "\epoc32\release\ARMV5\urel\ces_qwddescriptor.map"
+109) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_qptdescriptor.dll.map" or "\epoc32\release\ARMV5\urel\ces_qptdescriptor.map"
+110) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_PPTXFILTER.DLL.map" or "\epoc32\release\ARMV5\urel\CES_PPTXFILTER.map"
+111) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_QWS_SpellChecker.dll.map" or "\epoc32\release\ARMV5\urel\CES_QWS_SpellChecker.map"
+112) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_RichText_Engine.dll.map" or "\epoc32\release\ARMV5\urel\CES_RichText_Engine.map"
+113) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_txtfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_txtfilter.map"
+114) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_txtfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_txtfilterinfo.map"
+115) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_S60_CoreComponents.dll.map" or "\epoc32\release\ARMV5\urel\CES_S60_CoreComponents.map"
+116) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_txtrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_txtrecognizer.map"
+117) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdfilter.map"
+118) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdfilterinfo.map"
+119) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdrecognizer.map"
+120) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdxfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdxfilterinfo.map"
+121) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdxrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdxrecognizer.map"
+122) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdxfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdxfilter.map"
+123) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsfilter.map"
+124) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsfilterinfo.map"
+125) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsrecognizer.map"
+126) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsxfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsxfilterinfo.map"
+127) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsxrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsxrecognizer.map"
+128) Warning: Can't open "\epoc32\release\ARMV5\urel\FMPluginBase.dll.map" or "\epoc32\release\ARMV5\urel\FMPluginBase.map"
+129) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsxfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsxfilter.map"
+130) Warning: Can't open "\epoc32\release\ARMV5\urel\HDExcel2.dll.map" or "\epoc32\release\ARMV5\urel\HDExcel2.map"
+131) Warning: Can't open "\epoc32\release\ARMV5\urel\HDMetafile2.dll.map" or "\epoc32\release\ARMV5\urel\HDMetafile2.map"
+132) Warning: Can't open "\epoc32\release\ARMV5\urel\HDOfficeCommon2.dll.map" or "\epoc32\release\ARMV5\urel\HDOfficeCommon2.map"
+133) Warning: Can't open "\epoc32\release\ARMV5\urel\QO_FileManager.exe.map" or "\epoc32\release\ARMV5\urel\QO_FileManager.map"
+134) Warning: Can't open "\epoc32\release\ARMV5\urel\HDPowerPoint2.dll.map" or "\epoc32\release\ARMV5\urel\HDPowerPoint2.map"
+135) Warning: Can't open "\epoc32\release\ARMV5\urel\HDWord2.dll.map" or "\epoc32\release\ARMV5\urel\HDWord2.map"
+136) Warning: Can't open "\epoc32\release\ARMV5\urel\quickpoint.exe.map" or "\epoc32\release\ARMV5\urel\quickpoint.map"
+137) Warning: Can't open "\epoc32\release\ARMV5\urel\quicksheet.exe.map" or "\epoc32\release\ARMV5\urel\quicksheet.map"
+138) Warning: Can't open "\epoc32\release\ARMV5\urel\Quickpoint_DOM.dll.map" or "\epoc32\release\ARMV5\urel\Quickpoint_DOM.map"
+139) Warning: Can't open "\epoc32\release\ARMV5\urel\Quicksheet_DOM.dll.map" or "\epoc32\release\ARMV5\urel\Quicksheet_DOM.map"
+140) Warning: Can't open "\epoc32\release\ARMV5\urel\Quickword.exe.map" or "\epoc32\release\ARMV5\urel\Quickword.map"
+141) Warning: Can't open "\epoc32\release\ARMV5\urel\SYB_XMLArchive.dll.map" or "\epoc32\release\ARMV5\urel\SYB_XMLArchive.map"
+142) Warning: Can't open "\epoc32\release\ARMV5\urel\Quickword_DOM.dll.map" or "\epoc32\release\ARMV5\urel\Quickword_DOM.map"
+143) Warning: Can't open "\epoc32\release\ARMV5\urel\QuickPDFStub.exe.map" or "\epoc32\release\ARMV5\urel\QuickPDFStub.map"
+144) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_HTTP.dll.map" or "\epoc32\release\ARMV5\urel\CES_HTTP.map"
+145) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pdffilterinfostub.dll.map" or "\epoc32\release\ARMV5\urel\ces_pdffilterinfostub.map"
+146) Warning: Can't open "\epoc32\release\ARMV5\urel\zip.dll.map" or "\epoc32\release\ARMV5\urel\zip.map"
+147) Warning: Can't open "\epoc32\release\ARMV5\urel\videoeditor.exe.map" or "\epoc32\release\ARMV5\urel\videoeditor.map"
+148) Warning: Can't open "\epoc32\release\ARMV5\urel\amur.dll.map" or "\epoc32\release\ARMV5\urel\amur.map"
+149) Warning: Can't open "\epoc32\release\ARMV5\urel\arcavcodecs.dll.map" or "\epoc32\release\ARMV5\urel\arcavcodecs.map"
+150) Warning: Can't open "\epoc32\release\ARMV5\urel\amvesession.dll.map" or "\epoc32\release\ARMV5\urel\amvesession.map"
+151) Warning: Can't open "\epoc32\release\ARMV5\urel\videoeditoraiwplugin.dll.map" or "\epoc32\release\ARMV5\urel\videoeditoraiwplugin.map"
+152) Warning: Can't open "\epoc32\release\ARMV5\urel\3GPExtParser.dll.map" or "\epoc32\release\ARMV5\urel\3GPExtParser.map"
+153) Warning: Can't open "\epoc32\release\ARMV5\urel\VtcpCmpFilter.dll.map" or "\epoc32\release\ARMV5\urel\VtcpCmpFilter.map"
+154) Warning: Can't open "\epoc32\release\ARMV5\urel\SenVtcpTransport.dll.map" or "\epoc32\release\ARMV5\urel\SenVtcpTransport.map"
+155) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmkeystorage.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmkeystorage.map"
+156) Warning: Can't open "\epoc32\release\ARMV5\urel\hxwmdrmplugin.dll.map" or "\epoc32\release\ARMV5\urel\hxwmdrmplugin.map"
+157) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmota.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmota.map"
+158) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmpkclient.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmpkclient.map"
+159) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmpkserver.exe.map" or "\epoc32\release\ARMV5\urel\wmdrmpkserver.map"
+160) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmpkclientwrapper.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmpkclientwrapper.map"
+161) Warning: Can't open "\epoc32\release\ARMV5\urel\cameseutility.dll.map" or "\epoc32\release\ARMV5\urel\cameseutility.map"
+162) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmagent.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmagent.map"
+163) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmdla.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmdla.map"
+164) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmpd.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmpd.map"
+165) Warning: Can't open "\epoc32\release\gcce\urel\zipmanager.exe.map" or "\epoc32\release\gcce\urel\zipmanager.map"
+166) Warning: Can't open "\epoc32\release\armv5\udeb\ctcmangui.exe.map" or "\epoc32\release\armv5\udeb\ctcmangui.map"
+167) Warning: Can't open "\epoc32\release\ARMV5\urel\eunits60gui.exe.map" or "\epoc32\release\ARMV5\urel\eunits60gui.map"
+168) Warning: Can't open "\epoc32\release\ARMV5\urel\eunitappenvironment.exe.map" or "\epoc32\release\ARMV5\urel\eunitappenvironment.map"
+169) Warning: Can't open "\epoc32\release\ARMV5\urel\euniteikappenvironment.exe.map" or "\epoc32\release\ARMV5\urel\euniteikappenvironment.map"
+170) Warning: Can't open "\epoc32\release\ARMV5\urel\qakitcommonui.dll.map" or "\epoc32\release\ARMV5\urel\qakitcommonui.map"
+171) Warning: Can't open "\epoc32\release\ARMV5\urel\digiaconnect.exe.map" or "\epoc32\release\ARMV5\urel\digiaconnect.map"
+
+Error(s):
+1) ERROR: (/epoc32/include/s60customswfeatures.xml) Feature "KFEATUREIDFFMOBILITYMANAGEMENTERRORS" already exists
+===============================================================================
+Target: core-image  Duration: 14:26  Status: OK
+iMaker log             = `Y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_imaker_core-image.log'
+Core (ROM & ROFS1) dir = `y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd'
+Core ROM image         = `y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd.rom.img'
+Core ROM symbols       = `y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd.rom.symbol'
+Core ROFS1 image       = `y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd.rofs1.img'
+Core ROFS1 symbols     = `y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd.rofs1.symbol'
+-------------------------------------------------------------------------------
+Total duration: 14:29  Status: OK
+===============================================================================
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/data/doc/input_for_failure/.static/default.css	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,843 @@
+/**
+ * Sphinx Doc Design
+ */
+
+body {
+    font-family: sans-serif;
+    font-size: 100%;
+    background-color: #11303d;
+    color: #000;
+    margin: 0;
+    padding: 0;
+}
+
+/* :::: LAYOUT :::: */
+
+div.document {
+    background-color: #1c4e63;
+}
+
+div.documentwrapper {
+    float: left;
+    width: 100%;
+}
+
+div.bodywrapper {
+    margin: 0 0 0 230px;
+}
+
+div.body {
+    background-color: white;
+    padding: 0 20px 30px 20px;
+}
+
+div.sphinxsidebarwrapper {
+    padding: 10px 5px 0 10px;
+}
+
+div.sphinxsidebar {
+    float: left;
+    width: 230px;
+    margin-left: -100%;
+    font-size: 90%;
+}
+
+div.clearer {
+    clear: both;
+}
+
+div.footer {
+    color: #fff;
+    width: 100%;
+    padding: 9px 0 9px 0;
+    text-align: center;
+    font-size: 75%;
+}
+
+div.footer a {
+    color: #fff;
+    text-decoration: underline;
+}
+
+div.related {
+    background-color: #133f52;
+    color: #fff;
+    width: 100%;
+    height: 30px;
+    line-height: 30px;
+    font-size: 90%;
+}
+
+div.related h3 {
+    display: none;
+}
+
+div.related ul {
+    margin: 0;
+    padding: 0 0 0 10px;
+    list-style: none;
+}
+
+div.related li {
+    display: inline;
+}
+
+div.related li.right {
+    float: right;
+    margin-right: 5px;
+}
+
+div.related a {
+    color: white;
+}
+
+/* ::: TOC :::: */
+div.sphinxsidebar h3 {
+    font-family: 'Trebuchet MS', sans-serif;
+    color: white;
+    font-size: 1.4em;
+    font-weight: normal;
+    margin: 0;
+    padding: 0;
+}
+
+div.sphinxsidebar h4 {
+    font-family: 'Trebuchet MS', sans-serif;
+    color: white;
+    font-size: 1.3em;
+    font-weight: normal;
+    margin: 5px 0 0 0;
+    padding: 0;
+}
+
+div.sphinxsidebar p {
+    color: white;
+}
+
+div.sphinxsidebar p.topless {
+    margin: 5px 10px 10px 10px;
+}
+
+div.sphinxsidebar ul {
+    margin: 10px;
+    padding: 0;
+    list-style: none;
+    color: white;
+}
+
+div.sphinxsidebar ul ul,
+div.sphinxsidebar ul.want-points {
+    margin-left: 20px;
+    list-style: square;
+}
+
+div.sphinxsidebar ul ul {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+div.sphinxsidebar a {
+    color: #98dbcc;
+}
+
+div.sphinxsidebar form {
+    margin-top: 10px;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #98dbcc;
+    font-family: sans-serif;
+    font-size: 1em;
+}
+
+/* :::: MODULE CLOUD :::: */
+div.modulecloud {
+    margin: -5px 10px 5px 10px;
+    padding: 10px;
+    line-height: 160%;
+    border: 1px solid #cbe7e5;
+    background-color: #f2fbfd;
+}
+
+div.modulecloud a {
+    padding: 0 5px 0 5px;
+}
+
+/* :::: SEARCH :::: */
+ul.search {
+    margin: 10px 0 0 20px;
+    padding: 0;
+}
+
+ul.search li {
+    padding: 5px 0 5px 20px;
+    background-image: url(file.png);
+    background-repeat: no-repeat;
+    background-position: 0 7px;
+}
+
+ul.search li a {
+    font-weight: bold;
+}
+
+ul.search li div.context {
+    color: #888;
+    margin: 2px 0 0 30px;
+    text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+    font-weight: bold;
+}
+
+/* :::: COMMON FORM STYLES :::: */
+
+div.actions {
+    padding: 5px 10px 5px 10px;
+    border-top: 1px solid #cbe7e5;
+    border-bottom: 1px solid #cbe7e5;
+    background-color: #e0f6f4;
+}
+
+form dl {
+    color: #333;
+}
+
+form dt {
+    clear: both;
+    float: left;
+    min-width: 110px;
+    margin-right: 10px;
+    padding-top: 2px;
+}
+
+input#homepage {
+    display: none;
+}
+
+div.error {
+    margin: 5px 20px 0 0;
+    padding: 5px;
+    border: 1px solid #d00;
+    font-weight: bold;
+}
+
+/* :::: INLINE COMMENTS :::: */
+
+div.inlinecomments {
+    position: absolute;
+    right: 20px;
+}
+
+div.inlinecomments a.bubble {
+    display: block;
+    float: right;
+    background-image: url(style/comment.png);
+    background-repeat: no-repeat;
+    width: 25px;
+    height: 25px;
+    text-align: center;
+    padding-top: 3px;
+    font-size: 0.9em;
+    line-height: 14px;
+    font-weight: bold;
+    color: black;
+}
+
+div.inlinecomments a.bubble span {
+    display: none;
+}
+
+div.inlinecomments a.emptybubble {
+    background-image: url(style/nocomment.png);
+}
+
+div.inlinecomments a.bubble:hover {
+    background-image: url(style/hovercomment.png);
+    text-decoration: none;
+    color: #3ca0a4;
+}
+
+div.inlinecomments div.comments {
+    float: right;
+    margin: 25px 5px 0 0;
+    max-width: 50em;
+    min-width: 30em;
+    border: 1px solid #2eabb0;
+    background-color: #f2fbfd;
+    z-index: 150;
+}
+
+div#comments {
+    border: 1px solid #2eabb0;
+    margin-top: 20px;
+}
+
+div#comments div.nocomments {
+    padding: 10px;
+    font-weight: bold;
+}
+
+div.inlinecomments div.comments h3,
+div#comments h3 {
+    margin: 0;
+    padding: 0;
+    background-color: #2eabb0;
+    color: white;
+    border: none;
+    padding: 3px;
+}
+
+div.inlinecomments div.comments div.actions {
+    padding: 4px;
+    margin: 0;
+    border-top: none;
+}
+
+div#comments div.comment {
+    margin: 10px;
+    border: 1px solid #2eabb0;
+}
+
+div.inlinecomments div.comment h4,
+div.commentwindow div.comment h4,
+div#comments div.comment h4 {
+    margin: 10px 0 0 0;
+    background-color: #2eabb0;
+    color: white;
+    border: none;
+    padding: 1px 4px 1px 4px;
+}
+
+div#comments div.comment h4 {
+    margin: 0;
+}
+
+div#comments div.comment h4 a {
+    color: #d5f4f4;
+}
+
+div.inlinecomments div.comment div.text,
+div.commentwindow div.comment div.text,
+div#comments div.comment div.text {
+    margin: -5px 0 -5px 0;
+    padding: 0 10px 0 10px;
+}
+
+div.inlinecomments div.comment div.meta,
+div.commentwindow div.comment div.meta,
+div#comments div.comment div.meta {
+    text-align: right;
+    padding: 2px 10px 2px 0;
+    font-size: 95%;
+    color: #538893;
+    border-top: 1px solid #cbe7e5;
+    background-color: #e0f6f4;
+}
+
+div.commentwindow {
+    position: absolute;
+    width: 500px;
+    border: 1px solid #cbe7e5;
+    background-color: #f2fbfd;
+    display: none;
+    z-index: 130;
+}
+
+div.commentwindow h3 {
+    margin: 0;
+    background-color: #2eabb0;
+    color: white;
+    border: none;
+    padding: 5px;
+    font-size: 1.5em;
+    cursor: pointer;
+}
+
+div.commentwindow div.actions {
+    margin: 10px -10px 0 -10px;
+    padding: 4px 10px 4px 10px;
+    color: #538893;
+}
+
+div.commentwindow div.actions input {
+    border: 1px solid #2eabb0;
+    background-color: white;
+    color: #135355;
+    cursor: pointer;
+}
+
+div.commentwindow div.form {
+    padding: 0 10px 0 10px;
+}
+
+div.commentwindow div.form input,
+div.commentwindow div.form textarea {
+    border: 1px solid #3c9ea2;
+    background-color: white;
+    color: black;
+}
+
+div.commentwindow div.error {
+    margin: 10px 5px 10px 5px;
+    background-color: #fbe5dc;
+    display: none;
+}
+
+div.commentwindow div.form textarea {
+    width: 99%;
+}
+
+div.commentwindow div.preview {
+    margin: 10px 0 10px 0;
+    background-color: #70d0d4;
+    padding: 0 1px 1px 25px;
+}
+
+div.commentwindow div.preview h4 {
+    margin: 0 0 -5px -20px;
+    padding: 4px 0 0 4px;
+    color: white;
+    font-size: 1.3em;
+}
+
+div.commentwindow div.preview div.comment {
+    background-color: #f2fbfd;
+}
+
+div.commentwindow div.preview div.comment h4 {
+    margin: 10px 0 0 0!important;
+    padding: 1px 4px 1px 4px!important;
+    font-size: 1.2em;
+}
+
+/* :::: SUGGEST CHANGES :::: */
+div#suggest-changes-box input, div#suggest-changes-box textarea {
+    border: 1px solid #ccc;
+    background-color: white;
+    color: black;
+}
+
+div#suggest-changes-box textarea {
+    width: 99%;
+    height: 400px;
+}
+
+
+/* :::: PREVIEW :::: */
+div.preview {
+    background-image: url(style/preview.png);
+    padding: 0 20px 20px 20px;
+    margin-bottom: 30px;
+}
+
+
+/* :::: INDEX PAGE :::: */
+
+table.contentstable {
+    width: 90%;
+}
+
+table.contentstable p.biglink {
+    line-height: 150%;
+}
+
+a.biglink {
+    font-size: 1.3em;
+}
+
+span.linkdescr {
+    font-style: italic;
+    padding-top: 5px;
+    font-size: 90%;
+}
+
+/* :::: INDEX STYLES :::: */
+
+table.indextable td {
+    text-align: left;
+    vertical-align: top;
+}
+
+table.indextable dl, table.indextable dd {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+table.indextable tr.pcap {
+    height: 10px;
+}
+
+table.indextable tr.cap {
+    margin-top: 10px;
+    background-color: #f2f2f2;
+}
+
+img.toggler {
+    margin-right: 3px;
+    margin-top: 3px;
+    cursor: pointer;
+}
+
+form.pfform {
+    margin: 10px 0 20px 0;
+}
+
+/* :::: GLOBAL STYLES :::: */
+
+.docwarning {
+    background-color: #ffe4e4;
+    padding: 10px;
+    margin: 0 -20px 0 -20px;
+    border-bottom: 1px solid #f66;
+}
+
+p.subhead {
+    font-weight: bold;
+    margin-top: 20px;
+}
+ 
+/*BMT added 16/10/08 */
+a:link {
+    color: blue;
+    text-decoration: none;
+}
+
+a:visited {
+    color: navy;
+    text-decoration: none;
+}
+
+a:hover {
+    color: purple;
+    text-decoration: underline;
+}
+/* BMT end added 16/10/08 */
+
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+    font-family: 'Trebuchet MS', sans-serif;
+    background-color: #f2f2f2;
+    font-weight: normal;
+    color: #20435c;
+    border-bottom: 1px solid #ccc;
+    margin: 20px -20px 10px -20px;
+    padding: 3px 0 3px 10px;
+}
+
+div.body h1 { margin-top: 0; font-size: 250%; color:black;}
+div.body h2 { font-size: 190%; color:#36237f;}
+div.body h3 { font-size: 150%; color:#4933af;}
+div.body h4 { font-size: 120%; color:#6223df;}
+div.body h5 { font-size: 100%; color:#6f23ef;}
+div.body h6 { font-size: 80%; color:#5a62ff;}
+
+a.headerlink {
+    color: #c60f0f;
+    font-size: 0.8em;
+    padding: 0 4px 0 4px;
+    text-decoration: none;
+    visibility: hidden;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink {
+    visibility: visible;
+}
+
+a.headerlink:hover {
+    background-color: #c60f0f;
+    color: white;
+}
+
+div.body p, div.body dd, div.body li {
+    text-align: left;
+    line-height: 130%;
+}
+
+div.body p.caption {
+    text-align: inherit;
+}
+
+div.body td {
+    text-align: left;
+}
+
+ul.fakelist {
+    list-style: none;
+    margin: 10px 0 10px 20px;
+    padding: 0;
+}
+
+.field-list ul {
+    padding-left: 1em;
+}
+
+.first {
+    margin-top: 0 !important;
+}
+
+/* "Footnotes" heading */
+p.rubric {
+    margin-top: 30px;
+    font-weight: bold;
+}
+
+/* "Topics" */
+
+div.topic {
+    background-color: #eee;
+    border: 1px solid #ccc;
+    padding: 0 7px 0 7px;
+    margin: 10px 0 10px 0;
+}
+
+p.topic-title {
+    font-size: 1.1em;
+    font-weight: bold;
+    margin-top: 10px;
+}
+
+/* Admonitions */
+
+div.admonition {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    padding: 7px;
+}
+
+div.admonition dt {
+    font-weight: bold;
+}
+
+div.admonition dl {
+    margin-bottom: 0;
+}
+
+div.admonition p {
+    display: inline;
+}
+
+div.seealso {
+    background-color: #ffc;
+    border: 1px solid #ff6;
+}
+
+div.warning {
+    background-color: #ffe4e4;
+    border: 1px solid #f66;
+}
+
+div.note {
+    background-color: #eee;
+    border: 1px solid #ccc;
+}
+
+p.admonition-title {
+    margin: 0px 10px 5px 0px;
+    font-weight: bold;
+    display: inline;
+}
+
+p.admonition-title:after {
+    content: ":";
+}
+
+div.body p.centered {
+    text-align: center;
+    margin-top: 25px;
+}
+
+table.docutils {
+    border: 0;
+}
+
+table.docutils td, table.docutils th {
+    padding: 1px 8px 1px 0;
+    border-top: 0;
+    border-left: 0;
+    border-right: 0;
+    border-bottom: 1px solid #aaa;
+}
+
+table.field-list td, table.field-list th {
+    border: 0 !important;
+}
+
+table.footnote td, table.footnote th {
+    border: 0 !important;
+}
+
+.field-list ul {
+    margin: 0;
+    padding-left: 1em;
+}
+
+.field-list p {
+    margin: 0;
+}
+
+dl {
+    margin-bottom: 15px;
+    clear: both;
+}
+
+dd p {
+    margin-top: 0px;
+}
+
+dd ul, dd table {
+    margin-bottom: 10px;
+}
+
+dd {
+    margin-top: 3px;
+    margin-bottom: 10px;
+    margin-left: 30px;
+}
+
+.refcount {
+    color: #060;
+}
+
+dt:target,
+.highlight {
+    background-color: #fbe54e;
+}
+
+dl.glossary dt {
+    font-weight: bold;
+    font-size: 1.1em;
+}
+
+th {
+    text-align: left;
+    padding-right: 5px;
+}
+
+pre {
+    padding: 5px;
+    background-color: #efc;
+    color: #333;
+    border: 1px solid #ac9;
+    border-left: none;
+    border-right: none;
+    overflow: auto;
+    word-wrap: break-word;
+}
+
+td.linenos pre {
+    padding: 5px 0px;
+    border: 0;
+    background-color: transparent;
+    color: #aaa;
+}
+
+table.highlighttable {
+    margin-left: 0.5em;
+}
+
+table.highlighttable td {
+    padding: 0 0.5em 0 0.5em;
+}
+
+tt {
+    background-color: #ecf0f3;
+    padding: 0 1px 0 1px;
+    font-size: 0.95em;
+}
+
+tt.descname {
+    background-color: transparent;
+    font-weight: bold;
+    font-size: 1.2em;
+}
+
+tt.descclassname {
+    background-color: transparent;
+}
+
+tt.xref, a tt {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+.footnote:target  { background-color: #ffa }
+
+h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
+    background-color: transparent;
+}
+
+.optional {
+    font-size: 1.3em;
+}
+
+.versionmodified {
+    font-style: italic;
+}
+
+form.comment {
+    margin: 0;
+    padding: 10px 30px 10px 30px;
+    background-color: #eee;
+}
+
+form.comment h3 {
+    background-color: #326591;
+    color: white;
+    margin: -10px -30px 10px -30px;
+    padding: 5px;
+    font-size: 1.4em;
+}
+
+form.comment input,
+form.comment textarea {
+    border: 1px solid #ccc;
+    padding: 2px;
+    font-family: sans-serif;
+    font-size: 100%;
+}
+
+form.comment input[type="text"] {
+    width: 240px;
+}
+
+form.comment textarea {
+    width: 100%;
+    height: 200px;
+    margin-bottom: 10px;
+}
+
+.system-message {
+    background-color: #fda;
+    padding: 5px;
+    border: 3px solid red;
+}
+
+/* :::: PRINT :::: */
+@media print {
+    div.document,
+    div.documentwrapper,
+    div.bodywrapper {
+        margin: 0;
+        width : 100%;
+    }
+
+    div.sphinxsidebar,
+    div.related,
+    div.footer,
+    div#comments div.new-comment-box,
+    #top-link {
+        display: none;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/data/doc/input_for_failure/.templates/indexcontent.html	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,38 @@
+{% extends "defindex.html" %}
+{% block tables %}
+  <p><strong>Parts of the documentation:</strong></p>
+  <table class="contentstable" align="center"><tr>
+    <td width="50%">
+      <p class="biglink"><a class="biglink" href="{{ pathto("releasenotes/index") }}">Release notes</a><br/>
+         <span class="linkdescr">what's new</span></p>
+      <p class="biglink"><a class="biglink" href="{{ pathto("quick_start_guide") }}">Quick Start Guide</a><br/>
+         <span class="linkdescr">start here</span></p>
+      <p class="biglink"><a class="biglink" href="{{ pathto("feature_list") }}">Feature list</a><br/>
+         <span class="linkdescr">what is supported</span></p>
+      <p class="biglink"><a class="biglink" href="{{ pathto("manual/index") }}">Manual</a><br/>
+         <span class="linkdescr">reference docs</span></p>
+    </td><td width="50%">
+      <p class="biglink"><a class="biglink" href="{{ pathto("tutorials/index") }}">HowTos</a><br/>
+         <span class="linkdescr">specific use cases</span></p>
+      <p class="biglink"><a class="biglink" href="{{ pathto("api/helium/index") }}">Helium API</a><br/>
+         <span class="linkdescr">or check <a href="{{ pathto("api/helium/targets_list") }}">Targets</a>, <a href="{{ pathto("api/helium/properties_list") }}">Properties</a>, <a href="{{ pathto("api/helium/macros_list") }}">Macros</a></span></p>
+      <p class="biglink"><a class="biglink" href="{{ pathto("helium-antlib/index") }}">Ant libraries</a><br/>
+         <span class="linkdescr">when you just have to customize</span></p>
+      <p class="biglink"><a class="biglink" href="{{ pathto("development/index") }}">Development</a><br/>
+         <span class="linkdescr">for helium hackers everywhere</span></p>
+      <p class="biglink"><a class="biglink" href="{{ pathto("architecture") }}">Architecture</a><br/>
+         <span class="linkdescr">many pieces, loosely joined</span></p>
+    </td></tr>
+  </table>
+
+  <p><strong>Customer documentation:</strong></p>
+  <table class="contentstable" align="center"><tr>
+    <td width="50%">
+      <p class="biglink"><a class="biglink" href="http://helium.nmp.nokia.com/doc/ido">IDO</a><br/>
+         <span class="linkdescr">integration domains</span></p>
+    </td><td width="50%">
+      <p class="biglink"><a class="biglink" href="http://helium.nmp.nokia.com/doc/teamci">TeamCI</a><br/>
+         <span class="linkdescr">development teams</span></p>
+    </td></tr>
+  </table>
+{% endblock %}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/data/doc/input_for_failure/.templates/sidebar.html	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,6 @@
+
+<h3>Docs for other versions</h3>
+<ul>
+  <li><a href="http://helium.nmp.nokia.com/doc/11.0.0">Helium 11.0.0</a></li>
+  <li><a href="http://helium.nmp.nokia.com/doc/10.0.0">Helium 10.0.0</a></li>
+</ul>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/data/doc/input_for_failure/conf.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,183 @@
+# -*- coding: utf-8 -*-
+#============================================================================ 
+#Name        : ant.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+#
+# Helium Documentation documentation build configuration file, created by
+# sphinx-quickstart on Fri May 09 09:49:44 2008.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# The contents of this file are pickled, so don't put values in the namespace
+# that aren't pickleable (module imports are okay, they're removed automatically).
+#
+# All configuration values have a default value; values that are commented out
+# serve to show the default value.
+
+import sys, os
+
+# If your extensions are in another directory, add it here. If the directory
+# is relative to the documentation root, use os.path.abspath to make it
+# absolute, like shown here.
+#sys.path.append(os.path.abspath('some/directory'))
+
+# General configuration
+# ---------------------
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx_ext']
+#api_doc_base_url = 
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['.templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General substitutions.
+project = 'Helium'
+copyright = '2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. License: http://www.eclipse.org/legal/epl-v10.html'
+
+# The default replacements for |version| and |release|, also used in various
+# other places throughout the built documents.
+#
+# The short X.Y version.
+version = '0.23'
+# The full version, including alpha/beta/rc tags.
+release = '0.23'
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+today_fmt = '%B %d, %Y'
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relative to source directories, that shouldn't be searched
+# for source files.
+#exclude_dirs = []
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+
+# Options for HTML output
+# -----------------------
+
+# The style sheet to use for HTML and HTML Help pages. A file of that name
+# must exist either in Sphinx' static/ path, or in one of the custom paths
+# given in html_static_path.
+html_style = 'default.css'
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# The name of an image file (within the static path) to place at the top of
+# the sidebar.
+html_logo = 'helium_pallot_small.jpg'
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['.static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+html_sidebars = {
+   'index': 'sidebar.html'
+}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+html_additional_pages = {
+    'index': 'indexcontent.html',
+}
+
+# If false, no module index is generated.
+html_use_modindex = False
+
+# If true, the reST sources are included in the HTML build as _sources/<name>.
+#html_copy_source = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = ''
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'Helium doc'
+
+
+# Options for LaTeX output
+# ------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, document class [howto/manual]).
+latex_documents = [
+  ('index', 'Helium.tex', 'Helium Documentation', 'The Helium Team', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_use_modindex = True
Binary file buildframework/helium/tests/data/doc/input_for_failure/helium_pallot_small.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/data/doc/input_for_failure/index.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,33 @@
+..  ============================================================================ 
+    Name        : index.rst
+    Part of     : Helium 
+    
+    Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+    All rights reserved.
+    This component and the accompanying materials are made available
+    under the terms of the License "Eclipse Public License v1.0"
+    which accompanies this distribution, and is available
+    at the URL "http://www.eclipse.org/legal/epl-v10.html".
+    
+    Initial Contributors:
+    Nokia Corporation - initial contribution.
+    
+    Contributors:
+    
+    Description:
+    
+    ============================================================================
+    
+###################################
+  Helium
+###################################
+
+":hlm-p:`this.property.doesnt.exist`"
+
+
+
+   
+   
+   
+   
+   
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/data/doc/input_for_pass/.static/default.css	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,843 @@
+/**
+ * Sphinx Doc Design
+ */
+
+body {
+    font-family: sans-serif;
+    font-size: 100%;
+    background-color: #11303d;
+    color: #000;
+    margin: 0;
+    padding: 0;
+}
+
+/* :::: LAYOUT :::: */
+
+div.document {
+    background-color: #1c4e63;
+}
+
+div.documentwrapper {
+    float: left;
+    width: 100%;
+}
+
+div.bodywrapper {
+    margin: 0 0 0 230px;
+}
+
+div.body {
+    background-color: white;
+    padding: 0 20px 30px 20px;
+}
+
+div.sphinxsidebarwrapper {
+    padding: 10px 5px 0 10px;
+}
+
+div.sphinxsidebar {
+    float: left;
+    width: 230px;
+    margin-left: -100%;
+    font-size: 90%;
+}
+
+div.clearer {
+    clear: both;
+}
+
+div.footer {
+    color: #fff;
+    width: 100%;
+    padding: 9px 0 9px 0;
+    text-align: center;
+    font-size: 75%;
+}
+
+div.footer a {
+    color: #fff;
+    text-decoration: underline;
+}
+
+div.related {
+    background-color: #133f52;
+    color: #fff;
+    width: 100%;
+    height: 30px;
+    line-height: 30px;
+    font-size: 90%;
+}
+
+div.related h3 {
+    display: none;
+}
+
+div.related ul {
+    margin: 0;
+    padding: 0 0 0 10px;
+    list-style: none;
+}
+
+div.related li {
+    display: inline;
+}
+
+div.related li.right {
+    float: right;
+    margin-right: 5px;
+}
+
+div.related a {
+    color: white;
+}
+
+/* ::: TOC :::: */
+div.sphinxsidebar h3 {
+    font-family: 'Trebuchet MS', sans-serif;
+    color: white;
+    font-size: 1.4em;
+    font-weight: normal;
+    margin: 0;
+    padding: 0;
+}
+
+div.sphinxsidebar h4 {
+    font-family: 'Trebuchet MS', sans-serif;
+    color: white;
+    font-size: 1.3em;
+    font-weight: normal;
+    margin: 5px 0 0 0;
+    padding: 0;
+}
+
+div.sphinxsidebar p {
+    color: white;
+}
+
+div.sphinxsidebar p.topless {
+    margin: 5px 10px 10px 10px;
+}
+
+div.sphinxsidebar ul {
+    margin: 10px;
+    padding: 0;
+    list-style: none;
+    color: white;
+}
+
+div.sphinxsidebar ul ul,
+div.sphinxsidebar ul.want-points {
+    margin-left: 20px;
+    list-style: square;
+}
+
+div.sphinxsidebar ul ul {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+div.sphinxsidebar a {
+    color: #98dbcc;
+}
+
+div.sphinxsidebar form {
+    margin-top: 10px;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #98dbcc;
+    font-family: sans-serif;
+    font-size: 1em;
+}
+
+/* :::: MODULE CLOUD :::: */
+div.modulecloud {
+    margin: -5px 10px 5px 10px;
+    padding: 10px;
+    line-height: 160%;
+    border: 1px solid #cbe7e5;
+    background-color: #f2fbfd;
+}
+
+div.modulecloud a {
+    padding: 0 5px 0 5px;
+}
+
+/* :::: SEARCH :::: */
+ul.search {
+    margin: 10px 0 0 20px;
+    padding: 0;
+}
+
+ul.search li {
+    padding: 5px 0 5px 20px;
+    background-image: url(file.png);
+    background-repeat: no-repeat;
+    background-position: 0 7px;
+}
+
+ul.search li a {
+    font-weight: bold;
+}
+
+ul.search li div.context {
+    color: #888;
+    margin: 2px 0 0 30px;
+    text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+    font-weight: bold;
+}
+
+/* :::: COMMON FORM STYLES :::: */
+
+div.actions {
+    padding: 5px 10px 5px 10px;
+    border-top: 1px solid #cbe7e5;
+    border-bottom: 1px solid #cbe7e5;
+    background-color: #e0f6f4;
+}
+
+form dl {
+    color: #333;
+}
+
+form dt {
+    clear: both;
+    float: left;
+    min-width: 110px;
+    margin-right: 10px;
+    padding-top: 2px;
+}
+
+input#homepage {
+    display: none;
+}
+
+div.error {
+    margin: 5px 20px 0 0;
+    padding: 5px;
+    border: 1px solid #d00;
+    font-weight: bold;
+}
+
+/* :::: INLINE COMMENTS :::: */
+
+div.inlinecomments {
+    position: absolute;
+    right: 20px;
+}
+
+div.inlinecomments a.bubble {
+    display: block;
+    float: right;
+    background-image: url(style/comment.png);
+    background-repeat: no-repeat;
+    width: 25px;
+    height: 25px;
+    text-align: center;
+    padding-top: 3px;
+    font-size: 0.9em;
+    line-height: 14px;
+    font-weight: bold;
+    color: black;
+}
+
+div.inlinecomments a.bubble span {
+    display: none;
+}
+
+div.inlinecomments a.emptybubble {
+    background-image: url(style/nocomment.png);
+}
+
+div.inlinecomments a.bubble:hover {
+    background-image: url(style/hovercomment.png);
+    text-decoration: none;
+    color: #3ca0a4;
+}
+
+div.inlinecomments div.comments {
+    float: right;
+    margin: 25px 5px 0 0;
+    max-width: 50em;
+    min-width: 30em;
+    border: 1px solid #2eabb0;
+    background-color: #f2fbfd;
+    z-index: 150;
+}
+
+div#comments {
+    border: 1px solid #2eabb0;
+    margin-top: 20px;
+}
+
+div#comments div.nocomments {
+    padding: 10px;
+    font-weight: bold;
+}
+
+div.inlinecomments div.comments h3,
+div#comments h3 {
+    margin: 0;
+    padding: 0;
+    background-color: #2eabb0;
+    color: white;
+    border: none;
+    padding: 3px;
+}
+
+div.inlinecomments div.comments div.actions {
+    padding: 4px;
+    margin: 0;
+    border-top: none;
+}
+
+div#comments div.comment {
+    margin: 10px;
+    border: 1px solid #2eabb0;
+}
+
+div.inlinecomments div.comment h4,
+div.commentwindow div.comment h4,
+div#comments div.comment h4 {
+    margin: 10px 0 0 0;
+    background-color: #2eabb0;
+    color: white;
+    border: none;
+    padding: 1px 4px 1px 4px;
+}
+
+div#comments div.comment h4 {
+    margin: 0;
+}
+
+div#comments div.comment h4 a {
+    color: #d5f4f4;
+}
+
+div.inlinecomments div.comment div.text,
+div.commentwindow div.comment div.text,
+div#comments div.comment div.text {
+    margin: -5px 0 -5px 0;
+    padding: 0 10px 0 10px;
+}
+
+div.inlinecomments div.comment div.meta,
+div.commentwindow div.comment div.meta,
+div#comments div.comment div.meta {
+    text-align: right;
+    padding: 2px 10px 2px 0;
+    font-size: 95%;
+    color: #538893;
+    border-top: 1px solid #cbe7e5;
+    background-color: #e0f6f4;
+}
+
+div.commentwindow {
+    position: absolute;
+    width: 500px;
+    border: 1px solid #cbe7e5;
+    background-color: #f2fbfd;
+    display: none;
+    z-index: 130;
+}
+
+div.commentwindow h3 {
+    margin: 0;
+    background-color: #2eabb0;
+    color: white;
+    border: none;
+    padding: 5px;
+    font-size: 1.5em;
+    cursor: pointer;
+}
+
+div.commentwindow div.actions {
+    margin: 10px -10px 0 -10px;
+    padding: 4px 10px 4px 10px;
+    color: #538893;
+}
+
+div.commentwindow div.actions input {
+    border: 1px solid #2eabb0;
+    background-color: white;
+    color: #135355;
+    cursor: pointer;
+}
+
+div.commentwindow div.form {
+    padding: 0 10px 0 10px;
+}
+
+div.commentwindow div.form input,
+div.commentwindow div.form textarea {
+    border: 1px solid #3c9ea2;
+    background-color: white;
+    color: black;
+}
+
+div.commentwindow div.error {
+    margin: 10px 5px 10px 5px;
+    background-color: #fbe5dc;
+    display: none;
+}
+
+div.commentwindow div.form textarea {
+    width: 99%;
+}
+
+div.commentwindow div.preview {
+    margin: 10px 0 10px 0;
+    background-color: #70d0d4;
+    padding: 0 1px 1px 25px;
+}
+
+div.commentwindow div.preview h4 {
+    margin: 0 0 -5px -20px;
+    padding: 4px 0 0 4px;
+    color: white;
+    font-size: 1.3em;
+}
+
+div.commentwindow div.preview div.comment {
+    background-color: #f2fbfd;
+}
+
+div.commentwindow div.preview div.comment h4 {
+    margin: 10px 0 0 0!important;
+    padding: 1px 4px 1px 4px!important;
+    font-size: 1.2em;
+}
+
+/* :::: SUGGEST CHANGES :::: */
+div#suggest-changes-box input, div#suggest-changes-box textarea {
+    border: 1px solid #ccc;
+    background-color: white;
+    color: black;
+}
+
+div#suggest-changes-box textarea {
+    width: 99%;
+    height: 400px;
+}
+
+
+/* :::: PREVIEW :::: */
+div.preview {
+    background-image: url(style/preview.png);
+    padding: 0 20px 20px 20px;
+    margin-bottom: 30px;
+}
+
+
+/* :::: INDEX PAGE :::: */
+
+table.contentstable {
+    width: 90%;
+}
+
+table.contentstable p.biglink {
+    line-height: 150%;
+}
+
+a.biglink {
+    font-size: 1.3em;
+}
+
+span.linkdescr {
+    font-style: italic;
+    padding-top: 5px;
+    font-size: 90%;
+}
+
+/* :::: INDEX STYLES :::: */
+
+table.indextable td {
+    text-align: left;
+    vertical-align: top;
+}
+
+table.indextable dl, table.indextable dd {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+table.indextable tr.pcap {
+    height: 10px;
+}
+
+table.indextable tr.cap {
+    margin-top: 10px;
+    background-color: #f2f2f2;
+}
+
+img.toggler {
+    margin-right: 3px;
+    margin-top: 3px;
+    cursor: pointer;
+}
+
+form.pfform {
+    margin: 10px 0 20px 0;
+}
+
+/* :::: GLOBAL STYLES :::: */
+
+.docwarning {
+    background-color: #ffe4e4;
+    padding: 10px;
+    margin: 0 -20px 0 -20px;
+    border-bottom: 1px solid #f66;
+}
+
+p.subhead {
+    font-weight: bold;
+    margin-top: 20px;
+}
+ 
+/*BMT added 16/10/08 */
+a:link {
+    color: blue;
+    text-decoration: none;
+}
+
+a:visited {
+    color: navy;
+    text-decoration: none;
+}
+
+a:hover {
+    color: purple;
+    text-decoration: underline;
+}
+/* BMT end added 16/10/08 */
+
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+    font-family: 'Trebuchet MS', sans-serif;
+    background-color: #f2f2f2;
+    font-weight: normal;
+    color: #20435c;
+    border-bottom: 1px solid #ccc;
+    margin: 20px -20px 10px -20px;
+    padding: 3px 0 3px 10px;
+}
+
+div.body h1 { margin-top: 0; font-size: 250%; color:black;}
+div.body h2 { font-size: 190%; color:#36237f;}
+div.body h3 { font-size: 150%; color:#4933af;}
+div.body h4 { font-size: 120%; color:#6223df;}
+div.body h5 { font-size: 100%; color:#6f23ef;}
+div.body h6 { font-size: 80%; color:#5a62ff;}
+
+a.headerlink {
+    color: #c60f0f;
+    font-size: 0.8em;
+    padding: 0 4px 0 4px;
+    text-decoration: none;
+    visibility: hidden;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink {
+    visibility: visible;
+}
+
+a.headerlink:hover {
+    background-color: #c60f0f;
+    color: white;
+}
+
+div.body p, div.body dd, div.body li {
+    text-align: left;
+    line-height: 130%;
+}
+
+div.body p.caption {
+    text-align: inherit;
+}
+
+div.body td {
+    text-align: left;
+}
+
+ul.fakelist {
+    list-style: none;
+    margin: 10px 0 10px 20px;
+    padding: 0;
+}
+
+.field-list ul {
+    padding-left: 1em;
+}
+
+.first {
+    margin-top: 0 !important;
+}
+
+/* "Footnotes" heading */
+p.rubric {
+    margin-top: 30px;
+    font-weight: bold;
+}
+
+/* "Topics" */
+
+div.topic {
+    background-color: #eee;
+    border: 1px solid #ccc;
+    padding: 0 7px 0 7px;
+    margin: 10px 0 10px 0;
+}
+
+p.topic-title {
+    font-size: 1.1em;
+    font-weight: bold;
+    margin-top: 10px;
+}
+
+/* Admonitions */
+
+div.admonition {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    padding: 7px;
+}
+
+div.admonition dt {
+    font-weight: bold;
+}
+
+div.admonition dl {
+    margin-bottom: 0;
+}
+
+div.admonition p {
+    display: inline;
+}
+
+div.seealso {
+    background-color: #ffc;
+    border: 1px solid #ff6;
+}
+
+div.warning {
+    background-color: #ffe4e4;
+    border: 1px solid #f66;
+}
+
+div.note {
+    background-color: #eee;
+    border: 1px solid #ccc;
+}
+
+p.admonition-title {
+    margin: 0px 10px 5px 0px;
+    font-weight: bold;
+    display: inline;
+}
+
+p.admonition-title:after {
+    content: ":";
+}
+
+div.body p.centered {
+    text-align: center;
+    margin-top: 25px;
+}
+
+table.docutils {
+    border: 0;
+}
+
+table.docutils td, table.docutils th {
+    padding: 1px 8px 1px 0;
+    border-top: 0;
+    border-left: 0;
+    border-right: 0;
+    border-bottom: 1px solid #aaa;
+}
+
+table.field-list td, table.field-list th {
+    border: 0 !important;
+}
+
+table.footnote td, table.footnote th {
+    border: 0 !important;
+}
+
+.field-list ul {
+    margin: 0;
+    padding-left: 1em;
+}
+
+.field-list p {
+    margin: 0;
+}
+
+dl {
+    margin-bottom: 15px;
+    clear: both;
+}
+
+dd p {
+    margin-top: 0px;
+}
+
+dd ul, dd table {
+    margin-bottom: 10px;
+}
+
+dd {
+    margin-top: 3px;
+    margin-bottom: 10px;
+    margin-left: 30px;
+}
+
+.refcount {
+    color: #060;
+}
+
+dt:target,
+.highlight {
+    background-color: #fbe54e;
+}
+
+dl.glossary dt {
+    font-weight: bold;
+    font-size: 1.1em;
+}
+
+th {
+    text-align: left;
+    padding-right: 5px;
+}
+
+pre {
+    padding: 5px;
+    background-color: #efc;
+    color: #333;
+    border: 1px solid #ac9;
+    border-left: none;
+    border-right: none;
+    overflow: auto;
+    word-wrap: break-word;
+}
+
+td.linenos pre {
+    padding: 5px 0px;
+    border: 0;
+    background-color: transparent;
+    color: #aaa;
+}
+
+table.highlighttable {
+    margin-left: 0.5em;
+}
+
+table.highlighttable td {
+    padding: 0 0.5em 0 0.5em;
+}
+
+tt {
+    background-color: #ecf0f3;
+    padding: 0 1px 0 1px;
+    font-size: 0.95em;
+}
+
+tt.descname {
+    background-color: transparent;
+    font-weight: bold;
+    font-size: 1.2em;
+}
+
+tt.descclassname {
+    background-color: transparent;
+}
+
+tt.xref, a tt {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+.footnote:target  { background-color: #ffa }
+
+h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
+    background-color: transparent;
+}
+
+.optional {
+    font-size: 1.3em;
+}
+
+.versionmodified {
+    font-style: italic;
+}
+
+form.comment {
+    margin: 0;
+    padding: 10px 30px 10px 30px;
+    background-color: #eee;
+}
+
+form.comment h3 {
+    background-color: #326591;
+    color: white;
+    margin: -10px -30px 10px -30px;
+    padding: 5px;
+    font-size: 1.4em;
+}
+
+form.comment input,
+form.comment textarea {
+    border: 1px solid #ccc;
+    padding: 2px;
+    font-family: sans-serif;
+    font-size: 100%;
+}
+
+form.comment input[type="text"] {
+    width: 240px;
+}
+
+form.comment textarea {
+    width: 100%;
+    height: 200px;
+    margin-bottom: 10px;
+}
+
+.system-message {
+    background-color: #fda;
+    padding: 5px;
+    border: 3px solid red;
+}
+
+/* :::: PRINT :::: */
+@media print {
+    div.document,
+    div.documentwrapper,
+    div.bodywrapper {
+        margin: 0;
+        width : 100%;
+    }
+
+    div.sphinxsidebar,
+    div.related,
+    div.footer,
+    div#comments div.new-comment-box,
+    #top-link {
+        display: none;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/data/doc/input_for_pass/.templates/indexcontent.html	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,38 @@
+{% extends "defindex.html" %}
+{% block tables %}
+  <p><strong>Parts of the documentation:</strong></p>
+  <table class="contentstable" align="center"><tr>
+    <td width="50%">
+      <p class="biglink"><a class="biglink" href="{{ pathto("releasenotes/index") }}">Release notes</a><br/>
+         <span class="linkdescr">what's new</span></p>
+      <p class="biglink"><a class="biglink" href="{{ pathto("quick_start_guide") }}">Quick Start Guide</a><br/>
+         <span class="linkdescr">start here</span></p>
+      <p class="biglink"><a class="biglink" href="{{ pathto("feature_list") }}">Feature list</a><br/>
+         <span class="linkdescr">what is supported</span></p>
+      <p class="biglink"><a class="biglink" href="{{ pathto("manual/index") }}">Manual</a><br/>
+         <span class="linkdescr">reference docs</span></p>
+    </td><td width="50%">
+      <p class="biglink"><a class="biglink" href="{{ pathto("tutorials/index") }}">HowTos</a><br/>
+         <span class="linkdescr">specific use cases</span></p>
+      <p class="biglink"><a class="biglink" href="{{ pathto("api/helium/index") }}">Helium API</a><br/>
+         <span class="linkdescr">or check <a href="{{ pathto("api/helium/targets_list") }}">Targets</a>, <a href="{{ pathto("api/helium/properties_list") }}">Properties</a>, <a href="{{ pathto("api/helium/macros_list") }}">Macros</a></span></p>
+      <p class="biglink"><a class="biglink" href="{{ pathto("helium-antlib/index") }}">Ant libraries</a><br/>
+         <span class="linkdescr">when you just have to customize</span></p>
+      <p class="biglink"><a class="biglink" href="{{ pathto("development/index") }}">Development</a><br/>
+         <span class="linkdescr">for helium hackers everywhere</span></p>
+      <p class="biglink"><a class="biglink" href="{{ pathto("architecture") }}">Architecture</a><br/>
+         <span class="linkdescr">many pieces, loosely joined</span></p>
+    </td></tr>
+  </table>
+
+  <p><strong>Customer documentation:</strong></p>
+  <table class="contentstable" align="center"><tr>
+    <td width="50%">
+      <p class="biglink"><a class="biglink" href="http://helium.nmp.nokia.com/doc/ido">IDO</a><br/>
+         <span class="linkdescr">integration domains</span></p>
+    </td><td width="50%">
+      <p class="biglink"><a class="biglink" href="http://helium.nmp.nokia.com/doc/teamci">TeamCI</a><br/>
+         <span class="linkdescr">development teams</span></p>
+    </td></tr>
+  </table>
+{% endblock %}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/data/doc/input_for_pass/.templates/sidebar.html	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,6 @@
+
+<h3>Docs for other versions</h3>
+<ul>
+  <li><a href="http://helium.nmp.nokia.com/doc/11.0.0">Helium 11.0.0</a></li>
+  <li><a href="http://helium.nmp.nokia.com/doc/10.0.0">Helium 10.0.0</a></li>
+</ul>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/data/doc/input_for_pass/conf.py	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,183 @@
+# -*- coding: utf-8 -*-
+#============================================================================ 
+#Name        : ant.py 
+#Part of     : Helium 
+
+#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#All rights reserved.
+#This component and the accompanying materials are made available
+#under the terms of the License "Eclipse Public License v1.0"
+#which accompanies this distribution, and is available
+#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+#Initial Contributors:
+#Nokia Corporation - initial contribution.
+#
+#Contributors:
+#
+#Description:
+#===============================================================================
+#
+# Helium Documentation documentation build configuration file, created by
+# sphinx-quickstart on Fri May 09 09:49:44 2008.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# The contents of this file are pickled, so don't put values in the namespace
+# that aren't pickleable (module imports are okay, they're removed automatically).
+#
+# All configuration values have a default value; values that are commented out
+# serve to show the default value.
+
+import sys, os
+
+# If your extensions are in another directory, add it here. If the directory
+# is relative to the documentation root, use os.path.abspath to make it
+# absolute, like shown here.
+#sys.path.append(os.path.abspath('some/directory'))
+
+# General configuration
+# ---------------------
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx_ext']
+#api_doc_base_url = 
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['.templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General substitutions.
+project = 'Helium'
+copyright = '2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. License: http://www.eclipse.org/legal/epl-v10.html'
+
+# The default replacements for |version| and |release|, also used in various
+# other places throughout the built documents.
+#
+# The short X.Y version.
+version = '0.23'
+# The full version, including alpha/beta/rc tags.
+release = '0.23'
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+today_fmt = '%B %d, %Y'
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relative to source directories, that shouldn't be searched
+# for source files.
+#exclude_dirs = []
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+
+# Options for HTML output
+# -----------------------
+
+# The style sheet to use for HTML and HTML Help pages. A file of that name
+# must exist either in Sphinx' static/ path, or in one of the custom paths
+# given in html_static_path.
+html_style = 'default.css'
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# The name of an image file (within the static path) to place at the top of
+# the sidebar.
+html_logo = 'helium_pallot_small.jpg'
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['.static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+html_sidebars = {
+   'index': 'sidebar.html'
+}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+html_additional_pages = {
+    'index': 'indexcontent.html',
+}
+
+# If false, no module index is generated.
+html_use_modindex = False
+
+# If true, the reST sources are included in the HTML build as _sources/<name>.
+#html_copy_source = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = ''
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'Helium doc'
+
+
+# Options for LaTeX output
+# ------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, document class [howto/manual]).
+latex_documents = [
+  ('index', 'Helium.tex', 'Helium Documentation', 'The Helium Team', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_use_modindex = True
Binary file buildframework/helium/tests/data/doc/input_for_pass/helium_pallot_small.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/data/doc/input_for_pass/index.rst	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,32 @@
+..  ============================================================================ 
+    Name        : index.rst
+    Part of     : Helium 
+    
+    Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+    All rights reserved.
+    This component and the accompanying materials are made available
+    under the terms of the License "Eclipse Public License v1.0"
+    which accompanies this distribution, and is available
+    at the URL "http://www.eclipse.org/legal/epl-v10.html".
+    
+    Initial Contributors:
+    Nokia Corporation - initial contribution.
+    
+    Contributors:
+    
+    Description:
+    
+    ============================================================================
+    
+###################################
+  Helium
+###################################
+
+
+
+
+   
+   
+   
+   
+   
--- a/buildframework/helium/tests/minibuilds/ats/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tests/minibuilds/ats/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -56,7 +56,8 @@
     <!-- build configuration -->
     <property name="sysdef.configurations.list" value="helium_minibuild_ats_compile" />
     <path id="system.definition.files">
-        <fileset dir="." includes="*.sysdef.xml"/>
+        <fileset dir="${build.drive}/sf/app/contacts" includes="package_definition.xml"/>
+        <fileset dir="${build.drive}/sf/os/graphics" includes="package_definition.xml"/>
     </path>
 
 <!--    
--- a/buildframework/helium/tests/minibuilds/compile/archive.cfg.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tests/minibuilds/compile/archive.cfg.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -32,11 +32,11 @@
         <config name="empty_minibuild_archive" abstract="true" />
         
         <config name="minibuild_archive" abstract="true">
-            <set name="grace.service" value="minibuild"/>
-            <set name="grace.product" value="SF"/>
-            <set name="grace.release" value="SF_minibuild_${build.number}"/>
-            <set name="grace.metadata" value="true"/>
-            <set name="grace.template" value="${config.dir}/template_release_metadata.xml"/>
+            <set name="release.service" value="minibuild"/>
+            <set name="release.product" value="SF"/>
+            <set name="release.name" value="SF_minibuild_${build.number}"/>
+            <set name="release.metadata" value="true"/>
+            <set name="release.template" value="${config.dir}/template_release_metadata.xml"/>
             
             <set name="archives.dir" value="${zips.build.dir}/${zipping.type}"/>
             <set name="clock.dir" value="${build.drive}\sf\app\organizer\clock2"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/minibuilds/compile/archive.split.cfg.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<build>
+    <config abstract="true">
+        <set name="max.uncompressed.size" value="12500000"/>
+        <set name="split.on.uncompressed.size.enabled" value="true"/>
+        <set name="max.files.per.archive" value="65000"/>
+        <set name="archive.tool" value="7za"/>
+        <set name="root.dir" value="${build.drive}\"/>
+        <set name="temp.build.dir" value="${temp.build.dir}"/>
+        <set name="archives.dir" value="${zips.build.dir}/${zipping.type}"/>
+                
+        <config name="minibuild_archive" abstract="true">
+            <config>
+                <set name="name" value="sf_mw_classicui_and_app_radio_01"/>
+                <set name="mapper" value="policy"/>
+                <set name="include" value="sf/mw/classicui/**"/>
+                <set name="include" value="sf/app/radio/**"/>
+                <set name="exclude" value="**/_ccmwaid.inf"/>
+                <set name="policy.csv" value="${config.dir}/distribution.policy.extended_for_sf.id_status.csv"/>
+            </config>
+            <config>
+                <set name="name" value="sf_os_01"/>
+                <set name="mapper" value="policy.remover"/>
+                <set name="include" value="test_policy/os/**"/>
+                <set name="exclude" value="**/_ccmwaid.inf"/>
+                <set name="policy.root.dir" value="${build.drive}/test_policy"/>
+                <set name="policy.csv" value="${config.dir}/distribution.policy.extended_for_sf.id_status.csv"/>
+            </config>
+        </config>
+    </config>
+</build>
+  
\ No newline at end of file
--- a/buildframework/helium/tests/minibuilds/compile/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tests/minibuilds/compile/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -34,10 +34,14 @@
     <property name="minor.version" value="0" />
     <property name="publish.root.dir" location="${build.drive}/release" />
 
-    <!-- For Grace upload-->
+    <!-- For upload-->
     <property name="hydra.service" value="Helium" />
     <property name="hydra.product" value="minibuild_compile" />
     <property name="release.label" value="${major.version}.${minor.version}" />
+    
+    <!-- build -->
+    <property name="qmake.enabled" value="true" />
+    <property name="sysdef3.enabled" value="false" />
 
     <!-- build configuration -->
     <property name="sysdef.configurations.list" value="helium_minibuild_compile" />
@@ -221,7 +225,7 @@
     </target>
 
 
-    <target name="minibuild-archive" depends="minibuild-archive-ant,minibuild-archive-ec-full,minibuild-archive-ant-empty-config" />
+    <target name="minibuild-archive" depends="minibuild-archive-ant,minibuild-archive-ec-full,minibuild-archive-ant-empty-config,minibuild-split-archive-ec-full,minibuild-split-archive-ant" />
 
     <!-- This target will copy a part of the tree structure to test policy.remover mapper. -->
     <target name="prepare-archiving">
@@ -254,7 +258,26 @@
             <param name="zipping.type" value="ant" />
             <!-- Uses to set the target location -->
         </antcall>
-        
+    </target>
+    
+    <target name="minibuild-split-archive-ec-full">
+        <antcall target="do-minibuild-split-archive">
+            <param name="build.system" value="ec-helium" />
+            <param name="zip.config.file" value="archive.split.cfg.xml" />
+            <param name="archive.using.ec" value="true" />
+            <param name="zipping.type" value="ec" />
+            <!-- Uses to set the target location -->
+        </antcall>
+    </target>
+    
+    <target name="minibuild-split-archive-ant">
+        <antcall target="do-minibuild-split-archive">
+            <param name="build.system" value="ebs" />
+            <param name="zip.config.file" value="archive.split.cfg.xml" />
+            <param name="archive.using.ec" value="false" />
+            <param name="zipping.type" value="ant" />
+            <!-- Uses to set the target location -->
+        </antcall>
     </target>
  
     <target name="minibuild-archive-ant-empty-config">
@@ -286,6 +309,33 @@
         <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_os_1435.zip" />
         <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_os_1436.zip" />
     </target>
+    
+    <target name="do-minibuild-split-archive">
+            <runtarget target="prepare-archiving" />
+            <runtarget target="zip-ee" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_mw_classicui_and_app_radio_01_part01_0.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_mw_classicui_and_app_radio_01_part02_0.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_mw_classicui_and_app_radio_01_part03_0.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_mw_classicui_and_app_radio_01_part04_0.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_mw_classicui_and_app_radio_01_part05_0.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_mw_classicui_and_app_radio_01_part01_3.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_mw_classicui_and_app_radio_01_part02_3.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_mw_classicui_and_app_radio_01_part03_3.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_mw_classicui_and_app_radio_01_part01_7.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_mw_classicui_and_app_radio_01_part02_7.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_mw_classicui_and_app_radio_01_part03_7.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_mw_classicui_and_app_radio_01_part04_7.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_mw_classicui_and_app_radio_01_part05_7.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_mw_classicui_and_app_radio_01_part06_7.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_mw_classicui_and_app_radio_01_1401.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_os_01_0.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_os_01_1.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_os_01_part01_2.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_os_01_3.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_os_01_part01_1422.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_os_01_part02_1422.zip" />
+            <au:assertFileExists file="${zips.build.dir}/${zipping.type}/sf_os_01_part01_1435.zip" />
+        </target>
 
 
     <target name="minibuild-cleanup">
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/minibuilds/docs/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : build.xml
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="minibuild.docs" default="minibuild.docs-test" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium" basedir=".">
+
+    <property name="helium.dir" location="../../.." />
+    <import file="../../../build.xml" />
+    
+    <!-- Run Ant unit tests. -->
+    <target name="minibuild.docs-test">
+        <mkdir dir="${helium.build.dir}/temp/minibuild"/>
+        <mkdir dir="${helium.build.dir}/report/antunit/minibuild"/>
+        <au:antunit>
+            <fileset dir="${helium.dir}" includes="tests/minibuilds/docs/test_docs_minibuild.ant.xml"/> 
+            <au:plainlistener/>
+            <hlm:antcoveragelistener outputfile="${helium.build.dir}/report/antunit/minibuild/ant_coverage.txt"/>
+            <au:xmllistener toDir="${helium.build.dir}/report/antunit/minibuild" logLevel="info" />
+        </au:antunit>
+    </target>
+      
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/minibuilds/docs/hlm.bat	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,20 @@
+@echo off
+
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of the License "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description: 
+rem
+
+..\..\..\hlm.bat %*
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/minibuilds/docs/test_docs_minibuild.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : test_docs_minibuild.ant.xml 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test_docs_minibuild" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    <description>
+        Targets to test docs minibuild job 
+    </description>
+    <property name="helium.dir" location="../../.." />
+    <property name="cache.dir" value="build/cache" />
+    <import file="../../../build.xml" />
+
+    <target name="setUp">
+        <mkdir dir="${doc.build.dir}\docs_minibuild"/>
+        <antcall target="docs-database"/>
+    </target>
+       
+    <target name="test-check-minibuild-docs-fails">
+         <!-- Insert one undocumented property and check that we fail -->
+         <au:expectfailure>
+             <antcall target="build-textdocs">
+                 <param name="doc.temp.dir" value="${helium.dir}\tests\data\doc\input_for_failure"/>
+                 <param name="doc.build.dir" value="${doc.build.dir}\docs_minibuild"/>
+             </antcall>
+        </au:expectfailure>        
+        <au:assertLogContains text="EXCEPTION: Found 1 error(s) of type '(ERROR/3) Missing API doc for &lt;property&gt;'"/>
+     </target>
+
+    <target name="test-check-minibuild-docs-succeeds">
+       <antcall target="build-textdocs">
+                 <param name="doc.temp.dir" value="${helium.dir}\tests\data\doc\\input_for_pass"/>
+            <param name="doc.build.dir" value="${doc.build.dir}\docs_minibuild"/>
+        </antcall>
+        <au:assertLogDoesntContain text="EXCEPTION: Found 1 error(s) of type '(ERROR/3) Missing API doc for &lt;property&gt;'"/>
+    </target>
+
+    <target name="tearDown">
+        <delete dir="${doc.build.dir}\.."/>
+    </target>
+    
+</project>
\ No newline at end of file
--- a/buildframework/helium/tests/minibuilds/ido-sbs-coverity/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tests/minibuilds/ido-sbs-coverity/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -32,8 +32,10 @@
     <property name="s60.grace.product" value="DFS7x.92" />
     <property name="s60.grace.release" value="92_\d{6}_hw79" />
     
+    <property name="sysdef3.enabled" value="true" />
+    <property name="codescanner.enabled" value="false" />
+    
     <!-- enable coverity -->
-    <property name="coverity.enabled" value="true"/>
     <property name="coverity.commit.defects.enabled" value="true"/>
     <property name="coverity.defect.manager.server" value="ousrv057.europe.nokia.com"/>
     <property name="coverity.defect.manager.port" value="5467"/>
@@ -50,7 +52,9 @@
 
     <property name="build.name" value="minibuild_ido_sbs_coverity" />
     <property name="build.family" value="test_minibuild_ido_sbs_coverity" />
-        
+    
+    <property name="sfvalidate.enabled" value="true" />
+    
     <target name="minibuild-check">
         <!-- Check if prep has set some prop correctly... -->
         <echo>'${arm.compiler.version}'</echo>
@@ -67,9 +71,43 @@
         </if>
     </target>
     
+    <!-- Preparing the content on top of the env -->
+    <target name="ido-50-build" depends="ido-build-prep,compile-main-source,build-log-summary,render-internal-exports,
+                                         update-policy-src-reference,render-validate-policy,check-sf-source-header,
+                                         ido-codescanner,ido-check-sf-source-header,iad-check-pkg-version,ats-test,publish-tasks-to-folder,
+                                         ido-sources-to-s60-build-robot,check-epl-errors" />
+    
+    <target name="ido-build-prep" depends="ido-configure-prep,init,log-build-env,set-arm-version,check-free-space,
+                                               diamonds,do-prep-work-area,ido-prep-clean-source,ido-prep-copy,create-bom" />
+    
+    <target name="ido-prep-clean-source">
+        <antcall target="ido-prep-clean">
+           <param name="enabled.coverity" value="false"/>
+        </antcall>
+    </target>
+    
+    <target name="compile-main-source">
+        <antcall target="compile-main">
+           <param name="coverity.enabled" value="true"/>
+        </antcall>
+    </target>
+    
 
     <import file="../ido/build.xml"/>
     <import file="build.sbsinput.ant.xml" />
+    
+    <hlm:signalInput id="EPLLicenseSignalInput" failbuild="never">
+        <hlm:notifierListRef refid="defaultFailNotifier" />
+    </hlm:signalInput>
+    
+    <target name="check-epl-errors">
+        <loadfile property="epl.errors" srcFile="${sf.check.source.log}"/>
+        <au:assertMatches string="${epl.errors}"
+            pattern="ERROR: EPL license header not found:"
+            message="EPL validation is not done."
+            multiline="true"
+        />
+    </target>
 </project>
 
     
\ No newline at end of file
--- a/buildframework/helium/tests/minibuilds/ido-sbs/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tests/minibuilds/ido-sbs/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -26,6 +26,7 @@
     
     <!-- Configuring raptor build system -->
     <property name="build.system" value="sbs"/>
+    <property name="qmake.enabled" value="true" />
 
     <!-- Configuring get latest env. -->
     <property name="s60.grace.service" value="s60_devices_sw" />
@@ -33,8 +34,14 @@
     <property name="s60.grace.release" value="92_\d{6}_hw79" />
     
     <!-- Synergy project for TB92 -->
-    <property name="ccm.project" value="MinibuildDomain-tr1ido#50_201012:project:tr1test1#1" />
+	<property name="ccm.project" value="MinibuildDomain-tr1ido#20100928_3:project:tr1test1#1" />
+    
+    <!-- Compatibility analyser enabling flag, causes binary check to be run -->
+    <property name="ca.enabled" value="true" />
+    <property name="bc.prep.ca.file" location="${helium.dir}/tools/quality/compatibility_analyser/ca.cfg.xml" />
 
+    <property name="codescanner.enabled" value="false" />
+    
 
     <!-- Run the full sequence of target for the minibuild. ,minibuild-prep,compile-main,zip-ee,minibuild-check-->
     <!--<target name="do-minibuild" depends="minibuild-cleanup,
@@ -47,8 +54,18 @@
         <if>
             <istrue value="${blocks.enabled}" />
             <then>
-                <au:assertFileExists file="${blocks.config.dir}/minibuild_helloworldapi.blocks_component.xml" />
-                <au:assertFileExists file="${blocks.config.dir}/minibuild_helloworldcons.blocks_component.xml" />
+                <if>
+                    <istrue value="${sysdef3.enabled}" />
+                    <then>
+                        <au:assertFileExists file="${blocks.config.dir}/helloworld_api.blocks_component.xml" />
+                        <au:assertFileExists file="${blocks.config.dir}/helloworldcons_app.blocks_component.xml" />
+                        <au:assertFileExists file="${blocks.config.dir}/qt_helloworld_app.blocks_component.xml" />
+                    </then>
+                    <else>
+                        <au:assertFileExists file="${blocks.config.dir}/minibuild_helloworldapi.blocks_component.xml" />
+                        <au:assertFileExists file="${blocks.config.dir}/minibuild_helloworldcons.blocks_component.xml" />
+                    </else>
+                </if>
             </then>
         </if>
     </target>
@@ -71,6 +88,10 @@
         <hlm:notifierListRef refid="defaultFailNotifier" />
     </hlm:signalInput>
 
+    <!-- used by the compatibility analyser to define the build log that is to be
+     scanned and the output used for the comparison-->
+    <property name="bc.log.file.to.scan" location="${build.log.dir}/compile/${build.id}_dfs_build_armv5_compile.log" />
+
 </project>
 
     
\ No newline at end of file
--- a/buildframework/helium/tests/minibuilds/ido-sbs/common.sbsinput.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tests/minibuilds/ido-sbs/common.sbsinput.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -25,6 +25,10 @@
         Common sbs input config.
     </description>
     <!-- Common make options for particular engine values of it could be overridden by referencing it-->
+    <condition property="sbs.no.thread.jobs" value="20" else="${number.of.threads}">
+        <equals arg1="${build.system}" arg2="sbs-ec" />
+    </condition>
+
     <hlm:sbsmakeoptions id="commonEMakeOptions" engine="emake">
         <arg name="--emake-emulation" value="gmake" />
         <arg name="--emake-annodetail" value="basic,history,waiting" />
@@ -51,6 +55,7 @@
     <!-- tools common sbs options -->
     <hlm:sbsoptions id="commonSBS">
         <arg line="-k" />
+        <arg line="-j ${sbs.no.thread.jobs}" />
     </hlm:sbsoptions>
 
     <!-- tools common sbs options -->
--- a/buildframework/helium/tests/minibuilds/ido/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tests/minibuilds/ido/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -35,6 +35,7 @@
     <property name="minor.version" value="0" />
     <!-- Compatibility analyser enabling flag, causes binary check to be run -->
     <property name="ca.enabled" value="true" />
+    <property name="bc.prep.ca.file" location="${helium.dir}/tools/quality/compatibility_analyser/ca.cfg.xml" />
     
     <condition property="ccm.project.wa_path" value="${data.drive.letter}:\Build_${data.drive.letter}\${env.USERNAME}\ido_wa\${build.name}"  else="${build.name}\wa" > 
           <os family="windows"/>
@@ -47,20 +48,35 @@
 
     <!-- build configuration -->
     <property name="sysdef.configurations.list" value="helium_minibuild_ido" />
-    <path id="system.definition.files">
+    <property name="sysdef3.enabled" value="true" />
+    <property name="qmake.enabled" value="true" />    
+    <condition property="sysdef3.system.definition.files.id" value="system.definition.files.new" else="system.definition.files.old">
+        <istrue value="${sysdef3.enabled}" />
+    </condition>
+    <!--property name="ido.name" value="test_cmt" /-->
+    <path id="system.definition.files.old"> 
         <fileset dir="${config.dir}" includes="sysdefs/*.sysdef.xml" />
         <fileset dir="${ccm.project.wa_path}" includes="*/*/*/layers.sysdef.xml" />
     </path>
+    
+    <path id="system.definition.files.new"> 
+        <fileset dir="${ccm.project.wa_path}" includes="*/*/*/package_definition.xml"/>  
+    </path>
+
+      
+    <path id="system.definition.files">
+        <path refid="${sysdef3.system.definition.files.id}" />
+    </path>
 
 
     <!-- Configuring the build system -->
-    <property name="build.system" value="ec-helium" />
+    <property name="build.system" value="sbs" />
     <property name="rvct.version" value="22_686" />
 
     <!-- Configuring get latest env. -->
-    <property name="s60.grace.service" value="S60RnD" />
-    <property name="s60.grace.product" value="pf_5250_prd" />
-    <property name="s60.grace.release" value="pf_5250_prd_\d{2}\.\d{1}\.\d{3}" />
+    <property name="s60.grace.service" value="s60_devices_sw" />
+    <property name="s60.grace.product" value="DFS7x.92" />
+    <property name="s60.grace.release" value="92_\d{6}_hw79" />
     
     <!-- matching mcl_200948_hw79 -->
     <condition property="prep.root.dir" value="${data.drive.letter}:\Build_${data.drive.letter}\${env.USERNAME}\ido_ba\${build.name}" else="${build.name}\ido_ba" >
@@ -86,7 +102,8 @@
     <import file="hack-test.ant.xml" />
     <import file="${helium.dir}/helium.ant.xml" />
     <import file="config/stages_config.ant.xml" />
-
+    <import file="config/build.sbsinput.ant.xml" />
+    
     <!-- Run the full sequence of target for the minibuild. ,minibuild-prep,compile-main,zip-ee,minibuild-check-->
     <target name="do-minibuild" depends="ido-update-build-area,
                                             flag-ba-for-deletion,
@@ -215,8 +232,10 @@
     </target>
 
 
-    <target name="update-policy-src-reference" depends="ido-create-ado-mapping">
-        <hlm:iniKeys2Path ini="${ado.mapping.file}" pathid="reference.policy.path.list"/>
+    <target name="update-policy-src-reference">
+        <property name="policy.src.mapping.file" location="${build.output.dir}/build/ado_mapping_policy_src.ini" />
+        <hlm:createAdoMappingMacro adoMapFile="${policy.src.mapping.file}" />
+        <hlm:iniKeys2Path ini="${policy.src.mapping.file}" pathid="reference.policy.path.list"/>
     </target>
 
 </project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/minibuilds/ido/config/build.sbsinput.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,278 @@
+<?xml version="1.0"?>
+<!-- 
+============================================================================ 
+Name        : 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="ido_sbs_input" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    <description>
+        ido sbs input
+    </description>
+
+    <import file="common.sbsinput.ant.xml" />
+    <patternset id="build_layers" >
+        <include name="os_layer" />
+        <include name="bldfirst_mw_layer" />
+        <include name="bldfirst_app_layer" />
+        <include name="mw_layer" />
+        <include name="complementary_layer" />
+        <include name="app_layer" />
+        <include name="tools_layer" />
+        <include name="stubs_layer" />
+        <include name="addon_layer" />
+    </patternset>
+
+    <patternset id="dfs_build_layers" >
+        <include name="os_layer" />
+        <include name="bldfirst_mw_layer" />
+        <include name="bldfirst_app_layer" />
+        <include name="mw_layer" />
+        <include name="complementary_layer" />
+        <include name="app_layer" />
+        <include name="tools_layer" />
+        <include name="addon_layer" />
+    </patternset>
+
+    <patternset id="test_layers" >
+        <include name="api_test_layer" />
+        <include name="unit_test_layer" />
+        <include name="perf_test_layer" />
+        <include name="module_test_layer" />
+        <include name="qt_unit_test_layer" />
+    </patternset>
+
+
+    <hlm:sbsinput id="build_input_tools">
+        <sbsInput refid="tools-${build.system}" />
+        <sbsOptions/>
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="build_input_armv5">
+        <sbsInput refid="armv5-${build.system}" />
+        <sbsOptions>
+            <arg name="--logfile" value="${compile.log.dir}/${build.id}_armv5_build.compile.log" />
+        </sbsOptions>
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="build_input">
+        <sbsInput refid="build_input_tools" />
+        <sbsInput refid="build_input_armv5" />
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="build_input_clean_tools">
+        <sbsInput refid="tools-${build.system}-clean" />
+        <sbsOptions>
+            <arg name="--logfile" value="${compile.log.dir}/${build.id}_tools_rel_build_clean.compile.log" />
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_tools_rel_build_clean" />
+        </sbsOptions>
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="build_input_clean_armv5">
+        <sbsInput refid="armv5-${build.system}-clean" />
+        <sbsOptions>
+            <arg name="--logfile" value="${compile.log.dir}/${build.id}_armv5_build_clean.compile.log" />
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_armv5_build_clean" />
+        </sbsOptions>
+    </hlm:sbsinput>
+
+    <hlm:sbsbuild id="sbs.build_clean">
+        <sbsInput refid="build_input_clean_tools" />
+        <sbsInput refid="build_input_clean_armv5" />
+    </hlm:sbsbuild>
+
+    <hlm:sbsinput id="helium_minibuild_ido_input_tools">
+        <sbsInput refid="tools-${build.system}" />
+        <sbsOptions>
+            <arg name="--logfile" value="${compile.log.dir}/${build.id}_tools_helium_minibuild_ido.compile.log" />
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_tools_helium_minibuild_ido" />
+        </sbsOptions>
+    </hlm:sbsinput>
+        
+    <hlm:sbsinput id="helium_minibuild_ido_input_armv5">
+        <sbsInput refid="armv5-${build.system}" />
+        <sbsOptions>
+            <arg name="--logfile" value="${compile.log.dir}/${build.id}_armv5_helium_minibuild_ido.compile.log" />
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_armv5_helium_minibuild_ido" />
+        </sbsOptions>
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="helium_minibuild_ido_input">
+        <sbsInput refid="helium_minibuild_ido_input_tools" />
+        <sbsInput refid="helium_minibuild_ido_input_armv5" />
+    </hlm:sbsinput>
+    
+    <hlm:sbsbuild id="sbs.helium_minibuild_ido">
+        <sbsInput refid="helium_minibuild_ido_input" />
+    </hlm:sbsbuild> 
+
+    <hlm:sbsinput id="helium_minibuild_ido_input_clean">
+        <sbsInput refid="helium_minibuild_ido_clean_tools" />
+        <sbsInput refid="helium_minibuild_ido_clean_armv5" />
+    </hlm:sbsinput>
+    
+    <hlm:sbsinput id="helium_minibuild_ido_input_clean_tools">
+        <sbsInput refid="tools-${build.system}-clean"/>
+        <sbsOptions>
+            <arg name="--logfile" value="${compile.log.dir}/${build.id}_tools_helium_minibuild_ido_clean.compile.log" />
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_tools_helium_minibuild_ido_clean" />
+        </sbsOptions>
+    </hlm:sbsinput>
+        
+    <hlm:sbsinput id="helium_minibuild_ido_input_clean_armv5">
+        <sbsInput refid="armv5-${build.system}-clean" />
+        <sbsOptions>
+            <arg name="--logfile" value="${compile.log.dir}/${build.id}_armv5_helium_minibuild_ido_clean.compile.log" />
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_armv5_helium_minibuild_ido_clean" />
+        </sbsOptions>
+    </hlm:sbsinput>
+
+    <hlm:sbsbuild id="sbs.helium_minibuild_ido_clean">
+        <sbsInput refid="helium_minibuild_ido_input_clean_tools" />
+        <sbsInput refid="helium_minibuild_ido_input_clean_armv5" />
+    </hlm:sbsbuild> 
+
+    <hlm:sbsinput id="sf_build_input_tools">
+        <sbsInput refid="tools-${build.system}" />
+        <sbsOptions>
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_tools_sf_build" />
+        </sbsOptions>
+    </hlm:sbsinput> 
+
+    <hlm:sbsinput id="sf_build_input_armv5">
+        <sbsInput refid="armv5-${build.system}" />
+        <sbsOptions>
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_armv5_sf_build" />
+        </sbsOptions>
+    </hlm:sbsinput> 
+
+    <hlm:sbsinput id="sf_build_input">
+        <sbsInput refid="sf_build_input_tools" />
+        <sbsInput refid="sf_build_input_armv5" />
+    </hlm:sbsinput>
+    
+    <hlm:sbsbuild id="sbs.sf_build">
+        <sbsInput refid="sf_build_input" />
+    </hlm:sbsbuild>
+
+    <hlm:sbsinput id="sf_build_input_clean_tools">
+        <sbsInput refid="tools-${build.system}-clean" />
+        <sbsOptions>
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_tools_sf_build_clean" />
+        </sbsOptions>
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="sf_build_input_armv5">
+        <sbsInput refid="armv5-${build.system}-clean" />
+        <sbsOptions>
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_armv5_sf_build_clean" />
+        </sbsOptions>
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="sf_build_input_clean">
+        <sbsInput refid="sf_build_input_clean_tools" />
+        <sbsInput refid="sf_build_input_clean_armv5" />
+    </hlm:sbsinput>
+    
+    <hlm:sbsbuild id="sbs.sf_build_clean">
+        <sbsInput refid="sf_build_input_clean" />
+    </hlm:sbsbuild>
+
+    <hlm:sbsinput id="nonhw_input_clean_tools">
+        <sbsInput refid="tools-${build.system}-clean" />
+        <sbsOptions>
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_tools_winscw_build_clean" />
+        </sbsOptions>
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="nonhw_input_clean_winscw">
+        <sbsInput refid="winscw-${build.system}-clean" />
+        <sbsOptions>
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_winscw_winscw_build_clean" />
+        </sbsOptions>
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="nonhw_input_clean">
+        <sbsInput refid="nonhw_input_clean_tools" />
+        <sbsInput refid="nonhw_input_clean_winscw" />
+    </hlm:sbsinput>
+    
+    <hlm:sbsbuild id="sbs.nonhw_clean">
+        <sbsInput refid="nonhw_input_clean" />
+    </hlm:sbsbuild>
+
+    <hlm:sbsinput id="nonhw_input_tools">
+        <sbsInput refid="tools-${build.system}" />
+        <sbsOptions>
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_tools_build" />
+        </sbsOptions>
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="nonhw_input_winscw">
+        <sbsInput refid="winscw-${build.system}" />
+        <sbsOptions>
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_winscw_build" />
+        </sbsOptions>
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="test_input_tools">
+        <sbsInput refid="test-${build.system}" />
+        <sbsOptions>
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_tools_test" />
+        </sbsOptions>
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="test_input_armv5">
+        <sbsInput refid="test-${build.system}" />
+        <sbsOptions>
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_armv5_test" />
+        </sbsOptions>
+    </hlm:sbsinput>
+    
+    <hlm:sbsinput id="test_input">
+        <sbsInput refid="test_input_tools" />
+        <sbsInput refid="test_input_armv5" />
+    </hlm:sbsinput>
+    
+    <hlm:sbsbuild id="sbs.test">
+        <sbsInput refid="test_input" />
+    </hlm:sbsbuild>
+
+    <hlm:sbsinput id="test_input_clean_tools">
+        <sbsInput refid="test-${build.system}" />
+        <sbsOptions>
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_tools_test_clean" />
+        </sbsOptions>
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="test_input_clean_armv5">
+        <sbsInput refid="test-${build.system}" />
+        <sbsOptions>
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_armv5_test_clean" />
+        </sbsOptions>
+    </hlm:sbsinput>
+    
+    <hlm:sbsinput id="test_input_clean">
+        <sbsInput refid="test_input_clean_tools" />
+        <sbsInput refid="test_input_clean_armv5" />
+    </hlm:sbsinput>
+    
+    <hlm:sbsbuild id="sbs.test_clean">
+        <sbsInput refid="test_input_clean" />
+    </hlm:sbsbuild>    
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tests/minibuilds/ido/config/common.sbsinput.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,184 @@
+<?xml version="1.0"?>
+<!-- 
+============================================================================ 
+Name        : 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="common_sbs_input" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    <description>
+        Common sbs input config.
+    </description>
+    <!-- Common make options for particular engine values of it could be overridden by referencing it-->
+    <hlm:sbsmakeoptions id="commonEMakeOptions" engine="emake">
+        <arg name="--emake-emulation" value="gmake" />
+        <arg name="--emake-annodetail" value="basic,history,waiting" />
+        <arg name="--emake-class" value="${ec.build.class}" />
+        <arg name="--emake-historyfile" value="${build.log.dir}/ec_history/raptor_clean.emake.data" />
+        <arg name="--case-sensitive" value="0" />
+        <arg name="--emake-root" value="${env.EMAKE_ROOT};${helium.dir};${env.SBS_HOME}" />
+    </hlm:sbsmakeoptions>
+
+    <hlm:sbsmakeoptions id="commonGmakeOptions" engine="gmake" />
+    <hlm:sbsmakeoptions id="commonPVMGmakeOptions" engine="pvmgmake" />
+
+    <!-- Tools specific make options inheriting the commone make option-->
+    <hlm:sbsmakeoptions id="toolsmake-sbs-ec">
+        <sbsmakeoptions refid="commonEMakeOptions" />
+        <arg name="--emake-maxagents" value="1" />
+    </hlm:sbsmakeoptions>
+            
+    <!-- Main build make option directly refering to common emake option -->
+    <hlm:sbsmakeoptions id="mainbuildmake-sbs-ec">
+        <sbsmakeoptions refid="commonEMakeOptions" />
+    </hlm:sbsmakeoptions>
+
+    <!-- tools common sbs options -->
+    <hlm:sbsoptions id="commonSBS">
+        <arg line="-k" />
+    </hlm:sbsoptions>
+
+    <!-- tools common sbs options -->
+    <hlm:sbsoptions id="toolsCommonSBS">
+        <argset refid="commonSBS" />
+        <arg line="-c tools_rel -c tools2_rel" />
+        <arg line="-j 1" />
+    </hlm:sbsoptions>
+
+    <hlm:sbsoptions id="winscwSBSOptions">
+        <argset refid="commonSBS" />
+        <arg line="-c winscw" />
+    </hlm:sbsoptions>
+
+    <!-- Mainbuild common sbs options -->
+    <hlm:sbsoptions id="armv5CommonSBS">
+            <argset refid="commonSBS" />
+            <arg line="-c armv5" />
+    </hlm:sbsoptions>
+
+    <hlm:sbsoptions id="testCommonSBS">
+            <argset refid="commonSBS" />
+            <arg line="-c armv5.test" />
+    </hlm:sbsoptions>
+
+
+    <hlm:sbsoptions id="testCleanSBS">
+        <argset refid="testcommonSBS" />
+        <argset refid="cleanCommon" />
+    </hlm:sbsoptions>
+
+    <hlm:sbsoptions id="cleanCommon">
+            <arg line="REALLYCLEAN" />
+    </hlm:sbsoptions>
+
+    <!-- Mainbuild common sbs options -->
+    <hlm:sbsoptions id="armv5Clean">
+        <argset refid="armv5CommonSBS"/>
+        <argset refid="cleanCommon" />
+    </hlm:sbsoptions>
+
+
+    <!-- Mainbuild common sbs options -->
+    <hlm:sbsoptions id="toolsClean">
+        <argset refid="toolsCommonSBS"/>
+        <argset refid="cleanCommon" />
+    </hlm:sbsoptions>
+
+    <!-- Mainbuild common sbs options -->
+    <hlm:sbsoptions id="winscwClean">
+        <argset refid="winscwSBSOptions"/>
+        <argset refid="cleanCommon" />
+    </hlm:sbsoptions>
+
+    <!-- sbs input consists of sbs options and sbs make options, the sbs options remains same for all
+    the build system, the make options varies
+     -->
+    <hlm:sbsinput id="tools-sbs">
+        <sbsoptions refid="toolsCommonSBS" />
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="tools-sbs-clean">
+        <sbsoptions refid="toolsClean" />
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="tools-sbs-ec">
+        <sbsoptions refid="toolsCommonSBS" />
+        <sbsmakeoptions refid="toolsmake-sbs-ec" ppThreads="20"/>
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="tools-sbs-ec-clean">
+        <sbsoptions refid="toolsClean" />
+        <sbsmakeoptions refid="toolsmake-sbs-ec" ppThreads="20"/>
+    </hlm:sbsinput>
+
+    <!-- sbs input for main build.
+     -->
+    <hlm:sbsinput id="armv5-sbs">
+        <sbsoptions refid="armv5CommonSBS" />
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="armv5-sbs-clean">
+        <sbsoptions refid="armv5Clean" />
+    </hlm:sbsinput>
+
+    <!-- sbs input for main build.
+     -->
+    <hlm:sbsinput id="armv5-sbs-ec">
+        <sbsoptions refid="armv5CommonSBS" />
+        <sbsmakeoptions refid="mainbuildmake-sbs-ec" ppThreads="20"/>
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="armv5-sbs-ec-clean">
+        <sbsoptions refid="armv5Clean" />
+        <sbsmakeoptions refid="mainbuildmake-sbs-ec" ppThreads="20" />
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="winscw-sbs">
+        <sbsoptions refid="winscwSBSOptions" />
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="winscw-sbs-clean">
+        <sbsoptions refid="winscwClean" />
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="winscw-sbs-ec-clean">
+        <sbsoptions refid="winscwClean" />
+        <sbsmakeoptions refid="mainbuildmake-sbs-ec" ppThreads="20"/>
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="test-sbs">
+        <sbsoptions refid="testCommonSBS" />
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="test-sbs-clean">
+        <sbsoptions refid="testCleanSBS" />
+    </hlm:sbsinput>
+
+    <!-- sbs input for main build.
+     -->
+    <hlm:sbsinput id="test-sbs-ec">
+        <sbsoptions refid="testCommonSBS" />
+        <sbsmakeoptions refid="mainbuildmake-sbs-ec" ppThreads="20"/>
+    </hlm:sbsinput>
+
+    <hlm:sbsinput id="test-sbs-ec-clean">
+        <sbsoptions refid="testCleanSBS" />
+        <sbsmakeoptions refid="mainbuildmake-sbs-ec" ppThreads="20" />
+    </hlm:sbsinput>
+
+</project>
\ No newline at end of file
--- a/buildframework/helium/tests/minibuilds/imaker/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tests/minibuilds/imaker/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -166,18 +166,16 @@
 
     <target name="minibuild-check">
     </target>
-    
+        
     <!-- Rom configuration -->
     <hlm:imakerconfigurationset id="imaker.rom.config">
         <imakerconfiguration>
-            <makefileset>
-                <include name="**/${product.name}/*ui.mk"/>
-            </makefileset>
+            <hlm:product list="${product.list}" ui="true"/>
             <targetset>
                 <include name="^core$"/>
                 <include name="^langpack_01.*$"/>
-                <include name="^langpack_02.*$"/><!---->
-                <include name="^custvariant_.*$"/>
+                <include name="^langpack_02.*$"/>
+                <include name="^custvariant_01_test$"/>
             </targetset>
             <variableset>
                 <variable name="USE_FOTI" value="0"/>
--- a/buildframework/helium/tests/minibuilds/linux-build/ido/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tests/minibuilds/linux-build/ido/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -201,7 +201,9 @@
 
 
     <target name="update-policy-src-reference" depends="ido-create-ado-mapping">
-        <hlm:iniKeys2Path ini="${ado.mapping.file}" pathid="reference.policy.path.list"/>
+        <property name="policy.src.mapping.file" location="${build.output.dir}/build/ado_mapping_policy_src.ini" />
+        <hlm:createAdoMappingMacro adoMapFile="${policy.src.mapping.file}" />
+        <hlm:iniKeys2Path ini="${policy.src.mapping.file}" pathid="reference.policy.path.list"/>
     </target>
     
     <hlm:signalInput id="compileSignalInput" failbuild="never">
--- a/buildframework/helium/tests/minibuilds/qt/build.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tests/minibuilds/qt/build.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -39,11 +39,13 @@
     <property name="minor.version" value="0" />
     <property name="publish.root.dir" location="${build.drive}/release" />
 
-    <!-- For Grace upload-->
+    <!-- For upload-->
     <property name="hydra.service" value="Helium" />
     <property name="hydra.product" value="minibuild_qt" />
     <property name="release.label" value="${major.version}.${minor.version}" />
-
+    
+    <property name="sysdef3.enabled" value="false" />
+    
     <!-- build configuration -->
     <property name="sysdef.configurations.list" value="build_tools,build" />
     <path id="system.definition.files">
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/blocks/blocks.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,267 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : blocks.ant.xml 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<!--* @package preparation -->
+<project name="blocks" xmlns:hlm="http://www.nokia.com/helium">
+    <description>
+        Blocks integration.
+    </description>
+        
+    <!-- The directory where the blocks configuration will be generated.
+    @type string
+    -->
+    <property name="blocks.config.dir" location="${build.output.dir}/blocks/config" />
+    <!-- The directory where the bundles will be generated.
+    @type string
+    -->
+    <property name="blocks.bundle.dir" location="${build.output.dir}/blocks/bundles" />
+    <!-- The directory where the blocks metadata will be generated.
+    @type string
+    -->
+    <property name="blocks.metadata.dir" location="${build.output.dir}/blocks/metadata" />
+    <!-- Name of the writer to use while creating bundles.
+    @type string
+    -->
+    <property name="blocks.writer" value="deb" />
+    <!-- Number of workers to use while creating the bundles.
+    @type string
+    -->
+    <property name="blocks.workers" value="4" />
+    <!-- Location of the blocks log.
+    @type string
+    -->
+    <property name="blocks.log.dir" location="${build.output.dir}/blocks/logs" />
+    <!-- File extension of the blocks log.
+    @type string
+    -->
+    <property name="blocks.log.extension" value="blocks.log" />
+    <!-- Boolean attribute for the packager application to support generation of packages with inter-dependency. 
+    @type boolean
+    @scope public
+    @deprecated Since 11.0
+    -->
+    <property name="blocks.interdeps.generation" value="false" />
+    
+    <!-- Boolean attribute for the packager application to support generation of packages with inter-dependency. 
+    @type boolean
+    @scope public
+    -->
+    <property name="blocks.interdeps.generation.enabled" value="false" />
+    
+    <!--* @property internal.blocks.interdeps.generation.enabled
+    Internal property set if blocks.interdeps.generation.enabled set to true. 
+    @type boolean
+    @scope private
+    @since 11.0
+    -->
+    
+    <!--* @property blocks.enabled
+    Set to true to enable blocks.
+    @type boolean
+    @editable required
+    @scope public
+    @since 11.0
+    -->
+    
+    <!--* @property internal.blocks.enabled
+    Internal property to run the targets if blocks.enabled property is set to true.
+    @type boolean
+    @scope private
+    -->
+    
+    <!-- Check, is blocks enabled -->
+    <condition property="internal.blocks.enabled">
+        <istrue value="${blocks.enabled}"/>
+    </condition>
+    
+    <hlm:metadatafilterset id="filterset.blocks.archiving">
+        <metadatafilter priority="error" regex="^ERROR:.*" description="" />
+        <metadatafilter priority="warning" regex="^WARNING:.*" description="" />
+    </hlm:metadatafilterset>
+        
+    <!--
+        This target will run the packager application using all configurations
+        generated during the build under blocks.config.dir.
+     -->
+    <target name="blocks-create-bundles" if="internal.blocks.enabled">
+        <mkdir dir="${blocks.config.dir}" />
+        <mkdir dir="${blocks.bundle.dir}" />
+        <mkdir dir="${blocks.metadata.dir}" />
+        <mkdir dir="${blocks.log.dir}" />
+        
+        <condition property="arg.blocks.target.rules" value="--targetRules=${blocks.target.rules}" else="">
+            <isset property="blocks.target.rules" />
+        </condition>
+        
+        <condition property="arg.blocks.source.rules" value="--sourceRules=${blocks.source.rules}" else="">
+            <isset property="blocks.source.rules" />
+        </condition>
+        
+        <condition property="arg.blocks.package.directives" value="--pkgDirectives=${blocks.package.directives}" else="">
+            <isset property="blocks.package.directives" />
+        </condition>
+        
+        <condition property="internal.blocks.interdeps.generation.enabled" value="true" else="false">
+            <or>
+                <istrue value="${blocks.interdeps.generation.enabled}"/>
+                <istrue value="${blocks.interdeps.generation}"/>
+            </or>
+        </condition>
+        
+        <exec executable="python" failonerror="false" output="${blocks.log.dir}/${build.id}_blocks_archiving.${blocks.log.extension}">
+            <arg value="-m"/>
+            <arg value="packager.cli"/>
+            <arg value="--epocroot=${build.drive}/" />
+            <arg value="--config=${blocks.config.dir}" />
+            <arg value="--outputdir=${blocks.bundle.dir}" />
+            <arg value="--metadatadir=${blocks.metadata.dir}" />
+            <arg value="--workers=${blocks.workers}" />
+            <arg value="--writer=${blocks.writer}" />
+            <arg line="${arg.blocks.target.rules}" />
+            <arg line="${arg.blocks.source.rules}" />
+            <arg line="${arg.blocks.package.directives}" />
+            <arg value="--createBundle" />
+            <arg value="--debug" />
+            <arg value="--interdeps=${internal.blocks.interdeps.generation.enabled}" />
+        </exec>
+        <hlm:metadatarecord database="${metadata.dbfile}">
+            <hlm:textmetadatainput>
+                <fileset casesensitive="false" file= "${blocks.log.dir}/${build.id}_blocks_archiving.${blocks.log.extension}"/>
+                <metadatafilterset refid="filterset.blocks.archiving" />
+            </hlm:textmetadatainput>
+        </hlm:metadatarecord>
+        <hlm:blocksCreateRepositoryIndex dest="${blocks.bundle.dir}" verbose="true" failonerror="false" />
+    </target>
+    
+    <!--* @property blocks.workspace.id
+     The blocks.workspace.id gets defined by the blocks-create-workspace target while reusing or
+      creating a new workspace.     
+     @scope public
+     @since 12.0.0
+     -->
+    
+    <!--
+     The blocks-create-workspace will try to reuse existing workspace mapped on "${build.drive}/", or
+     create a new one if none exists.
+     
+     If a new workspace is created then repositories from blocks.repositories.id blocksRespositorySet
+     will be added to the newly created workspace.
+     
+     @scope public
+     @since 12.0.0
+     -->
+    <target name="blocks-create-workspace" if="internal.blocks.enabled">
+        <if>
+            <hlm:blocksWorkspaceExists dir="${build.drive}/" verbose="true" />
+            <then>
+                <echo>Reusing current workspace.</echo>
+                <hlm:blocksGetWorkspaceId wsidoutput="blocks.workspace.id" dir="${build.drive}/" verbose="true" /> 
+            </then>
+            <else>
+                <echo>Creating new workspace under ${build.drive}${file.separator}.</echo>
+                <hlm:blocksAddWorkspace name="${build.family}" dir="${build.drive}/" wsidproperty="blocks.workspace.id"  verbose="true" />
+                <if>
+                    <and>
+                        <not>
+                            <hlm:blocksRepositoryExists wsid="${blocks.workspace.id}" verbose="true"/>
+                        </not>
+                        <isreference refid="blocks.repositories.id" />
+                    </and>
+                    <then>
+                        <echo>Creating new repsoitory for workspace ID ${blocks.workspace.id}.</echo>
+                        <hlm:blocksAddRepository wsid="${blocks.workspace.id}">
+                            <repositorySet refid="blocks.repositories.id" />
+                        </hlm:blocksAddRepository>
+                    </then>
+                    <else>
+                        <echo level="warning">'blocks.repositories.id' reference doesn't exist/repository already exists.</echo>
+                    </else>
+                </if>
+            </else>
+        </if>
+    </target>
+
+    <!--
+     The blocks-install-bundles will install bundles on the workspace under build.drive.
+     @scope public
+     @since 12.0.0
+     -->
+    <target name="blocks-install-bundles" if="internal.blocks.enabled" depends="blocks-create-workspace">
+        <if>
+            <isreference refid="blocks.bundle.filters.id" />
+            <then>
+                <hlm:blocksInstallBundle wsid="${blocks.workspace.id}" verbose="true">
+                    <hlm:bundleFilterSet refid="blocks.bundle.filters.id" />
+                </hlm:blocksInstallBundle>
+            </then>
+            <else>
+                <echo level="warning">Nothing to do, blocks.bundle.filters.id reference doesn't exist.</echo>
+            </else>
+        </if>
+        <if>
+            <isreference refid="blocks.group.filters.id" />
+            <then>
+                <hlm:blocksInstallBundle wsid="${blocks.workspace.id}" verbose="true">
+                    <hlm:groupFilterSet refid="blocks.group.filters.id" />
+                </hlm:blocksInstallBundle>
+            </then>
+            <else>
+                <echo level="warning">Nothing to do, blocks.group.filters.id reference doesn't exist.</echo>
+            </else>
+        </if>
+    </target>
+
+    <!--
+     The blocks-update-bundles will update the workspace under build.drive.
+     @scope public
+     @since 12.0.0
+     -->
+    <target name="blocks-update-bundles" if="internal.blocks.enabled" depends="blocks-create-workspace">
+        <hlm:blocksUpdate wsid="${blocks.workspace.id}" />
+    </target>
+
+    <!--
+     The blocks-add-repo will update the current workspace using repositories defined by the
+     blocks.repositories.id reference.
+     
+     @scope public
+     @since 12.0.0
+     -->
+    <target name="blocks-add-repo" if="internal.blocks.enabled" depends="blocks-create-workspace">
+        <if>
+            <and>
+                <not>
+                    <hlm:blocksRepositoryExists wsid="${blocks.workspace.id}" verbose="true"/>
+                </not>
+                <isreference refid="blocks.repositories.id" />
+            </and>
+            <then>
+                <hlm:blocksAddRepository wsid="${blocks.workspace.id}">
+                    <repositorySet refid="blocks.repositories.id" />
+                </hlm:blocksAddRepository>
+            </then>
+            <else>
+                <echo level="warning">'blocks.repositories.id' reference doesn't exist/repository already exists.</echo>
+            </else>
+        </if>
+    </target>
+</project>
--- a/buildframework/helium/tools/common/common.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/common.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -153,7 +153,7 @@
                         <isset property="email.from"/>
                     </not>
                     <then>
-                        <hlm:ldap url="${email.ldap.server}" rootdn="${email.ldap.rootdn}" filter="uid=${env.USERNAME}" outputproperty="email.from" key="mail"/>
+                        <hlm:ldap url="${email.ldap.server}" rootdn="${email.ldap.rootdn}" filter="uid=${env.USERNAME}" outputproperty="email.from" key="mail" failonerror="false"/>
                     </then>
                 </if>
             </then>   
@@ -328,12 +328,24 @@
         <echo message="Helium version: ${helium.version}" />
     </target>
         
-        
-    <!-- Checks the Ant configuration against a Helium data model. -->
+    <!-- Checks the Ant configuration against a Helium data model.
+    @deprecated Implementation of the feature has changed, and the target is not needed anymore. Instead use antlint target
+    -->
     <target name="check">
-        <hlm:antconfiglint>
-            <WrongTypePropertyCheck/>
-        </hlm:antconfiglint>
+        <hlm:antlint>
+            <fileset id="antlint.files" dir="${helium.dir}/tools">
+                <include name="**/*.ant.xml"/>
+                <include name="**/build.xml"/>
+                <include name="**/*.antlib.xml"/>
+                <exclude name="tests/**"/>
+                <exclude name="**/test/test_*.xml"/>
+                <exclude name="external/**"/>
+                <exclude name="**/tests/data/**"/>
+                <exclude name="build/**"/>
+            </fileset>
+            <hlm:checkPropertyTypeAndValueMismatch severity="error" />
+            <hlm:antlintConsoleReporter />            
+        </hlm:antlint>
     </target>
     
     
@@ -352,6 +364,11 @@
         <delete dir="${helium.build.dir}/beanshell"/>
         <delete file="${helium.build.dir}/test_jython.xml"/>
         <mkdir dir="${helium.build.dir}/report/antlint" />
+        
+        <pathconvert pathsep="${path.separator}" property="python.tools.path">
+            <fileset dir="${helium.dir}/nokia_builder" includes="tools/pylint/**/*.egg" />
+            <dirset dir="${helium.dir}/nokia_builder" includes="tools/pylint/**/*.egg" />
+        </pathconvert>
         <hlm:antlint>
             <fileset id="antlint.files" dir="${helium.dir}/tools">
                 <include name="**/*.ant.xml"/>
@@ -375,32 +392,34 @@
             <hlm:checkAntCall severity="warning" />
             <hlm:checkScriptSize severity="warning" />
             <hlm:checkUseOfIfInTargets severity="warning" />
-            <hlm:checkJythonScript severity="error" outputDir="${helium.build.dir}/jep"/>
-            <hlm:checkScriptCondition severity="warning" outputDir="${helium.build.dir}/scriptcondition"/>
-            <hlm:checkPythonTasks severity="warning" outputDir="${helium.build.dir}/python"/>
+            <hlm:checkJythonScript severity="error"/>
+            <hlm:checkScriptCondition severity="warning" />
             <hlm:checkUseOfEqualsTask severity="warning" />
-            <hlm:checkScriptDefNameAttributes severity="error" />
+            <hlm:checkScriptDefAttributes severity="error" />
             <hlm:checkScriptDefStyle severity="warning" />
-            <hlm:checkScriptDef severity="error" outputDir="${helium.build.dir}/beanshell"/>
+            <hlm:checkScriptDefName severity="warning" regexp="([a-z0-9][a-zA-Z0-9]*)"/>
             <hlm:checkDuplicateNames severity="warning" />
             <hlm:checkTryCatchBlock severity="warning" />
+            <hlm:checkPropertyTypeAndValueMismatch severity="error" />
+            <hlm:checkVariableTask severity="error" />
             
+            <!-- external command executors -->
+            <hlm:checkstyleExecutor outputDir="${helium.build.dir}/beanshell" config="builder/java/config/java_checkstyle_config.xml">
+                <formatter type="plain"/>
+            </hlm:checkstyleExecutor>
+            <hlm:pylintExecutor outputDir="${helium.build.dir}/python">
+                <env key="PYTHONPATH" value="${python.tools.path}"/>
+                <arg file="${helium.dir}/nokia_builder/tools/pylint/bin/pylint-script.py"/>
+                <arg value="--output-format=parseable"/>
+                <arg line="--rcfile=${helium.dir}/nokia_builder/config/pylintrc.txt"/>
+            </hlm:pylintExecutor>
+
             <!-- Reporters -->
             <hlm:antlintCheckstyleReporter file="${helium.build.dir}/report/antlint/antlint_report.xml" />
             <hlm:antlintConsoleReporter />            
+            
         </hlm:antlint>
-        <fileset id="jep.files" dir="${helium.build.dir}">
-            <include name="jep/**/*.py"/>
-            <include name="python/**/*.py"/>
-        </fileset>
-        <!--<antcall target="pylint" inheritRefs="true">
-            <reference refid="jep.files" torefid="python.files" />
-        </antcall>-->
-        <cs:checkstyle config="builder/java/config/java_checkstyle_config.xml">
-            <fileset dir="${helium.build.dir}/beanshell" includes="**/*.java"/>
-            <formatter type="plain"/>
-        </cs:checkstyle>
-        
+
         <for param="file">
             <path>
                 <fileset dir="${helium.dir}">
@@ -422,7 +441,7 @@
             </sequential>
         </for>
     </target>
-    
+   
     
     <!-- This target can be use to clean up after a build finished or failed.
     
--- a/buildframework/helium/tools/common/common.antlib.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/common.antlib.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -325,13 +325,13 @@
 collectTargetDependencies(target, 1)
 targetList.append((target, 0))
     
-format = str(attributes.get('format'))
+formatstr = str(attributes.get('format'))
 
-if format == 'nested':    
+if formatstr == 'nested':    
     for target, indent in targetList:        
         indentString = ''.join(['   ' for x in range(indent)])
         print indentString + str(target)
-elif format == 'executable':
+elif formatstr == 'executable':
     print "Top level targets:\n"
     print ''.join([str(target) + ' ' for target, indent in targetList[:-1] if indent == 1])
     print "\n\nAll targets in sequence:\n"
@@ -378,18 +378,17 @@
 import netrc
 import os
 result = "0"
-try:
-    netrc_file = netrc.netrc()
-    self.log("Type: %s" % str(attributes.get("type")))
-    netrc_info = netrc_file.authenticators(str(attributes.get("type")))
-    if netrc_info == None:
-        raise Exception("No entry found for Type: %s" % str(attributes.get("type")))
+
+netrc_file = netrc.netrc()
+self.log("Type: %s" % str(attributes.get("type")))
+netrc_info = netrc_file.authenticators(str(attributes.get("type")))
+if netrc_info == None:
+    print "No entry found for Type: %s" % str(attributes.get("type"))
+    result = '-1'
+else:
     (n_username, n_account, n_password) = netrc_info
     if attributes.get('output-prop') != None:
         project.setProperty(str(attributes.get('output-prop')), str(n_password))
-except Exception, e:
-    result = "-1"
-    print "Warning: %s" % e
 if attributes.get('result-prop') != None:
     project.setProperty(str(attributes.get('result-prop')), str(result))
         ]]>
@@ -405,18 +404,17 @@
 import netrc
 import os
 result = "0"
-try:
-    netrc_file = netrc.netrc()
-    self.log("Type: %s" % str(attributes.get("type")))
-    netrc_info = netrc_file.authenticators(str(attributes.get("type")))
-    if netrc_info == None:
-        raise Exception("No entry found for Type: %s" % str(attributes.get("type")))
+
+netrc_file = netrc.netrc()
+self.log("Type: %s" % str(attributes.get("type")))
+netrc_info = netrc_file.authenticators(str(attributes.get("type")))
+if netrc_info == None:
+    print "No entry found for Type: %s" % str(attributes.get("type"))
+    result = '-1'
+else:
     (n_username, n_account, n_password) = netrc_info
     if attributes.get('output-prop') != None:
         project.setProperty(str(attributes.get('output-prop')), str(n_username))
-except Exception, e:
-    result = "-1"
-    print "Warning: %s" % e
 if attributes.get('result-prop') != None:
     project.setProperty(str(attributes.get('result-prop')), str(result))
         ]]>
@@ -438,37 +436,22 @@
 cache = None
 if project.getProperty("ccm.cache.xml")is not None:
     cache = str(project.getProperty("ccm.cache.xml"))
-try:
-    database = project.getProperty('ccm.database')
-    
-    if project.getProperty('ccm.user.login') == None :
-        raise Exception("'ccm.user.login' property is not defined")
-        
-    username = project.getProperty('ccm.user.login')
-    
-    if project.getProperty('ccm.user.password') == None :
-        raise Exception("'ccm.user.password' property is not defined")
-        
-    password = project.getProperty('ccm.user.password')
-    
-    
-    engine = project.getProperty('ccm.engine.host')
-    dbpath = project.getProperty('ccm.database.path')
-    provider = ccm.extra.CachedSessionProvider(opener=nokia.nokiaccm.open_session, cache=cache)
-    if database != None:
-        session = provider.get(username, password, database=database, reuse=False)
-    else:
-        session = provider.get(username, password, engine, dbpath, reuse=False)
-    session.close()
-    provider.close()
-except Exception, e:
-    print "ERROR: %s" % e
-    if str(e).find("access denied") != -1:
-        result = "-2"
-    else:
-        result = "-1"
-self.log("Result: %s" % attributes.get('resultproperty'))
-project.setProperty(str(attributes.get('resultproperty')), str(result))
+database = project.getProperty('ccm.database')
+if project.getProperty('ccm.user.login') == None :
+    raise Exception("'ccm.user.login' property is not defined")
+username = project.getProperty('ccm.user.login')
+if project.getProperty('ccm.user.password') == None :
+    raise Exception("'ccm.user.password' property is not defined")
+password = project.getProperty('ccm.user.password')
+engine = project.getProperty('ccm.engine.host')
+dbpath = project.getProperty('ccm.database.path')
+provider = ccm.extra.CachedSessionProvider(opener=nokia.nokiaccm.open_session, cache=cache)
+if database != None:
+    session = provider.get(username, password, database=database, reuse=False)
+else:
+    session = provider.get(username, password, engine, dbpath, reuse=False)
+session.close()
+provider.close()
         ]]>
     </scriptdef>
 
@@ -504,13 +487,13 @@
             <!-- signal for errors -->
             <var name="internal.signal.macro.log.basename" value="" unset="true"/> 
             <basename property="internal.signal.macro.log.basename" file="@{logfile}" />
-            <hlm:signal name="@{signal.input}" result="${signal.errors.total}"
-                message="Found ${signal.errors.total} errors under @{logfile}.">
+            <hlm:signal result="${signal.errors.total}" message="Found ${signal.errors.total} errors under @{logfile}."> 
                 <signalNotifierInput>
                     <signalInput refid="@{signal.input}" />
                     <notifierInput>
-                        <fileset casesensitive="false" dir="${build.signal.status.dir}"
-                            includes="${internal.signal.macro.log.basename}.status.html" />
+                        <fileset casesensitive="false" dir="${build.log.dir}">
+                            <include name="**/${internal.signal.macro.log.basename}*" />
+                        </fileset>
                     </notifierInput>
                 </signalNotifierInput>
             </hlm:signal>
@@ -536,7 +519,7 @@
         <attribute name="failonerror"/>
         <![CDATA[
 import logging
-
+import junit.framework
 import java.io
 import org.custommonkey.xmlunit
 
@@ -562,7 +545,7 @@
     test_reader = java.io.InputStreamReader(test_resource.getInputStream())
     org.custommonkey.xmlunit.XMLAssert.assertXMLEqual(control_reader, test_reader)
     print 'XML is similar'
-except Exception, e:
+except junit.framework.AssertionFailedError, e:
     print 'XML is NOT similar!'
     failonerror = str(attributes.get('failonerror'))
     if failonerror == 'true' or failonerror == 'None':
@@ -575,7 +558,7 @@
     <scriptdef name="unsubst" language="jython" uri="http://www.nokia.com/helium">
         <attribute name="drive"/>
         <attribute name="failonerror"/>
-""" internal.codescanner.drive """
+#internal.codescanner.drive
 import os
 if os.sep == '\\':
     import fileutils
@@ -596,7 +579,7 @@
         try:
             self.log(str("Unsubsting %s..." % drive))
             fileutils.unsubst(drive)
-        except Exception, e:
+        except OSError, e:
             if failonerror:
                 raise e
             else:
@@ -609,8 +592,8 @@
         <element name="path" type="path"/>
         <![CDATA[
 import fileutils
-for id in range(elements.get("path").size()):
-    iterator = elements.get("path").get(int(id)).iterator()
+for aid in range(elements.get("path").size()):
+    iterator = elements.get("path").get(int(aid)).iterator()
     while iterator.hasNext():
         path = str(iterator.next())
         fileutils.touch(path)
@@ -729,6 +712,7 @@
                     <include name="config/signaling_config_default.ant.xml"/>
                     <include name="config/stages_config_default.ant.xml"/>
                     <include name="config/metadata_filter_config_default.ant.xml"/>
+                    <include name="tools/common/default_config.ant.xml"/>
                     <include name="tools/**/*.antlib.xml"/>
                 </fileset>
             </hlm:database>
--- a/buildframework/helium/tools/common/default_config.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/default_config.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -36,7 +36,7 @@
     @scope private
     -->
     <property name="logging.output.file" location="${cache.dir}/logging.${env.PID}.conf" />
-    <fmpp sourceFile="${helium.dir}/config/logging.conf.ftl" outputFile="${logging.output.file}" quiet="true">
+    <fmpp sourceFile="${helium.dir}/tools/logging/templates/logging.conf.ftl" outputFile="${logging.output.file}" quiet="true">
         <data expandProperties="yes">
             ant: antProperties()
         </data>
@@ -71,24 +71,26 @@
         </and>
         <then>
             <!-- used to track if build.drive has predefined or not
-            @type flag
+            @type boolean
             @scope private
             -->
-            <property name="build.drive.notdefined" value="true"/> 
-            <exec osfamily="windows" executable="python" failonerror="true" outputproperty="build.drive">
-                <arg line="-m searchnextdrive"/>               
-            </exec>
-            <if>
-                <equals arg1="${build.drive}" arg2="Error: No free drive!"/>
-                <then>            
-                    <fail message="ERROR: Failed to assign build drive, please check you are not running out of drives." />    
-                </then>
-            </if>
-            <mkdir dir="${env.TEMP}/helium/temp_drive"/>
-            <exec osfamily="windows" executable="subst" failonerror="false">
-                <arg value="${build.drive}" />
-                <arg value="${env.TEMP}/helium/temp_drive" />
-            </exec>
+            <property name="build.drive.notdefined" value="true"/>
+            <hlm:resourceaccess lockName="subst-drive">
+                <exec osfamily="windows" executable="python" failonerror="true" outputproperty="build.drive">
+                    <arg line="-m searchnextdrive"/>
+                </exec>
+                <if>
+                    <equals arg1="${build.drive}" arg2="Error: No free drive!"/>
+                    <then>            
+                        <fail message="ERROR: Failed to assign build drive, please check you are not running out of drives." />    
+                    </then>
+                </if>
+                <mkdir dir="${env.TEMP}/helium/temp_drive"/>
+                <exec osfamily="windows" executable="subst" failonerror="false">
+                    <arg value="${build.drive}" />
+                    <arg value="${env.TEMP}/helium/temp_drive" />
+                </exec>
+            </hlm:resourceaccess>
             <script language="jython" setbeans="false">
                 <![CDATA[
 import os
@@ -356,7 +358,7 @@
     -->
     <property name="failonerror" value="false"/>
     <!-- Maximum allowable errors in a build.
-    @type number
+    @type integer
     -->
     <property name="build.errors.limit" value="0"/>
     <!-- Unsubsted drive after build finished. If not defined then helium should left the drive as subst. Set the value as "yes" if you want to unsubst after build finished.
--- a/buildframework/helium/tools/common/docs.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/docs.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -91,6 +91,7 @@
     @scope private    
     -->    
     <target name="docs-database">
+        <mkdir dir="${basedir}/build"/>
         <hlm:database output="${public.database.file}" scope="public" filesetonly="true">
             <fileset dir=".">
                 <include name="**/*.ant.xml"/>
@@ -117,10 +118,10 @@
             <fileset dir="${doc.temp.dir}/api/helium" includes="*.dot"/>
             <sequential>
                 <echo>Processing dot file: @{dot.file}</echo>
-                <exec executable="dot" dir="${doc.temp.dir}/api/helium">
+                <exec executable="dot" dir="${doc.temp.dir}/api/helium" failonerror="true">
                     <arg line="-Tcmap @{dot.file} -O"/>
                 </exec>
-                <exec executable="dot" dir="${doc.build.dir}/api">
+                <exec executable="dot" dir="${doc.build.dir}/api" failonerror="true">
                     <arg line="-Tpng @{dot.file} -O"/>
                 </exec>
             </sequential>
@@ -168,8 +169,11 @@
 
     
     <!-- Generate API documentation from the source code. -->
-    <target name="apidocs" depends="helium-apidocs"/>
-    
+    <target name="apidocs" depends="helium-apidocs" unless="env.HLM_SUBCON">
+        <exec executable="cmd" osfamily="windows" dir="${helium.dir}/nokia_builder" failonerror="true">
+            <arg line="/C bld doc" />
+        </exec>
+    </target>
     
     <!-- Macro to generate HTML docs from rst. -->
     <macrodef name="rstPrepMacro" uri="http://www.nokia.com/helium">
@@ -232,6 +236,11 @@
                     <patch reverse="true" patchfile="${nokia.python.tools}/sphinxfixsearch.diff" originalfile="${sphinx.lib.dir}/search.py"/>
                 </then>
             </if>
+            <copy todir="@{output}" overwrite="true">
+                <fileset dir="@{src}">
+                    <include name="**/*.zip"/>
+                </fileset>
+            </copy>
         </sequential>
     </macrodef>
     
@@ -261,7 +270,7 @@
             try:
                 rstfile = codecs.open(rstfilename, 'r', 'utf8')
                 rstfile.read()
-            except:
+            except UnicodeError:
                 print rstfilename + ' has invalid unicode'
                 rstfile.close()
                 os.remove(rstfilename)
@@ -313,7 +322,6 @@
             <!-- default doc content is always processed first -->
             <path>
                 <pathelement path="${helium.dir}/doc/default"/>
-                <pathelement path="${helium.dir}/doc/src/manual"/>
             </path>
             <resources refid="textdoc.paths"/>
         </resources>
@@ -331,7 +339,7 @@
             </fileset>
             <sequential>
                 <echo>Building dot file: @{dot.file}</echo>
-                <exec executable="dot">
+                <exec executable="dot" failonerror="true">
                     <arg line="-Tpng @{dot.file} -O"/>
                 </exec>
             </sequential>
@@ -375,6 +383,40 @@
     
     
     <!-- generate all the user documentation for helium -->
-    <target name="docs" depends="clean-docs,apidocs,textdocs"/>
+    <target name="docs" depends="clean-docs,apidocs,textdocs,docs-check-links"/>
 
+    <!-- Check links in docs -->
+    <target name="docs-check-links">
+        <hlm:python failonerror="true">
+<![CDATA[
+import os
+error = ''
+for root, dirs, files in os.walk(r'${doc.build.dir}', topdown=False):
+    for fname in files:
+        if '.htm' in fname:
+            filename = os.path.abspath(os.path.join(root, fname))
+            f = open(filename)
+            for line in f:
+                if ' src="' in line:
+                    line1 = line.split('src="')[1]
+                    line1 = line1.split('"')[0]
+                    os.chdir(root)
+                    if line1 and not os.path.exists(line1) and not ':' in line1 and not '$' in line1:
+                        error = error + filename + ' has a broken link ' + line1 + '\n'
+                if ' href="' in line:
+                    line = line.split('href="')[1]
+                    line = line.split('"')[0]
+                    if '#' in line:
+                        line = line.split('#')[0]
+                    if '?' in line:
+                        line = line.split('?')[0]
+                    os.chdir(root)
+                    if line and not os.path.exists(line) and not ':' in line and not '&' in line:
+                        error = error + filename + ' has a broken link ' + line + '\n'
+            f.close()
+if error != '':
+    raise Exception(error)
+]]>
+        </hlm:python>
+    </target>
 </project>
--- a/buildframework/helium/tools/common/helium_docs.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/helium_docs.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -51,7 +51,7 @@
     
     <target name="helium-prep-textdocs">
         <mkdir dir="${doc.temp.dir}/minibuilds"/>
-        <copy todir="${doc.temp.dir}/development/minibuilds" failonerror="false">
+        <copy todir="${doc.temp.dir}/development/minibuilds">
             <fileset dir="${helium.dir}/tests/minibuilds/">
                 <include name="*/doc/**/*"/>
             </fileset>
@@ -69,6 +69,13 @@
                         <include name="**/*.png"/>
                     </fileset>
                 </copy>
+                <hlm:rstPrepMacro destdir="${doc.temp.dir}/helium-antlib">
+                    <resources>
+                        <path>
+                            <pathelement path="@{dir}"/>
+                        </path>
+                    </resources>
+                </hlm:rstPrepMacro>
             </sequential>
         </for>
         <for param="dir">
@@ -105,7 +112,7 @@
         @scope private
         -->
         <property name="last.major.release.database.url" value="${documentation.url.root}/${last.major.helium.version}/database.xml"/>
-        <hlm:python>
+        <hlm:python failonerror="true">
 import urllib
 import helium.documentation
 
@@ -385,7 +392,7 @@
         
         <antcall target="dependency-grouping"/>
         
-        <exec executable="dot">
+        <exec executable="dot" failonerror="true">
             <arg line="-Tpng -Grankdir=LR -Nshape=box -Nfontsize=9 -Nwidth=0.3 -Nheight=0.2 ${dependency.grph} -O"/>
         </exec>
         
@@ -413,7 +420,7 @@
         @scope private
         -->
         <property name="ivy.xml.file" value="${helium.dir}/config/ivy/ivy.xml"/>
-        <hlm:python>
+        <hlm:python failonerror="true">
 import os
 import dependancygraph
 
@@ -485,7 +492,7 @@
 dependancygraph.findLogFiles(r'${database.file}.parsed', r'${dependency.external.grph}')
         </hlm:python>
         <!---->
-        <exec executable="dot">
+        <exec executable="dot" failonerror="true">
             <arg line="-Tpng -Grankdir=LR -Nshape=box -Nfontsize=9 -Nwidth=0.3 -Nheight=0.2 ${dependency.external.grph} -O"/>
         </exec>
     </target>
@@ -503,10 +510,10 @@
             <fileset dir="${doc.temp.dir}" includes="user_graph.dot"/>
             <sequential>
                 <echo>Processing dot file: @{dot.file}</echo>
-                <exec executable="dot" dir="${doc.temp.dir}/">
+                <exec executable="dot" dir="${doc.temp.dir}/" failonerror="true">
                     <arg line="-Tcmap @{dot.file} -O"/>
                 </exec>
-                <exec executable="dot" dir="${doc.build.dir}/api">
+                <exec executable="dot" dir="${doc.build.dir}/api" failonerror="true">
                     <arg line="-Tpng @{dot.file} -O"/>
                 </exec>
             </sequential>
--- a/buildframework/helium/tools/common/libs.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/libs.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -60,6 +60,7 @@
     <taskdef resource="com/nokia/helium/ccmtask/ant/antlib.xml" uri="http://www.nokia.com/helium" />
     <taskdef resource="com/nokia/helium/sysdef/ant/antlib.xml" uri="http://www.nokia.com/helium" />
     <taskdef resource="com/nokia/helium/internaldata/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
+    <taskdef resource="com/nokia/helium/diamonds/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
 
     <!-- Nokia internal types. -->
     <typedef resource="com/nokia/helium/ant/coverage/antlib.xml" uri="http://www.nokia.com/helium"/>
--- a/buildframework/helium/tools/common/templates/codescanner/codescanner.ant.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-<#--
-============================================================================ 
-Name        : codescanner.ant.xml.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-<?xml version="1.0"?>
-<project name="codescanner_fmpp" default="all">
-<#assign dollar="$"/>
-    <target name="all">
-<#assign scanid=1/>
-<#assign config=""/>
-        <#list data['inputs'] as input>
-            <exec executable="${data['executable']}">
-                <arg line="-c ${data['config']}"/>
-                <arg line="-o${data['output_fmt']}"/>
-                <arg line="${input}"/>
-                <arg line="${data['output_dir']}\${data['outputs'][scanid - 1]}"/>
-            </exec>
-            <#assign scanid=scanid+1/>
-        </#list>
-    </target>
-</project>
\ No newline at end of file
--- a/buildframework/helium/tools/common/templates/codescanner/codescanner.mk.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-<#--
-============================================================================ 
-Name        : codescanner.mk.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-###################################################################
-# Template for CodeScanner.
-###################################################################
-<#assign all_target="codescanner: "/>
-<#assign scanid=1/>
-<#list data['inputs'] as input>
-codescan${scanid}:
-	${data['executable']} -c ${data['config']} -o${data['output_fmt']} ${input} ${data['output_dir']}\${data['outputs'][scanid - 1]}
-
-<#assign all_target ="${all_target}\\\n\tcodescan${scanid} "/>
-<#assign scanid=scanid + 1/>
-</#list>
-
-
-${all_target}
--- a/buildframework/helium/tools/common/templates/coverity/coverity.summary.html.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-<#--
-============================================================================ 
-Name        : coverity.summary.html.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-  <head>
-  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-    <title>
-      Coverity tool summary information.
-    </title>
-    <style type="text/css">
-        body{font-family:Verdana; font-size:8pt; line-height:1.1em; padding: 10px 10px; background-color:#F8F8F2;}
-        h1{
-          font-size:14pt;
-          color:#000;
-          padding: 20px 15px;
-          margin:0;
-         }
-        h2 {
-          font-size:10pt;
-          margin: 1em 0;
-        }
-        h5{
-          font-size:10pt;
-          text-align:center;
-          background-color:#4682B4;
-          color:"black";
-          heigth:20pt;
-          padding: 5px 15px;
-          
-         }
-        .data{color:#00F;font-family:Verdana; font-size:10pt;color:"black";}
-        span.items{text-indent:-1em; padding-left: 1em; display:block; word-wrap:normal;}
-
-        span.bold{font-weight:bold; display:block; padding: 1em 0;}
-        p.maintext{padding-top: 1em;}
-        p.logfolder{color:#000;font-weight:bold; padding-top: 1em;}
-        p.distrib{font-weight:bold;}
- 
- 
-        a:link,a:visited{color:#00E;}
-        
-    </style>
-  </head>
-  <body>
-        <div id="coveritysummary">
-            <h5>Coverity Summary</h5>
-                <#assign htmlString = covsummary?replace("["," ")>
-                <#assign htmlString = htmlString?replace("]"," ")>
-                <#list htmlString?split(",") as line>
-                    <#if line?starts_with("   ")>
-                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${line}<br />
-                    <#elseif !line?contains("cov-analyze")>
-                        ${line}<br />
-                    </#if>
-                </#list>
-        </div>
-        </br>
-    </body>
-</html>
--- a/buildframework/helium/tools/common/templates/coverity/coverity.summary.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-<#--
-============================================================================ 
-Name        : coverity.summary.xml.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-<?xml version="1.0" encoding="utf-8"?>
-<coverity>
-    <#assign htmlString = covsummary?replace("["," ")>
-    <#assign htmlString = htmlString?replace("]"," ")>
-    <#list htmlString?split(",") as line>
-        <#if !line?contains("cov-analyze") && !line?starts_with("---") && !line?contains("summary") && !line?contains("defects") >
-            <#assign words = line?split(":")>
-            <#if words[1]??>
-                <#assign firstword=words[0]?trim secondword=words[1]?trim>
-<summary message="${firstword}" value="${secondword}"/> 
-            </#if>
-        </#if>
-    </#list>
-</coverity>
-        
--- a/buildframework/helium/tools/common/templates/db2xml.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<#--
-============================================================================ 
-Name        : bmd.macros.xml.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
--->
-<#assign table_info = pp.loadData('com.nokia.helium.metadata.SQLFMPPLoader', "${dbPath}") >
-<?xml version="1.0" encoding="utf-8"?>
-<log filename="${log}">
-<build>
-
-<#list table_info['select * from metadata INNER JOIN logfiles ON logfiles.id=metadata.logfile_id INNER JOIN severity ON severity.id=metadata.severity_id where severity=\'ERROR\' and path like \'${r\'%\'}${log}\''] as recordentry >
-<message severity="error"><![CDATA[${recordentry['data']}]]></message>
-</#list>
-
-</build>
-</log>
\ No newline at end of file
--- a/buildframework/helium/tools/common/templates/diamonds/apimetrics.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/apimetrics.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -29,10 +29,10 @@
     <illegal-apis>
     <#list doc.api_dataset.api as illegal>
         <#if illegal.release.@category == 'private'>
-            <api>${illegal.buildfiles.file.path}</api>
+            <api>${illegal.buildfiles.file.path?xml}</api>
         </#if>
         <#if illegal.release.@category == 'internal'>
-            <api>${illegal.buildfiles.file.path}</api>
+            <api>${illegal.buildfiles.file.path?xml}</api>
         </#if>
     </#list>
     </illegal-apis>
--- a/buildframework/helium/tools/common/templates/diamonds/build_roms_diamonds.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/build_roms_diamonds.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -19,7 +19,6 @@
 
 ============================================================================
 -->
-
 <#include "diamonds_header.ftl">
 
 <#assign db = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', "${dbPath}") >
@@ -27,30 +26,27 @@
     <images>
         <#assign overallStatus = "ok">
         
-        <#list db['native:java.lang.String']['select DISTINCT component.component from component where component.component like \'%.fpsx\''] as component>
+        <#list db['jpa']['select c from Component c where c.component like \'%.fpsx\''] as component>
         <image>
             <#assign status = "ok">
-            <#list db['jpa']['select m from MetadataEntry m JOIN m.logFile as l JOIN m.severity as p JOIN m.component as c where p.severity=\'ERROR\' and c.component=\'${component}\''] as m>
-            <#assign match = m.text?matches(".*?fpsx' - DOESN'T EXIST")>
-            <#if match>
+            <#assign missing =  db['jpasingle']['select Count(m.id) from Component c JOIN c.metadataEntries as m JOIN m.severity as p where c.id=\'${component.id}\' and p.severity=\'ERROR\' and m.text like \'%.fpsx\'\' - DOESN\'\'T EXIST\''][0]>
+            <#if (missing > 0)>
             <#assign status = "failed">
             <#assign overallStatus = "failed">
             </#if>
-            </#list>
-            <status>${status}</status>
-            
-            <name>${component}</name>
+            <status>${status?xml}</status>
+            <name>${component.component?xml}</name>
             <hardware>N/A</hardware>
-            <#assign type = component?matches("([^.]+)\\.fpsx")[0]>
-            <type>${type?groups[1]}</type>
-            <errors count="${db['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.severity as p JOIN m.component as c where p.severity=\'ERROR\' and c.component=\'${component}\''][0]}">
-                <#list db['jpa']['select m from MetadataEntry m JOIN m.logFile as l JOIN m.severity as p JOIN m.component as c where p.severity=\'ERROR\' and c.component=\'${component}\''] as m>
-                <error>${m.text}</error>
+            <#assign type = component.component?matches("([^.]+)\\.fpsx")[0]>
+            <type>${type?groups[1]?xml}</type>
+            <errors count="${db['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.severity as p JOIN m.component as c where p.severity=\'ERROR\' and c.id=\'${component.id}\''][0]}">
+                <#list db['jpa']['select m from MetadataEntry m JOIN m.severity as p JOIN m.component as c where p.severity=\'ERROR\' and c.id=\'${component.id}\''] as m>
+                <error>${m.text?xml}</error>
                 </#list>
             </errors>
-            <warnings count="${db['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.severity as p JOIN m.component as c where p.severity=\'WARNING\' and c.component=\'${component}\''][0]}">
-                <#list db['jpa']['select m from MetadataEntry m JOIN m.logFile as l JOIN m.severity as p JOIN m.component as c where p.severity=\'WARNING\' and c.component=\'${component}\''] as m>
-                <warning>${m.text}</warning>
+            <warnings count="${db['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.severity as p JOIN m.component as c where p.severity=\'WARNING\' and c.id=\'${component.id}\''][0]}">
+                <#list db['jpa']['select m from MetadataEntry m JOIN m.severity as p JOIN m.component as c where p.severity=\'WARNING\' and c.id=\'${component.id}\''] as m>
+                <warning>${m.text?xml}</warning>
                 </#list>
             </warnings>
         </image>
--- a/buildframework/helium/tools/common/templates/diamonds/compile.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/compile.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -28,21 +28,21 @@
     <faults>
         <#list doc.compile.components.component as component>
         <component>
-            <name>${component.@name}</name>
-            <total severity="error">${component.@error}</total>
-            <total severity="warning">${component.@warning}</total>
+            <name>${component.@name?xml}</name>
+            <total severity="error">${component.@error?xml}</total>
+            <total severity="warning">${component.@warning?xml}</total>
         </component>
         </#list>
         <!-- print summary of the errors -->
-        <total severity="error">${doc.compile.total.@error}</total>      
-        <total severity="warning">${doc.compile.total.@warning}</total>
+        <total severity="error">${doc.compile.total.@error?xml}</total>      
+        <total severity="warning">${doc.compile.total.@warning?xml}</total>
         <total severity="warning_rvct_other">0</total>
         <!-- todo update to calculate the correct value -->
-        <total severity="warning_rvct_bad">${doc.compile.total.@critical}</total>
+        <total severity="warning_rvct_bad">${doc.compile.total.@critical?xml}</total>
     </faults>
     <components>
         <#list doc.compile.components.component as component>
-        <component>${component.@name}</component>
+        <component>${component.@name?xml}</component>
         </#list>
     </components>
 </#if>
--- a/buildframework/helium/tools/common/templates/diamonds/diamonds_build.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/diamonds_build.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -1,6 +1,6 @@
 <#--
 ============================================================================ 
-Name        : build.xml.ftl 
+Name        : diamonds_build.xml.ftl 
 Part of     : Helium 
 
 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -20,20 +20,20 @@
 ============================================================================
 -->
 <build>
-    <category>${ant["build.family"]}</category>
-    <name>${ant["build.id"]}</name>
+    <category>${ant["build.family"]?xml}</category>
+    <name>${ant["build.id"]?xml}</name>
     <#if ant?keys?seq_contains("ecc.project")>
-    <project>${ant["ecc.project"]}</project>
-    <schedule>${ant["ecc.schedule"]}</schedule>
-    <timebox>${ant["ecc.ido.branch"]}</timebox>
-    <procedure>${ant["ecc.procedure"]}</procedure>
-    <includeinstats>${ant["ecc.include.in.stats"]}</includeinstats>
+    <project>${ant["ecc.project"]?xml}</project>
+    <schedule>${ant["ecc.schedule"]?xml}</schedule>
+    <timebox>${ant["ecc.ido.branch"]?xml}</timebox>
+    <procedure>${ant["ecc.procedure"]?xml}</procedure>
+    <includeinstats>${ant["ecc.include.in.stats"]?xml}</includeinstats>
     </#if>
-    <#if ant?keys?seq_contains("build.start.time")><started>${ant["build.start.time"]}</started></#if>
+    <#if ant?keys?seq_contains("build.start.time")><started>${ant["build.start.time"]?xml}</started></#if>
     <#if ant?keys?seq_contains("build.end.time")><finished></finished></#if>
-        <creator>${ant["env.USERNAME"]}</creator>
-        <hostname>${ant["env.COMPUTERNAME"]}</hostname>
-        <product>${ant["build.name"]}</product>
-        <build_system>${ant["build.system"]}</build_system>
-    <#if ant?keys?seq_contains("env.NUMBER_OF_PROCESSORS")><processor_count>${ant["env.NUMBER_OF_PROCESSORS"]}</processor_count></#if>
+        <creator>${ant["env.USERNAME"]?xml}</creator>
+        <hostname>${ant["env.COMPUTERNAME"]?xml}</hostname>
+        <product>${ant["build.name"]?xml}</product>
+        <build_system>${ant["build.system"]?xml}</build_system>
+    <#if ant?keys?seq_contains("env.NUMBER_OF_PROCESSORS")><processor_count>${ant["env.NUMBER_OF_PROCESSORS"]?xml}</processor_count></#if>
 </build>
\ No newline at end of file
--- a/buildframework/helium/tools/common/templates/diamonds/diamonds_faults.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/diamonds_faults.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -1,6 +1,6 @@
 <#--
 ============================================================================ 
-Name        : faults.ftl 
+Name        : diamonds_faults.ftl 
 Part of     : Helium 
 
 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
--- a/buildframework/helium/tools/common/templates/diamonds/diamonds_finish.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/diamonds_finish.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -1,6 +1,6 @@
 <#--
 ============================================================================ 
-Name        : finish.xml.ftl 
+Name        : diamonds_finish.xml.ftl
 Part of     : Helium 
 
 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -21,6 +21,6 @@
 -->
 <#include "diamonds_header.ftl"> 
   <build>
-    <#if ant?keys?seq_contains("build.end.time")><finished>${ant["build.end.time"]}</finished></#if>
+    <#if ant?keys?seq_contains("build.end.time")><finished>${ant["build.end.time"]?xml}</finished></#if>
   </build>
 <#include "diamonds_footer.ftl"> 
\ No newline at end of file
--- a/buildframework/helium/tools/common/templates/diamonds/diamonds_footer.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/diamonds_footer.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -1,6 +1,6 @@
 <#--
 ============================================================================ 
-Name        : footer.ftl 
+Name        : diamonds_footer.ftl 
 Part of     : Helium 
 
 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
--- a/buildframework/helium/tools/common/templates/diamonds/diamonds_header.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/diamonds_header.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -1,6 +1,6 @@
 <#--
 ============================================================================ 
-Name        : header.ftl 
+Name        : diamonds_header.ftl 
 Part of     : Helium 
 
 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -22,4 +22,4 @@
 <#include "diamonds_macro.ftl">
 <?xml version="1.0" encoding="UTF-8"?>
 <diamonds-build>
-    <schema>${schema_version}</schema>
\ No newline at end of file
+    <schema>${schema_version?xml}</schema>
--- a/buildframework/helium/tools/common/templates/diamonds/diamonds_locations.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/diamonds_locations.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -1,6 +1,6 @@
 <#--
 ============================================================================ 
-Name        : locations.ftl 
+Name        : diamonds_locations.ftl 
 Part of     : Helium 
 
 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -22,7 +22,7 @@
 <locations>
     <#if ant?keys?seq_contains("release.hydra.dir")>
         <location>
-               <link>${ant["release.hydra.dir"]}</link>
+               <link>${ant["release.hydra.dir"]?xml}</link>
                <description>Hydra server</description>
         </location>
     </#if>
@@ -30,7 +30,7 @@
         <#list ant["publish.dir.list"]?split(",") as path>
             <#if !path?contains("${")>
                 <location>
-                       <link>${path}</link>
+                       <link>${path?xml}</link>
                        <description>Shared drive</description>
                 </location>
             </#if>
@@ -38,7 +38,7 @@
     </#if>
     <#if (ant?keys?seq_contains("publish.dir") && !ant["publish.dir"]?contains("${"))>
         <location>
-            <link>${ant["publish.dir"]}</link>
+            <link>${ant["publish.dir"]?xml}</link>
             <description>Shared drive</description>
         </location>
     </#if>
--- a/buildframework/helium/tools/common/templates/diamonds/diamonds_macro.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/diamonds_macro.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -1,6 +1,6 @@
 <#--
 ============================================================================ 
-Name        : macro.ftl 
+Name        : diamonds_macro.ftl 
 Part of     : Helium 
 
 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -58,9 +58,9 @@
             </#if>
             <#if componentname != currentcomponentname>
             <component>
-                <name>${componentname}</name>
-                <total severity="error">${componenterrors}</total>
-                <total severity="warning">${componentwarnings}</total>
+                <name>${componentname?xml}</name>
+                <total severity="error">${componenterrors?xml}</total>
+                <total severity="warning">${componentwarnings?xml}</total>
             </component>
                 <#assign componentname=currentcomponentname>
                 <#assign components= components + ",${componentname}">
@@ -77,20 +77,20 @@
         </#list>
         <#if componentname!= "">
             <component>
-                <name>${componentname}</name>
-                <total severity="error">${componenterrors}</total>
-                <total severity="warning">${componentwarnings}</total>
-                <total severity="critical">${componentcriticals}</total>
+                <name>${componentname?xml}</name>
+                <total severity="error">${componenterrors?xml}</total>
+                <total severity="warning">${componentwarnings?xml}</total>
+                <total severity="critical">${componentcriticals?xml}</total>
             </component>
         </#if>
             <!-- print summary of the errors -->
             <#assign totalerrors = totalerrors + componenterrors>
             <#assign totalwarnings = totalwarnings + componentwarnings>
-            <total severity="error">${totalerrors}</total>      
-            <total severity="warning">${totalwarnings}</total>
-            <total severity="warning_rvct_other">${totalwarnings}</total>
+            <total severity="error">${totalerrors?xml}</total>      
+            <total severity="warning">${totalwarnings?xml}</total>
+            <total severity="warning_rvct_other">${totalwarnings?xml}</total>
             <!-- todo update to calculate the correct value -->
-            <total severity="warning_rvct_bad">${totalcriticals}</total>
+            <total severity="warning_rvct_bad">${totalcriticals?xml}</total>
         </faults>
         <components>
         <!-- all components -->
--- a/buildframework/helium/tools/common/templates/diamonds/diamonds_signal.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/diamonds_signal.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -25,6 +25,7 @@
       <#if diamondskey?starts_with("diamond.signal.name.")>
       <#assign signalIndex = diamondskey?split(".")?last />
       <signal>
+          <id>${signalIndex}</id>
           <#if ant?keys?seq_contains("diamond.signal.name.${signalIndex}")><name>${ant["diamond.signal.name.${signalIndex}"]?xml}</name></#if>
           <#if ant?keys?seq_contains("diamond.error.message.${signalIndex}")><message>${ant["diamond.error.message.${signalIndex}"]?xml}</message></#if>
           <#if ant?keys?seq_contains("diamond.time.stamp.${signalIndex}")><timestamp>${ant["diamond.time.stamp.${signalIndex}"]?xml}</timestamp></#if>
--- a/buildframework/helium/tools/common/templates/diamonds/diamonds_stage.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/diamonds_stage.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -1,6 +1,6 @@
 <#--
 ============================================================================ 
-Name        : stage.xml.ftl 
+Name        : diamonds_stage.xml.ftl 
 Part of     : Helium 
 
 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -22,9 +22,9 @@
 <#include "diamonds_header.ftl"> 
     <stages>
       <stage>    
-            <name>${ant["logical.stage"]}</name>
-            <#if ant?keys?seq_contains("stage.start.time")><started>${ant["stage.start.time"]}</started></#if>
-            <#if ant?keys?seq_contains("stage.end.time")><finished>${ant["stage.end.time"]}</finished></#if>
+            <name>${ant["logical.stage"]?xml}</name>
+            <#if ant?keys?seq_contains("stage.start.time")><started>${ant["stage.start.time"]?xml}</started></#if>
+            <#if ant?keys?seq_contains("stage.end.time")><finished>${ant["stage.end.time"]?xml}</finished></#if>
      </stage>
     </stages>
 <#include "diamonds_footer.ftl"> 
\ No newline at end of file
--- a/buildframework/helium/tools/common/templates/diamonds/diamonds_start.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/diamonds_start.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -1,6 +1,6 @@
 <#--
 ============================================================================ 
-Name        : start.xml.ftl 
+Name        : diamonds_start.xml.ftl 
 Part of     : Helium 
 
 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
--- a/buildframework/helium/tools/common/templates/diamonds/diamonds_status.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/diamonds_status.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -1,6 +1,6 @@
 <#--
 ============================================================================ 
-Name        : finish.xml.ftl 
+Name        : diamonds_status.xml.ftl 
 Part of     : Helium 
 
 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -21,6 +21,6 @@
 -->
 <#include "diamonds_header.ftl"> 
   <build>
-    <#if ant?keys?seq_contains("build.status")><status>${ant["build.status"]}</status></#if>
+    <#if ant?keys?seq_contains("build.status")><status>${ant["build.status"]?xml}</status></#if>
   </build>
 <#include "diamonds_footer.ftl"> 
\ No newline at end of file
--- a/buildframework/helium/tools/common/templates/diamonds/faults_metadata_orm.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/faults_metadata_orm.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -38,7 +38,7 @@
         <total severity="warning_rvct_bad">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.severity as p JOIN m.logFile as l where LOWER(l.path) like \'%\\_compile.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_clean\\_%compile.log\' ESCAPE \'\\\' and p.severity=\'CRITICAL\''][0]}</total>
     <#list table_info['native:java.lang.String']['select DISTINCT component.component from component INNER JOIN logfile ON logfile.logfile_id=component.logfile_id where logfile.path like \'%_compile.log\' and logfile.path not like \'%\\_clean\\_%compile.log\''] as component>
         <component>
-            <name>${component}</name>
+            <name>${component?xml}</name>
             <total severity="error">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.severity as p JOIN m.component as c where UPPER(p.severity)=\'ERROR\' and c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_clean\\_%compile.log\' ESCAPE \'\\\''][0]}</total>
             <total severity="warning">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.severity as p JOIN m.component as c where UPPER(p.severity)=\'WARNING\' and c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_clean\\_%compile.log\' ESCAPE \'\\\''][0]}</total>
             <total severity="critical">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.severity as p JOIN m.component as c where UPPER(p.severity)=\'REMARK\' and c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_clean\\_%compile.log\' ESCAPE \'\\\''][0]}</total>
@@ -53,9 +53,9 @@
         <#if (!components?seq_contains(component.component))>
         <@pp.add seq=components value=component.component />
         <component>
-            <name>${component.component}</name>
+            <name>${component.component?xml}</name>
             <#if component.sysdefUnit??>
-            <package>${component.sysdefUnit.sysdefComponent.sysdefCollection.sysdefPackage.packageId}</package>
+            <package>${component.sysdefUnit.sysdefComponent.sysdefCollection.sysdefPackage.packageId?xml}</package>
             </#if>
         </component>
         </#if>
--- a/buildframework/helium/tools/common/templates/diamonds/publish.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/publish.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -1,6 +1,6 @@
 <#--
 ============================================================================ 
-Name        : .xml.ftl 
+Name        : publish.xml.ftl 
 Part of     : Helium 
 
 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -25,15 +25,15 @@
     <#list ant['diamonds.files']?split(" ") as line>
         <#if line?split(".")?last == "fpsx">
     <file>
-        <name>${line?split("\\")?last}</name>
-        <url>${line}</url>
+        <name>${line?split("\\")?last?xml}</name>
+        <url>${line?xml}</url>
         <type>flash_image</type>
     </file>
         </#if>
         <#if line?split(".")?last == "html" || line?split(".")?last == "log">
     <file>
-        <name>${line?split("\\")?last}</name>
-        <url>${line}</url>
+        <name>${line?split("\\")?last?xml}</name>
+        <url>${line?xml}</url>
         <type>log</type>
     </file>
         </#if>
--- a/buildframework/helium/tools/common/templates/diamonds/tool.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/tool.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -25,22 +25,22 @@
 <#if ant?keys?seq_contains("env.SYMSEE_VERSION")>         
         <tool>
             <name>SymSEE</name>
-            <version>${ant["env.SYMSEE_VERSION"]}</version>
+            <version>${ant["env.SYMSEE_VERSION"]?xml}</version>
         </tool>
 </#if>
 <#if (doc)??>
 <#list doc["environment/tool"] as tool>
         <#if tool.path?length &gt; 0>
         <tool>
-            <name>${tool.name}</name>
-            <version>${tool.version}</version>
+            <name>${tool.name?xml}</name>
+            <version>${tool.version?xml}</version>
         </tool>
         </#if>
 </#list>
 </#if>
         <tool>
             <name>Helium</name>
-            <version>${ant["helium.version"]}</version>
+            <version>${ant["helium.version"]?xml}</version>
         </tool>
     </tools>
 <#include "diamonds_footer.ftl">
--- a/buildframework/helium/tools/common/templates/diamonds/validate-policy-log.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/diamonds/validate-policy-log.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -19,12 +19,13 @@
 
 ============================================================================
 -->
-<#include "diamonds_header.ftl"> 
+<#include "diamonds_header.ftl">
 <quality aspect="policy">
-<#if (doc)??!""?keys?seq_contains('policyvalidation')>
-<#list doc['policyvalidation'].error as error>
+    <#if (doc)??!""?keys?seq_contains('policyvalidation')>
+    <summary message="Policy validation errors" value="${doc['policyvalidation'].error?size}"/>
+    <#list doc['policyvalidation'].error as error>
     <message severity="error" type="${error.@type}" message="${error.@message}" value="${error.@value}"/>
-</#list>
-</#if>
+    </#list>
+    </#if>
 </quality>
-<#include "diamonds_footer.ftl"> 
\ No newline at end of file
+<#include "diamonds_footer.ftl">
--- a/buildframework/helium/tools/common/templates/ido/ido-ant-copy.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-<#--
-============================================================================ 
-Name        : ido-ant-copy.xml.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-<?xml version="1.0"?>
-<project name="ido-ant-copy" default="all">
-    <target name="delete">
-        <parallel threadCount="${r'$'}{number.of.threads}">
-        <#list data?keys as component>
-            <sequential>
-                <#if ((ant['keep.old.source.enabled']=="true") || ant?keys?seq_contains('ido.keep.old'))>
-                <delete dir="${data[component]}_old" failonerror="false"/>
-                <move file="${data[component]}" todir="${data[component]}_old" failonerror="false"/>
-                <#else>
-                <delete dir="${data[component]}" failonerror="false"/>
-                </#if>
-            </sequential>
-        </#list>
-        </parallel>
-    </target>
-    
-    <target name="copy">
-        <#list data?keys as component>
-            <mkdir dir="${data[component]}"/>
-        </#list>
-        <parallel threadCount="${r'$'}{number.of.threads}">
-        <#list data?keys as component>
-            <sequential>
-                <copy todir="${data[component]}" verbose="false" failonerror="false" overwrite="true">
-                    <fileset dir="${component}" casesensitive="false" >
-                        <exclude name="**/_ccmwaid.inf"/>
-                        <exclude name="**/.ccmwaid.inf"/>
-                        <#if ((ant['keep.internal.folders.enabled'] == "false")&& (!ant?keys?seq_contains('keep.internals')))>
-                        <exclude name="**/internal/**"/>
-                        </#if>
-                        <exclude name="**/.hg/**"/>
-                        <exclude name="**/.svn/**"/>
-                    </fileset>
-                </copy>
-                <#-- Below operation is not required on linux as copy task will changes 
-                the file permissions to write mode -->
-                <exec executable="attrib" osfamily="windows" dir="${data[component]}">
-                    <arg line="-R /S /D .\*"/>
-                </exec>
-            </sequential>
-        </#list>
-        </parallel>
-    </target>
-    
-    <target name="all" depends="delete,copy" />
-</project>
--- a/buildframework/helium/tools/common/templates/ido/ido-ant-fixslashes.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/ido/ido-ant-fixslashes.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -1,6 +1,6 @@
 <#--
 ============================================================================ 
-Name        : ido-ant-copy.xml.ftl 
+Name        : ido-ant-fixslashes.xml.ftl 
 Part of     : Helium 
 
 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
--- a/buildframework/helium/tools/common/templates/ido/ido-cenrep-gen.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-<#--
-============================================================================ 
-Name        : ido-cenrep-gen.xml.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
--->
-<#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader',
-        "${dbPath}") >
-
-<project name="cenrep-generation" default="all">
-    <#if os?lower_case?starts_with('win')>
-        <#assign exe_file="cmd.exe"/>
-    <#else>
-        <#assign exe_file="bash"/>
-    </#if>
-    <target name="ido-cenrep-generation">
-        <sequential>
-            <#list table_info['native:java.lang.String']['select distinct w.member FROM WhatLogEntry w where w.member like \'%.confml\''] as confmlfile>
-            <exec executable="${exe_file}" dir="${ant['build.drive']}/epoc32/tools" failonerror="false" output="${ant['post.log.dir']}/${ant['build.id']}_cenrep.cone.log">
-                <#if os?lower_case?starts_with('win')>
-                <arg value="/c"/>
-                <arg value="cone.cmd"/>
-                <#else>
-                <arg value="cone"/>
-                </#if>
-                <arg value="generate" />                            
-                <arg value="-p"/>
-                <arg value="${ant['build.drive']}\epoc32\rom\config\assets\s60" />
-                <arg value="-o" />
-                <arg value="${ant['build.drive']}\epoc32\release\winscw\urel\z" />
-                <arg value="-c"/>
-                <arg value="root.confml" />
-                <arg value="-i"/> 
-                <arg value="${confmlfile}" />
-            </exec>
-            </#list>
-        </sequential>
-    </target>
-    
-    <target name="all" depends="ido-cenrep-generation" />
-</project>
-
-
--- a/buildframework/helium/tools/common/templates/ido/ido-cmt-ant.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-<#--
-============================================================================ 
-Name        : ido-cmt-ant.xml.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-<?xml version="1.0"?>
-<project name="ido-cmt-ant" default="all" xmlns:hlm="http://www.nokia.com/helium">
-<import file="${ant['helium.dir']}/helium.ant.xml"/>
-<#assign targetlist=""/>
-<#assign cmtid=1/>
-    <#list data?keys as component>
-    <#if (cmtid > 1)>
-    <#assign targetlist="${targetlist}" + ","/>
-    </#if>
-    <basename property="componentbase${cmtid}" file="${data[component]}"/>
-    <target name="cmt-${cmtid}">
-        <hlm:cmt output="${ant['build.log.dir']}/${ant['build.id']}_cmt/${ant['build.id']}_${r'$'}{componentbase${cmtid}}_${cmtid}.txt" failonerror="${ant['failonerror']}" 
-                 htmlOutputDir="${ant['ido.cmt.html.output.dir']}">
-            <fileset id="input" dir="${data[component]}">
-                <include name="**/*.h"/>
-                <include name="**/*.cpp"/>
-            </fileset>
-        </hlm:cmt>
-    </target>
-
-    <#assign targetlist="${targetlist}" + "cmt-${cmtid}"/>
-    <#assign cmtid=cmtid+1/>
-    </#list>
-    <target name="all" depends="${targetlist}" />
-</project>
--- a/buildframework/helium/tools/common/templates/ido/ido-confml-validate.ant.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-<#--
-============================================================================ 
-Name        : ido-confml-validate.ant.xml.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
--->
-<#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader',
-        "${dbPath}") >
-<?xml version="1.0"?>
-<project name="validate-confml" default="validate-confml-file">
-    
-    <target name="validate-confml-file">
-        <#if os?lower_case?starts_with('win')>
-            <#assign exe_file="cmd.exe"/>
-        <#else>
-            <#assign exe_file="bash"/>
-        </#if>
-        <sequential>
-            <exec executable="${exe_file}" dir="${ant['build.drive']}/epoc32/tools" failonerror="false" output="${ant['post.log.dir']}/${ant['build.id']}_validate_confml.log">
-                <#if os?lower_case?starts_with('win')>
-                <arg value="/c"/>
-                <arg value="cone.cmd"/>
-                <#else>
-                <arg value="cone"/>
-                </#if>
-                <arg value="validate" />                            
-                <#list table_info['native:java.lang.String']['select distinct w.member FROM WhatLogEntry w where w.member like \'%.confml\''] as confmlfile>
-                <arg value="--confml-file"/> 
-                <arg value="${confmlfile}" />
-                </#list>
-                <#list table_info['native:java.lang.String']['select distinct w.member FROM WhatLogEntry w where w.member like \'%.crml\''] as crmlfile>
-                <arg value="--implml-file"/> 
-                <arg value="${crmlfile}" />
-                </#list>
-                <arg value="--report-type"/> 
-                <arg value="xml" />
-                <arg value="--report"/>
-                <arg value="${ant['post.log.dir']}/${ant['build.id']}_validate_confml.xml" />
-            </exec>
-        </sequential>
-    </target>
-    
-</project>
-
-
--- a/buildframework/helium/tools/common/templates/ido/ido-export.ant.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-<#--
-============================================================================ 
-Name        : ido-export.ant.xml.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-<?xml version="1.0"?>
-<project name="ido-copy">
-
-    <target name="ido-copy-iby">
-        <#list data?keys as name>
-        <copy todir="${ant['ido.romtree']}" verbose="true" overwrite="true" flatten="true">
-            <fileset dir="${data[name]}" casesensitive="no">
-                <include name="**/rom/*.iby"/>
-                <exclude name="**/internal/**"/>
-                <exclude name="**/tsrc/**"/>
-            </fileset>
-        </copy>
-        </#list>
-    </target>
-
-    <target name="ido-copy-cenrep">
-        <#list data?keys as name>
-        <copy todir="${ant['ido.cenrep.root']}" verbose="true" overwrite="true" flatten="true">
-            <fileset dir="${data[name]}" casesensitive="no">
-                <include name="**/cenrep/keys_*.xls"/>
-            </fileset>
-        </copy>
-        </#list>
-    </target>
-
-</project>
--- a/buildframework/helium/tools/common/templates/ido/ido-robot-zip.ant.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-<#--
-============================================================================ 
-Name        : ido-robot-zip.ant.xml.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-<?xml version="1.0"?>
-<project name="ido-zip" default="all">
-    <target name="all">
-        <delete file="${ant['build.output.dir']}/s60Sources.7z" failonerror="false"/>
-        <#if ((data?keys?size > 0) && (ant['robot.release.project']?split(';')?size > 0))>
-            <#list data?keys as name>
-                <#list ant['robot.release.project']?split(',') as project>
-                    <#if name?replace('\\', '/')?lower_case?contains("/${project}/${project}"?lower_case)>
-                    <#-- 7za u test.7z  output/analysisdata/ -->
-                    <exec executable="7za" dir="${name}/../">
-                        <arg value="u"/>
-                        <arg value="-xr!*/internal/*"/>
-                        <arg value="-xr!*/doc/*"/>
-                        <arg value="-xr!_ccmwaid.inf"/>
-                        <arg value="-xr!abld.bat"/>
-                        <arg value="${ant['build.output.dir']}/s60Sources.7z"/>
-                        <arg value="${name?split("/")?last}/"/>
-                    </exec>                    
-                    </#if>
-                </#list>
-            </#list>
-        </#if>
-        <copy todir="${ant['s60.build.robot.path']}" file="${ant['build.output.dir']}/s60Sources.7z" failonerror="false" />        
-    </target>
-</project>
--- a/buildframework/helium/tools/common/templates/ido/ready.txt.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-<#--
-============================================================================ 
-Name        : ready.txt.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-ido_name:${ant['build.name']}
-date(gt):${pp.now?string("EEE MMM d HH:mm:ss yyyy")}
-source_path:${ant['ccm.project.wa_path']}
-<#if ant?keys?seq_contains('email.from')>email:${ant['email.from']}</#if>
-<#if ant?keys?seq_contains('robot.email.to')><#list ant['robot.email.to']?split(',') as email>
-email:${email}
-</#list></#if>
-
--- a/buildframework/helium/tools/common/templates/ido/task-publish.ant.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-<#--
-============================================================================ 
-Name        : task-publish.xml.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-<?xml version="1.0"?>
-<project name="task-publish" default="all" xmlns:hlm="http://www.nokia.com/helium">
-    
-    <target name="all">
-        <#if (ant?keys?seq_contains('ccm.cache.xml'))>
-        <hlm:createSessionMacro database="${ant['ccm.database']}" reference="publish.session" cache="${ant['ccm.cache.xml']}"/>
-        <#else>
-        <hlm:createSessionMacro database="${ant['ccm.database']}" reference="publish.session"/>
-        </#if>
-        <hlm:ccm verbose="false">
-            <!-- Defining some session to use. -->
-            <hlm:sessionset refid="publish.session"/>
-
-            <hlm:addtask folder="${ant['publish.ccm.folder']}">
-                <#list bom['/bom/content//task/id'] as task>
-                <task name="${task?trim}"/>
-                </#list>
-            </hlm:addtask>
-            <#if (!ant?keys?seq_contains('ccm.cache.xml'))>
-            <hlm:close/>
-            </#if>
-        </hlm:ccm>
-    </target>
-    
-    <!-- this is needed to include ccmtask support. -->
-    <import file="${ant['helium.dir']}/helium.ant.xml"/>
-</project>
--- a/buildframework/helium/tools/common/templates/ido/zip-ant-wa-copy.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<#--
-============================================================================ 
-Name        : zip-ant-wa-copy.xml.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-<?xml version="1.0"?>
-<project name="zip-wa-ant-copy" default="all">
-    <target name="all">
-        <#list data?keys as component>
-            <sequential>
-                <#assign ba_path= data[component]?substring(3)/>
-                <zip destfile="${ant['zip.wa.file']}" update="true" excludes="_ccmwaid.inf">
-                    <zipfileset dir="${component}" prefix="${ba_path}"/>
-                 </zip>
-            </sequential>
-        </#list>
-    </target>
-</project>
--- a/buildframework/helium/tools/common/templates/integration/build-duplicates.html.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-<#--
-============================================================================ 
-Name        : build-duplicates.html.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-    <#include "/@macro/logger/logger.ftl" />
-    <head>
-        <title>Build duplicates</title>
-        <@helium_logger_html_head/>
-    </head>
-    <body>
-
-<#macro printconflict node>
-    <#assign helium_node_id = helium_node_id + 1>
-    <@helium_logger_node_head nodeid="${helium_node_id}" title="${node.@name}">
-        <@helium_message_box nodeid="${helium_node_id}" type="conflict" count=node[".//component"]?size/>
-    </@helium_logger_node_head>    
-    <@helium_logger_node_content nodeid="${helium_node_id}">
-        <#list node[".//component"] as component>
-            <@helium_logger_print type="conflict">
-                <a href="${component.@name}">${component.@name}</a>
-            </@helium_logger_print>
-        </#list>
-    </@helium_logger_node_content>
-</#macro>
-
-    
-    <@helium_logger_header title="${ant['build.id']} build"/>
-    
-    
-    <@helium_logger_content title="Errors and warnings details">
-        <#list doc.buildconflicts["./file"] as conflict>
-            <@printconflict conflict/>
-        </#list>
-    </@helium_logger_content>
-    
-    </body>
-</html>
-
--- a/buildframework/helium/tools/common/templates/integration/internal-exports.html.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-<#--
-============================================================================ 
-Name        : internal-exports.html.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-    <#include "/@macro/logger/logger.ftl" />
-    <head>
-        <title>Internal Exports</title>
-        <@helium_logger_html_head/>
-    </head>
-    <body>
-
-<#macro printconflict node>
-    <#assign helium_node_id = helium_node_id + 1>
-    <@helium_logger_node_head nodeid="${helium_node_id}" title="${node.@name}">
-        <@helium_message_box nodeid="${helium_node_id}" type="InternalExport" count=node[".//file"]?size/>
-    </@helium_logger_node_head>    
-    <@helium_logger_node_content nodeid="${helium_node_id}">
-        <#list node[".//file"] as file>
-            <@helium_logger_print type="InternalExport">
-                <a href="${file.@name}">${file.@name}</a>
-            </@helium_logger_print>
-        </#list>
-    </@helium_logger_node_content>
-</#macro>
-
-    
-    <@helium_logger_header title="${ant['build.id']} build"/>
-        
-    <@helium_logger_content title="Errors and warnings details">
-        <#list doc.internalexports["./component"] as component>
-            <@printconflict component/>
-        </#list>
-    </@helium_logger_content>
-    
-    </body>
-</html>
-
--- a/buildframework/helium/tools/common/templates/integration/validate-policy.log.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-<#--
-============================================================================ 
-Name        : validate-policy.log.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-CSV validation:
-<#list doc["./policyvalidation/error[@type='unknownstatus']"] as unknownstatus>
-    ${unknownstatus.@message} (${unknownstatus.@value})
-</#list>
-
-Errors:
-<#list doc["./policyvalidation/error"] as error>
-    <#if error.@type=='A' || error.@type=='B' || error.@type=='C' || error.@type=='D'>
-    ${error.@type}  Found incorrect for ${error.@message?replace('([\\\\/][^\\\\/]+?)$', '', 'ris')}, ${error.@value}
-    </#if>
-</#list>
-
-Missing policy files in:
-<#list doc["./policyvalidation/error[@type='missing']"] as missing>
-    ${missing.@message}
-</#list>
-
-
-Incorrect policy files in:
-<#list doc["./policyvalidation/error[@type='invalidencoding']"] as error>
-    ${error.@message}
-</#list>
--- a/buildframework/helium/tools/common/templates/integration/validate-policy.log.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-<#--
-============================================================================ 
-Name        : validate-policy.log.xml.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-<?xml version="1.0" encoding="utf-8"?>
-<log filename="${ant['validate.policy.log']}">
-    <build>
-        <task name="CSV validation">
-<#list doc["./policyvalidation/error[@type='unknownstatus']"] as unknownstatus>
-            <message priority="error"><![CDATA[${unknownstatus.@message} (${unknownstatus.@value})]]></message>
-</#list>
-        </task>
-        <task name="Issues">
-<#list doc["./policyvalidation/error"] as error>
-    <#if error.@type=='A' || error.@type=='B' || error.@type=='C' || error.@type=='D'>
-            <message priority="error"><![CDATA[${error.@type}  Found incorrect for ${error.@message?replace('([\\\\/][^\\\\/]+?)$', '', 'ris')}, ${error.@value}]]></message>
-    </#if>
-</#list>
-        </task>
-        <task name="Missing">
-Missing policy files in:
-<#list doc["./policyvalidation/error[@type='missing']"] as missing>
-            <message priority="error"><![CDATA[${missing.@message}]]></message>
-</#list>
-        </task>
-        <task name="Incorrect policy files">
-<#list doc["./policyvalidation/error[@type='invalidencoding']"] as error>
-            <message priority="error"><![CDATA[${error.@message}]]></message>
-</#list>
-        </task>
-    </build>
-</log>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/common/templates/log/ca_content.txt.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,41 @@
+<#--
+============================================================================ 
+Name        : ca_content_libraries.txt.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<#if (logfilename)??>
+    <#assign logfilename_cleaned = "${logfilename}"?replace("\\","/") >
+    <#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader',
+        "${dbPath}") >
+        <#assign logfile = table_info['jpasingle']['select l from LogFile l where LOWER(l.path)=\'${logfilename_cleaned?lower_case}\''][0] >
+    <#if (checktype == 'header')>
+in header code
+        <#list table_info['native:java.lang.String']['select distinct w.member FROM WhatLogEntry w where w.member like \'%/epoc32/include%.%\''] as hfile>
+${hfile}
+        </#list>
+    <#elseif (checktype == 'lib')>
+in lib code
+        <#list table_info['native:java.lang.String']['select distinct w.member FROM WhatLogEntry w where w.member like \'%.lib\''] as hfile>
+${hfile}
+        </#list>
+        <#list table_info['native:java.lang.String']['select distinct w.member FROM WhatLogEntry w where w.member like \'%.dso\''] as hfile>
+${hfile}
+        </#list>
+    </#if>
+</#if>
--- a/buildframework/helium/tools/common/templates/log/email_status_orm.html.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/log/email_status_orm.html.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -107,7 +107,7 @@
             ${logfile.path}...FAIL<br/>
             <#list table_info['jpa']['select e from MetadataEntry e JOIN e.severity s where s.severity=\'ERROR\' and e.logFileId=${logfile.id}'] as entry >
             <ul>
-            ${entry.text}<br/>
+            <#if entry.text??>${entry.text?html}</#if><br/>
             </ul>
             </#list>
         </span>
--- a/buildframework/helium/tools/common/templates/log/scan2_orm.html.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/log/scan2_orm.html.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -86,7 +86,11 @@
         "${dbPath}") >
 <#-- overall summary -->
 <#assign logfile = table_info['jpasingle']['select l from LogFile l where LOWER(l.path)=\'${logfilename_cleaned?lower_case}\''][0] >
-<#assign time = table_info['jpasingle']['select et from ExecutionTime et where et.logFileId=${logfile.id}'][0] >
+<#assign time = 0 >
+<#if (table_info['jpasingle']['select count(et) from ExecutionTime et where et.logFileId=${logfile.id}'][0] != 0)>
+<#assign time = table_info['jpasingle']['select et from ExecutionTime et where et.logFileId=${logfile.id}'][0]>
+<#assign time = time.time >
+</#if>
 <html>
 <head><title>${logfile.path}</title></head>
 <body>
@@ -107,7 +111,7 @@
 <#assign color_list={'error': 'FF0000', 'warning': 'FFF000', 'critical': 'FF7000', 'remark': 'FFCCFF', 'info': 'FFFFFF'}>
 <#assign severity_ids = color_list?keys>
 <td width="22%%">Total</td>
-<td width="12%%" align="center"><@converttime time=time.time /></td>
+<td width="12%%" align="center"><@converttime time=time /></td>
 <#assign count_check_errors = table_info['jpasingle']['select Count(w.id) from WhatLogEntry w JOIN w.component c where c.logFileId=${logfile.id} and w.missing=\'true\''][0]> 
 <#list severity_ids as severity>
     <#assign count = table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.severity p where m.logFileId=${logfile.id} and p.severity=\'${severity?upper_case}\''][0]>
--- a/buildframework/helium/tools/common/templates/log/summary_metadata_orm.html.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/templates/log/summary_metadata_orm.html.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -64,6 +64,35 @@
     <@logentry "${text}", "${severity?lower_case}" />
 </#macro>
 
+<#macro metadata_entry_detail logentry, helium_node_id, component_name, component_id>
+    <#assign title_text="general">
+    <#assign component_query=" is NULL">
+    <#assign c_id="${logentry.path}">
+    
+    <#if !(component_name == "")>
+        <#assign title_text="${component_name}">
+        <#assign component_query="=${component_id}">
+        <#assign c_id="${component_id}">
+    </#if>
+    <@helium_logger_node_head nodeid="${helium_node_id}" title="${title_text}">
+        <#list table_info['jpa']['select p from Severity p where p.severity not like \'INFO\''] as severity>
+            <@logfile_severity "${c_id}", "${severity.severity?lower_case}", 
+                    table_info['jpasingle']['select Count(m.id) from MetadataEntry m where m.severityId=${severity.id} and m.componentId ${component_query} and m.logFileId = ${logentry.id}'][0], 
+                    "${helium_node_id}" />
+        </#list>
+    </@helium_logger_node_head>
+
+    <@helium_logger_node_content nodeid="${helium_node_id}">
+        <#list table_info['jpa']['select p from Severity p'] as severity>
+        <#list table_info['jpa']['select m from MetadataEntry m where m.componentId ${component_query} and m.severityId=${severity.id} and m.logFileId = ${logentry.id}'] as entry>
+            <#if entry.text??>
+                <@logfile_entry_detail "${entry.text}", "${severity.severity?lower_case}", "${helium_node_id}" />
+            </#if>
+        </#list>
+    </#list>
+    </@helium_logger_node_content>
+</#macro>
+
 <!-- Call the macros to render the log contents. -->
 <#assign mykey=loginfo>
 <#if (conv[mykey])?exists>
@@ -92,24 +121,14 @@
         </#list>
     </@helium_logger_node_head>
     <@helium_logger_node_content nodeid="${helium_node_id}">
+        <#assign count_default_component = table_info['jpasingle']['select Count(m.id) from MetadataEntry m where m.logFileId=${logentry.id} and m.componentId is NULL'][0]>
+        <#if count_default_component &gt; 0>
+            <#assign helium_node_id = helium_node_id + 1>
+            <@metadata_entry_detail logentry, "${helium_node_id}", "", ""/>
+        </#if>
         <#list table_info['jpa']['select c from Component c where c.logFileId=${logentry.id}'] as component>
             <#assign helium_node_id = helium_node_id + 1>
-            <@helium_logger_node_head nodeid="${helium_node_id}" title="${component.component}">
-                <#list table_info['jpa']['select p from Severity p where p.severity not like \'INFO\''] as severity>
-                    <@logfile_severity "${component.id}", "${severity.severity?lower_case}", 
-                            table_info['jpasingle']['select Count(m.id) from MetadataEntry m where m.severityId=${severity.id} and m.componentId=${component.id}'][0], 
-                            "${helium_node_id}" />
-                </#list>
-            </@helium_logger_node_head>
-            <@helium_logger_node_content nodeid="${helium_node_id}">
-                <#list table_info['jpa']['select p from Severity p'] as severity>
-                <#list table_info['jpa']['select m from MetadataEntry m where m.componentId=${component.id} and m.severityId=${severity.id}'] as entry>
-                    <#if entry.text??>
-                        <@logfile_entry_detail "${entry.text}", "${severity.severity?lower_case}", "${helium_node_id}" />
-                    </#if>
-                </#list>
-            </#list>
-            </@helium_logger_node_content>
+            <@metadata_entry_detail logentry, "${helium_node_id}", "${component.component}", "${component.id}" />
         </#list>
     </@helium_logger_node_content>
 </#list>
--- a/buildframework/helium/tools/common/templates/quality/cone-validate.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-<#--
-============================================================================ 
-Name        : cone-validate.xml.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
--->
-
-<project name="cone-validate" default="all">
-    
-    <target name="product-cone-validate">
-        <#if os?lower_case?starts_with('win')>
-            <#assign exe_file="cmd.exe"/>
-        <#else>
-            <#assign exe_file="bash"/>
-        </#if>
-        <#list ant['product.list']?split(',') as product>
-        <sequential>
-            <echo>Validating cone configuration for ${product}_root.confml</echo>
-            <exec executable="${exe_file}" dir="${ant['build.drive']}/epoc32/tools" failonerror="false">
-                <#if os?lower_case?starts_with('win')>
-                <arg value="/c"/>
-                <arg value="cone.cmd"/>
-                <#else>
-                <arg value="cone"/>
-                </#if>
-                <arg value="validate" />
-                <arg value="--project"/>
-                <arg value="${ant['build.drive']}/epoc32/rom/config"/>
-                <arg value="--configuration"/>
-                <arg value="${product}_root.confml"/>
-                <arg value="--report-type"/> 
-                <arg value="xml" />
-                <arg value="--report"/>
-                <arg value="${ant['post.log.dir']}/${ant['build.id']}_validate_cone_${product}.xml" />
-            </exec>
-        </sequential>
-        </#list>
-    </target>
-    
-    <target name="all" depends="product-cone-validate" />
-</project>
-
-
--- a/buildframework/helium/tools/common/test/test_diamonds_templates.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/test/test_diamonds_templates.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -42,6 +42,7 @@
         <delete dir="${test.temp.dir}" />        
     </target>
     
+    
     <target name="test-diamonds-signal-template-without-signal-data">
         <fmpp sourceFile="${helium.dir}/tools/common/templates/diamonds/diamonds_signal.xml.ftl"
                      outputfile="${test.temp.dir}/diamonds_signal.xml">
@@ -51,6 +52,7 @@
         </fmpp>
         <loadfile property="diamonds.xml" srcFile="${test.temp.dir}/diamonds_signal.xml" />
         <echo>${diamonds.xml}</echo>
+        <xmlvalidate file="${test.temp.dir}/diamonds_signal.xml" lenient="true" />
         <au:assertTrue message="No signals are pushed to diamonds">
             <not>
                 <contains string="${diamonds.xml}" substring="&lt;signal&gt;" />
@@ -75,4 +77,106 @@
             <contains string="${diamonds.xml}" substring="&lt;name&gt;fakeSignal&lt;/name&gt;" />
         </au:assertTrue>
     </target>
+
+    <target name="test-diamonds-build-roms-template">
+        <hlm:metadatarecord  database="${test.temp.dir}/database_db">
+            <hlm:imakermetadatainput>
+                <fileset casesensitive="false" file="${helium.dir}/tests/data/diamonds/build_roms_sample.log"/>
+                <metadatafilterset refid="filterset.imaker" />
+            </hlm:imakermetadatainput>
+        </hlm:metadatarecord>
+        <fmpp sourceFile="${helium.dir}/tools/common/templates/diamonds/build_roms_diamonds.xml.ftl"
+                     outputfile="${test.temp.dir}/build_roms_diamonds.xml">
+            <data expandProperties="yes">
+                dbPath: ${test.temp.dir}/database_db
+                ant: antProperties()
+            </data>
+        </fmpp>
+        <loadfile property="diamonds.xml" srcFile="${test.temp.dir}/build_roms_diamonds.xml" />
+        <echo>${diamonds.xml}</echo>
+        <xmlvalidate file="${test.temp.dir}/build_roms_diamonds.xml" lenient="true" warn="true" />
+        <au:assertTrue message="XML character are escaped.">
+            <contains string="${diamonds.xml}" substring="&amp;apos;" />
+        </au:assertTrue>
+        <au:assertTrue message="known image can be found.">
+            <contains string="${diamonds.xml}" substring="&lt;name&gt;RM-XXX_010.014_79.92_prd.udaerase.fpsx&lt;/name&gt;" />
+        </au:assertTrue>
+    </target>
+    
+    <target name="test-diamonds-build-xml-template">
+        <property name="ecc.project" value="diamonds_ecc_test"/>
+        <property name="ecc.schedule" value="diamonds_ecc_schedule"/>
+        <property name="ecc.ido.branch" value="diamonds_ecc_ido_branch"/>
+        <property name="ecc.procedure" value="diamonds_ecc_procedure"/>
+        <property name="ecc.include.in.stats" value="diamonds_ecc_include_in_stats"/>
+        <property name="build.family" value="diamonds_template_test"/>
+        <property name="ecc.ido.branch" value="diamonds_ecc_ido_branch"/>
+        <property name="ecc.ido.branch" value="diamonds_ecc_ido_branch"/>
+        <tstamp>
+            <format property="build.start.time" pattern="MM/dd/yyyy hh:mm aa" unit="hour"/>
+        </tstamp>
+        <tstamp>
+            <format property="build.end.time" pattern="MM/dd/yyyy hh:mm aa" unit="hour"/>
+        </tstamp>
+        <fmpp sourceFile="${helium.dir}/tools/common/templates/diamonds/diamonds_build.xml.ftl"
+                     outputfile="${test.temp.dir}/diamonds_build.xml">
+            <data expandProperties="yes">
+                dbPath: ${test.temp.dir}/database_db
+                ant: antProperties()
+            </data>
+        </fmpp>
+        <loadfile property="diamonds.xml" srcFile="${test.temp.dir}/diamonds_build.xml" />
+        <echo>${diamonds.xml}</echo>
+        <au:assertTrue message="XML character are escaped.">
+            <contains string="${diamonds.xml}" substring="diamonds_template_test" />
+        </au:assertTrue>
+    </target>
+    
+    <target name="test-diamonds-finish-xml-template">
+        <tstamp>
+            <format property="build.end.time" pattern="MM/dd/yyyy hh:mm aa" unit="hour"/>
+        </tstamp>
+        <echo> test.temp.dir = ${test.temp.dir}</echo>
+        <fmpp sourceFile="${helium.dir}/tools/common/templates/diamonds/diamonds_finish.xml.ftl"
+                     outputfile="${test.temp.dir}/finish.xml">
+            <data expandProperties="yes">
+                dbPath: ${test.temp.dir}/database_db
+                ant: antProperties()
+            </data>
+        </fmpp>
+        <loadfile property="diamonds.xml" srcFile="${test.temp.dir}/finish.xml" />
+        <echo>${diamonds.xml}</echo>
+        <au:assertTrue message="XML character are escaped.">
+            <contains string="${diamonds.xml}" substring="${build.end.time}" />
+        </au:assertTrue>
+    </target>
+    
+    <target name="test-diamonds-stage-xml-template">
+        <property name="logical.stage" value="diamonds-test"/>
+        <tstamp>
+            <format property="stage.start.time" pattern="MM/dd/yyyy hh:mm aa" unit="hour"/>
+        </tstamp>
+        <tstamp>
+            <format property="stage.end.time" pattern="MM/dd/yyyy hh:mm aa" unit="hour"/>
+        </tstamp>
+        <fmpp sourceFile="${helium.dir}/tools/common/templates/diamonds/diamonds_stage.xml.ftl"
+                     outputfile="${test.temp.dir}/stage.xml">
+            <data expandProperties="yes">
+                dbPath: ${test.temp.dir}/database_db
+                ant: antProperties()
+            </data>
+        </fmpp>
+        <loadfile property="diamonds.xml" srcFile="${test.temp.dir}/stage.xml" />
+        <echo>${diamonds.xml}</echo>
+        <au:assertTrue message="XML character are escaped.">
+            <contains string="${diamonds.xml}" substring="${stage.start.time}" />
+        </au:assertTrue>
+        <au:assertTrue message="XML character are escaped.">
+            <contains string="${diamonds.xml}" substring="${stage.end.time}" />
+        </au:assertTrue>
+    </target>
+    
+    
+    
+
 </project>
--- a/buildframework/helium/tools/common/testing.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/common/testing.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -39,7 +39,7 @@
                 <propertyref name="synergy71.enabled"/>
             </propertyset>
             <fileset dir="${helium.dir}" includes="tools/**/test_*.ant.xml"/> 
-            <fileset dir="${helium.dir}" includes="extensions/*/tools/**/test_*.ant.xml"/>  
+            <fileset dir="${helium.dir}" includes="extensions/*/tools/**/test_*.ant.xml"/>
             <au:plainlistener/>
             <hlm:antcoveragelistener outputfile="${helium.build.dir}/report/antunit/ant_coverage.txt"/>
             <au:xmllistener toDir="${helium.build.dir}/report/antunit" logLevel="info" />
--- a/buildframework/helium/tools/compile/cmaker.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/compile/cmaker.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -80,6 +80,24 @@
     </condition>
 
     <!--
+     This property defines the full path location of cmaker under windows. 
+     @type string
+     @scope public
+     @editable allowed
+     @since 11.0.1
+     -->
+    <property name="cmaker.windows.location" value="${build.drive}/epoc32/tools/cmaker.cmd" />
+
+    <!--
+     This property defines the full path location of cmaker under linux. 
+     @type string
+     @scope public
+     @editable allowed
+     @since 11.0.1
+     -->
+    <property name="cmaker.linux.location" value="${build.drive}/epoc32/tools/cmaker" />
+    
+    <!--
         The cmakerMacro enables the user to run cmaker commands directly from Ant.
         To configure it just provide NCP and S60 version and the action you want to run.
         Default action is WHAT.
@@ -114,12 +132,12 @@
             </if>
             <hlm:symbianLogHeaderMacro command="cmaker ${temp.cmaker.arg1} ${temp.cmaker.arg2} ACTION=@{action}"
                     config="CMAKER_@{action}" dir="${cmaker.config.dir}"/>
-            <exec executable="${build.drive}/epoc32/tools/cmaker.cmd" osfamily="windows" dir="${cmaker.config.dir}">
+            <exec executable="${cmaker.windows.location}" osfamily="windows" dir="${cmaker.config.dir}">
                 <arg line="${temp.cmaker.arg1}" />
                 <arg line="${temp.cmaker.arg2}" />
                 <arg value="ACTION=@{action}" />
             </exec>
-            <exec executable="${build.drive}/epoc32/tools/cmaker.sh" osfamily="unix" dir="${cmaker.config.dir}">
+            <exec executable="${cmaker.linux.location}" osfamily="unix" dir="${cmaker.config.dir}">
                 <arg line="${temp.cmaker.arg1}" />
                 <arg line="${temp.cmaker.arg2}" />
                 <arg value="ACTION=@{action}" />
--- a/buildframework/helium/tools/compile/compile.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/compile/compile.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -104,6 +104,7 @@
      @editable required
      @since 11.0
      -->
+    <property name="sysdef3.enabled" value="true" />
     
     <!--* @property internal.sysdef3.enabled
      To run the sysdef3 dependent tasks if sysdef3.enabled set to true. 
--- a/buildframework/helium/tools/compile/compile.antlib.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/compile/compile.antlib.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -216,7 +216,6 @@
         </sequential>
     </macrodef>
 
-
     <!-- Electric Cloud emake support.
 
     e.g:
@@ -256,13 +255,6 @@
 if (attributes.get("custom") != null) {
     custom = attributes.get("custom");
 }
-if (attributes.get("root") != null) {
-    root = attributes.get("root");
-}
-else {
-    root = "";
-}
-
 self.log("Custom: " + custom);
 
 // Create and configure exec target
@@ -291,12 +283,18 @@
 task.createArg().setValue("--emake-build-label=" + buildId + "-" + attributes.get("name"));
 String eclass = com.nokia.ant.util.Helper.getProperty(project, "ec.build.class");
 task.createArg().setValue("--emake-class=" + eclass);
+
+// Defining the emake-root argument for the command line.
 String eroot = com.nokia.ant.util.Helper.getProperty(project, "env.EMAKE_ROOT");          
 String heliumDir = com.nokia.ant.util.Helper.getProperty(project, "helium.dir"); 
-if (attributes.get("root") != null) {
-    self.log("--emake-root=" + eroot + ";" + heliumDir + ";" + root);
-}         
-task.createArg().setValue("--emake-root=" + eroot + ";" + heliumDir + ";" + root);
+String pathSeparator = com.nokia.ant.util.Helper.getProperty(project, "path.separator");
+String emakeRoot = eroot + pathSeparator + heliumDir;
+if (attributes.get("root") != null &amp;&amp; attributes.get("root").length() > 0) {
+    emakeRoot = emakeRoot + pathSeparator + attributes.get("root");
+}   
+self.log("Roots: " + emakeRoot);
+task.createArg().setValue("--emake-root=" + emakeRoot);
+
 if (attributes.get("phase") != null) {
     annofileDir = com.nokia.ant.util.Helper.getProperty(project, "build.log.dir") + "/" + attributes.get("phase");
 }
--- a/buildframework/helium/tools/compile/coverity.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/compile/coverity.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -56,6 +56,27 @@
     @since 11.0
     -->
     
+    <!--* @property post.coverity.steps.enabled
+    Set to true to run post coverity steps.
+    @type boolean
+    @scope private
+    @since 11.0.4
+    -->
+    
+    <!--* @property is.zero.coverity.errors
+    Set to true if coverity error file contains zero errors.
+    @type boolean
+    @scope private
+    @since 11.0.4
+    -->
+    
+    <!--* @property is.zero.coverity.output.errors
+    Set to true if coverity output file contains zero fatal errors.
+    @type boolean
+    @scope private
+    @since 11.0.4
+    -->
+    
     <!--* @property internal.coverity.commit.defects.enabled
     Run the targets to commit the defects into database if coverity.commit.defects.enabled set to true.
     @type boolean
@@ -145,14 +166,14 @@
     <!-- set property if coverity is enabled -->
     <condition property="internal.coverity.enabled">
         <or>
-            <istrue value="${coverity.enabled}" />
+            <istrue value="${coverity.enabled}"/>
             <istrue value="${enabled.coverity}"/>
         </or>
     </condition>
     
     <!-- set property if coverity.commit.defects.enabled is enabled -->
     <condition property="internal.coverity.commit.defects.enabled">
-        <istrue value="${coverity.commit.defects.enabled}" />
+        <istrue value="${coverity.commit.defects.enabled}"/>
     </condition>
     
     <if>
@@ -178,74 +199,59 @@
         <arg name="--record-only" value=""/>
     </hlm:coverityoptions>
     
-    <!-- cov-build emit command options -->
-    <hlm:coverityoptions id="coverity.emit.options">
-        <arg name="--config" value="${coverity.config.dir}/coverity_config.xml"/>
-        <arg name="--dir" value="${coverity.inter.dir}"/>
-        <arg name="--replay" value=""/>
-        <arg name="--replay-processes" value="${coverity.no.thread}"/>
-    </hlm:coverityoptions>
-    
-    <!-- cov-config command options -->
-    <hlm:coverityoptions id="coverity.config.options">
-        <hlm:arg name="--config" value="${coverity.config.dir}/coverity_config.xml"/>
-        <hlm:arg name="--template" value=""/>
-        <hlm:arg name="--comptype" value="armcc"/>
-        <hlm:arg name="--compiler" value="armcc.exe"/>
-    </hlm:coverityoptions>
-    
-    <!-- cov-analyze command options -->
-    <hlm:coverityoptions id="coverity.analyze.options">
-        <hlm:arg name="--dir" value="${coverity.analyze.dir}"/>
-        <hlm:arg name="--all" value=""/>
-        <hlm:arg name="--symbian" value=""/>
-        <hlm:arg name="--append" value=""/>
-        <hlm:arg name="--enable-callgraph-metrics" value=""/>
-    </hlm:coverityoptions>
-
     <!-- To run post coverity steps -->
     <target name="post-coverity" if="internal.coverity.enabled">
         <mkdir dir="${post.log.dir}"/>
+        
         <!-- To emit the file into defect database -->
-        <antcall target="run-coverity-emit"/>
+        <runtarget target="run-coverity-emit"/>
+        
+        <!-- To collect linkage information on all files -->
+        <runtarget target="run-coverity-link"/>
         
         <!-- To analyze the sources file -->
-        <antcall target="run-coverity-analyze"/>
+        <runtarget target="run-coverity-analyze"/>
         
         <!-- To generate the HTML error pages -->
-        <antcall target="gen-coverity-report"/>
+        <runtarget target="gen-coverity-report"/>
         
         <!-- To commit the defects into coverity defect manager. -->
-        <antcall target="run-commit-defects"/>
-        
-        <hlm:metadatarecord database="${metadata.dbfile}">
-            <hlm:textmetadatainput>
-                <fileset casesensitive="false" file="${post.log.dir}/${build.id}_coverity_command_errors.log" />
-                <metadatafilterset>
-                    <metadatafilter priority="error" regex=".*" description="coverity error" />
-                </metadatafilterset>
-            </hlm:textmetadatainput>
-        </hlm:metadatarecord>
-        <hlm:metadataCountSeverity severity="ERROR" log="${post.log.dir}/${build.id}_coverity_command_errors.log" database="${metadata.dbfile}" property="coverity.error.total"/>
-        <echo>Coverity command errors: ${coverity.error.total}</echo>
-        <hlm:generateBuildStatus file="${post.log.dir}/${build.id}_coverity_command_errors.log" />
-        <hlm:signalMacro logfile="${post.log.dir}/${build.id}_coverity_command_errors.log" phase="post" signal.input="coveritySignalInput" />
+        <runtarget target="run-commit-defects"/>
     </target>
     
     <!-- Run coverity configure if the coverity.enabled is set to true -->
     <target name="run-coverity-configure" if="internal.coverity.enabled">
-        <hlm:coverity command="cov-configure" dir="${build.drive}/">
-            <hlm:coverityoptions refid="coverity.config.options"/>
-        </hlm:coverity >
+        <mkdir dir="${compile.log.dir}"/>
+        <!-- cov-config command options -->
+        <hlm:coverityoptions id="coverity.config.options">
+            <hlm:arg name="--config" value="${coverity.config.dir}/coverity_config.xml"/>
+            <hlm:arg name="--template" value=""/>
+            <hlm:arg name="--comptype" value="armcc"/>
+            <hlm:arg name="--compiler" value="armcc.exe"/>
+        </hlm:coverityoptions>
+        <hlm:runCoverityCommand errorlog="${compile.log.dir}/${build.id}_coverity_configure_errors.log"
+            command="cov-configure"
+            options="coverity.config.options"
+            outputlog="${compile.log.dir}/${build.id}_coverity_configure_output.log"
+        />
     </target>
     
     <!-- Run coverity build with emit options if the coverity.enabled is set to true 
      re-running the cov-build with replay option will reduce the build time by ~ 20% 
     -->
-    <target name="run-coverity-emit" >
-        <hlm:coverity command="cov-build" dir="${build.drive}/" error="${post.log.dir}/${build.id}_coverity_command_errors.log" >
-            <hlm:coverityoptions refid="coverity.emit.options"/>
-        </hlm:coverity >
+    <target name="run-coverity-emit">
+        <!-- cov-build emit command options -->
+        <hlm:coverityoptions id="coverity.emit.options">
+            <arg name="--config" value="${coverity.config.dir}/coverity_config.xml"/>
+            <arg name="--dir" value="${coverity.inter.dir}"/>
+            <arg name="--replay" value=""/>
+            <arg name="--replay-processes" value="${coverity.no.thread}"/>
+        </hlm:coverityoptions>
+        <hlm:runCoverityCommand errorlog="${post.log.dir}/${build.id}_coverity_emit_errors.log"
+            command="cov-build"
+            options="coverity.emit.options"
+            outputlog="${post.log.dir}/${build.id}_coverity_emit_output.log"
+        />
     </target>
     
     <!-- Run coverity-analyze if the coverity.enabled is set to true 
@@ -260,34 +266,75 @@
      So run the cov-link commands and analyze the database using cov-analyze command.
     
     -->
-    <target name="run-coverity-analyze" >
+    <target name="run-coverity-link" if="post.coverity.steps.enabled">
         <mkdir dir="${coverity.link.dir}"/>
-        <hlm:coverity command="cov-link" dir="${build.drive}/" error="${post.log.dir}/${build.id}_coverity_command_errors.log" append="true">
+        
+        <!-- Run cov-link with the -co and -of options to collect linkage information on all files compiled in an emit directory.-->        
+        <hlm:coverityoptions id="coverity.link.all.options">
             <hlm:arg name="--dir" value="${coverity.inter.dir}"/>
             <hlm:arg name="--collect" value=""/>
             <hlm:arg name="-of" value="${coverity.link.dir}/all.link"/>
-        </hlm:coverity >
-        <hlm:coverity command="cov-link" dir="${build.drive}/" error="${post.log.dir}/${build.id}_coverity_command_errors.log" append="true">
+        </hlm:coverityoptions>
+        <hlm:runCoverityCommand errorlog="${post.log.dir}/${build.id}_coverity_link_errors.log" 
+            command="cov-link" 
+            options="coverity.link.all.options"
+            outputlog="${post.log.dir}/${build.id}_coverity_link_output.log"
+        />
+        
+        <!--Create one or more additional link files by filtering information using either an argument or a portion 
+        of the pathname that was used during command-line compilation-->
+        <hlm:coverityoptions id="coverity.link.options">
             <hlm:arg name="--dir" value="${coverity.inter.dir}"/>
             <hlm:arg name="--compile-arg" value="armv5"/>
             <hlm:arg name="-of" value="${coverity.link.dir}/armv5.link"/>
             <hlm:arg name="${coverity.link.dir}/all.link" value=""/>
-        </hlm:coverity >
-        <hlm:coverity command="cov-link" dir="${build.drive}/" error="${post.log.dir}/${build.id}_coverity_command_errors.log" append="true">
+        </hlm:coverityoptions>
+        <hlm:runCoverityCommand errorlog="${post.log.dir}/${build.id}_coverity_link_errors.log"
+            append="true"
+            command="cov-link" 
+            options="coverity.link.options"
+            outputlog="${post.log.dir}/${build.id}_coverity_link_output.log"
+        />
+        
+        <!--Use the link files created in the previous steps, and the emit repository in the original intermediate directory, to create a new 
+        intermediate directory with an emit repository with resolved function calls -->
+        <hlm:coverityoptions id="coverity.link.extract.options">
             <hlm:arg name="--dir" value="${coverity.inter.dir}"/>
             <hlm:arg name="--output-dir" value="${coverity.analyze.dir}"/>
             <hlm:arg name="${coverity.link.dir}/armv5.link" value=""/>
-        </hlm:coverity >
-        <hlm:coverity command="cov-analyze" dir="${build.drive}/" error="${post.log.dir}/${build.id}_coverity_command_errors.log" append="true">
-            <hlm:coverityoptions refid="coverity.analyze.options"/>
-        </hlm:coverity >
+        </hlm:coverityoptions>
+        <hlm:runCoverityCommand errorlog="${post.log.dir}/${build.id}_coverity_link_errors.log" 
+            append="true" 
+            command="cov-link" 
+            options="coverity.link.extract.options"
+            outputlog="${post.log.dir}/${build.id}_coverity_link_output.log"
+        />
+    </target>
+    
+    <!-- To analyze the sources file -->
+    <target name="run-coverity-analyze" if="post.coverity.steps.enabled">
+        
+        <!-- cov-analyze command options -->
+        <hlm:coverityoptions id="coverity.analyze.options">
+            <hlm:arg name="--dir" value="${coverity.analyze.dir}"/>
+            <hlm:arg name="--all" value=""/>
+            <hlm:arg name="--symbian" value=""/>
+            <hlm:arg name="--append" value=""/>
+            <hlm:arg name="--enable-callgraph-metrics" value=""/>
+        </hlm:coverityoptions>
+        <hlm:runCoverityCommand errorlog="${post.log.dir}/${build.id}_coverity_analyze_errors.log" 
+            command="cov-analyze" 
+            options="coverity.analyze.options"
+            outputlog="${post.log.dir}/${build.id}_coverity_analyze_output.log"
+        />
+        
     </target>
     
     
     <!-- Generate coverity report -->
-    <target name="gen-coverity-report">
+    <target name="gen-coverity-report" if="post.coverity.steps.enabled">
         <!-- Read the summary file generated by cov-analyze and generate html file -->
-        <fmpp sourceFile="${helium.dir}/tools/common/templates/coverity/coverity.summary.html.ftl"
+        <fmpp sourceFile="${helium.dir}/tools/compile/templates/coverity.summary.html.ftl"
               outputFile="${temp.build.dir}/${build.id}_coverity_build_summary.html">
             <data   expandProperties="yes">
                     ant: antProperties()
@@ -296,7 +343,7 @@
         </fmpp>
         
         <!-- To generate summary file for diamonds -->
-        <fmpp sourceFile="${helium.dir}/tools/common/templates/coverity/coverity.summary.xml.ftl"
+        <fmpp sourceFile="${helium.dir}/tools/compile/templates/coverity.summary.xml.ftl"
               outputFile="${coverity.summary.xml.file}">
             <data   expandProperties="yes">
                     ant: antProperties()
@@ -305,11 +352,16 @@
         </fmpp>
         
         <!-- Run this to get the static html pages -->
-        <hlm:coverity command="cov-format-errors" dir="${build.drive}/" error="${post.log.dir}/${build.id}_coverity_command_errors.log" append="true">
+        <hlm:coverityoptions id="coverity.format.errors.options">
             <hlm:arg name="--dir" value="${coverity.analyze.dir}"/>
             <hlm:arg name="--filesort" value=""/>
             <hlm:arg name="--functionsort" value=""/>
-        </hlm:coverity >
+        </hlm:coverityoptions>
+        <hlm:runCoverityCommand errorlog="${post.log.dir}/${build.id}_coverity_format_errors.log" 
+            command="cov-format-errors" 
+            options="coverity.format.errors.options"
+            outputlog="${post.log.dir}/${build.id}_coverity_format_ouput.log"
+        />
         
         <!-- Copy the summary file to resolve the xml load error -->
         <copy file="${coverity.analyze.dir}/c/output/errors/summary.xml" tofile="${coverity.checkers.xml.file}" overwrite="true" failonerror="false">
@@ -341,61 +393,40 @@
         </concat>
     </target>
     
-    
-    <!-- To get the SBS variable value -->
-    <macrodef name="getSBSVariableValue" uri="http://www.nokia.com/helium">
-        <attribute name="variablename"/>
-        <attribute name="outputvar"/>
-        <attribute name="sbsinput"/>
-        <sequential>
-            <var name="output.var" unset="true"/>
-            <hlm:getVariableValue name="@{variablename}" property="output.var">
-                <hlm:sbsinput refid="@{sbsinput}" />
-            </hlm:getVariableValue>
-            <if>
-                <and>
-                    <isset property="output.var"/>
-                    <matches string="${output.var}" pattern="arm.*"/>
-                </and>
-                <then>
-                    <antcall target="set-arm-version"/>
-                </then>
-            </if>
-            <script language="beanshell"> <![CDATA[
-                curVal=project.getProperty("output.var"); 
-                project.setProperty("@{outputvar}",curVal);
-                ]]>
-            </script> 
-        </sequential>
-    </macrodef>
-    
     <!-- To commit the coverity defects into coverity defect manager --> 
     <target name="run-commit-defects" depends="coverity-username,coverity-password" if="internal.coverity.commit.defects.enabled">
-        
-        <!-- Check is the coverity defect manager server and port numbers are set -->
-        <fail message="FAILED: Coverity defect manager server/IP address is not set. Please set 'coverity.defect.manager.server'. Ex: server.domain.extension or 100.220.530.101" 
-            unless="coverity.defect.manager.server"/>
-        <fail message="FAILED: Coverity defect manager HTTP port number is not set. Please set 'coverity.defect.manager.port'." 
-            unless="coverity.defect.manager.port"/>        
-        <!-- Check is the coverity defect manager server product is set to submit the coverity errors.-->
-        <fail message="FAILED: Coverity defect manager product name is not set. Please set 'coverity.defect.manager.product'." 
-            unless="coverity.defect.manager.product"/>
-        
-        <!-- cov-commit-defects command options -->
-        <hlm:coverityoptions id="coverity.commit.defects.options">
-            <hlm:arg name="--config" value="${coverity.config.dir}/coverity_config.xml"/>
-            <hlm:arg name="--remote" value="${coverity.defect.manager.server}"/>
-            <hlm:arg name="--port" value="${coverity.defect.manager.port}"/>
-            <hlm:arg name="--user" value="${coverity.username}"/>
-            <hlm:arg name="--password" value="${coverity.password}"/>
-            <hlm:arg name="--dir" value="${coverity.analyze.dir}"/>
-            <hlm:arg name="--product" value="${coverity.defect.manager.product}"/>
-        </hlm:coverityoptions>
-        
-        <!-- Run the coverity commit defects command to submit the errors into defect manager -->
-        <hlm:coverity command="cov-commit-defects" dir="${build.drive}/" error="${post.log.dir}/${build.id}_coverity_command_errors.log" append="true">
-            <hlm:coverityoptions refid="coverity.commit.defects.options"/>
-        </hlm:coverity >
+        <if>
+            <istrue value="${post.coverity.steps.enabled}"/>
+            <then>
+                <mkdir dir="${post.log.dir}"/>
+                <!-- Check is the coverity defect manager server and port numbers are set -->
+                <fail message="FAILED: Coverity defect manager server/IP address is not set. Please set 'coverity.defect.manager.server'. Ex: server.domain.extension or 100.220.530.101" 
+                    unless="coverity.defect.manager.server"/>
+                <fail message="FAILED: Coverity defect manager HTTP port number is not set. Please set 'coverity.defect.manager.port'." 
+                    unless="coverity.defect.manager.port"/>        
+                <!-- Check is the coverity defect manager server product is set to submit the coverity errors.-->
+                <fail message="FAILED: Coverity defect manager product name is not set. Please set 'coverity.defect.manager.product'." 
+                    unless="coverity.defect.manager.product"/>
+                
+                <!-- cov-commit-defects command options -->
+                <hlm:coverityoptions id="coverity.commit.defects.options">
+                    <hlm:arg name="--config" value="${coverity.config.dir}/coverity_config.xml"/>
+                    <hlm:arg name="--remote" value="${coverity.defect.manager.server}"/>
+                    <hlm:arg name="--port" value="${coverity.defect.manager.port}"/>
+                    <hlm:arg name="--user" value="${coverity.username}"/>
+                    <hlm:arg name="--password" value="${coverity.password}"/>
+                    <hlm:arg name="--dir" value="${coverity.analyze.dir}"/>
+                    <hlm:arg name="--product" value="${coverity.defect.manager.product}"/>
+                </hlm:coverityoptions>
+                
+                <!-- Run the coverity commit defects command to submit the errors into defect manager -->
+                <hlm:runCoverityCommand errorlog="${post.log.dir}/${build.id}_coverity_commit_defects_errors.log" 
+                    command="cov-commit-defects" 
+                    options="coverity.commit.defects.options"
+                    outputlog="${post.log.dir}/${build.id}_coverity_commit_defects_ouput.log"
+                />
+            </then>
+        </if>
     </target>
     
     <!-- Retrieve the coverity password from the .netrc file and store it into coverity.password property. -->
@@ -409,4 +440,60 @@
         <hlm:netrcUsernameMacro output-prop="coverity.username" result-prop="coverity.username.available" type="coverity"/>
     </target>
     
+    
+    <!-- To run coverity command and to check errors thrown by coverity commands -->
+    <macrodef name="runCoverityCommand" uri="http://www.nokia.com/helium">
+        <attribute name="errorlog"/>
+        <attribute name="outputlog"/>
+        <attribute name="command"/>
+        <attribute name="append" default="false"/>
+        <attribute name="options"/>
+        <sequential>
+            <var name="is.zero.coverity.errors" unset="true"/>
+            <var name="is.zero.coverity.output.errors" unset="true"/>
+            <var name="post.coverity.steps.enabled" unset="true"/>
+            <var name="total.coverity.errors" unset="true"/>
+            <var name="total.coverity.output.errors" unset="true"/>
+            <hlm:coverity command="@{command}" dir="${build.drive}/" error="@{errorlog}" append="@{append}" output="@{outputlog}">
+                <hlm:coverityoptions refid="@{options}"/>
+            </hlm:coverity>
+            <hlm:metadatarecord database="${metadata.dbfile}">
+                <hlm:coveritymetadatainput>
+                    <fileset casesensitive="false" file="@{errorlog}"/>
+                    <metadatafilterset refid="filterset.coverity.error.cli"/>
+                </hlm:coveritymetadatainput>
+            </hlm:metadatarecord>
+            <hlm:metadataCountSeverity severity="ERROR" log="@{errorlog}" database="${metadata.dbfile}" property="total.coverity.errors"/>
+            <echo>Coverity command '@{command}' errors: ${total.coverity.errors}</echo>
+            <condition property="is.zero.coverity.errors">
+                <equals arg1="${total.coverity.errors}" arg2="0"/>
+            </condition>
+            <hlm:generateBuildStatus file="@{errorlog}"/>
+            <hlm:signalMacro logfile="@{errorlog}" phase="post" signal.input="coveritySignalInput"/>
+            <if>
+                <available file="@{outputlog}" />
+                <then>
+                    <hlm:metadatarecord database="${metadata.dbfile}">
+                        <hlm:coveritymetadatainput>
+                            <fileset casesensitive="false" file="@{outputlog}"/>
+                            <metadatafilterset refid="filterset.coverity.output.cli"/>
+                        </hlm:coveritymetadatainput>
+                    </hlm:metadatarecord>
+                    <hlm:metadataCountSeverity severity="ERROR" log="@{outputlog}" database="${metadata.dbfile}" property="total.coverity.output.errors"/>
+                    <echo>Coverity command '@{command}' errors: ${total.coverity.output.errors}</echo>
+                    <condition property="is.zero.coverity.output.errors">
+                        <equals arg1="${total.coverity.output.errors}" arg2="0"/>
+                    </condition>
+                    <hlm:generateBuildStatus file="@{outputlog}"/>
+                    <hlm:signalMacro logfile="@{outputlog}" phase="post" signal.input="coveritySignalInput"/>
+                </then>
+            </if>
+            <condition property="post.coverity.steps.enabled">
+                <and>
+                    <istrue value="${is.zero.coverity.errors}"/>
+                    <istrue value="${is.zero.coverity.output.errors}"/>
+                </and>
+            </condition>
+        </sequential>
+    </macrodef>
 </project>
--- a/buildframework/helium/tools/compile/ec/ec.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/compile/ec/ec.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -345,6 +345,7 @@
 
         <echo>Building ${sysdef.configuration}....</echo>
         <echo file="${temp.build.dir}/${build.id}.${sysdef.configuration}_run_emake.bat" level="info">
+set JYTHONPATH=
 set
 ${ec.emake} --emake-build-label=${build.id}.${sysdef.configuration} --emake-class=${ec.build.class} --emake-priority=normal --emake-maxagents=${ec.maxagents} --emake-job-limit=0 --emake-mem-limit=${ec.mem.limit} --emake-history=${ec.history.option} --emake-annodetail=basic,history,file,waiting --emake-annofile=${compile.log.dir}\${build.id}.${sysdef.configuration}.emake.anno.xml --emake-historyfile=${ec.historyfile} --emake-debug=${emake_debug_flag} --emake-logfile=${compile.log.dir}\${build.id}.${sysdef.configuration}.emake.g.dlog --emake-root=%EMAKE_ROOT%;${helium.dir} --emake-autodepend=1 -k -i -f ${build.drive}/${sysdef.configuration}.make LOGBUILDTIME=&quot;&quot; VERBOSE=&quot;&quot; SAVESPACE=&quot;&quot; ${sysdef.configuration}
         </echo>
--- a/buildframework/helium/tools/compile/qt/antunit/test_qt.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/compile/qt/antunit/test_qt.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -61,16 +61,17 @@
         <au:assertTrue message="The output file must contain helloworldapi.pro">
             <contains string="${run.qmake.out}" substring="helloworldapi.pro" />
         </au:assertTrue>
-        <au:assertTrue message="The output file must contain $${build.drive}/sf/app/helloworldcons/group">
-            <contains string="${run.qmake.out}" substring="$${build.drive}/sf/app/helloworldcons/group" />
+        <au:assertTrue message="The output file must contain sf/app/helloworldcons/group ${run.qmake.out}">
+            <contains string="${run.qmake.out}" substring="sf/app/helloworldcons/group" />
         </au:assertTrue>
-        <au:assertTrue message="The output file must contain $${build.drive}/sf/mw/helloworldapi/group">
-            <contains string="${run.qmake.out}" substring="$${build.drive}/sf/mw/helloworldapi/group" />
+        <au:assertTrue message="The output file must contain sf/mw/helloworldapi/group">
+            <contains string="${run.qmake.out}" substring="sf/mw/helloworldapi/group" />
         </au:assertTrue>
     </target>
     
     <target name="test-sysdef151-namespaced-qt-ant">
         <property name="sysdef.configuration" value="demo" />
+        <var name="sysdef3.enabled" value="false" />
         <fmpp sourceFile="${helium.dir}/tools/compile/qt/templates/run-qmake.ant.xml.ftl"
            outputFile="${qt.temp.dir}/run-qmake151.ant.xml">
             <data expandProperties="yes">
@@ -78,6 +79,7 @@
                 ant: antProperties()
             </data>
         </fmpp>
+        <var name="sysdef3.enabled" value="true" />
         <au:assertFileExists file="${qt.temp.dir}/run-qmake151.ant.xml" />
         <loadfile property="run.qmake.out" srcfile="${qt.temp.dir}/run-qmake151.ant.xml" />
         <au:assertTrue message="The output file must contain the -nomoc argument.">
@@ -101,6 +103,7 @@
         <propertyregex property="build.drive.slash" input="${build.drive}" regexp="\\" replace="/" />
         <property name="build.drive.slash" value="${build.drive}" />
         <property name="sysdef.configuration" value="demo" />
+        <var name="sysdef3.enabled" value="false" />
         <fmpp sourceFile="${helium.dir}/tools/compile/qt/templates/run-qmake.mk.ftl"
            outputFile="${qt.temp.dir}/run-qmake151.mk">
             <data expandProperties="yes">
@@ -108,6 +111,7 @@
                 ant: antProperties()
             </data>
         </fmpp>
+        <var name="sysdef3.enabled" value="true" />
         <au:assertFileExists file="${qt.temp.dir}/run-qmake151.mk" />
         <loadfile property="run.qmake.out" srcfile="${qt.temp.dir}/run-qmake151.mk" />
         <au:assertTrue message="The output file must contain the -nomoc argument.">
@@ -119,11 +123,11 @@
         <au:assertTrue message="The output file must contain helloworldapi.pro">
             <contains string="${run.qmake.out}" substring="helloworldapi.pro" />
         </au:assertTrue>
-        <au:assertTrue message="The output file must contain -@cd ${build.drive.slash}/sf/mw/HelloWorldAPI/group &amp;&amp; qmake -listgen -nomoc helloworldapi.pro">
-            <contains string="${run.qmake.out}" substring="-@cd ${build.drive.slash}/sf/mw/HelloWorldAPI/group &amp;&amp; qmake -listgen -nomoc helloworldapi.pro" />
+        <au:assertTrue message="The output file must contain -@cd ${build.drive.slash}/sf/mw/HelloWorldAPI/group &amp;&amp; ${build.drive}/epoc32/tools/qmake -listgen -nomoc helloworldapi.pro, ${run.qmake.out}">
+            <contains string="${run.qmake.out}" substring="-@cd ${build.drive.slash}/sf/mw/HelloWorldAPI/group &amp;&amp; ${build.drive}/epoc32/tools/qmake -listgen -nomoc helloworldapi.pro" />
         </au:assertTrue>
-        <au:assertTrue message="The output file must contain -@cd ${build.drive.slash}/sf/app/HelloWorldCons/group &amp;&amp; qmake -listgen -r helloworld.pro">
-            <contains string="${run.qmake.out}" substring="-@cd ${build.drive.slash}/sf/app/HelloWorldCons/group &amp;&amp; qmake -listgen -r helloworld.pro" />
+        <au:assertTrue message="The output file must contain -@cd ${build.drive.slash}/sf/app/HelloWorldCons/group &amp;&amp; ${build.drive}/epoc32/tools/qmake -listgen -r helloworld.pro">
+            <contains string="${run.qmake.out}" substring="-@cd ${build.drive.slash}/sf/app/HelloWorldCons/group &amp;&amp; ${build.drive}/epoc32/tools/qmake -listgen -r helloworld.pro" />
         </au:assertTrue>
     </target>
 
@@ -149,11 +153,11 @@
         <au:assertTrue message="The output file must contain helloworldapi.pro">
             <contains string="${run.qmake.out}" substring="helloworldapi.pro" />
         </au:assertTrue>
-        <au:assertTrue message="The output file must contain -@cd ${build.drive.slash}/sf/mw/helloworldapi/group &amp;&amp; qmake -listgen -nomoc helloworldapi.pro">
-            <contains string="${run.qmake.out}" substring="-@cd ${build.drive.slash}/sf/mw/helloworldapi/group &amp;&amp; qmake -listgen -nomoc helloworldapi.pro" />
+        <au:assertTrue message="The output file must contain sf/mw/helloworldapi/group &amp;&amp; ${build.drive}/epoc32/tools/qmake -listgen -nomoc helloworldapi.pro, ${run.qmake.out}">
+            <contains string="${run.qmake.out}" substring="sf/mw/helloworldapi/group &amp;&amp; ${build.drive}/epoc32/tools/qmake -listgen -nomoc helloworldapi.pro" />
         </au:assertTrue>
-        <au:assertTrue message="The output file must contain -@cd ${build.drive.slash}/sf/app/helloworldcons/group &amp;&amp; qmake -listgen -r helloworld.pro">
-            <contains string="${run.qmake.out}" substring="-@cd ${build.drive.slash}/sf/app/helloworldcons/group &amp;&amp; qmake -listgen -r helloworld.pro" />
+        <au:assertTrue message="The output file must contain sf/app/helloworldcons/group &amp;&amp; ${build.drive}/epoc32/tools/qmake -listgen -r helloworld.pro">
+            <contains string="${run.qmake.out}" substring="sf/app/helloworldcons/group &amp;&amp; ${build.drive}/epoc32/tools/qmake -listgen -r helloworld.pro" />
         </au:assertTrue>
     </target>
 </project>
\ No newline at end of file
--- a/buildframework/helium/tools/compile/qt/qt.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/compile/qt/qt.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -60,6 +60,9 @@
     <condition property="internal.qmake.enabled">
         <istrue value="${qmake.enabled}"/>
     </condition>
+    <condition property="iswindows" value="true" else="false">
+        <os family='windows'/>
+    </condition>
     
     <!--
         Executing qmake on all Qt components defined under the system definition file.
--- a/buildframework/helium/tools/compile/qt/templates/run-qmake.ant.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/compile/qt/templates/run-qmake.ant.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -30,36 +30,54 @@
         <#if unit.@proFile[0]??>
             <#assign prefix="" />
         </#if>
-        <#assign bldinf="${r'$'}{build.drive}/${unit.@bldFile}"?replace('\\', '/')?replace('//', '/')>
+        <#if ant['iswindows'] == "false" && ant['sysdef3.enabled'] == "true">
+            <#assign bldinf="${unit.@bldFile}"?replace('\\', '/')?replace('//', '/')>
+        <#else>
+            <#assign bldinf="${r'$'}{build.drive}/${unit.@bldFile}"?replace('\\', '/')?replace('//', '/')>
+        </#if>
             <sequential>
                 <echo>Running qmake for ${bldinf}/${unit['@${prefix}proFile'][0]?xml}</echo>
                 <if>
-                    <available file="${bldinf}" type="dir"/>
+                    <os family='windows'/>
                     <then>
-                        <exec executable="cmd" osfamily="windows" dir="${bldinf}" failonerror="false">
-                            <arg value="/C"/>
-                            <arg value="qmake"/>
-                            <arg value="-listgen"/>
-                            <#if unit['@${prefix}qmakeArgs'][0]??>
-                            <arg line="${unit['@${prefix}qmakeArgs'][0]?xml}"/>
-                            <#else>
-                            <arg line="${ant['qt.qmake.default.args']?xml}"/>
-                            </#if>
-                            <arg value="${unit['@${prefix}proFile'][0]?xml}"/>
-                        </exec>
-                        <exec osfamily="unix" executable="sh" dir="${bldinf}" failonerror="false">
-                            <arg value="${(ant['epocroot'] + "/")?replace('//', '/')}epoc32/tools/qmake"/>
-                            <arg value="-listgen"/>
-                            <#if unit['@${prefix}qmakeArgs'][0]??>
-                            <arg line="${unit['@${prefix}qmakeArgs'][0]?xml}"/>
-                            <#else>
-                            <arg line="${ant['qt.qmake.default.args']?xml}"/>
-                            </#if>
-                            <arg value="${unit['@${prefix}proFile'][0]?xml}"/>
-                        </exec>
+                        <if>
+                            <available file="${bldinf}" type="dir"/>
+                            <then>
+                                <exec executable="cmd" dir="${bldinf}" failonerror="false">
+                                    <arg value="/C"/>
+                                    <arg value="qmake"/>
+                                    <arg value="-listgen"/>
+                                    <#if unit['@${prefix}qmakeArgs'][0]??>
+                                    <arg line="${unit['@${prefix}qmakeArgs'][0]?xml}"/>
+                                    <#else>
+                                    <arg line="${ant['qt.qmake.default.args']?xml}"/>
+                                    </#if>
+                                    <arg value="${unit['@${prefix}proFile'][0]?xml}"/>
+                                </exec>
+                            </then>
+                            <else>
+                               <echo message="ERROR: Directory ${bldinf} doesn't exist."/>
+                            </else>
+                        </if>
                     </then>
                     <else>
-                       <echo message="ERROR: Directory ${bldinf} doesn't exist."/>
+                        <if>
+                            <available file="${bldinf}" type="dir"/>
+                            <then>
+                                <exec executable="${ant['build.drive']}/epoc32/tools/qmake" dir="${bldinf}" failonerror="false">
+                                    <arg value="-listgen"/>
+                                    <#if unit['@${prefix}qmakeArgs'][0]??>
+                                    <arg line="${unit['@${prefix}qmakeArgs'][0]?xml}"/>
+                                    <#else>
+                                    <arg line="${ant['qt.qmake.default.args']?xml}"/>
+                                    </#if>
+                                    <arg value="${unit['@${prefix}proFile'][0]?xml}"/>
+                                </exec>
+                            </then>
+                            <else>
+                               <echo message="ERROR: Directory ${bldinf} doesn't exist."/>
+                            </else>
+                        </if>
                     </else>
                 </if>
             </sequential>
--- a/buildframework/helium/tools/compile/qt/templates/run-qmake.mk.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/compile/qt/templates/run-qmake.mk.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -31,12 +31,16 @@
     <#if unit.@proFile[0]??>
         <#assign prefix="" />
     </#if>
-    <#assign bldinf="${ant['build.drive']}/${unit.@bldFile}"?replace('\\', '/')?replace('//', '/')>
+    <#if ant['iswindows'] == "false" && ant['sysdef3.enabled'] == "true">
+        <#assign bldinf="${unit.@bldFile}"?replace('\\', '/')?replace('//', '/')>
+    <#else>
+        <#assign bldinf="${ant['build.drive']}/${unit.@bldFile}"?replace('\\', '/')?replace('//', '/')>
+    </#if>
 
 ##########################################################################
 ${bldinf}/bld.inf: ${bldinf}/${unit['@${prefix}proFile'][0]}
-	@echo cd ${bldinf} ^&^& qmake -listgen <#if unit['@${prefix}qmakeArgs'][0]??>${unit['@${prefix}qmakeArgs'][0]}<#else>${ant['qt.qmake.default.args']}</#if><#if "${ant['build.system']?lower_case}" = 'sbs-ec'> -spec symbian-sbsv2</#if> ${unit['@${prefix}proFile'][0]}
-	-@cd ${bldinf} && qmake -listgen <#if unit['@${prefix}qmakeArgs'][0]??>${unit['@${prefix}qmakeArgs'][0]}<#else>${ant['qt.qmake.default.args']}</#if> ${unit['@${prefix}proFile'][0]}
+	@echo "cd ${bldinf} && ${ant['build.drive']}/epoc32/tools/qmake -listgen <#if unit['@${prefix}qmakeArgs'][0]??>${unit['@${prefix}qmakeArgs'][0]}<#else>${ant['qt.qmake.default.args']}</#if><#if "${ant['build.system']?lower_case}" = 'sbs-ec'> -spec symbian-sbsv2</#if> ${unit['@${prefix}proFile'][0]}"
+	-@cd ${bldinf} && ${ant['build.drive']}/epoc32/tools/qmake -listgen <#if unit['@${prefix}qmakeArgs'][0]??>${unit['@${prefix}qmakeArgs'][0]}<#else>${ant['qt.qmake.default.args']}</#if> ${unit['@${prefix}proFile'][0]}
 
 all:: ${bldinf}/bld.inf
 
--- a/buildframework/helium/tools/compile/sbs/sbs.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/compile/sbs/sbs.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -212,7 +212,7 @@
                 <if>
                     <or>
                         <istrue value="${coverity.enabled}" />
-                        <isset property="enabled.coverity"/>
+                        <istrue value="${enabled.coverity}"/>
                     </or>
                     <then>
                         <hlm:coveritybuild  sbsinput="@{sbs.input}" 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/compile/templates/coverity.summary.html.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,79 @@
+<#--
+============================================================================ 
+Name        : coverity.summary.html.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+  <head>
+  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>
+      Coverity tool summary information.
+    </title>
+    <style type="text/css">
+        body{font-family:Verdana; font-size:8pt; line-height:1.1em; padding: 10px 10px; background-color:#F8F8F2;}
+        h1{
+          font-size:14pt;
+          color:#000;
+          padding: 20px 15px;
+          margin:0;
+         }
+        h2 {
+          font-size:10pt;
+          margin: 1em 0;
+        }
+        h5{
+          font-size:10pt;
+          text-align:center;
+          background-color:#4682B4;
+          color:"black";
+          heigth:20pt;
+          padding: 5px 15px;
+          
+         }
+        .data{color:#00F;font-family:Verdana; font-size:10pt;color:"black";}
+        span.items{text-indent:-1em; padding-left: 1em; display:block; word-wrap:normal;}
+
+        span.bold{font-weight:bold; display:block; padding: 1em 0;}
+        p.maintext{padding-top: 1em;}
+        p.logfolder{color:#000;font-weight:bold; padding-top: 1em;}
+        p.distrib{font-weight:bold;}
+ 
+ 
+        a:link,a:visited{color:#00E;}
+        
+    </style>
+  </head>
+  <body>
+        <div id="coveritysummary">
+            <h5>Coverity Summary</h5>
+                <#assign htmlString = covsummary?replace("["," ")>
+                <#assign htmlString = htmlString?replace("]"," ")>
+                <#list htmlString?split(",") as line>
+                    <#if line?starts_with("   ")>
+                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${line}<br />
+                    <#elseif !line?contains("cov-analyze")>
+                        ${line}<br />
+                    </#if>
+                </#list>
+        </div>
+        </br>
+    </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/compile/templates/coverity.summary.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,36 @@
+<#--
+============================================================================ 
+Name        : coverity.summary.xml.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+<?xml version="1.0" encoding="utf-8"?>
+<coverity>
+    <#assign htmlString = covsummary?replace("["," ")>
+    <#assign htmlString = htmlString?replace("]"," ")>
+    <#list htmlString?split(",") as line>
+        <#if !line?contains("cov-analyze") && !line?starts_with("---") && !line?contains("summary") && !line?contains("defects") >
+            <#assign words = line?split(":")>
+            <#if words[1]??>
+                <#assign firstword=words[0]?trim secondword=words[1]?trim>
+<summary message="${firstword}" value="${secondword}"/> 
+            </#if>
+        </#if>
+    </#list>
+</coverity>
+        
--- a/buildframework/helium/tools/logging/logging.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/logging/logging.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -288,7 +288,7 @@
             </hlm:metadatarecord>
             <!-- todo: check to add for usage and add genbuildstatus macro -->
             <basename property="log.name" file="@{log}"/>
-            <fmpp sourceFile="${helium.dir}/tools/common/templates/db2xml.xml.ftl"
+            <fmpp sourceFile="${helium.dir}/tools/logging/templates/db2xml.xml.ftl"
                          outputfile="@{log}.xml">
                 <data expandProperties="yes">
                     dbPath: ${metadata.dbfile}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/logging/templates/db2xml.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,32 @@
+<#--
+============================================================================ 
+Name        : db2xml.xml.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<#assign table_info = pp.loadData('com.nokia.helium.metadata.SQLFMPPLoader', "${dbPath}") >
+<?xml version="1.0" encoding="utf-8"?>
+<log filename="${log}">
+<build>
+
+<#list table_info['select * from metadata INNER JOIN logfiles ON logfiles.id=metadata.logfile_id INNER JOIN severity ON severity.id=metadata.severity_id where severity=\'ERROR\' and path like \'${r\'%\'}${log}\''] as recordentry >
+<message severity="error"><![CDATA[${recordentry['data']}]]></message>
+</#list>
+
+</build>
+</log>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/logging/templates/logging.conf.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,58 @@
+<#--
+============================================================================ 
+Name        : logging.conf.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+[formatters]
+keys: simple,detailed
+ 
+[handlers]
+keys: console,syslog
+ 
+[loggers]
+keys: root,dp
+ 
+[formatter_simple]
+format: %(levelname)s:%(name)s:%(message)s
+
+[formatter_detailed]
+format: %(levelname)s:%(name)s: %(module)s:%(lineno)d: %(message)s
+
+[handler_console]
+class: StreamHandler
+args: []
+formatter: simple
+
+[handler_syslog]
+class: handlers.SysLogHandler
+args: [('myhost.mycorp.net', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_USER]
+formatter: detailed
+
+[logger_root]
+level: INFO
+handlers: syslog
+
+[logger_dp]
+<#if ant?keys?seq_contains("dp.debug") || ant?keys?seq_contains("debug")>
+level: DEBUG
+<#else>
+level: INFO
+</#if>
+handlers: console
+qualname: dp
\ No newline at end of file
--- a/buildframework/helium/tools/preparation/bom/bom.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/preparation/bom/bom.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -63,71 +63,68 @@
 import traceback
 
 session = None
-try:
-    runccm = ant.get_property(r'${ccm.enabled}')
-    database = ant.get_property(r'${ccm.database}')
-    username = ant.get_property(r'${ccm.user.login}')
-    password = ant.get_property(r'${ccm.user.password}')
-    engine = ant.get_property(r'${ccm.engine.host}')
-    dbpath = ant.get_property(r'${ccm.database.path}')
-    waroot = ant.get_property(r'${create.bom.workarea.root}')
-    buildid = ant.get_property(r'${build.id}')
-    buildlogdir = ant.get_property(r'${build.log.dir}')
-    deliveryfile = ant.get_property(r'${prep.delivery.conf.parsed}')
-    oldbom = ant.get_property(r'${old.bom.log}')
-    bom = None
-    bomfilename = r"%s/%s_bom.xml" % (buildlogdir, buildid)
-    if runccm and deliveryfile:
-        cache = None
-        if ant.get_property(r'${ccm.cache.xml}') is not None:
-            cache = str(ant.get_property(r'${ccm.cache.xml}'))
-        provider = ccm.extra.CachedSessionProvider(opener=nokia.nokiaccm.open_session, cache=cache)
-            
-        configBuilder = configuration.NestedConfigurationBuilder(open(deliveryfile, 'r'))
-        configSet = configBuilder.getConfiguration()
-        for config in configSet.getConfigurations():
-            waroot = config['dir']
-            print "Found wa for project %s" % waroot
-                        
-        if database != None:
-            session = provider.get(username, password, database=database)
-        else:
-            session = provider.get(username, password, engine, dbpath)
-            
-        ccmproject =  ccm.extra.get_toplevel_project(session, waroot)
+
+runccm = ant.get_property(r'${ccm.enabled}')
+database = ant.get_property(r'${ccm.database}')
+username = ant.get_property(r'${ccm.user.login}')
+password = ant.get_property(r'${ccm.user.password}')
+engine = ant.get_property(r'${ccm.engine.host}')
+dbpath = ant.get_property(r'${ccm.database.path}')
+waroot = ant.get_property(r'${create.bom.workarea.root}')
+buildid = ant.get_property(r'${build.id}')
+buildlogdir = ant.get_property(r'${build.log.dir}')
+deliveryfile = ant.get_property(r'${prep.delivery.conf.parsed}')
+oldbom = ant.get_property(r'${old.bom.log}')
+bom = None
+bomfilename = r"%s/%s_bom.xml" % (buildlogdir, buildid)
+if deliveryfile and runccm == 'true':
+    cache = None
+    if ant.get_property(r'${ccm.cache.xml}') is not None:
+        cache = str(ant.get_property(r'${ccm.cache.xml}'))
+    provider = ccm.extra.CachedSessionProvider(opener=nokia.nokiaccm.open_session, cache=cache)
+        
+    configBuilder = configuration.NestedConfigurationBuilder(open(deliveryfile, 'r'))
+    configSet = configBuilder.getConfiguration()
+    for config in configSet.getConfigurations():
+        waroot = config['dir']
+        print "Found wa for project %s" % waroot
+                    
+    if database != None:
+        session = provider.get(username, password, database=database)
+    else:
+        session = provider.get(username, password, engine, dbpath)
         
-        config_data = {'delivery': deliveryfile, 'prep.xml': ant.get_property(r'${prep.config.file.parsed}'), 'build.id': buildid, 'ccm.database': database, 'symbian_rel_week': ant.get_property(r'${symbian.version.week}'), 'symbian_rel_ver': ant.get_property(r'${symbian.version}'), 'symbian_rel_year': ant.get_property(r'${symbian.version.year}'), 's60_version': ant.get_property(r'${s60.version}'), 's60_release': ant.get_property(r'${s60.release}'), 'currentRelease.xml': ant.get_property(r'${build.drive}') + "/currentRelease.xml", 'release_regexp': ant.get_property(r'${bom.release.regex}') }
-        config = configuration.Configuration(config_data)
-        
-        # let's only support the new spec model!
-        bom = build.model.SynergyBOM(config, ccmproject, username=username, password=password, provider=provider)
-        
-        xml_writer = build.model.BOMXMLWriter(bom)
-        xml_writer.write(bomfilename)
-    if not bom and os.path.exists(bomfilename):
-        config_data = {'prep.xml': ant.get_property(r'${prep.config.file.parsed}'), 'build.id': buildid, 'symbian_rel_week': ant.get_property(r'${symbian.version.week}'), 'symbian_rel_ver': ant.get_property(r'${symbian.version}'), 'symbian_rel_year': ant.get_property(r'${symbian.version.year}'), 's60_version': ant.get_property(r'${s60.version}'), 's60_release': ant.get_property(r'${s60.release}'), 'currentRelease.xml': ant.get_property(r'${build.drive}') + "/currentRelease.xml"}
-        config = configuration.Configuration(config_data)
-        bom = build.model.SimpleBOM(config, bomfilename)
-    if os.path.exists(oldbom):
-        xml_delta_writer = build.model.BOMDeltaXMLWriter(bom, oldbom)
-        xml_delta_writer.write(buildlogdir + "/" + buildid + "_bom_delta.xml")
-        delta_bom_content_validity = xml_delta_writer.validate_delta_bom_contents(buildlogdir + "/" + buildid + "_bom_delta.xml", bomfilename, oldbom)
-        if((delta_bom_content_validity == False) and (ant.get_property(r'${hlm.enable.asserts}') is not None)):
-            print 'Bom delta contents are not matching'
-            raise Exception
-        elif((delta_bom_content_validity == True) or (delta_bom_content_validity == None)):
-            print 'Bom delta contents are matching.'
-        elif(delta_bom_content_validity == False):
-            print 'Bom delta contents are not matching.'
-    else:
-        print 'Old BOM log cannot be found ' + oldbom + ', skipping BOM delta creation.'
-    if runccm:
-        bom.close()
-    if session:
-        session.close()
-except Exception, ex:
-    print 'Caught exception in BOM: ' + str(ex)
-    traceback.print_exc()
+    ccmproject =  ccm.extra.get_toplevel_project(session, waroot)
+    
+    config_data = {'delivery': deliveryfile, 'prep.xml': ant.get_property(r'${prep.config.file.parsed}'), 'build.id': buildid, 'ccm.database': database, 'symbian_rel_week': ant.get_property(r'${symbian.version.week}'), 'symbian_rel_ver': ant.get_property(r'${symbian.version}'), 'symbian_rel_year': ant.get_property(r'${symbian.version.year}'), 's60_version': ant.get_property(r'${s60.version}'), 's60_release': ant.get_property(r'${s60.release}'), 'currentRelease.xml': ant.get_property(r'${build.drive}') + "/currentRelease.xml", 'release_regexp': ant.get_property(r'${bom.release.regex}') }
+    config = configuration.Configuration(config_data)
+    
+    # let's only support the new spec model!
+    bom = build.model.SynergyBOM(config, ccmproject, username=username, password=password, provider=provider)
+    
+    xml_writer = build.model.BOMXMLWriter(bom)
+    xml_writer.write(bomfilename)
+if not bom and os.path.exists(bomfilename):
+    config_data = {'prep.xml': ant.get_property(r'${prep.config.file.parsed}'), 'build.id': buildid, 'symbian_rel_week': ant.get_property(r'${symbian.version.week}'), 'symbian_rel_ver': ant.get_property(r'${symbian.version}'), 'symbian_rel_year': ant.get_property(r'${symbian.version.year}'), 's60_version': ant.get_property(r'${s60.version}'), 's60_release': ant.get_property(r'${s60.release}'), 'currentRelease.xml': ant.get_property(r'${build.drive}') + "/currentRelease.xml"}
+    config = configuration.Configuration(config_data)
+    bom = build.model.SimpleBOM(config, bomfilename)
+if bom and os.path.exists(oldbom):
+    xml_delta_writer = build.model.BOMDeltaXMLWriter(bom, oldbom)
+    xml_delta_writer.write(buildlogdir + "/" + buildid + "_bom_delta.xml")
+    delta_bom_content_validity = xml_delta_writer.validate_delta_bom_contents(buildlogdir + "/" + buildid + "_bom_delta.xml", bomfilename, oldbom)
+    if((delta_bom_content_validity == False) and (ant.get_property(r'${hlm.enable.asserts}') is not None)):
+        print 'Bom delta contents are not matching'
+        raise Exception
+    elif((delta_bom_content_validity == True) or (delta_bom_content_validity == None)):
+        print 'Bom delta contents are matching.'
+    elif(delta_bom_content_validity == False):
+        print 'Bom delta contents are not matching.'
+else:
+    print 'Old BOM log cannot be found ' + oldbom + ', skipping BOM delta creation.'
+if runccm == 'true':
+    bom.close()
+if session:
+    session.close()
         </hlm:python>
         <if>
             <available file="${build.log.dir}/${build.id}_bom.xml"/>
@@ -136,7 +133,7 @@
                 <xmltask source="${build.log.dir}/${build.id}_bom.xml" dest="${build.log.dir}/${build.id}_bom.xml" outputter="simple">
                     <replace path="//bom/build/text()" withText="${build.id}"/>
                 </xmltask>
-                <fmpp sourceRoot="${helium.dir}/tools/preparation/bom"
+                <fmpp sourceRoot="${helium.dir}/tools/preparation/bom/templates"
                       outputRoot="${prep.log.dir}" includes="bom.html.*,bom.txt.*" removeExtensions="ftl">
                     <freemarkerLinks expandProperties="yes">
                         macro: ${helium.dir}/tools/common/templates/macro
@@ -189,10 +186,13 @@
         </if>
         
         <if>
-            <available file="${old.bom.log}"/>
+            <and>
+                <available file="${old.bom.log}"/>
+                <available file="${build.log.dir}/${build.id}_bom_delta.xml"/>
+            </and>
             <then>
                 <hlm:assertFileExists file="${build.log.dir}/${build.id}_bom_delta.xml"/>
-                <fmpp sourceRoot="${helium.dir}/tools/preparation/bom"
+                <fmpp sourceRoot="${helium.dir}/tools/preparation/bom/templates"
                       outputRoot="${prep.log.dir}" includes="bom_delta.*" removeExtensions="ftl">
                     <freemarkerLinks expandProperties="yes">
                         macro: ${helium.dir}/tools/common/templates/macro
@@ -287,7 +287,7 @@
                 <if>
                     <isset property="email.ldap.server"/>
                     <then>
-                        <hlm:ldap url="${email.ldap.server}" rootdn="${email.ldap.rootdn}" filter="uid=${task.owner}" outputproperty="task.owner.email" key="mail"/>
+                        <hlm:ldap url="${email.ldap.server}" rootdn="${email.ldap.rootdn}" filter="uid=${task.owner}" outputproperty="task.owner.email" key="mail" failonerror="false"/>
                         <if>
                             <isset property="task.owners.email"/>
                             <then>
--- a/buildframework/helium/tools/preparation/bom/bom.html.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-<#--
-============================================================================ 
-Name        : bom.html.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-    <#include "/@macro/logger/logger.ftl" />
-    <head>
-        <title>Bill of Materials</title>
-        <@helium_logger_html_head/>
-    </head>
-    <body>
-
-
-<#macro printtype project title type>
-    <#assign helium_node_id = helium_node_id + 1>
-    <@helium_logger_node_head nodeid="${helium_node_id}" title="${title}">
-        <@helium_message_box nodeid="${helium_node_id}" type="${type}" count=project?size/>
-    </@helium_logger_node_head>    
-    <@helium_logger_node_content nodeid="${helium_node_id}">
-        <#list project as node>
-            <@helium_logger_print type="${type}">
-                ${node}
-            </@helium_logger_print>
-        </#list>
-    </@helium_logger_node_content>
-</#macro>
-
-<#macro printTasks project>
-    <#list project.task as node>
-    <@helium_logger_print type="task">
-      ${node.id}:${node.synopsis}
-    </@helium_logger_print>
-    </#list>
-</#macro>
-
-<#macro printTasksAndFolders project title>
-    <#assign helium_node_id = helium_node_id + 1>
-    <@helium_logger_node_head nodeid="${helium_node_id}" title="${title}">
-        <@helium_message_box nodeid="${helium_node_id}" type="task" count=project["count(//task)"]/>
-    </@helium_logger_node_head> 
-    <@helium_logger_node_content nodeid="${helium_node_id}">
-        <@printTasks project=project/>
-        <#list project.folder as node>           
-            <#assign helium_node_id = helium_node_id + 1>
-            <@helium_logger_node_head nodeid="${helium_node_id}" title="${node.name}">
-                <@helium_message_box nodeid="${helium_node_id}" type="task" count=project.task?size/>
-            </@helium_logger_node_head>    
-            <@helium_logger_node_content nodeid="${helium_node_id}">
-                <@printTasks project=node/>
-            </@helium_logger_node_content>
-        </#list>          
-    </@helium_logger_node_content>
-</#macro>
-
-<#macro printproject project>
-    <#assign helium_node_id = helium_node_id + 1>
-    <@helium_logger_node_head nodeid="${helium_node_id}" title="${project.name}">
-        <@helium_message_box nodeid="${helium_node_id}" type="baseline" count=project.baseline?size/>
-        <@helium_message_box nodeid="${helium_node_id}" type="task" count=project["count(//task)"]/>
-        <@helium_message_box nodeid="${helium_node_id}" type="fix" count=project.fix?size/>
-    </@helium_logger_node_head>    
-    <@helium_logger_node_content nodeid="${helium_node_id}">
-        <@printtype project=project.baseline title="Baselines" type="baseline"/>
-        <@printTasksAndFolders project=project title="Tasks"/>
-        <@printtype project=project.fix title="Fix" type="fix"/>
-    </@helium_logger_node_content>
-</#macro>
-
-
-    
-    <@helium_logger_header title="${doc.bom.build} build"/>
-        
-    <@helium_logger_content title="Baseline and Task details">
-        <#list doc.bom.content.project as project>
-            <@printproject project=project />
-        </#list>
-    </@helium_logger_content>
-
-    <@helium_logger_content title="ICDs / ICFs">
-        <@printtype project=doc.bom.content.input.icds.icd.name title="ICDs / ICFs" type="icd"/>
-    </@helium_logger_content>
-    
-    </body>
-</html>
-
--- a/buildframework/helium/tools/preparation/bom/bom.txt.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-<#--
-============================================================================ 
-Name        : bom.txt.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-Bill Of Materials
-=================
-
-Build: ${doc.bom.build}
-
-<#list doc.bom.content.project as project>
-
-Project
--------
-
-${project.name}
-
-Baselines
-`````````
-<#list project.baseline as baseline>
-${baseline}
-</#list>
-
-Tasks
-`````
-<#list project.task as task>
-${task.id}
-${task.synopsis}
-</#list>
-<#list project.folder as folder>
-<#list folder.task as task>
-${task.id}
-${task.synopsis}
-</#list>
-</#list>
-
-Folders
-```````
-<#list project.folder as folder>
-<#list folder.name as name>
-${name}
-</#list>    
-</#list>
-</#list>
-
-Symbian ICD/ICFs
-----------------
-
-<#list doc.bom.content.input.icds.icd as icd>
-${icd.name}
-</#list>
-
--- a/buildframework/helium/tools/preparation/bom/bom_delta.html.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-<#--
-============================================================================ 
-Name        : bom_delta.html.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-<#assign delta = doc.bomDelta>
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE HTML PUBLIC "-//w3c//dtd xhtml 1.0 strict//en"
-      "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-    <head>
-        <title>BOM delta for  ${delta.buildTo}</title>
-        
-        <link rel ="stylesheet" type="text/css" href="stylesheet.css" title="style"/>
-        <style type="text/css">
-              body{font-family:Verdana; font-size:10pt; line-height:1.1em; padding: 10px 10px; background-color:#E4F0F4;}
-              h1{
-                font-size:14pt;
-                background-color:#3366ff;
-                color:#000;                
-                margin:0;                
-                color:#fff;
-                heigth:20pt;
-                padding: 5px 15px;
-                text-align: center
-                border-left:2px solid #5A6FA0;
-                border-bottom:2px solid #5A6FA0;
-                border-top:2px solid #98A6C6;
-                border-right:2px solid #98A6C6;
-                
-                
-               }
-              h2{font-size:12pt;}
-              h3{
-                font-size:14pt;
-                color:#00f;
-                padding: 20px 15px;
-                    margin:0;
-               }
-              h5{
-                font-size:10pt;
-                background-color:#8495BA;
-                color:#fff;
-                heigth:20pt;
-                padding: 5px 15px;
-                border-left:2px solid #5A6FA0;
-                border-bottom:2px solid #5A6FA0;
-                border-top:2px solid #98A6C6;
-                border-right:2px solid #98A6C6;
-                margin:0;
-               }
-       
-        
-              p {
-                font-size:10pt;
-                padding: 0em 1em 1em 1em;
-                margin: 0 1em 0.5em 1em;
-                border-right:1px solid #5A6FA0;
-                border-top:0;
-                border-bottom:1px solid #98A6C6;
-                border-left:1px solid #98A6C6;
-                background-color:#CDE4EB;
-                white-space:normal;
-              }
-       
-              .data{color:#00F;}
-              .added{color:#24A22D;font-weight:normal; display:block; margin-bottom: 0em;padding-top: 0em;}
-              .deleted{color:#F00;font-weight:normal; display:block; margin-bottom: 0em;padding-top: 0em;}
-       
-              span.items{text-indent:-1em; padding-left: 1em; display:block; word-wrap:normal;}
-      
-              span.bold{font-weight:bold; display:block; padding: 1em 0;}
-              p.maintext{padding-top: 1em;}
-              p.logfolder{color:#000;font-weight:bold; padding-top: 1em;}
-              p.distrib{font-weight:bold;}
-               
-              a:link,a:visited{color:#00E;}
-        </style>
-    </head>
-    <body>
-        <h1>BOM delta for  ${delta.buildTo}</h1>
-        <div id="buildname">
-                <h3>Build from ${delta.buildFrom} to ${delta.buildTo} </h3>
-          </div>
-      
-          <div id="foldername">
-                   <h5>Task added </h5>
-                   <p class="maintext">                   
-                   <span class="data">
-                   <#list delta.content.task as tasks>
-                   <#if tasks.@status == "added">
-                       <span class="added"> ${tasks}</span>
-                   </#if>
-                   </#list>
-                   </span>
-                   </p>
-             </div>
-             <div id="foldername">                   
-                   <h5>Task removed</h5>
-                   <p class="logfolder">
-                    <#list delta.content.task as tasks>
-                   <#if tasks.@status == "deleted">
-                       <span class="deleted"> ${tasks}</span>
-                   </#if>
-                   </#list>
-                   </p>
-                </div>   
-                <div id="foldername">
-                   <h5>Baseline added</h5>
-                   <p class="maintext">                   
-                   <#list delta.content.baseline as baselines>
-                   <#if baselines.@status == "added">
-                       <span class="added">${baselines}</span>
-                   </#if>
-                   </#list>
-                   </p>
-                </div>   
-                <div id="foldername">
-                   <h5>Baseline removed</h5>
-                   <p class="logfolder">                   
-                   <#list delta.content.baseline as baselines>
-                   <#if baselines.@status == "deleted">
-                       <span class="deleted"> ${baselines}</span>
-                   </#if>
-                   </#list>                   
-               </div>
-        
-    </body>
-</html>
-
-
--- a/buildframework/helium/tools/preparation/bom/bom_delta.txt.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-<#--
-============================================================================ 
-Name        : bom_delta.txt.ftl 
-Part of     : Helium 
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
-This component and the accompanying materials are made available
-under the terms of the License "Eclipse Public License v1.0"
-which accompanies this distribution, and is available
-at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
-Initial Contributors:
-Nokia Corporation - initial contribution.
-
-Contributors:
-
-Description:
-
-============================================================================
---> 
-Bill Of Materials
-=================
-
-Build from: ${doc.bomDelta.buildFrom}
-Build to:   ${doc.bomDelta.buildTo}
-
-
-Baselines
----------
-<#list doc.bomDelta.content.baseline as baseline>
-<#if baseline.@status == "added">
-+ ${baseline}
-</#if>
-<#if baseline.@status == "deleted">
-- ${baseline}
-</#if>
-</#list>
-
-Tasks
------
-<#list doc.bomDelta.content.task as task>
-<#if task.@status == "added">
-+ ${task}
-</#if>
-<#if task.@status == "deleted">
-- ${task}
-</#if>
-</#list>
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/preparation/bom/templates/bom.html.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,104 @@
+<#--
+============================================================================ 
+Name        : bom.html.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+    <#include "/@macro/logger/logger.ftl" />
+    <head>
+        <title>Bill of Materials</title>
+        <@helium_logger_html_head/>
+    </head>
+    <body>
+
+
+<#macro printtype project title type>
+    <#assign helium_node_id = helium_node_id + 1>
+    <@helium_logger_node_head nodeid="${helium_node_id}" title="${title}">
+        <@helium_message_box nodeid="${helium_node_id}" type="${type}" count=project?size/>
+    </@helium_logger_node_head>    
+    <@helium_logger_node_content nodeid="${helium_node_id}">
+        <#list project as node>
+            <@helium_logger_print type="${type}">
+                ${node}
+            </@helium_logger_print>
+        </#list>
+    </@helium_logger_node_content>
+</#macro>
+
+<#macro printTasks project>
+    <#list project.task as node>
+    <@helium_logger_print type="task">
+      ${node.id}:${node.synopsis}
+    </@helium_logger_print>
+    </#list>
+</#macro>
+
+<#macro printTasksAndFolders project title>
+    <#assign helium_node_id = helium_node_id + 1>
+    <@helium_logger_node_head nodeid="${helium_node_id}" title="${title}">
+        <@helium_message_box nodeid="${helium_node_id}" type="task" count=project["count(//task)"]/>
+    </@helium_logger_node_head> 
+    <@helium_logger_node_content nodeid="${helium_node_id}">
+        <@printTasks project=project/>
+        <#list project.folder as node>           
+            <#assign helium_node_id = helium_node_id + 1>
+            <@helium_logger_node_head nodeid="${helium_node_id}" title="${node.name}">
+                <@helium_message_box nodeid="${helium_node_id}" type="task" count=project.task?size/>
+            </@helium_logger_node_head>    
+            <@helium_logger_node_content nodeid="${helium_node_id}">
+                <@printTasks project=node/>
+            </@helium_logger_node_content>
+        </#list>          
+    </@helium_logger_node_content>
+</#macro>
+
+<#macro printproject project>
+    <#assign helium_node_id = helium_node_id + 1>
+    <@helium_logger_node_head nodeid="${helium_node_id}" title="${project.name}">
+        <@helium_message_box nodeid="${helium_node_id}" type="baseline" count=project.baseline?size/>
+        <@helium_message_box nodeid="${helium_node_id}" type="task" count=project["count(//task)"]/>
+        <@helium_message_box nodeid="${helium_node_id}" type="fix" count=project.fix?size/>
+    </@helium_logger_node_head>    
+    <@helium_logger_node_content nodeid="${helium_node_id}">
+        <@printtype project=project.baseline title="Baselines" type="baseline"/>
+        <@printTasksAndFolders project=project title="Tasks"/>
+        <@printtype project=project.fix title="Fix" type="fix"/>
+    </@helium_logger_node_content>
+</#macro>
+
+
+    
+    <@helium_logger_header title="${doc.bom.build} build"/>
+        
+    <@helium_logger_content title="Baseline and Task details">
+        <#list doc.bom.content.project as project>
+            <@printproject project=project />
+        </#list>
+    </@helium_logger_content>
+
+    <@helium_logger_content title="ICDs / ICFs">
+        <@printtype project=doc.bom.content.input.icds.icd.name title="ICDs / ICFs" type="icd"/>
+    </@helium_logger_content>
+    
+    </body>
+</html>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/preparation/bom/templates/bom.txt.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,68 @@
+<#--
+============================================================================ 
+Name        : bom.txt.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+Bill Of Materials
+=================
+
+Build: ${doc.bom.build}
+
+<#list doc.bom.content.project as project>
+
+Project
+-------
+
+${project.name}
+
+Baselines
+`````````
+<#list project.baseline as baseline>
+${baseline}
+</#list>
+
+Tasks
+`````
+<#list project.task as task>
+${task.id}
+${task.synopsis}
+</#list>
+<#list project.folder as folder>
+<#list folder.task as task>
+${task.id}
+${task.synopsis}
+</#list>
+</#list>
+
+Folders
+```````
+<#list project.folder as folder>
+<#list folder.name as name>
+${name}
+</#list>    
+</#list>
+</#list>
+
+Symbian ICD/ICFs
+----------------
+
+<#list doc.bom.content.input.icds.icd as icd>
+${icd.name}
+</#list>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/preparation/bom/templates/bom_delta.html.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,147 @@
+<#--
+============================================================================ 
+Name        : bom_delta.html.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+<#assign delta = doc.bomDelta>
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE HTML PUBLIC "-//w3c//dtd xhtml 1.0 strict//en"
+      "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>BOM delta for  ${delta.buildTo}</title>
+        
+        <link rel ="stylesheet" type="text/css" href="stylesheet.css" title="style"/>
+        <style type="text/css">
+              body{font-family:Verdana; font-size:10pt; line-height:1.1em; padding: 10px 10px; background-color:#E4F0F4;}
+              h1{
+                font-size:14pt;
+                background-color:#3366ff;
+                color:#000;                
+                margin:0;                
+                color:#fff;
+                heigth:20pt;
+                padding: 5px 15px;
+                text-align: center
+                border-left:2px solid #5A6FA0;
+                border-bottom:2px solid #5A6FA0;
+                border-top:2px solid #98A6C6;
+                border-right:2px solid #98A6C6;
+                
+                
+               }
+              h2{font-size:12pt;}
+              h3{
+                font-size:14pt;
+                color:#00f;
+                padding: 20px 15px;
+                    margin:0;
+               }
+              h5{
+                font-size:10pt;
+                background-color:#8495BA;
+                color:#fff;
+                heigth:20pt;
+                padding: 5px 15px;
+                border-left:2px solid #5A6FA0;
+                border-bottom:2px solid #5A6FA0;
+                border-top:2px solid #98A6C6;
+                border-right:2px solid #98A6C6;
+                margin:0;
+               }
+       
+        
+              p {
+                font-size:10pt;
+                padding: 0em 1em 1em 1em;
+                margin: 0 1em 0.5em 1em;
+                border-right:1px solid #5A6FA0;
+                border-top:0;
+                border-bottom:1px solid #98A6C6;
+                border-left:1px solid #98A6C6;
+                background-color:#CDE4EB;
+                white-space:normal;
+              }
+       
+              .data{color:#00F;}
+              .added{color:#24A22D;font-weight:normal; display:block; margin-bottom: 0em;padding-top: 0em;}
+              .deleted{color:#F00;font-weight:normal; display:block; margin-bottom: 0em;padding-top: 0em;}
+       
+              span.items{text-indent:-1em; padding-left: 1em; display:block; word-wrap:normal;}
+      
+              span.bold{font-weight:bold; display:block; padding: 1em 0;}
+              p.maintext{padding-top: 1em;}
+              p.logfolder{color:#000;font-weight:bold; padding-top: 1em;}
+              p.distrib{font-weight:bold;}
+               
+              a:link,a:visited{color:#00E;}
+        </style>
+    </head>
+    <body>
+        <h1>BOM delta for  ${delta.buildTo}</h1>
+        <div id="buildname">
+                <h3>Build from ${delta.buildFrom} to ${delta.buildTo} </h3>
+          </div>
+      
+          <div id="foldername">
+                   <h5>Task added </h5>
+                   <p class="maintext">                   
+                   <span class="data">
+                   <#list delta.content.task as tasks>
+                   <#if tasks.@status == "added">
+                       <span class="added"> ${tasks}</span>
+                   </#if>
+                   </#list>
+                   </span>
+                   </p>
+             </div>
+             <div id="foldername">                   
+                   <h5>Task removed</h5>
+                   <p class="logfolder">
+                    <#list delta.content.task as tasks>
+                   <#if tasks.@status == "deleted">
+                       <span class="deleted"> ${tasks}</span>
+                   </#if>
+                   </#list>
+                   </p>
+                </div>   
+                <div id="foldername">
+                   <h5>Baseline added</h5>
+                   <p class="maintext">                   
+                   <#list delta.content.baseline as baselines>
+                   <#if baselines.@status == "added">
+                       <span class="added">${baselines}</span>
+                   </#if>
+                   </#list>
+                   </p>
+                </div>   
+                <div id="foldername">
+                   <h5>Baseline removed</h5>
+                   <p class="logfolder">                   
+                   <#list delta.content.baseline as baselines>
+                   <#if baselines.@status == "deleted">
+                       <span class="deleted"> ${baselines}</span>
+                   </#if>
+                   </#list>                   
+               </div>
+        
+    </body>
+</html>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/preparation/bom/templates/bom_delta.txt.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,50 @@
+<#--
+============================================================================ 
+Name        : bom_delta.txt.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+Bill Of Materials
+=================
+
+Build from: ${doc.bomDelta.buildFrom}
+Build to:   ${doc.bomDelta.buildTo}
+
+
+Baselines
+---------
+<#list doc.bomDelta.content.baseline as baseline>
+<#if baseline.@status == "added">
++ ${baseline}
+</#if>
+<#if baseline.@status == "deleted">
+- ${baseline}
+</#if>
+</#list>
+
+Tasks
+-----
+<#list doc.bomDelta.content.task as task>
+<#if task.@status == "added">
++ ${task}
+</#if>
+<#if task.@status == "deleted">
+- ${task}
+</#if>
+</#list>
+
--- a/buildframework/helium/tools/preparation/ci.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/preparation/ci.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -73,8 +73,6 @@
     try:
         self.log(str("Removing %s" % dir_))
         fileutils.rmtree(dir_)
-    except Exception, exc:
-        self.log(str("ERROR: %s" % exc))
     except IOException, ioExc:
         self.log(str("ERROR: %s" % ioExc))
 
@@ -183,14 +181,10 @@
             update_session = False
 
     if update_session:
-        try:
-            self.log(str("Opening a new session for %s..." % database))
-            session = nokia.nokiaccm.open_session(database=database, engine=engine, dbpath=dbpath)
-            session.close_on_exit = False        
-            config[database] = session.addr()
-        except Exception, exc:
-            traceback.print_exc()
-            raise exc
+        self.log(str("Opening a new session for %s..." % database))
+        session = nokia.nokiaccm.open_session(database=database, engine=engine, dbpath=dbpath)
+        session.close_on_exit = False        
+        config[database] = session.addr()
     
 self.log(str("Updating the file %s..." % sessionFile))
 config.store(open(sessionFile, 'w+'))    
--- a/buildframework/helium/tools/preparation/ido-prep.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/preparation/ido-prep.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -30,31 +30,16 @@
          * IBY export (old way)
     </description>
         
-    <!-- Path to a INI file that contains the mapping between the ADO from Synergy WA and it's location on the BA.
-    @type string
-    @scope private
-    -->
-    <property name="ado.mapping.file" location="${build.output.dir}/build/ado_mapping.ini"/>
-    <!-- Path to a INI file that contains the mapping between the ADO from Synergy WA and it's location on the BA for quality targets.
+    <!-- Path to the cenrep root. Default value is "${build.drive}/epoc32/tools/cenrep/ido/src"
     @type string
     @scope private
     -->
-    <property name="ado.quality.mapping.file" location="${build.output.dir}/build/ado_quality_mapping.ini"/>
-    <!-- Path to the build romtree; the location contains iby files. Default value is "${build.drive}${env.EPOCROOT}/epoc32/rom/include"
+    <property name="ido.cenrep.root" location="${build.drive}/epoc32/tools/cenrep/ido/src"  />
+    <!-- Path to the cenrep target directory. Default value is "${build.drive}/epoc32/data/z/private/10202be9"
     @type string
     @scope private
     -->
-    <property name="ido.romtree" location="${build.drive}${env.EPOCROOT}/epoc32/rom/include"  />
-    <!-- Path to the cenrep root. Default value is "${build.drive}${env.EPOCROOT}/epoc32/tools/cenrep/ido/src"
-    @type string
-    @scope private
-    -->
-    <property name="ido.cenrep.root" location="${build.drive}${env.EPOCROOT}/epoc32/tools/cenrep/ido/src"  />
-    <!-- Path to the cenrep target directory. Default value is "${build.drive}${env.EPOCROOT}/epoc32/data/z/private/10202be9"
-    @type string
-    @scope private
-    -->
-    <property name="ido.cenrep.target" value="${build.drive}${env.EPOCROOT}/epoc32/data/z/private/10202be9"  />
+    <property name="ido.cenrep.target" value="${build.drive}/epoc32/data/z/private/10202be9"  />
     <!-- Defines the location of Codescanner output.
     @type string
     -->
@@ -78,6 +63,27 @@
     @type boolean
     @scope private
     -->
+
+    <!-- Path to a INI file that contains the mapping between the ADO from Synergy WA and it's location on the BA for quality targets.
+    @type string
+    @scope private
+    @deprecated since 12.0 Not used, ido-create-ado-mapping is not used, it is replaced with macro createAdoMappingMacro.
+    -->
+    <property name="ado.mapping.file" location="${build.output.dir}/build/ado_mapping.ini"/>
+
+    <!-- Path to a INI file that contains the quality mapping between the ADO from Synergy WA and it's location on the BA for quality targets.
+    @type string
+    @scope private
+    @deprecated since 12.0 Not used, ido-create-ado-mapping is not used, it is replaced with macro createAdoMappingMacro.
+    -->
+    <property name="ado.quality.mapping.file" location="${build.output.dir}/build/ado_quality_mapping.ini"/>
+
+    <!-- Path to the build romtree; the location contains iby files. Default value is "${build.drive}${env.EPOCROOT}/epoc32/rom/include"
+    deprecated: Not used, ido-create-ado-mapping is not used, it is replaced with macro createAdoMappingMacro.
+    @type string
+    @scope private
+    @deprecated 12.0 since Not used, ido-create-ado-mapping is not used, it is replaced with macro createAdoMappingMacro.
+    -->
     
     <!--* @property cmt.enabled
     Enables to run cmt, testing code coverage tool.
@@ -107,8 +113,14 @@
     @scope public
     @since 11.0
     -->
-    <property name="codescanner.enabled" value="true"/>
+    <property name="codescanner.enabled" value="true"/>
 
+    <!--* @property codescanner.lxr.source.url
+    Enables source files referring to lxr url path in codescanner output html files. Should not include source path on platform.
+    @type string
+    @scope public
+    @since 12.0
+    -->
     
     <!--* @property internal.codescanner.enabled
     Enables codescanner targets to run if codescanner.enabled is set to true.
@@ -184,63 +196,100 @@
             </not>
         </and>
     </condition>
-    
+
+    <!--
+    @deprecated: since 12.0: Use createAdoMappingMacro  
+     -->
     <target name="ido-create-ado-mapping">
-        <mkdir dir="${build.output.dir}/build"/>
-        <mkdir dir="${temp.build.dir}"/>
-        <if>
-            <istrue value="${sysdef3.enabled}" />
-            <then>
-                <hlm:createPackageMapping epocroot="${build.drive}" destFile="${ado.mapping.file}">
-                    <path refid="system.definition.files" />
-                </hlm:createPackageMapping>
-                <if>
-                    <isreference refid="ado.quality.dirs" />
-                    <then>
-                        <hlm:createPackageMapping epocroot="${build.drive}" destFile="${ado.quality.mapping.file}"
-                            filterDirSet="ado.quality.dirs" >
-                            <path refid="system.definition.files" />
-                        </hlm:createPackageMapping>
-                    </then>
-                    <else>
-                        <copy file="${ado.mapping.file}" tofile="${ado.quality.mapping.file}" overwrite="true" />
-                    </else>
-                </if>
-            </then>
-            <else>
-                <tempfile property="prep.dynamic.sysdef.config" suffix=".txt" deleteonexit="false" destdir="${temp.build.dir}"/>
-                <trycatch property="error.message">
-                    <try>
-                        <hlm:referenceToFileMacro refid="system.definition.files" output="${prep.dynamic.sysdef.config}"/>
-                    </try>
-                    <catch>       
-                        <propertyregex property="message" input="${error.message}"
-                          regexp=":(.*)$"
-                          select="\1" casesensitive="false" />
-                        <fail message="Error: ${message}" />     
-                    </catch>               
-                </trycatch>
-                <trycatch>
-                    <try>
-                        <pathconvert pathsep="," property="ado.quality.dirs.path">
-                            <dirset refid="ado.quality.dirs"/>
-                        </pathconvert>                              
-                    </try>
-                </trycatch>
-                <script language="jython" setbeans="false">
+        <hlm:createAdoMappingMacro adoMapFile="${ado.mapping.file}" />
+        <hlm:createAdoMappingMacro adoMapFile="${ado.quality.mapping.file}" mapForQuality="true"/>
+    </target>
+
+    <!-- Internal target to generate ado mapping for old sysdef format, this would be deprecated once
+         the sysdef3 is deployed. 
+    -->
+    <scriptdef name="adoMappingOldSysdefMacro" language="jython" uri="http://www.nokia.com/helium">
+        <attribute name="adomapfile" />
+        <attribute name="mapforquality" />
+import os
 import idoprep
-idoprep.create_ado_mapping(project.getProperty(r"prep.dynamic.sysdef.config"), project.getProperty(r"ado.mapping.file"), project.getProperty(r"ado.quality.mapping.file"), project.getProperty(r"build.drive"), project.getProperty("ado.quality.dirs.path"))
-                </script>
-            </else>
-        </if>
-    </target>
-    
+idoprep.create_ado_mapping(project.getProperty(r"prep.dynamic.sysdef.config"), attributes.get(r"adomapfile"), attributes.get(r"mapforquality"), project.getProperty(r"build.drive"), project.getProperty(r"ado.quality.dirs.path"))
+    </scriptdef>
+
+    <!-- Generates ado mapping file which could be used to identify the new sources. 
+        e.g: 
+        <pre>
+            <property name="prep.copy.mapping.file" location="${build.output.dir}/build/ado_mapping_copy.ini" />
+            <hlm:createAdoMappingMacro adoMapFile="${prep.copy.mapping.file}" />
+        </pre>
+
+    Usage example:
+    <pre>
+        <target name="ido-map-file">
+            <property name="prep.copy.mapping.file" location="${build.output.dir}/build/ado_mapping_copy.ini" />
+            <hlm:createAdoMappingMacro adoMapFile="${prep.copy.mapping.file}" />
+        </target>
+    </pre>
+    -->
+    <macrodef name="createAdoMappingMacro" uri="http://www.nokia.com/helium">
+        <attribute name="adoMapFile"/>
+        <attribute name="mapForQuality" default="false"/>
+        <sequential>
+            <mkdir dir="${build.output.dir}/build"/>
+            <mkdir dir="${temp.build.dir}"/>
+            <if>
+                <istrue value="${sysdef3.enabled}" />
+                <then>
+                    <if>
+                        <and>
+                            <isreference refid="ado.quality.dirs" />
+                            <equals arg1="@{mapForQuality}" arg2="true" />
+                        </and>
+                        <then>
+                            <hlm:createPackageMapping epocroot="${build.drive}" destFile="@{adoMapFile}"
+                                filterDirSet="ado.quality.dirs" >
+                                <path refid="system.definition.files" />
+                            </hlm:createPackageMapping>
+                        </then>
+                        <else>
+                            <hlm:createPackageMapping epocroot="${build.drive}" destFile="@{adoMapFile}">
+                                <path refid="system.definition.files" />
+                            </hlm:createPackageMapping>
+                        </else>
+                    </if>
+                </then>
+                <else>
+                    <tempfile property="prep.dynamic.sysdef.config" suffix=".txt" deleteonexit="false" destdir="${temp.build.dir}"/>
+                    <trycatch property="error.message">
+                        <try>
+                            <hlm:referenceToFileMacro refid="system.definition.files" output="${prep.dynamic.sysdef.config}"/>
+                        </try>
+                        <catch>       
+                            <propertyregex property="message" input="${error.message}"
+                              regexp=":(.*)$"
+                              select="\1" casesensitive="false" />
+                            <fail message="Error: ${message}" />     
+                        </catch>               
+                    </trycatch>
+                    <trycatch>
+                        <try>
+                            <pathconvert pathsep="," property="ado.quality.dirs.path">
+                                <dirset refid="ado.quality.dirs"/>
+                            </pathconvert>                              
+                        </try>
+                    </trycatch>
+                    <hlm:adoMappingOldSysdefMacro adomapfile="@{adoMapFile}"  mapforquality="@{mapForQuality}" />
+                </else>
+            </if>
+        </sequential>
+    </macrodef>
+
     <!-- Target to generate cenreps using cone tool -->
     <target name="ido-gen-cenrep">
         <mkdir dir="${post.log.dir}" />
         <mkdir dir="${temp.build.dir}" />
         <tempfile property="cenrep.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/>
-        <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-cenrep-gen.xml.ftl"
+        <fmpp sourceFile="${helium.dir}/tools/preparation/templates/ido-cenrep-gen.xml.ftl"
               outputfile="${cenrep.dynamic.config}">
             <data expandProperties="yes">
                 dbPath: ${metadata.dbfile}
@@ -276,7 +325,7 @@
         <mkdir dir="${post.log.dir}" />
         <mkdir dir="${temp.build.dir}" />
         <tempfile property="confml.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/>
-        <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-confml-validate.ant.xml.ftl"
+        <fmpp sourceFile="${helium.dir}/tools/preparation/templates/ido-confml-validate.ant.xml.ftl"
               outputfile="${confml.dynamic.config}">
             <data expandProperties="yes">
                 dbPath: ${metadata.dbfile}
@@ -317,7 +366,7 @@
     @type string
     @scope public
     -->
-    <property name="ido.prep.copy.template" location="${helium.dir}/tools/common/templates/ido/ido-ant-copy.xml.ftl" />
+    <property name="ido.prep.copy.template" location="${helium.dir}/tools/preparation/templates/ido-ant-copy.xml.ftl" />
     
     <!-- Target that uses the information from the system.definition.files to prepare the IDO build area.
         It relies on the fact that layer_real_source_path entity is declared in each ADO configuration.
@@ -325,13 +374,15 @@
         By default it deletes the previous content. If you want to backup what was previoulsy used please
         defined '''keep.old.source.enabled''' property.         
         -->
-    <target name="ido-prep-copy" depends="ido-create-ado-mapping">
+    <target name="ido-prep-copy">
+        <property name="prep.copy.mapping.file" location="${build.output.dir}/build/ado_mapping_copy.ini" />
+        <hlm:createAdoMappingMacro adoMapFile="${prep.copy.mapping.file}" />
         <mkdir dir="${temp.build.dir}"/>
         <tempfile property="prep.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/>
         <fmpp sourceFile="${ido.prep.copy.template}"
             outputFile="${prep.dynamic.config}">
             <data expandProperties="yes">
-                inputfile: antProperty(ado.mapping.file)
+                inputfile: antProperty(prep.copy.mapping.file)
                 ant: antProperties()
                     data: eval('
                             java.io.FileInputStream pin = new java.io.FileInputStream(filename);
@@ -347,9 +398,9 @@
     
     <!--
     Run cleanup system definition configuration. The configuration name are
-    generated from the '''sysdef.configurations.list''' property, appending '_clean'
+    generated from the ``sysdef.configurations.list`` property, appending '_clean'
     at the end of each configuration also reversing their build order.
-    if '''sysdef.clean.configurations.list''' is defined it overrides
+    if ``sysdef.clean.configurations.list`` is defined it overrides
     the previous beharvious and is used to cleanup the environment.
     -->
     <target name ="ido-prep-clean">
@@ -364,7 +415,7 @@
                         <script language="jython" setbeans="false">
 rev_names = ""
 for sysdef in project.getProperty("sysdef.configurations.list").split(","):    
-    rev_names = sysdef + "_clean," + rev_names;
+    rev_names = sysdef + "_clean," + rev_names
 project.setProperty("sysdef.clean.configurations.list", rev_names)
                         </script>
                     </then>
@@ -385,24 +436,34 @@
 
     <!--
         This targets run the codescanner application on each discovered ADO.
-        The location of the output is defined byt '''ido.codescanner.output.dir''' property.
-        And the type is defined by '''ido.codescanner.output.type''' (default is HTML). 
+        The location of the output is defined byt ``ido.codescanner.output.dir`` property.
+        And the type is defined by ``ido.codescanner.output.type`` (default is HTML). 
+        To update the HTML files with lxr source URL you need to set the property ``codescanner.lxr.source.url`` 
+        URL should not include source path on platform.
     -->
-    <target name="ido-codescanner" depends="ido-create-ado-mapping" if="internal.codescanner.enabled">
-        
-        <!--hlm:iniKeys2Path ini="${ado.mapping.file}" pathid="ado.src.path"/-->
+    <target name="ido-codescanner" if="internal.codescanner.enabled">
+        <property name="codescanner.mapping.file" location="${build.output.dir}/build/ado_mapping_codescanner.ini" />
+        <hlm:createAdoMappingMacro adoMapFile="${codescanner.mapping.file}" mapForQuality="true"/>
+        <!--hlm:iniKeys2Path ini="${codescanner.mapping.file}" pathid="ado.src.path"/-->
         <!-- Defines the format of Codescanner output (html|xml|std).
         @type string
         -->
-        <property name="ido.codescanner.output.type" value="html"/>
-        <script language="jython" setbeans="false">
-""" internal.codescanner.drive """
+        <hlm:resourceaccess lockName="subst-drive">
+            <property name="ido.codescanner.output.type" value="html"/>
+            
+            <!-- Defines the fmpp template for Codescanner.
+            @type string
+            @scope private
+            -->
+            <property name="ido.codescanner.template" value="${helium.dir}/tools/preparation/templates/ido-codescanner.ant.xml.ftl"/>
+            <script language="jython" setbeans="false">
+#internal.codescanner.drive
 import os
 import fileutils
 import configuration
 import pathaddition.relative
 
-config = configuration.PropertiesConfiguration(stream=open(str(project.getProperty("ado.quality.mapping.file")), 'r'))
+config = configuration.PropertiesConfiguration(stream=open(str(project.getProperty("codescanner.mapping.file")), 'r'))
 prefix = pathaddition.relative.commonprefix(config.keys())
 if not os.path.exists(prefix):
     raise Exception("Could not find common prefix for the following paths:\n" + "\n".join(config.keys()))
@@ -423,14 +484,37 @@
     pe = path.createPathElement()
     pe.setPath(location)
 project.addReference('substed.ado.src.path', path)
-        </script>
+            </script>
+        </hlm:resourceaccess>
         <trycatch property="codescanner.thrown">
             <try>
-                <hlm:codescanner dest="${ido.codescanner.output.dir}"
-                    format="${ido.codescanner.output.type}"
-                    configuration="${ido.codescanner.config}">
-                    <path refid="substed.ado.src.path"/>
-                </hlm:codescanner>
+                <if>
+                    <isset property="codescanner.lxr.source.url"/>
+                    <then>
+                        <tempfile property="codescanner.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/>
+                        <fmpp sourceFile="${ido.codescanner.template}"
+                            outputFile="${codescanner.dynamic.config}">
+                            <data expandProperties="yes">
+                                inputfile: antProperty(codescanner.mapping.file)
+                                ant: antProperties()
+                                data: eval('
+                                        java.io.FileInputStream pin = new java.io.FileInputStream(filename);
+                                        java.util.Properties props = new java.util.Properties();
+                                        props.load(pin);
+                                        return props;
+                                        ', {filename:get(inputfile)})
+                            </data>
+                        </fmpp>
+                        <ant antfile="${codescanner.dynamic.config}"/>
+                    </then>
+                    <else>
+                        <hlm:codescanner dest="${ido.codescanner.output.dir}"
+                            format="${ido.codescanner.output.type}"
+                            configuration="${ido.codescanner.config}">
+                            <path refid="substed.ado.src.path"/>
+                        </hlm:codescanner>
+                    </else>
+                </if>
             </try>
             <catch>
                 <fail message="${codescanner.thrown}" />
@@ -439,6 +523,7 @@
                 <hlm:unsubst drive="${internal.codescanner.drive}"/>
             </finally>
         </trycatch>
+        
     </target>
 
         <!-- CMT Tool target. Complexity tool measures. Supported options for cmt tool macro is
@@ -446,12 +531,13 @@
         2. output - output xml file (file size is huge 68MB for JAVA IDO, if this needs to be send, need to consider
         3. config - input config . 
         -->
-    <target name="ido-cmt" depends="ido-create-ado-mapping" if="internal.cmt.enabled">
-        
-        <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-cmt-ant.xml.ftl"
+    <target name="ido-cmt" if="internal.cmt.enabled">
+        <property name="cmt.mapping.file" location="${build.output.dir}/build/ado_mapping_cmt.ini" />
+        <hlm:createAdoMappingMacro adoMapFile="${cmt.mapping.file}" mapForQuality="true"/>
+        <fmpp sourceFile="${helium.dir}/tools/preparation/templates/ido-cmt-ant.xml.ftl"
                           outputFile="${temp.build.dir}/ido-cmt.ant.xml">
             <data expandProperties="yes">
-                        inputfile: antProperty(ado.quality.mapping.file)
+                        inputfile: antProperty(cmt.mapping.file)
                         ant: antProperties()
                             data: eval('
                                     java.io.FileInputStream pin = new java.io.FileInputStream(filename);
@@ -492,16 +578,16 @@
         
     </target>
 
-    <!-- Internal target that generates a temporary file that allow the 
-    either export of iby or either key*.xls. The generated Ant build file
-    contains two targets with copy insturctions and generic set of fileset rules.     
+    <!-- Target to copy files based on ado mapping.
     -->
-    <target name="ido-create-copy-file" depends="ido-create-ado-mapping">
+    <target name="ido-create-copy-file">
+        <property name="create.copy.mapping.file" location="${build.output.dir}/build/ado_mapping_create_copy.ini" />
+        <hlm:createAdoMappingMacro adoMapFile="${create.copy.mapping.file}" />
         <tempfile property="copyfile.dynamic.config" suffix=".ant.xml" deleteonexit="false" destdir="${temp.build.dir}"/>
-        <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-export.ant.xml.ftl"
+        <fmpp sourceFile="${helium.dir}/tools/preparation/templates/ido-export.ant.xml.ftl"
                       outputFile="${copyfile.dynamic.config}">
             <data expandProperties="yes">
-                inputfile: antProperty(ado.mapping.file)
+                inputfile: antProperty(create.copy.mapping.file)
                 ant: antProperties()
                 data: eval('
                             java.io.FileInputStream pin = new java.io.FileInputStream(filename);
@@ -550,94 +636,172 @@
     </target>
 
     <!-- Gets the contents from a network drive or Dragonfly -->
-    <target name="ido-check-latest-release" depends="ido-check-latest-release-grace" unless="env.HLM_SUBCON">
+    <target name="ido-check-latest-release" depends="ido-check-latest-release-network" unless="env.HLM_SUBCON">
         <runtarget target="ido-check-latest-release-dragonfly"/>
     </target>
 
+    <!--* @property s60.grace.service
+        File service to look into.
+        @type string
+        @editable required
+        @scope public
+        @deprecated since 12.0
+    -->
+    <!--* @property download.release.service
+        File service to look into.
+        @type string
+        @editable required
+        @scope public
+    -->
+    <condition property="download.release.service" value="${s60.grace.service}">
+        <isset property="s60.grace.service" />
+    </condition>
+
     <!--* @property s60.grace.server
         UNC path to file server.
         @type string
         @editable required
         @scope public
+        @deprecated since 12.0
     -->
-    <!--* @property s60.grace.service
-        File service to look into.
+    <!--* @property download.release.server
+        UNC path to file server.
         @type string
         @editable required
         @scope public
     -->
+    <condition property="download.release.server" value="${s60.grace.server}">
+        <isset property="s60.grace.server" />
+    </condition>
+    
     <!--* @property s60.grace.product
         Product to look into.
         @type string
         @editable required
         @scope public
+        @deprecated since 12.0
     -->
+    <!--* @property download.release.product
+        Product to look into.
+        @type string
+        @editable required
+        @scope public
+    -->
+    <condition property="download.release.product" value="${s60.grace.product}">
+        <isset property="s60.grace.product" />
+    </condition>
+    
     <!--* @property s60.grace.release
         Regular expression to match a particular realease.
         @type string
         @editable required
         @scope public
+        @deprecated since 12.0
+    -->
+        
+    <!--* @property download.release.regex
+        Regular expression to match a particular realease.
+        @type string
+        @editable required
+        @scope public
     -->
-    <!--* @property s60.grace.release.fixbuildregex
-        Regular expression to match a particular release fixbuilds. Example _(.*?)$ or _(\d+)$ 
+    <condition property="download.release.regex" value="${s60.grace.release}">
+        <isset property="s60.grace.release" />
+    </condition>
+    
+    <!-- Regular expression to match a particular release fixbuilds. Example _(.*?)$ or _(\d+)$ 
+        @type string
+        @editable required
+        @scope public
+        @deprecated since 12.0
+    -->
+    <property name="s60.grace.release.fixbuildregex" value="_(.*?)$" />
+    
+    <!-- Regular expression to match a particular release fixbuilds. Example _(.*?)$ or _(\d+)$ 
         @type string
         @editable required
         @scope public
     -->
+    <property name="download.release.fixbuildregex" value="${s60.grace.release.fixbuildregex}" />
+    
     <!--* @property s60.grace.cache
-        Location of the Grace result cache for a builder.
+        Location of the result cache for a builder.
+        @type string
+        @editable required
+        @scope public
+        @deprecated since 12.0
+    -->
+    <!--* @property download.release.cache
+        Location of the result cache for a builder.
         @type string
         @editable required
         @scope public
     -->
-    <!--* @property s60.grace.checkmd5
-        Enable MD5 validation for release metadata (default: false).
-        @type boolean
-        @editable required
-        @scope public
-        @deprecate Since 11.0
-    -->
+    <condition property="download.release.cache" value="${s60.grace.cache}">
+        <isset property="s60.grace.cache" />
+    </condition>
     
     <!--* @property s60.grace.checkmd5.enabled
         Enable MD5 validation for release metadata (default: false).
         @type boolean
         @editable required
         @scope public
+        @deprecated since 12.0
     -->
-    
-    <!--* @property internal.s60.grace.checkmd5.enabled
-        set if s60.grace.checkmd5.enabled set to true.
+    <!--* @property download.release.checkmd5.enabled
+        Enable MD5 validation for release metadata (default: false).
         @type boolean
-        @scope private
+        @editable required
+        @scope public
     -->
-    
+        
     <!--* @property s60.grace.revision
         Defined the regular expression to find a particular revision.
         @type string
         @editable required
         @scope public
+        @deprecated since 12.0
+    -->
+    <!--* @property download.release.revision
+        Defined the regular expression to find a particular revision.
+        @type string
+        @editable required
+        @scope public
     -->
+    <condition property="download.release.revision" value="${s60.grace.revision}">
+        <isset property="s60.grace.revision" />
+    </condition>
+    
     <!--* @property s60.grace.usetickler
         Enable the detection of ready release using release tickler mechanism.
         @type boolean
         @editable required
         @scope public
+        @deprecated since 12.0
     -->
+    <!--* @property download.release.usetickler
+        Enable the detection of ready release using release tickler mechanism.
+        @type string
+        @editable required
+        @scope public
+    -->
+    <condition property="download.release.usetickler" value="${s60.grace.usetickler}">
+        <isset property="s60.grace.usetickler" />
+    </condition>
     
-    <!-- Check is the s60.grace.checkmd5.enabled is set -->
-    <condition property="internal.s60.grace.checkmd5.enabled" else="false" value="true">
+    <condition property="internal.release.checkmd5.enabled" else="false" value="true">
         <or>
             <istrue value="${s60.grace.checkmd5.enabled}"/>
-            <istrue value="${s60.grace.checkmd5}"/>
+            <istrue value="${download.release.checkmd5.enabled}"/>
         </or>
     </condition>
     <!-- Checks the contents from the release. -->    
-    <target name="ido-check-latest-release-grace" unless="internal.dragonfly.enabled">
+    <target name="ido-check-latest-release-network" unless="internal.dragonfly.enabled">
         <script language="jython" setbeans="false">
 import os
 import idoprep
-
-result = idoprep.get_s60_env_details(project.getProperty('s60.grace.server'), project.getProperty('s60.grace.service'), project.getProperty('s60.grace.product'), project.getProperty('s60.grace.release'), project.getProperty('s60.grace.revision'), project.getProperty('s60.grace.cache'), project.getProperty('internal.s60.grace.checkmd5.enabled'), project.getProperty('s60.grace.usetickler'))
+from com.nokia.ant.util import Helper
+result = idoprep.get_s60_env_details(Helper.getProperty(project, 'download.release.server'), Helper.getProperty(project, 'download.release.service'), Helper.getProperty(project, 'download.release.product'), Helper.getProperty(project, 'download.release.regex'), project.getProperty('download.release.revision'), project.getProperty('download.release.cache'), project.getProperty('internal.release.checkmd5.enabled'), project.getProperty('download.release.usetickler'))
 resultname = os.path.basename(result[0])
 project.setProperty('s60.getenv.path', str(result[0]))
 project.setProperty('s60.getenv.release', str(resultname))
@@ -646,6 +810,11 @@
     project.setProperty('s60.getenv.update', "1")
         </script>
     </target>
+    
+    <!-- Replaced by ido-update-build-area-network.
+    @deprecated since 12.0
+    -->
+    <target name="ido-update-build-area-grace" depends="ido-update-build-area-network"/>
 
     <!-- Updates the build area from either a network drive or Dragonfly server.-->
     <target name="ido-update-build-area" depends="backup-subst-drives,ido-update-build-area-grace" unless="env.HLM_SUBCON">
@@ -653,9 +822,9 @@
     </target>
 
     <!-- Creates the build area by getting the contents from the release.-->    
-    <target name="ido-update-build-area-grace" if="s60.getenv.update" depends="ido-check-latest-release" unless="internal.dragonfly.enabled">
+    <target name="ido-update-build-area-network" if="s60.getenv.update" depends="ido-check-latest-release" unless="internal.dragonfly.enabled">
         <!-- Just get S60 for IDOs -->
-        <echo>Location of the new S60 release:${s60.getenv.path}</echo>
+        <echo>Location of the new release:${s60.getenv.path}</echo>
         <tstamp>
             <format property="getenv.tstamp" pattern="yyyyMMddHHmmss"/>
         </tstamp>
@@ -703,7 +872,7 @@
 variant_pkg = rel_metadata.getVariantPackage(project.getProperty('ido.variant'))
 project.setProperty('ido.variant.package', os.path.join(rel_path, variant_pkg))
         </script>
-        <unzip src="${ido.variant.package}" dest="${build.drive}${env.EPOCROOT}"/>
+        <unzip src="${ido.variant.package}" dest="${build.drive}/"/>
     </target>
 
 
--- a/buildframework/helium/tools/preparation/password.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/preparation/password.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -75,12 +75,6 @@
         <hlm:filterRecordStopMacro/>
     </target>
     
-    <!-- Retrieve the GRACE password from the .netrc file and store it into release.grace.password property. -->
-    <target name="grace-password" if="release.grace">
-        <hlm:netrcPasswordMacro output-prop="release.grace.password" result-prop="grace.password.available" type="grace"/>
-        <hlm:logreplace regexp="${release.grace.password}"/>
-    </target>
-    
     <!-- Retrieve the NOE password from the .netrc file and store it into noe.password property. -->
     <target name="noe-password">
         <hlm:netrcPasswordMacro output-prop="noe.password" result-prop="noe.password.available" type="noe"/>
@@ -190,18 +184,5 @@
     <!-- check synergy is available needs ccm.enabled to be set to 'true' as well.-->
     <target name="ccm-check" unless="skip.password.validation" if="internal.ccm.enabled">
         <hlm:ccmAvailableMacro resultproperty="ccm.session.created"/>
-        <echo>ccm.session.created = ${ccm.session.created}</echo>
-        <if>
-            <equals arg1="${ccm.session.created}" arg2="-1"/>
-            <then>
-                <fail message="Unable to create CCM session."/>
-            </then>
-        </if>
-        <if>
-            <equals arg1="${ccm.session.created}" arg2="-2"/>
-            <then>
-                <fail message="Access Denied for user."/>
-            </then>
-        </if>
     </target>
 </project>
--- a/buildframework/helium/tools/preparation/preparation.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/preparation/preparation.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -120,7 +120,7 @@
 
 
     <!-- Gets a release from network drive. -->
-    <target name="preparation-getenv" if="base_release.path" depends="init-build-area">
+    <target name="preparation-getenv" if="base_release.path" depends="init-build-area,start-ant-log">
         <!-- Making sure we have nothing to pass -->
         <property name="base_release.path" value=""/>
         <property name="base_release.getenv_options" value=""/>
@@ -373,7 +373,6 @@
     <propertyset id="password.list.ref">
         <propertyref name="ccm.password.rc" />
         <propertyref name="ccm.user.password" />
-        <propertyref name="release.grace.password" />
         <propertyref name="unix.password" />
         <propertyref name="release.notes.password" />
         <propertyref name="nwiki.password" />
@@ -443,7 +442,10 @@
                         <script language="jython" setbeans="false">
 from java.io import *
 import time
+import os
 prep_build_dir_str = project.getProperty('prep.build.dir')
+if prep_build_dir_str.endswith(os.sep):
+    prep_build_dir_str = prep_build_dir_str[:-1]
 prep_build_dir = File(prep_build_dir_str)
 print prep_build_dir
 if prep_build_dir.exists(): 
--- a/buildframework/helium/tools/preparation/synergy/ccmgetinput.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/preparation/synergy/ccmgetinput.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -76,26 +76,15 @@
 # enabling logging
 logging.basicConfig(level=logging.INFO)
 
-builder = None           
+configBuilder = configuration.NestedConfigurationBuilder(open(ant.get_property(r'${prep.delivery.conf.parsed}'), 'r'))
+configSet = configBuilder.getConfiguration()
+password = ant.get_property(r'${ccm.user.password}')
+builder = preparation.PreparationBuilder(configSet.getConfigurations(), ant.get_property(r'${ccm.user.login}'), password, cache=ant.get_property(r'${ccm.cache.xml}'))
 try:
-    configBuilder = configuration.NestedConfigurationBuilder(open(ant.get_property(r'${prep.delivery.conf.parsed}'), 'r'))
-    configSet = configBuilder.getConfiguration()
-    password = ant.get_property(r'${ccm.user.password}')
-    builder = preparation.PreparationBuilder(configSet.getConfigurations(), ant.get_property(r'${ccm.user.login}'), password, cache=ant.get_property(r'${ccm.cache.xml}'))
     builder.check()
     builder.get_content()
+finally:
     builder.close()
-except Exception, e:
-    print "ERROR: error found during preparation phase:" 
-    for l in traceback.format_exc().splitlines(False):
-        print "ERROR: %s" % l         
-    print "ERROR: this is a critical error, build will fail now:"
-    for l in str(e).splitlines(False):
-        print "ERROR: %s" % l         
-    if builder != None:
-        builder.close()
-    sys.exit(-1)
-sys.exit(0)
                 </hlm:python>
             </try>
             <finally>
@@ -130,25 +119,14 @@
 # enabling logging
 logging.basicConfig(level=logging.INFO)
 
-builder = None           
+configBuilder = configuration.NestedConfigurationBuilder(open(ant.get_property(r'${prep.delivery.conf.parsed}'), 'r'))
+configSet = configBuilder.getConfiguration()
+password = ant.get_property(r'${ccm.user.password}')
+builder = preparation.PreparationBuilder(configSet.getConfigurations(), ant.get_property(r'${ccm.user.login}'), password, cache=ant.get_property(r'${ccm.cache.xml}'))
 try:
-    configBuilder = configuration.NestedConfigurationBuilder(open(ant.get_property(r'${prep.delivery.conf.parsed}'), 'r'))
-    configSet = configBuilder.getConfiguration()
-    password = ant.get_property(r'${ccm.user.password}')
-    builder = preparation.PreparationBuilder(configSet.getConfigurations(), ant.get_property(r'${ccm.user.login}'), password, cache=ant.get_property(r'${ccm.cache.xml}'))
     builder.cleanup()
+finally:
     builder.close()
-except Exception, e:
-    print "ERROR: error found during preparation phase:" 
-    for l in traceback.format_exc().splitlines(False):
-        print "ERROR: %s" % l         
-    print "ERROR: this is a critical error, build will fail now:"
-    for l in str(e).splitlines(False):
-        print "ERROR: %s" % l         
-    if builder != None:
-        builder.close()
-    sys.exit(-1)
-sys.exit(0)
                 </hlm:python>
             </try>
             <finally>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/preparation/templates/ido-ant-copy.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,68 @@
+<#--
+============================================================================ 
+Name        : ido-ant-copy.xml.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+<?xml version="1.0"?>
+<project name="ido-ant-copy" default="all">
+    <target name="delete">
+        <parallel threadCount="${r'$'}{number.of.threads}">
+        <#list data?keys as component>
+            <sequential>
+                <#if ((ant['keep.old.source.enabled']=="true") || ant?keys?seq_contains('ido.keep.old'))>
+                <delete dir="${data[component]}_old" failonerror="false"/>
+                <move file="${data[component]}" todir="${data[component]}_old" failonerror="false"/>
+                <#else>
+                <delete dir="${data[component]}" failonerror="false"/>
+                </#if>
+            </sequential>
+        </#list>
+        </parallel>
+    </target>
+    
+    <target name="copy">
+        <#list data?keys as component>
+            <mkdir dir="${data[component]}"/>
+        </#list>
+        <parallel threadCount="${r'$'}{number.of.threads}">
+        <#list data?keys as component>
+            <sequential>
+                <copy todir="${data[component]}" verbose="false" failonerror="false" overwrite="true">
+                    <fileset dir="${component}" casesensitive="false" >
+                        <exclude name="**/_ccmwaid.inf"/>
+                        <exclude name="**/.ccmwaid.inf"/>
+                        <#if ((ant['keep.internal.folders.enabled'] == "false")&& (!ant?keys?seq_contains('keep.internals')))>
+                        <exclude name="**/internal/**"/>
+                        </#if>
+                        <exclude name="**/.hg/**"/>
+                        <exclude name="**/.svn/**"/>
+                    </fileset>
+                </copy>
+                <#-- Below operation is not required on linux as copy task will changes 
+                the file permissions to write mode -->
+                <exec executable="attrib" osfamily="windows" dir="${data[component]}">
+                    <arg line="-R /S /D .\*"/>
+                </exec>
+            </sequential>
+        </#list>
+        </parallel>
+    </target>
+    
+    <target name="all" depends="delete,copy" />
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/preparation/templates/ido-cenrep-gen.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,58 @@
+<#--
+============================================================================ 
+Name        : ido-cenrep-gen.xml.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader',
+        "${dbPath}") >
+
+<project name="cenrep-generation" default="all">
+    <#if os?lower_case?starts_with('win')>
+        <#assign exe_file="cmd.exe"/>
+    <#else>
+        <#assign exe_file="bash"/>
+    </#if>
+    <target name="ido-cenrep-generation">
+        <sequential>
+            <#list table_info['native:java.lang.String']['select distinct w.member FROM WhatLogEntry w where w.member like \'%.confml\''] as confmlfile>
+            <exec executable="${exe_file}" dir="${ant['build.drive']}/epoc32/tools" failonerror="false" output="${ant['post.log.dir']}/${ant['build.id']}_cenrep.cone.log">
+                <#if os?lower_case?starts_with('win')>
+                <arg value="/c"/>
+                <arg value="cone.cmd"/>
+                <#else>
+                <arg value="cone"/>
+                </#if>
+                <arg value="generate" />                            
+                <arg value="-p"/>
+                <arg value="${ant['build.drive']}\epoc32\rom\config\assets\s60" />
+                <arg value="-o" />
+                <arg value="${ant['build.drive']}\epoc32\release\winscw\urel\z" />
+                <arg value="-c"/>
+                <arg value="root.confml" />
+                <arg value="-i"/> 
+                <arg value="${confmlfile}" />
+            </exec>
+            </#list>
+        </sequential>
+    </target>
+    
+    <target name="all" depends="ido-cenrep-generation" />
+</project>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/preparation/templates/ido-cmt-ant.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,46 @@
+<#--
+============================================================================ 
+Name        : ido-cmt-ant.xml.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+<?xml version="1.0"?>
+<project name="ido-cmt-ant" default="all" xmlns:hlm="http://www.nokia.com/helium">
+<import file="${ant['helium.dir']}/helium.ant.xml"/>
+<#assign targetlist=""/>
+<#assign cmtid=1/>
+    <#list data?keys as component>
+    <#if (cmtid > 1)>
+    <#assign targetlist="${targetlist}" + ","/>
+    </#if>
+    <basename property="componentbase${cmtid}" file="${data[component]}"/>
+    <target name="cmt-${cmtid}">
+        <hlm:cmt output="${ant['build.log.dir']}/${ant['build.id']}_cmt/${ant['build.id']}_${r'$'}{componentbase${cmtid}}_${cmtid}.txt" failonerror="${ant['failonerror']}" 
+                 htmlOutputDir="${ant['ido.cmt.html.output.dir']}">
+            <fileset id="input" dir="${data[component]}">
+                <include name="**/*.h"/>
+                <include name="**/*.cpp"/>
+            </fileset>
+        </hlm:cmt>
+    </target>
+
+    <#assign targetlist="${targetlist}" + "cmt-${cmtid}"/>
+    <#assign cmtid=cmtid+1/>
+    </#list>
+    <target name="all" depends="${targetlist}" />
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/preparation/templates/ido-codescanner.ant.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,48 @@
+<#--
+============================================================================ 
+Name        : ido-codescanner.ant.xml.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+<?xml version="1.0"?>
+<project name="ido-codescanner" default="gen-codescanner-report" xmlns:hlm="http://www.nokia.com/helium">
+    <target name="gen-codescanner-report">
+        <parallel>
+        <#assign componentLXRPath = "">
+        <#assign no_of_components = data?size>
+        <#list data?keys as component>
+        <#if (no_of_components > 1)>
+            <#assign componentName = data[component]?split("/")?last>
+            <hlm:codescanner    format="${ant['ido.codescanner.output.type']}"
+                                configuration="${ant['ido.codescanner.config']}"
+                                sourcedir="${ant['internal.codescanner.drive']}/${componentName}"
+                                dest="${ant['ido.codescanner.output.dir']}/${componentName}"
+                                lxrurl="${ant['codescanner.lxr.source.url']}${data[component]?substring(ant['build.drive']?length)}/"
+                                failonerror="false"/>
+        <#else>
+            <hlm:codescanner    format="${ant['ido.codescanner.output.type']}"
+                            configuration="${ant['ido.codescanner.config']}"
+                            sourcedir="${ant['internal.codescanner.drive']}\"
+                            dest="${ant['ido.codescanner.output.dir']}"
+                            lxrurl="${ant['codescanner.lxr.source.url']}${data[component]?substring(ant['build.drive']?length)}/"
+                            failonerror="false"/>
+        </#if>
+        </#list>
+        </parallel>
+    </target>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/preparation/templates/ido-confml-validate.ant.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,60 @@
+<#--
+============================================================================ 
+Name        : ido-confml-validate.ant.xml.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader',
+        "${dbPath}") >
+<?xml version="1.0"?>
+<project name="validate-confml" default="validate-confml-file">
+    
+    <target name="validate-confml-file">
+        <#if os?lower_case?starts_with('win')>
+            <#assign exe_file="cmd.exe"/>
+        <#else>
+            <#assign exe_file="bash"/>
+        </#if>
+        <sequential>
+            <exec executable="${exe_file}" dir="${ant['build.drive']}/epoc32/tools" failonerror="false" output="${ant['post.log.dir']}/${ant['build.id']}_validate_confml.log">
+                <#if os?lower_case?starts_with('win')>
+                <arg value="/c"/>
+                <arg value="cone.cmd"/>
+                <#else>
+                <arg value="cone"/>
+                </#if>
+                <arg value="validate" />                            
+                <#list table_info['native:java.lang.String']['select distinct w.member FROM WhatLogEntry w where w.member like \'%.confml\''] as confmlfile>
+                <arg value="--confml-file"/> 
+                <arg value="${confmlfile}" />
+                </#list>
+                <#list table_info['native:java.lang.String']['select distinct w.member FROM WhatLogEntry w where w.member like \'%.crml\''] as crmlfile>
+                <arg value="--implml-file"/> 
+                <arg value="${crmlfile}" />
+                </#list>
+                <arg value="--report-type"/> 
+                <arg value="xml" />
+                <arg value="--report"/>
+                <arg value="${ant['post.log.dir']}/${ant['build.id']}_validate_confml.xml" />
+            </exec>
+        </sequential>
+    </target>
+    
+</project>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/preparation/templates/ido-export.ant.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,47 @@
+<#--
+============================================================================ 
+Name        : ido-export.ant.xml.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+<?xml version="1.0"?>
+<project name="ido-copy">
+
+    <target name="ido-copy-iby">
+        <#list data?keys as name>
+        <copy todir="${ant['ido.romtree']}" verbose="true" overwrite="true" flatten="true">
+            <fileset dir="${data[name]}" casesensitive="no">
+                <include name="**/rom/*.iby"/>
+                <exclude name="**/internal/**"/>
+                <exclude name="**/tsrc/**"/>
+            </fileset>
+        </copy>
+        </#list>
+    </target>
+
+    <target name="ido-copy-cenrep">
+        <#list data?keys as name>
+        <copy todir="${ant['ido.cenrep.root']}" verbose="true" overwrite="true" flatten="true">
+            <fileset dir="${data[name]}" casesensitive="no">
+                <include name="**/cenrep/keys_*.xls"/>
+            </fileset>
+        </copy>
+        </#list>
+    </target>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/preparation/test/test_ido-prep.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : test_ido-prep.ant.xml 
+Part of     : Helium 
+
+Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test_ido-prep" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    <description>
+         Preparation Testing targets
+    </description>
+
+    <property name="helium.dir" location="../../.." />
+    <property name="sysdef3.enabled" value="true"/>
+    <import file="../../../build.xml" />
+
+    <path id="system.definition.files">
+        <fileset dir="${helium.dir}/tests/minibuilds" includes="*.sysdef.xml"/>
+    </path>
+    
+    <target name="test-ido-create-ado-mapping">
+        <property name="ado.mapping.file" location="${build.output.dir}/build/ado_mapping.ini" />
+        <hlm:createAdoMappingMacro adoMapFile="${policy.src.mapping.file}" />
+        <au:assertFileExists file="${ado.mapping.file}" />
+    </target>
+
+</project>
--- a/buildframework/helium/tools/preparation/test/test_preparation.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/preparation/test/test_preparation.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -36,6 +36,7 @@
     <property name="prep.root.dir" value="../../../build/test/preproot" />
 
     <property name="helium.dir" location="../../.." />
+    <property name="sysdef3.enabled" value="true"/>
     <!--<import file="../../../build.xml"/>-->
 
     <!-- in the normal run we should not have the same build.drive content in the second run 
@@ -224,7 +225,7 @@
         <antcall target="create-directory-structure" />
         <au:assertLogContains text="'directory.structure.config' reference not found, so not any directory structure will be created." />
     </target>
-    
+
     <target name="test-create-directory-structure">
         <antcall target="create-directory-structure">
             <reference refid="test.directory.structure.config" torefid="directory.structure.config" />
@@ -238,4 +239,5 @@
             <available file="${preparation.temp.dir}/dir2" type="dir" />
         </au:assertTrue>
     </target>
+
 </project>
--- a/buildframework/helium/tools/preparation/test/test_synergyjavataks.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/preparation/test/test_synergyjavataks.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -34,7 +34,7 @@
     <condition property="run.ccm.71">
         <istrue value="${synergy71.enabled}" />
     </condition>
-    
+
     <target name="suiteSetUp" if="run.ccm.71">
         <mkdir dir="${synergy71.project.wa}"/>
         <mkdir dir="${synergy71.snapshot.wa}"/>
@@ -89,6 +89,24 @@
         </hlm:ccm>
         <au:assertLogContains text="Modifying work area for the project : MinibuildDomain-hlm_71_test"/>
         
+        <!-- To unmaintain the project workarea -->
+        <delete dir="${synergy71.project.wa}"/>
+        <hlm:ccm >
+            <hlm:sessionset refid="test.session" />
+            <hlm:workarea project="MinibuildDomain-hlm_71_test" maintain="false" recursive="true" path="${synergy71.project.wa}"/>
+        </hlm:ccm>
+        <au:assertLogContains text="Modifying work area for the project : MinibuildDomain-hlm_71_test"/>
+        <au:assertFileDoesntExist file="${synergy71.project.wa}/MinibuildDomain/MinibuildDomain/_ccmwaid.inf" />
+        
+        <!-- To unmaintain the project workarea for snapshot-->
+        <delete dir="${synergy71.snapshot.wa}"/>
+        <hlm:ccm >
+            <hlm:sessionset refid="test.session" />
+            <hlm:workarea project="MinibuildDomain-hlm_71_test" maintain="false" recursive="true" path="${synergy71.snapshot.wa}"/>
+        </hlm:ccm>
+        <au:assertLogContains text="Modifying work area for the project : MinibuildDomain-hlm_71_test"/>
+        <au:assertFileDoesntExist file="${synergy71.snapshot.wa}/MinibuildDomain/MinibuildDomain/_ccmwaid.inf" />
+        
         <!-- To add the tasks into folders -->
         <hlm:ccm >
             <hlm:sessionset refid="test.session" />
--- a/buildframework/helium/tools/publish/publish.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/publish/publish.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -30,7 +30,7 @@
     <hlm:envdata id="helium.tools.envdata">
         <hlm:executable name="7za" versionArgs="" versionRegex="7-Zip (\S+)"/>
         <hlm:executable name="ant" versionArgs="-version" versionRegex="Apache Ant version (\S+)"/>
-        <hlm:executable name="armcc" versionArgs="" versionRegex="RVCT(.+)" output="stderr"/>
+        <hlm:executable name="armcc" versionArgs="" versionRegex="RVCT(.+)"/>
         <hlm:executable name="ccm" versionArgs="version -c" versionRegex="(\S+)"/>
         <hlm:executable name="codescanner" versionArgs="" versionRegex="version (\S+)"/>
         <hlm:executable name="ctc" versionArgs="" versionRegex="This is CTC\+\+ \(v(\S+)\)"/>
@@ -98,7 +98,7 @@
     @scope public
     @since 11.0
     -->
-    <property name="archiving.enabled" value="true"/>
+    <property name="archiving.enabled" value="true"/>
 
     
     <!--* @property internal.archiving.enabled
@@ -327,44 +327,40 @@
 
 def merge_filelist(merger, filelist):
     for filename in filelist:
-        try:
-            LOGGER.info("Merging %s" % filename)
-            merger.merge(filename)
-            os.unlink(filename)
-        except Exception, exc:
-            LOGGER.warning("Warning: %s" % exc)
+        LOGGER.info("Merging %s" % filename)
+        merger.merge(filename)
+        os.unlink(filename)
 
-try:
-    builder = configuration.NestedConfigurationBuilder(open(ant.get_property(r'@{file}')), 'r')
-    configSet = builder.getConfiguration()
-    configs = configSet.getConfigurations(ant.get_property(r'@{config}'))
+filename = ant.get_property(r'@{file}')
+if filename == None:
+    raise IOError(r'@{file} not found')
+builder = configuration.NestedConfigurationBuilder(open(filename), 'r')
+configSet = builder.getConfiguration()
+configs = configSet.getConfigurations(ant.get_property(r'@{config}'))
+
+if len(configs) > 0:
+    filelist = []
+    for config in configs:
+        if config.get_boolean("release.metadata", False):
+            metadata = os.path.join(config['archives.dir'], config['name']+ ".metadata.xml")
+            if os.path.exists(metadata):
+                LOGGER.info("Found %s" % metadata)
+                filelist.append(metadata)
     
-    if len(configs) > 0:
-        filelist = []
-        for config in configs:
-            if config.get_boolean("grace.metadata", False):
-                metadata = os.path.join(config['archives.dir'], config['name']+ ".metadata.xml")
-                if os.path.exists(metadata):
-                    LOGGER.info("Found %s" % metadata)
-                    filelist.append(metadata)
-        
-        merger = None
-        metadata_main = os.path.join(configs[0]['archives.dir'], "release_metadata.xml")
-        if os.path.exists(metadata_main):
-            merger = symrec.MetadataMerger(metadata_main)
-            merge_filelist(merger, filelist)
-            LOGGER.info(str("Writing %s" % metadata_main))
-            merger.save()
-        elif len(filelist) > 0:
-            input = filelist.pop(0)
-            merger = symrec.MetadataMerger(input)
-            merge_filelist(merger, filelist)
-            LOGGER.info(str("Writing %s" % metadata_main))
-            merger.save(metadata_main)
-            os.unlink(input)
-except Exception, e:
-    LOGGER.error('ERROR: %s' % e)
-    sys.exit(-1)
+    merger = None
+    metadata_main = os.path.join(configs[0]['archives.dir'], "release_metadata.xml")
+    if os.path.exists(metadata_main):
+        merger = symrec.MetadataMerger(metadata_main)
+        merge_filelist(merger, filelist)
+        LOGGER.info(str("Writing %s" % metadata_main))
+        merger.save()
+    elif len(filelist) > 0:
+        input = filelist.pop(0)
+        merger = symrec.MetadataMerger(input)
+        merge_filelist(merger, filelist)
+        LOGGER.info(str("Writing %s" % metadata_main))
+        merger.save(metadata_main)
+        os.unlink(input)
 ]]> 
             </hlm:python>
         </sequential>
@@ -405,31 +401,27 @@
 if ant.get_property(r'@{filters}') is not None:
     filters = ant.get_property(r'@{filters}').split(r',')
 
-try:
-    filename = ant.get_property(r'@{file}')
-    archive = ant.get_property(r'@{archive}')
-    if not os.path.exists(filename):
-        raise Exception("Could not find file: %s" % filename)
-    if not os.path.exists(archive):
-        raise Exception("Could not find file: %s" % archive)
+filename = ant.get_property(r'@{file}')
+archive = ant.get_property(r'@{archive}')
+if not os.path.exists(filename):
+    raise Exception("Could not find file: %s" % filename)
+if not os.path.exists(archive):
+    raise Exception("Could not find file: %s" % archive)
 
-    LOGGER.info(str("Opening %s" % filename))
-    md = symrec.ReleaseMetadata(filename)
-    if os.path.basename(archive) not in md.keys():
-        LOGGER.info(str("Adding %s to metadata" % os.path.basename(archive)))
-        md.add_package(os.path.basename(archive), md5checksum=fileutils.getmd5(archive), size=os.path.getsize(archive), filters=filters)
-    else:
-        LOGGER.info(str("Updating %s to metadata" % os.path.basename(archive)))
-        result = md[os.path.basename(archive)]
-        result['md5checksum'] = unicode(fileutils.getmd5(archive))
-        result['size'] = unicode(os.path.getsize(archive))
-        if filters is not None:
-            result['filters'] = filters
-        md[os.path.basename(archive)] = result
-    md.save()
-except Exception, e:
-    LOGGER.error('ERROR: %s' % e)
-    sys.exit(-1)
+LOGGER.info(str("Opening %s" % filename))
+md = symrec.ReleaseMetadata(filename)
+if os.path.basename(archive) not in md.keys():
+    LOGGER.info(str("Adding %s to metadata" % os.path.basename(archive)))
+    md.add_package(os.path.basename(archive), md5checksum=fileutils.getmd5(archive), size=os.path.getsize(archive), filters=filters)
+else:
+    LOGGER.info(str("Updating %s to metadata" % os.path.basename(archive)))
+    result = md[os.path.basename(archive)]
+    result['md5checksum'] = unicode(fileutils.getmd5(archive))
+    result['size'] = unicode(os.path.getsize(archive))
+    if filters is not None:
+        result['filters'] = filters
+    md[os.path.basename(archive)] = result
+md.save()
 ]]> 
             </hlm:python>
         </sequential>
@@ -462,26 +454,24 @@
 logging.basicConfig(level=logging.INFO)
           
 # Reading the config from Ant
-try:
-    config_filename = ant.get_property(r'@{file}')
-    spec_name = ant.get_property(r'@{config}')
-    # Loading the config file.                        
-    builder = configuration.NestedConfigurationBuilder(open(config_filename, 'r'))
-    configSet = builder.getConfiguration()
-    configs = configSet.getConfigurations(spec_name)
+config_filename = ant.get_property(r'@{file}')
+spec_name = ant.get_property(r'@{config}')
+# Loading the config file.
+if config_filename == None:
+    raise IOError(r'@{file} not found')
+builder = configuration.NestedConfigurationBuilder(open(config_filename, 'r'))
+configSet = builder.getConfiguration()
+configs = configSet.getConfigurations(spec_name)
 
-    if len(configs) > 0:
-        if os.path.exists(os.path.join(configs[0]['archives.dir'], "release_metadata.xml")):
-            md5update = symrec.MD5Updater(os.path.join(configs[0]['archives.dir'], "release_metadata.xml"))
-            md5update.update()
-            md5update.save()
-        else:
-            LOGGER.warning(str('WARNING: Could not find %s.' % os.path.join(configs[0]['archives.dir'], "release_metadata.xml")))
+if len(configs) > 0:
+    if os.path.exists(os.path.join(configs[0]['archives.dir'], "release_metadata.xml")):
+        md5update = symrec.MD5Updater(os.path.join(configs[0]['archives.dir'], "release_metadata.xml"))
+        md5update.update()
+        md5update.save()
     else:
-        LOGGER.warning('WARNING: No config.')
-except Exception, e:
-    LOGGER.error('ERROR: %s' % e)
-    sys.exit(-1)
+        LOGGER.warning(str('WARNING: Could not find %s.' % os.path.join(configs[0]['archives.dir'], "release_metadata.xml")))
+else:
+    LOGGER.warning('WARNING: No config.')
 ]]> 
         </hlm:python>
         </sequential>
@@ -643,6 +633,8 @@
         toAppendEmakeRoot = prebuilder.checkRootDirValue(builder, config_parsed_filename, project.getProperty('build.drive'), config_type)
         if toAppendEmakeRoot is not None:
             project.setProperty("emake.root.to.append", str(toAppendEmakeRoot))
+    else:
+        project.setProperty("emake.root.to.append", "")
     prebuilder.writeTopLevel(os.path.join(project.getProperty('build.drive') + os.sep, 'ZIP_' + config_type + outputext), project.getProperty('temp.build.dir'), config_parsed_filename)       
 else:
     raise Exception('There are no archive configs to build. Looked for %s' % config_type)
@@ -894,19 +886,19 @@
 
         <move file="${delta.zip.delete.file}" todir="${delta.zip.temp.location}" />
         <move file="${md5.signature.file}" todir="${delta.zip.temp.location}" />
-
-        <exec executable="C:\APPS\symrec\symrec" failonerror="${failonerror}">
+        
+        <exec osfamily="windows" executable="C:\APPS\symrec\symrec" failonerror="${failonerror}">
             <arg value="create" />
             <arg value="-ser" />
-            <arg value="${release.grace.service}" />
+            <arg value="${hydra.service}" />
             <arg value="-pro" />
-            <arg value="${release.grace.product}" />
+            <arg value="${hydra.product}" />
             <arg value="-rel" />
             <arg value="${release.label}" />
             <arg value="-relroot" />
             <arg value="${delta.zip.location}" />
             <arg value="-dep" />
-            <arg value="${release.grace.service}/${release.grace.product}/${old.release.label}" />
+            <arg value="${hydra.service}/${hydra.product}/${old.release.label}" />
         </exec>
 
         <move file="${delta.zip.temp.location}/specialInstructions.xml" tofile="${delta.zip.delete.file}" />
@@ -952,20 +944,6 @@
 
     <!-- Creates a delta from the prevous build to the current one -->
     <target name="delta-zip" depends="delta-use-last-build,build-md5,generate-delta" description="Generate a delta between two build areas" />
-
-
-    <!-- Upload the delta and config into Grace -->
-    <target name="delta-zip-grace-upload">
-        <fileset id="grace.delta.zips.id" dir="${delta.zip.location}">
-            <include name="**/*.zip" />
-            <include name="**/*.xml" />
-        </fileset>
-
-        <antcall target="grace-upload">
-            <reference refid="grace.delta.zips.id" torefid="release.zips" />
-        </antcall>
-    </target>
-
     
     <!-- Publishes the Ant build log.
         
@@ -1046,11 +1024,13 @@
     
     
     <!-- This target will zip the WA depending on the ado mapping file -->
-    <target name="zip-wa" depends="ido-create-ado-mapping" if="internal.archive.wa.enabled">
+    <target name="zip-wa" if="internal.archive.wa.enabled">
+        <property name="zip.mapping.file" location="${build.output.dir}/build/ado_mapping_zip.ini" />
+        <hlm:createAdoMappingMacro adoMapFile="${zip.mapping.file}" />
         <tempfile property="zipwa.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/>
-        <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/zip-ant-wa-copy.xml.ftl" outputFile="${zipwa.dynamic.config}">
+        <fmpp sourceFile="${helium.dir}/tools/publish/templates/zip-ant-wa-copy.xml.ftl" outputFile="${zipwa.dynamic.config}">
             <data expandProperties="yes">
-                inputfile: antProperty(ado.mapping.file)
+                inputfile: antProperty(zip.mapping.file)
                 ant: antProperties()
                 data: eval('
                     java.io.FileInputStream pin = new java.io.FileInputStream(filename);
--- a/buildframework/helium/tools/publish/synergy.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/publish/synergy.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -93,7 +93,7 @@
             <available file="${build.log.dir}/${build.id}_bom.xml" />
             <then>
                 <mkdir dir="${temp.build.dir}" />
-                <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/task-publish.ant.xml.ftl" outputFile="${temp.build.dir}/task-publish.ant.xml">
+                <fmpp sourceFile="${helium.dir}/tools/publish/templates/task-publish.ant.xml.ftl" outputFile="${temp.build.dir}/task-publish.ant.xml">
                     <freemarkerLinks expandProperties="yes">
                         macro: ${helium.dir}/tools/common/templates/macro
                     </freemarkerLinks>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/publish/templates/task-publish.ant.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,48 @@
+<#--
+============================================================================ 
+Name        : task-publish.xml.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+<?xml version="1.0"?>
+<project name="task-publish" default="all" xmlns:hlm="http://www.nokia.com/helium">
+    
+    <target name="all">
+        <#if (ant?keys?seq_contains('ccm.cache.xml'))>
+        <hlm:createSessionMacro database="${ant['ccm.database']}" reference="publish.session" cache="${ant['ccm.cache.xml']}"/>
+        <#else>
+        <hlm:createSessionMacro database="${ant['ccm.database']}" reference="publish.session"/>
+        </#if>
+        <hlm:ccm verbose="false">
+            <!-- Defining some session to use. -->
+            <hlm:sessionset refid="publish.session"/>
+
+            <hlm:addtask folder="${ant['publish.ccm.folder']}">
+                <#list bom['/bom/content//task/id'] as task>
+                <task name="${task?trim}"/>
+                </#list>
+            </hlm:addtask>
+            <#if (!ant?keys?seq_contains('ccm.cache.xml'))>
+            <hlm:close/>
+            </#if>
+        </hlm:ccm>
+    </target>
+    
+    <!-- this is needed to include ccmtask support. -->
+    <import file="${ant['helium.dir']}/helium.ant.xml"/>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/publish/templates/zip-ant-wa-copy.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,34 @@
+<#--
+============================================================================ 
+Name        : zip-ant-wa-copy.xml.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+<?xml version="1.0"?>
+<project name="zip-wa-ant-copy" default="all">
+    <target name="all">
+        <#list data?keys as component>
+            <sequential>
+                <#assign ba_path= data[component]?substring(3)/>
+                <zip destfile="${ant['zip.wa.file']}" update="true" excludes="_ccmwaid.inf">
+                    <zipfileset dir="${component}" prefix="${ba_path}"/>
+                 </zip>
+            </sequential>
+        </#list>
+    </target>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/quality/compatibility_analyser/ca.cfg.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,60 @@
+<?xml version="1.0" ?>
+<!-- 
+============================================================================ 
+Name        : 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+
+<build>
+    <config name="compatibility.analyser.cfg">
+        <set name="BASELINE_NAME" value="'SDK 3rd Edition'" />
+        <set name="BASELINE_SDK_DIR" value="C:\Symbian\9.2\S60_3rd_FP1_2" />
+        <set name="BASELINE_SDK_S60_VERSION" value="3.0" />
+        <set name="CURRENT_NAME" value="RnD SDK wk26" />
+        <set name="CURRENT_SDK_DIR" value="${build.drive}" />
+        <set name="CURRENT_SDK_S60_VERSION" value="3.1" />
+        <set name="TEMP" value="" />
+        <set name="USE_THREAD" value="" />
+        <set name="BASELINE_HEADERS" value="" />
+        <set name="CURRENT_HEADERS" value="" />
+        <set name="BASELINE_SYSTEMINCLUDEDIR" value="" />
+        <set name="CURRENT_SYSTEMINCLUDEDIR" value="" />
+        <set name="BASELINE_FORCED_HEADERS" value="" />
+        <set name="CURRENT_FORCED_HEADERS" value="" />
+        <set name="USE_PLATFORM_DATA" value="" />
+        <set name="RECURSIVE_HEADERS" value="" />
+        <set name="EXCLUDE_DIR_HEADERS" value="" />
+        <set name="REPLACE_HEADERS" value="" />
+        <set name="TOOLCHAIN" value="" />
+        <set name="TOOLCHAIN_PATH" value="" />
+        <set name="BASELINE_BUILDTARGET" value="" />
+        <set name="CURRENT_BUILDTARGET" value="" />
+        <set name="BASELINE_IMPORTLIBRARIES" value="" />
+        <set name="CURRENT_IMPORTLIBRARIES" value="" />
+        <set name="BASELINE_IMPORTDLLS" value="" />
+        <set name="CURRENT_IMPORTDLLS" value="" />
+        <set name="REPORT_FILE_HEADERS" value="" />
+        <set name="FILTER_FILE_HEADERS" value="" />
+        <set name="REPORT_FILE_LIBRARIES" value="" />
+        <set name="FILTER_FILE_LIBRARIES" value="" />
+        <set name="REPORT_FILE_FILTER" value="" />
+        <set name="OUTPUT_FILE_FILTER" value="" />
+        <set name="ISSUES_FILE" value="" />
+    </config>
+</build>
--- a/buildframework/helium/tools/quality/compatibility_analyser/ca_config_template.txt	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-#
-# Copyright (c) 2008, 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:  End-user Interface for Core Tools execution
-#
-
-########## GUIDELINES 
-# 
-# - If any paths contain spaces, place them in "Quotes"
-# - If some parameter is not to be used, it can be empty or completely removed
-#   from the config file
-
-
-########## MANDATORY COMMON PARAMETERS 
-#
-# Name for baseline file set
-BASELINE_NAME='SDK 3rd Edition'
-
-# Root directory for files in baseline directory. It's a mandatory parameter.
-BASELINE_SDK_DIR=C:\Symbian\9.2\S60_3rd_FP1_2
-
-# S60 version of baseline set.It can be any of the following
-# 3.0, 3.1, 3.2, 5.0, 9.1, 9.2,,10.1, S^1, S^2,S^3,S^4 (S^1, S^2,S^3,S^4 are for symbian 1,2,3,4 SDk versions respectively).
-BASELINE_SDK_S60_VERSION=3.0
-
-# Name for current file set
-CURRENT_NAME=RnD SDK wk26
-
-# Root directory for files in current directory. It's a mandatory parameter.
-CURRENT_SDK_DIR=Y:\
-
-# S60 version of current set.It can be any of the following
-# 3.0, 3.1, 3.2, 5.0, 9.1, 9.2,,10.1, S^1, S^2,S^3,S^4 (S^1, S^2,S^3,S^4 are for symbian 1,2,3,4 SDk versions respectively).
-CURRENT_SDK_S60_VERSION=3.1
-
-
-########## OPTIONAL COMMON PARAMETERS 
-#
-# Defines the path for intermediate temporary files
-# Uses system defined paths if empty
-TEMP=
-
-
-########## OPTIONAL HEADER ANALYSIS SPECIFIC PARAMETERS 
-
-# Mark as 'true', if Public vs Rnd sdk or small no of headers ( count < 3000) analysis will be done.
-# defaults to 'false' if not defined. Analysis time will be increased.
-# When analysing large no of headers, multiple Thread logic needs to be disabled to avoid issues due to high memory consumption .
-USE_THREAD=
-
-# Analyse any header directory, other than \epoc32\include. This will override
-# the default SDK paths. Multiple names separated by ‘;’ can be input. If they 
-# are relative paths, BASELINE_SDK_DIR\epoc32\include and 
-# CURRENT_SDK_DIR\epoc32\include will be inserted at the begining.
-BASELINE_HEADERS=
-CURRENT_HEADERS=
-
-# Specifies the dependant header directories. Multiple names separated by ‘;’
-# can be input. If defined or not, default system defined inputs will be taken
-# along with these always. If they are relative paths, 
-# BASELINE_SDK_DIR\epoc32\include and CURRENT_SDK_DIR\epoc32\include will be 
-# inserted at the begining.
-BASELINE_SYSTEMINCLUDEDIR=
-CURRENT_SYSTEMINCLUDEDIR=
-
-# Additional headers that have to be included for successful compilation of the
-# header files. Multiple names separated by ‘;’ can be input.
-BASELINE_FORCED_HEADERS=
-CURRENT_FORCED_HEADERS=
-
-# Usage of platform data to resolve compile time dependency information,
-# defaults to 'true' if not defined
-USE_PLATFORM_DATA=
-
-# Recurse the directory hierarchy while scanning for files under verification,
-# defaults to 'true' if not defined
-RECURSIVE_HEADERS=
-
-# If the recursive scan is enabled, optionally exclude some subdirectories,
-# defaults to be none if not defined. Multiple names separated by ‘;’ can 
-# be input.
-EXCLUDE_DIR_HEADERS=
-
-# File pairs to be compared, if names change between base & current releases,
-# Format, OLD:NEW, each such set is separated by ‘;’, defaults to none
-REPLACE_HEADERS=
-
-# Report file for header analysis, report file created under reports directory
-# with a default file name if not specified
-REPORT_FILE_HEADERS=Y:/output/logs/BC/headers_report.xml
-
-# Similar as above, but this is the path of the filtered report file, otherwise
-# the same file name is used
-FILTER_FILE_HEADERS=
-
-
-########## OPTIONAL LIBRARY ANALYSIS SPECIFIC PARAMETERS 
-#
-# Type of the tool chain (GCC/GGCE/RVCT) which is used fetch information from the
-# import libraries under analysis, defaults to GCCE if not specified
-TOOLCHAIN=
-
-# Path to the tool chain mentioned above, path found automatically if not specified
-TOOLCHAIN_PATH=
-
-# Target build directories of the import libraries (eg ARMV5/ARMV6). Defaults to
-# ARMV5. Please note that WINSCW is not supported. Multiple names separated by 
-# ‘;’ can be input.
-BASELINE_BUILDTARGET=
-CURRENT_BUILDTARGET=
-
-# Analyse any other import library directory than from under \epoc32\release.
-# This will override target builds mentioned above. Multiple names separated 
-# by ‘;’ can be input. If they are relative paths, 
-# BASELINE_SDK_DIR\epoc32\release and CURRENT_SDK_DIR\epoc32\release will be 
-# inserted at the begining. If any of these param is mentioned, corresponding 
-# dll path also needs to be mentioned.
-BASELINE_IMPORTLIBRARIES=
-CURRENT_IMPORTLIBRARIES=
-
-# Analyse any other dll directory than from under \epoc32\release. This will 
-# override target builds mentioned above. Multiple names separated by ‘;’ can
-# be input. If they are relative paths, BASELINE_SDK_DIR\epoc32\release and 
-# CURRENT_SDK_DIR\epoc32\release will be inserted at the begining. If any of 
-# these param is mentioned,corresponding lib path is also needs to be mentioned.
-BASELINE_IMPORTDLLS=
-CURRENT_IMPORTDLLS=
-
-# Report file for library analysis, report file created under reports directory
-# with a default file name if not specified
-REPORT_FILE_LIBRARIES=Y:/output/logs/BC/libraries_report.xml
-
-# Similar as above, but this is the path of the filtered report file, otherwise
-# the same file name is used
-FILTER_FILE_LIBRARIES=
-
-
-########## OPTIONAL REPORT FILTERING SPECIFIC PARAMETERS
-#
-# Report files to be filtered, multiple reports can be mentioned here separated
-# by ';'. In addition, peport paths mentioned in headers, libraries section are
-# also filtered
-REPORT_FILE_FILTER=
-
-# Same as above, but specifies paths for filtered report files. There is a
-# correspondance between report file above and the output file. If a report
-# file does not have a corresponding Output file mentioned then it is filtered
-# in-place.
-OUTPUT_FILE_FILTER=
-
-# Defines paths for knownissues files separated by ';' which can be either local
-# directory or a server path. Defaults to the default knownissues file
-# delivered by the tool
-ISSUES_FILE=
--- a/buildframework/helium/tools/quality/compatibility_analyser/compatibility.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/quality/compatibility_analyser/compatibility.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -20,7 +20,7 @@
 
 ============================================================================
 -->
-<project name="compatibility.analyser" xmlns:hlm="http://www.nokia.com/helium">
+<project name="compatibility.analyser" xmlns:hlm="http://www.nokia.com/helium" xmlns:au="org.apache.ant.antunit">
     <description>
         Compatibility Analyser - BC (Binary Comparison) needs the property ca.enabled to
         be set to true in order to run the targets bc-check and ca-generate-diamond-summary
@@ -32,25 +32,17 @@
     @editable required
     @scope public
     -->
-    <property name="bctools.root" location="E:\brtaylor\Apps\carbide\plugins\com.nokia.s60tools.compatibilityanalyser.corecomponents_2.0.0\BCTools" />
+    <property name="bc.tools.root" location="${build.drive}/epoc32/tools/s60rndtools/bctools/compatibilityanalyser" />
 
-    <!-- Place where the CheckBC default configuration file is - required (see compatibility analyser user guide for details)
-    it is copied from this location to the output folder  for use by checkBC.py
-    @type string
-    @editable required
-    @scope public
-    -->
-    <property name="default.bc.config"  location="${helium.dir}/tools/quality/compatibility_analyser/ca_config_template.txt" />
-
-    <!-- The bc_config_template.txt file (default configuration file) will be copied from the folder
+    <!-- The ca.cfg.xml file (default configuration file) will be copied from the folder
     it is saved in within helium to the location named in this property where it will be used.
     @type string
     @editable required
     @scope public
     -->
-    <property name="bc.config.dir" location="${build.log.dir}/bc" />
+    <property name="bc.build.dir" location="${build.log.dir}/bc" />
 
-    <!-- The bc_config_template.txt file (default configuration file) will be copied from the
+    <!-- The ca.cfg.xml file (default configuration file) will be copied from the
     folder it is saved in within helium to the location and file name named in this property 
     where it will be used. You need to make sure this is 
     not the same name as any other IDO or person using the build area
@@ -58,101 +50,239 @@
     @editable required
     @scope public
     -->
-    <property name="bc.config.file" location="${bc.config.dir}/bc.config" />
+    <property name="bc.config.file" location="${bc.build.dir}/bc_config.txt" />
 
     <!-- Enables the Binary Comparison for libraries when set to true
     @type boolean
     @editable required
     @scope public
     -->
-    <property name="bc.check.libraries.enabled" value="true" />
+    <property name="bc.check.libraries.enabled" value="false" />
     
-    <!-- Defines the parameter that checkBC.py is called with 
+    <!--* @property bc.lib.param.val
+        Defines which library files will be compared, user can define or leave as default value '-la'.
+        If the property 'bc.what.log.entry.enabled' is set to true 'bc.head.param.val' needs to be left unset. 
        -la (all libraries checked) 
     or -ls lib (single library checked) (lib = the name of library to check)
     or -lm file.name (multiple libraries checked) 
-    the file.name is a file that contains the names of the library(ies) to check 
+    the file.name is a file that contains the names of the library(ies) to check e.g.
+    property name="bc.lib.param.val" value="-ls J:\epoc32\release\armv5\lib\platsimopengles11.dso"
     @type string
     @editable required
     @scope public
     -->
-    <property name="lib.param.val" value="-la" />
 
+    <!--* @property ca.enabled
+        when set to true enables the Compatibility Analyser code to function, when to to flase or not present CA is disabled
+    @type string
+    @editable required
+    @scope public
+    -->
+
+    
     <!-- Enables the Binary Comparison for headers when set to true
     @type boolean
     @editable required
     @scope public
     -->
-    <property name="bc.check.headers.enabled" value="true" />
+    <property name="bc.check.headers.enabled" value="false" />
     
-    <!-- Defines the parameter that checkBC.py is called with 
+    <!--* @property bc.head.param.val
+        Defines which header files will be compared, user can define or leave as default value '-ha'.
+        If the property 'bc.what.log.entry.enabled' is set to true 'bc.head.param.val' needs to be left unset. 
        -ha (all headers checked) 
     or -hs file (single header checked) (file= name of header file to check) 
     or -hm file.name (multiple headers checked) 
-    the file.name is a file that contains the names of the header(s) to check 
+    the file.name is a file that contains the names of the header(s) to check used when 'bc.what.log.entry.enabled' is set to 'true'.
+    e.g. property name="bc.head.param.val" value="-hs j:\epoc32\include\csy.rh
     @type string
     @editable required
     @scope public
     -->
-    <property name="head.param.val" value="-ha" />
 
     <!-- Adds this to the CA output file name to give it a unique name
     @type string
     @editable required
     @scope public
     -->
-    <property name="bc.check.report.id" value="${build.name}_${build.number}" />
+    <property name="bc.check.report.id" value="${build.name}_${build.number}.xml" />
 
-    <!-- Defines the location of CA output and the input for the diamonds creation target.
+    <!-- location of the config file that contains the values for checkbc.py config file (template.txt)
     @type string
+    @editable required
+    @scope public
     -->
-    <property name="ido.ca.html.output.dir" location="${build.log.dir}/${build.id}_ca"/>
+    <property name="bc.prep.ca.file" location="./../ca.cfg.xml" />
+    
+    <!-- Enables the use of whatlogentry (from the metadata DB) to generate the list of files
+     to be compared against the compiled code when set to true.
+    @type boolean
+    @editable required
+    @scope public
+    -->
+    <property name="bc.what.log.entry.enabled" value="false" />
 
+    <!--* @property bc.log.file.to.scan
+        the name of the log file that contains all the 'what' information. e.g. ${build.log.dir}/compile/${build.id}_dfs_build_armv5_compile.log
+    @type string
+    @editable required
+    @scope public
+    -->
+
+    <!-- If set to true fails the build if there is an error. If set to false does not fail the build if there is an error. Default value is false.
+    @type boolean
+    @editable required
+    @scope public
+    -->
+    <property name="bc.fail.on.error" value="false" />
+    
+    <!-- check if it is enabled and set the flag to make the target run -->
     <condition property="internal.run.ca">
         <istrue value="${ca.enabled}" />
     </condition>
+    
+    <!-- create the parsed file name-->
+    <property name="prep.ca.conf.parsed" location="${bc.build.dir}\ca.cfg.xml.parsed" />
 
 
-<!-- static and dynamic BC Test target -->
-    <target name="bc-check" if="internal.run.ca" >
-        <!-- create BC dir -->
-        <mkdir dir="${build.log.dir}/BC"/>
-        <delete file="${bc.config.file}" quiet="true"/>
-        <delete file="${build.log.dir}/BC/BBCResults.xsl" quiet="true"/>
+    <!-- the whatlogentry DB is scanned and the files written to the file named here -->
+    <var name="bc.db.output.file" value="" />
+
+    <!--location and name of the file that the checkbc.py script writes the output for the headers to 
+    then used as the input to the target that summarises the output to go to diamonds -->
+    <property name="bc.header.output.file" location="${bc.build.dir}/ca_header_${bc.check.report.id}" />
+     <!--location and name of the file that the checkbc.py script writes the output for the libraries to 
+    then used as the input to the target that summarises the output to go to diamonds -->
+    <property name="bc.library.output.file" location="${bc.build.dir}/ca_library_${bc.check.report.id}" />
 
-        <copy file="${default.bc.config}" tofile="${bc.config.file}" failonerror="false" verbose="true"/>
+    <!--setup property so can be tested - location of the FMPP template file-->
+    <property name="ca.template.file" location="${helium.dir}/tools/common/templates/log/ca_content.txt.ftl" />
+    
+    <property name="bc.template.macro" location="${helium.dir}/tools/common/templates/macro" />
+    
+    <!-- scan the whatlogentry contents and retrieve the files to compare within the headers and libraries-->
+    <target name="get-whatlogentry-contents-for-ca" >
+        <fmpp sourceFile="${ca.template.file}"
+                     outputfile="${bc.db.output.file}">
+            <freemarkerLinks expandProperties="yes">
+                macro: ${bc.template.macro}
+            </freemarkerLinks>
+            <data expandProperties="yes">
+                dbPath: ${build.log.dir}/${build.id}_metadata_db
+                logfilename: ${bc.log.file.to.scan}
+                checktype: ${bc.check.type}
+                ant: antProperties()
+            </data>
+        </fmpp>
+    </target>
+    
+    <!--takes the ca BC config file and runs it through the parser to replace ant properties with
+    real values, taken out here so that some testing of the CA code can be done-->
+    <target name="parse-ca-config" >
+        <!-- run through the bc.prep.ca.file and replace all the ant properties with real values-->
+        <copy file="${bc.prep.ca.file}" tofile="${prep.ca.conf.parsed}" overwrite="true">
+            <filterchain>
+                <expandproperties />
+            </filterchain>
+        </copy>
 
+        <!-- run through the parsed bc.prep.ca.file and take the 'set' name and write this to a text file
+        with the '=' sign after it and write the 'set' value after the '=' sign. This is to create the
+        checkbc.py configuration file which contains all its configration values -->
+        <hlm:python>
+import configuration
+
+configBuilder = configuration.NestedConfigurationBuilder(open(r'${prep.ca.conf.parsed}', 'r'))
+configSet = configBuilder.getConfiguration()
+outputFile = open(r'${bc.config.file}', 'w')
+for config in configSet.getConfigurations('compatibility.analyser.cfg'):
+    for x in config.keys():
+        outputFile.write(x)
+        outputFile.write('=')
+        outputFile.write(config[x])
+        outputFile.write('\n')
+        
+outputFile.close()
+        </hlm:python>
+    </target>
+    
+    <!-- static and dynamic BC Test target -->
+    <target name="bc-check"  if="internal.run.ca" >
+        <!-- create BC dir -->
+        <mkdir dir="${bc.build.dir}"/>
+        <delete file="${bc.config.file}" quiet="true"/>
+        <delete file="${bc.build.dir}/BBCResults.xsl" quiet="true"/>
         <!--copy the CSS file to the output folder-->
-        <copy file="${bctools.root}/reports/BBCResults.xsl" tofile="${build.log.dir}/BC/BBCResults.xsl" failonerror="false" verbose="true"/>
+        <copy file="${bc.tools.root}/reports/BBCResults.xsl" tofile="${bc.build.dir}/BBCResults.xsl" 
+                                                                failonerror="false" verbose="true"/>
 
-        <if>    <!--the library check enaled flag is set then run the check on the lirary files-->
+        <runtarget target="parse-ca-config" />
+        
+        <if>    <!--the library check enabled flag is set then run the check on the library files-->
             <istrue value="${bc.check.libraries.enabled}"/>
             <then>
-                <exec executable="python" dir="${build.log.dir}/BC" failonerror="true">
-                    <arg value="${bctools.root}/CheckBC.py"/>
+                <if>
+                    <!-- check to see if the whatlogentry needs to be scanned for list of files to compare
+                    if it is not set then the bc.lib.param.val as defined by the user will be used-->
+                    <istrue value="${bc.what.log.entry.enabled}"/>
+                    <then>
+                        <var name="bc.check.type" value="lib" />
+                        <var name="bc.db.output.file" value="${bc.build.dir}/ca_libraries.txt" />
+                        <runtarget target="get-whatlogentry-contents-for-ca" failonerror="${bc.fail.on.error}"/>
+                        <property name="bc.lib.param.val" value="-lm ${bc.db.output.file}"/>
+                    </then>
+                </if>
+                <condition property="bc.lib.param.val" value="-la">
+                    <not>
+                        <isset property="bc.lib.param.val" />
+                    </not>
+                </condition>
+                <exec executable="python" dir="${build.log.dir}/bc" failonerror="${bc.fail.on.error}">
+                    <arg value="${bc.tools.root}/CheckBC.py"/>
                     <arg value="${bc.config.file}"/>
-                    <arg line="${lib.param.val}"/>
+                    <arg line="${bc.lib.param.val}"/>
                     <arg value="-f"/>
                     <arg value="${bc.check.report.id}"/>
                 </exec>
+                <copy file="${bc.tools.root}/reports/Libraries_CompatibilityReport_${bc.check.report.id}" 
+                      tofile="${bc.library.output.file}" />
             </then>
         </if>
 
         <if>    <!-- if the header check flag is set then run the checks on the headers-->
             <istrue value="${bc.check.headers.enabled}"/>
             <then>
-                <exec executable="python" dir="${build.log.dir}/BC" failonerror="true">
-                    <arg value="${bctools.root}/CheckBC.py"/>
+                <if>
+                    <!-- check to see if the whatlogentry needs to be scanned for list of files to compare
+                    if it is not set then the bc.lib.param.val as defined by the user will be used-->
+                    <istrue value="${bc.what.log.entry.enabled}"/>
+                    <then>
+                        <var name="bc.check.type" value="header" />
+                        <var name="bc.db.output.file" value="${bc.build.dir}/ca_headers.txt" />
+                        <runtarget target="get-whatlogentry-contents-for-ca" failonerror="${bc.fail.on.error}"/>
+                        <property name="bc.head.param.val" value="-hm ${bc.db.output.file}"/>
+                    </then>
+                </if>
+                <condition property="bc.head.param.val" value="-ha">
+                    <not>
+                        <isset property="bc.head.param.val" />
+                    </not>
+                </condition>
+                <exec executable="python" dir="${build.log.dir}/bc" failonerror="${bc.fail.on.error}">
+                    <arg value="${bc.tools.root}/CheckBC.py"/>
                     <arg value="${bc.config.file}"/>
-                    <arg line="${head.param.val}"/>
+                    <arg line="${bc.head.param.val}"/>
                     <arg value="-f"/>
                     <arg value="${bc.check.report.id}"/>
                 </exec>
+                <copy file="${bc.tools.root}/reports/Headers_CompatibilityReport_${bc.check.report.id}" 
+                      tofile="${bc.header.output.file}" />
             </then>
         </if>
+        <runtarget target="ca-generate-diamond-summary" />
     </target>
 
-
+    <!-- used to summarise the output of the CA and pass the summary on to Diamonds for display -->
     <target name="ca-generate-diamond-summary" if="internal.run.ca">
         <!--use the header.ftl template file to create the init part of the output file
         that can be copied to the final output file by the java class-->
@@ -163,6 +293,7 @@
         <fmpp sourcefile="${helium.dir}/tools/common/templates/diamonds/diamonds_footer.ftl" 
               outputfile="${temp.diamonds.footer.xml}" quiet="true"/>
 
+        <!-- just in case it does not exist-->
         <mkdir dir="${diamonds.build.output.dir}" />
 
         <if>    <!-- if the header check flag is set then run the checks on the headers-->
@@ -171,8 +302,8 @@
                 <hlm:casummary diamondsHeaderFileName="${temp.diamonds.header.xml}" diamondsFooterFileName="${temp.diamonds.footer.xml}"
                     header="true"
                     outputFile="${diamonds.build.output.dir}/ca_summary_header.xml"
-                    inputFile="${bc.config.dir}/headers_report_${bc.check.report.id}.xml" 
-                     />
+                    inputFile="${bc.header.output.file}" 
+                    failOnError="${bc.fail.on.error}"/>
             </then>
         </if>
 
@@ -182,8 +313,8 @@
                 <hlm:casummary diamondsHeaderFileName="${temp.diamonds.header.xml}" diamondsFooterFileName="${temp.diamonds.footer.xml}"
                     header="false" 
                     outputFile="${diamonds.build.output.dir}/ca_summary_library.xml"
-                    inputFile="${bc.config.dir}/libraries_report_${bc.check.report.id}.xml"
-                    />
+                    inputFile="${bc.library.output.file}"
+                    failOnError="${bc.fail.on.error}"/>
             </then>
         </if>
 
@@ -191,4 +322,5 @@
         <delete file="${temp.diamonds.footer.xml}" failonerror="false" />
     </target>
 
+    
 </project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/quality/compatibility_analyser/test/test_ca-bc.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+============================================================================ 
+Name        : test_ca-bc.ant.xml 
+Part of     : Helium AntLib
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+<project name="test-ca-bc" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
+    <description>Helium antlib Quality Compatibility Analyser related tests.</description>
+
+
+    <taskdef resource="com/nokia/helium/quality/ant/antlib.xml" uri="http://www.nokia.com/helium" />
+    <!--place the output is written to-->
+    <property name="ca.output.dir" location="./output"/>
+    <!-- add the Ca folder to the output dir-->
+    <property name="build.log.dir" location="${ca.output.dir}/ca"/>
+    <!-- location and name of the bc.config file used by checkbc.py-->
+    <property name="bc.config.file" location="${build.log.dir}/bc.config" />
+    <!-- name of the parsed config file-->
+    <property name="prep.ca.conf.parsed" location="${build.log.dir}/ca.cfg.xml.parsed" />
+    <!--name of the ant CA config file-->
+    <property name="ca.ant.config.file" location="ca-ant-config.xml" />
+    <!-- used by the compatibility analyser to define the build log that is to be
+     scanned and the output used for the comparison-->
+    <property name="log.file.to.scan" location="${build.log.dir}/compile/${build.id}_armv5_compile.log" />
+
+    <!--setup property so can be tested - location of the FMPP template file-->
+    <property name="ca.template.file" location="./../../../common/templates/log/ca_content.txt.ftl" />
+    
+    <property name="template.macro" location="./../../../common/templates/macro" />
+
+    
+    <!--import the file under test-->
+    <import file="./../compatibility.ant.xml" />
+
+    <!-- is called prior to the test -->
+    <target name="setUp">
+        <delete dir="${build.log.dir}" failonerror="false" />
+        <mkdir dir="${build.log.dir}" />
+        
+    </target>
+
+    <!-- is called after the test, even if that caused an error -->
+    <target name="tearDown">
+        <delete dir="${build.log.dir}" failonerror="false" />
+    </target>
+
+    <!-- tests part of the CA code that parses the input file-->
+    <target name="test-ca-parse-config" depends="parse-ca-config">
+        
+        <au:assertFileExists file="${prep.ca.conf.parsed}" />
+        <au:assertFileExists file="${bc.config.file}" />
+        <loadfile property="ca.one.id" srcfile="${bc.config.file}">
+            <filterchain>
+                <replaceregex pattern="\\(:|\\)" replace="\1" flags="g" />
+            </filterchain>
+        </loadfile>
+        <echo>${ca.one.id}</echo>
+        <au:assertTrue message="file not parsed correctly">
+            <contains string="${ca.one.id}" 
+                substring="BASELINE_NAME='SDK 3rd Edition'" />
+        </au:assertTrue>
+        <delete file="${prep.ca.conf.parsed}" quiet="true" />
+        <delete dir="${ca.output.dir}" quiet="true" />
+    </target>
+
+
+    <!--tests the scanning of the whatlog NOT WORKING YET-->
+    <!--target name="test_ftl_file_header">
+        <echo> helium dir = ${helium.dir} </echo>
+        <var name="check.type" value="header" />
+        <var name="bc.db.output.file" value="${build.log.dir}/ca_headers.txt" />
+        <runtarget target="get-whatlogentry-contents-for-ca" />
+        <au:assertFileExists file="${bc.db.output.file}"/>
+    </target>
+
+    <target name="test_ftl_file_lib">
+        <echo> helium dir = ${helium.dir} </echo>
+        <var name="check.type" value="lib" />
+        <var name="bc.db.output.file" value="${build.log.dir}/ca_libraries.txt" />
+        <runtarget target="get-whatlogentry-contents-for-ca" />
+        <au:assertFileExists file="${bc.db.output.file}"/>
+    </target-->
+        
+</project>
\ No newline at end of file
--- a/buildframework/helium/tools/quality/cone-validate.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/quality/cone-validate.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -54,7 +54,7 @@
         <mkdir dir="${temp.build.dir}" />
         <tempfile property="cone.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/>
         
-        <fmpp sourceFile="${helium.dir}/tools/common/templates/quality/cone-validate.xml.ftl"
+        <fmpp sourceFile="${helium.dir}/tools/quality/templates/cone-validate.xml.ftl"
               outputfile="${cone.dynamic.config}">
             <data expandProperties="yes">
                 ant: antProperties()
--- a/buildframework/helium/tools/quality/conflict-checker.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/quality/conflict-checker.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -81,7 +81,7 @@
 
     <!-- Render the build duplicates xml file into an HTML output. -->
     <target name="render-build-duplicates" depends="integration-build-duplicates" if="run.build.duplicates">
-        <fmpp sourceFile="${helium.dir}/tools/common/templates/integration/build-duplicates.html.ftl" outputFile="${build.log.dir}/${build.id}_build-duplicates.html">
+        <fmpp sourceFile="${helium.dir}/tools/quality/templates/build-duplicates.html.ftl" outputFile="${build.log.dir}/${build.id}_build-duplicates.html">
             <freemarkerLinks expandProperties="yes">
                             macro: ${helium.dir}/tools/common/templates/macro
                         </freemarkerLinks>
--- a/buildframework/helium/tools/quality/internal-exports.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/quality/internal-exports.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -60,7 +60,7 @@
         parser.parse()
         for component in parser.internalexports.keys():
             output.write("    <component name=\"%s\">\n" % component)
-            output.write("".join(map(lambda x: "        <file name=\"%s\"/>\n" % x, parser.internalexports[component])))
+            output.write("".join(["        <file name=\"%s\"/>\n" % x for x in parser.internalexports[component]]))
             output.write("    </component>\n")
 output.write("</internalexports>\n")
 output.close()
@@ -83,7 +83,7 @@
     
     <!-- Render the build duplicates xml file into an HTML output. -->
     <target name="render-internal-exports" depends="integration-internal-exports">
-        <fmpp sourceFile="${helium.dir}/tools/common/templates/integration/internal-exports.html.ftl"
+        <fmpp sourceFile="${helium.dir}/tools/quality/templates/internal-exports.html.ftl"
               outputFile="${build.log.dir}/${build.id}_internal-exports.html">
             <freemarkerLinks expandProperties="yes">
                 macro: ${helium.dir}/tools/common/templates/macro
--- a/buildframework/helium/tools/quality/lint.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/quality/lint.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -21,64 +21,7 @@
 ============================================================================
 -->
 <project name="lint" xmlns:hlm="http://www.nokia.com/helium"
-                     xmlns:cs="antlib:com.puppycrawl.tools.checkstyle">
-
-    <!-- Run AntLint on project Ant XML files. -->
-    <target name="antlint">
-        <delete dir="${helium.build.dir}/jep"/>
-        <delete dir="${helium.build.dir}/python"/>
-        <delete dir="${helium.build.dir}/beanshell"/>
-        <delete file="${helium.build.dir}/test_jython.xml"/>
-        <mkdir dir="${helium.build.dir}/report/antlint" />
-        <hlm:antlint>
-            <fileset dir="${helium.dir}/tools">
-                <include name="**/*.ant.xml"/>
-                <include name="**/build.xml"/>
-                <include name="**/*.antlib.xml"/>
-                <exclude name="tests/**"/>
-                <exclude name="**/test/test_*.xml"/>
-                <exclude name="external/**"/>
-                <exclude name="**/tests/data/**"/>
-                <exclude name="build/**"/>
-            </fileset>
-            <hlm:checkTabCharacter severity="error" enabled="true"/>
-            <hlm:checkPropertyName severity="warning" enabled="true" regexp="([a-z0-9[\\d\\_\\.\\@\\{\\}\\$]]*)" />
-            <hlm:checkTargetName severity="warning" enabled="true" regexp="([a-z0-9[\\d\\-]]*)" />
-            <hlm:checkIndentation severity="error" enabled="true"/>
-            <hlm:checkPresetDefMacroDefName severity="warning" enabled="true" regexp="([a-z0-9][a-zA-Z0-9]*)" />       
-            <hlm:checkProjectName severity="warning" enabled="true" regexp="([a-z0-9[\\d\\.\\_\\-]]*)" />
-            <hlm:checkDescription severity="warning" enabled="true"/>
-            <hlm:checkFileName severity="warning" enabled="true" regexp="^build.xml$|ant.xml$|antlib.xml$" />
-            <hlm:checkRunTarget severity="warning" enabled="true"/>
-            <hlm:checkAntCall severity="warning" enabled="true"/>
-            <hlm:checkScriptSize severity="warning" enabled="true"/>
-            <hlm:checkUseOfIfInTargets severity="warning" enabled="true"/>
-            <hlm:checkJythonScript severity="error" enabled="true" outputDir="${helium.build.dir}/jep"/>
-            <hlm:checkScriptCondition severity="warning" enabled="true" outputDir="${helium.build.dir}/scriptcondition"/>
-            <hlm:checkPythonTasks severity="warning" enabled="true" outputDir="${helium.build.dir}/python"/>
-            <hlm:checkUseOfEqualsTask severity="warning" enabled="true"/>
-            <hlm:checkScriptDefNameAttributes severity="error" enabled="true"/>
-            <hlm:checkScriptDefStyle severity="warning" enabled="true"/>
-            <hlm:checkScriptDef severity="error" enabled="true" outputDir="${helium.build.dir}/beanshell"/>
-            <hlm:checkDuplicateNames severity="warning" enabled="true"/>
-            
-            <!-- Reporters -->
-            <hlm:antlintCheckstyleReporter file="${helium.build.dir}/report/antlint/antlint_report.xml" />
-            <hlm:antlintConsoleReporter />            
-        </hlm:antlint>
-        <fileset id="jep.files" dir="${helium.build.dir}">
-            <include name="jep/**/*.py"/>
-            <include name="python/**/*.py"/>
-        </fileset>
-        <antcall target="pylint" inheritRefs="true">
-            <reference refid="jep.files" torefid="python.files" />
-        </antcall>
-        <cs:checkstyle config="${helium.dir}/builder/java/config/java_checkstyle_config.xml">
-            <fileset dir="${helium.build.dir}/beanshell" includes="**/*.java"/>
-            <formatter type="plain"/>
-        </cs:checkstyle>
-    </target>    
-        
+                     xmlns:cs="antlib:com.puppycrawl.tools.checkstyle">        
     
     <!-- Checks FTL files for lint issues. -->
     <target name="ftllint">
--- a/buildframework/helium/tools/quality/mmp-to-target.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/quality/mmp-to-target.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -61,12 +61,13 @@
     for filename in ds.getIncludedFiles():
         filename = os.path.join(str(ds.getBasedir()), str(filename))
         project.log("Analysing %s" % filename, 4)
-        input = open(filename, 'r')
-        for line in input.readlines():
+        inputfile = open(filename, 'r')
+        for line in inputfile.readlines():
             m = match_target.match(line)
             # do not match resource files.
             if m != None and os.path.splitext(m.group(1))[1].lower() != ".rsc":            
                 output.write("%s : %s\n" % (os.path.splitdrive(filename)[1], m.group(1)))
+        inputfile.close()
 output.close()
         ]]>
     </scriptdef>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/quality/templates/build-duplicates.html.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,58 @@
+<#--
+============================================================================ 
+Name        : build-duplicates.html.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+    <#include "/@macro/logger/logger.ftl" />
+    <head>
+        <title>Build duplicates</title>
+        <@helium_logger_html_head/>
+    </head>
+    <body>
+
+<#macro printconflict node>
+    <#assign helium_node_id = helium_node_id + 1>
+    <@helium_logger_node_head nodeid="${helium_node_id}" title="${node.@name}">
+        <@helium_message_box nodeid="${helium_node_id}" type="conflict" count=node[".//component"]?size/>
+    </@helium_logger_node_head>    
+    <@helium_logger_node_content nodeid="${helium_node_id}">
+        <#list node[".//component"] as component>
+            <@helium_logger_print type="conflict">
+                <a href="${component.@name}">${component.@name}</a>
+            </@helium_logger_print>
+        </#list>
+    </@helium_logger_node_content>
+</#macro>
+
+    
+    <@helium_logger_header title="${ant['build.id']} build"/>
+    
+    
+    <@helium_logger_content title="Errors and warnings details">
+        <#list doc.buildconflicts["./file"] as conflict>
+            <@printconflict conflict/>
+        </#list>
+    </@helium_logger_content>
+    
+    </body>
+</html>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/quality/templates/cone-validate.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,58 @@
+<#--
+============================================================================ 
+Name        : cone-validate.xml.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+-->
+
+<project name="cone-validate" default="all">
+    
+    <target name="product-cone-validate">
+        <#if os?lower_case?starts_with('win')>
+            <#assign exe_file="cmd.exe"/>
+        <#else>
+            <#assign exe_file="bash"/>
+        </#if>
+        <#list ant['product.list']?split(',') as product>
+        <sequential>
+            <echo>Validating cone configuration for ${product}_root.confml</echo>
+            <exec executable="${exe_file}" dir="${ant['build.drive']}/epoc32/tools" failonerror="false">
+                <#if os?lower_case?starts_with('win')>
+                <arg value="/c"/>
+                <arg value="cone.cmd"/>
+                <#else>
+                <arg value="cone"/>
+                </#if>
+                <arg value="validate" />
+                <arg value="--project"/>
+                <arg value="${ant['build.drive']}/epoc32/rom/config"/>
+                <arg value="--configuration"/>
+                <arg value="${product}_root.confml"/>
+                <arg value="--report-type"/> 
+                <arg value="xml" />
+                <arg value="--report"/>
+                <arg value="${ant['post.log.dir']}/${ant['build.id']}_validate_cone_${product}.xml" />
+            </exec>
+        </sequential>
+        </#list>
+    </target>
+    
+    <target name="all" depends="product-cone-validate" />
+</project>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/quality/templates/internal-exports.html.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,57 @@
+<#--
+============================================================================ 
+Name        : internal-exports.html.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+    <#include "/@macro/logger/logger.ftl" />
+    <head>
+        <title>Internal Exports</title>
+        <@helium_logger_html_head/>
+    </head>
+    <body>
+
+<#macro printconflict node>
+    <#assign helium_node_id = helium_node_id + 1>
+    <@helium_logger_node_head nodeid="${helium_node_id}" title="${node.@name}">
+        <@helium_message_box nodeid="${helium_node_id}" type="InternalExport" count=node[".//file"]?size/>
+    </@helium_logger_node_head>    
+    <@helium_logger_node_content nodeid="${helium_node_id}">
+        <#list node[".//file"] as file>
+            <@helium_logger_print type="InternalExport">
+                <a href="${file.@name}">${file.@name}</a>
+            </@helium_logger_print>
+        </#list>
+    </@helium_logger_node_content>
+</#macro>
+
+    
+    <@helium_logger_header title="${ant['build.id']} build"/>
+        
+    <@helium_logger_content title="Errors and warnings details">
+        <#list doc.internalexports["./component"] as component>
+            <@printconflict component/>
+        </#list>
+    </@helium_logger_content>
+    
+    </body>
+</html>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/quality/templates/validate-policy.log.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,43 @@
+<#--
+============================================================================ 
+Name        : validate-policy.log.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+CSV validation:
+<#list doc["./policyvalidation/error[@type='unknownstatus']"] as unknownstatus>
+    ${unknownstatus.@message} (${unknownstatus.@value})
+</#list>
+
+Errors:
+<#list doc["./policyvalidation/error"] as error>
+    <#if error.@type=='A' || error.@type=='B' || error.@type=='C' || error.@type=='D'>
+    ${error.@type}  Found incorrect for ${error.@message?replace('([\\\\/][^\\\\/]+?)$', '', 'ris')}, ${error.@value}
+    </#if>
+</#list>
+
+Missing policy files in:
+<#list doc["./policyvalidation/error[@type='missing']"] as missing>
+    ${missing.@message}
+</#list>
+
+
+Incorrect policy files in:
+<#list doc["./policyvalidation/error[@type='invalidencoding']"] as error>
+    ${error.@message}
+</#list>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/quality/templates/validate-policy.log.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,49 @@
+<#--
+============================================================================ 
+Name        : validate-policy.log.xml.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+<?xml version="1.0" encoding="utf-8"?>
+<log filename="${ant['validate.policy.log']}">
+    <build>
+        <task name="CSV validation">
+<#list doc["./policyvalidation/error[@type='unknownstatus']"] as unknownstatus>
+            <message priority="error"><![CDATA[${unknownstatus.@message} (${unknownstatus.@value})]]></message>
+</#list>
+        </task>
+        <task name="Issues">
+<#list doc["./policyvalidation/error"] as error>
+    <#if error.@type=='A' || error.@type=='B' || error.@type=='C' || error.@type=='D'>
+            <message priority="error"><![CDATA[${error.@type}  Found incorrect for ${error.@message?replace('([\\\\/][^\\\\/]+?)$', '', 'ris')}, ${error.@value}]]></message>
+    </#if>
+</#list>
+        </task>
+        <task name="Missing">
+Missing policy files in:
+<#list doc["./policyvalidation/error[@type='missing']"] as missing>
+            <message priority="error"><![CDATA[${missing.@message}]]></message>
+</#list>
+        </task>
+        <task name="Incorrect policy files">
+<#list doc["./policyvalidation/error[@type='invalidencoding']"] as error>
+            <message priority="error"><![CDATA[${error.@message}]]></message>
+</#list>
+        </task>
+    </build>
+</log>
--- a/buildframework/helium/tools/quality/validate-policy.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/quality/validate-policy.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -219,7 +219,7 @@
     Render the policy validation xml file ('validate.policy.log') into an text output.
   -->
     <target name="render-validate-policy" depends="integration-validate-policy">
-        <fmpp sourceFile="${helium.dir}/tools/common/templates/integration/validate-policy.log.ftl" outputFile="${post.log.dir}/${build.id}_validate-policy.log">
+        <fmpp sourceFile="${helium.dir}/tools/quality/templates/validate-policy.log.ftl" outputFile="${post.log.dir}/${build.id}_validate-policy.log">
             <freemarkerLinks expandProperties="yes">
                 macro: ${helium.dir}/tools/common/templates/macro
             </freemarkerLinks>
@@ -228,7 +228,7 @@
                 ant: antProperties()
             </data>
         </fmpp>
-        <fmpp sourceFile="${helium.dir}/tools/common/templates/integration/validate-policy.log.xml.ftl" outputFile="${validate.policy.log.xml}">
+        <fmpp sourceFile="${helium.dir}/tools/quality/templates/validate-policy.log.xml.ftl" outputFile="${validate.policy.log.xml}">
             <freemarkerLinks expandProperties="yes">
                 macro: ${helium.dir}/tools/common/templates/macro
             </freemarkerLinks>
@@ -249,9 +249,11 @@
     </target>
 
     <!-- Policy validation target for IDO. Only detected ADO will get scanned. -->    
-    <target name="ido-validate-policy" depends="ido-create-ado-mapping" if="internal.policy.file.validation.enabled">
+    <target name="ido-validate-policy" if="internal.policy.file.validation.enabled">
+        <property name="policy.mapping.file" location="${build.output.dir}/build/ado_mapping_policy.ini" />
+        <hlm:createAdoMappingMacro adoMapFile="${policy.mapping.file}" mapForQuality="true"/>
         <hlm:record name="${temp.build.dir}/${build.id}_validate-policy.ant.log" action="start" />
-        <hlm:iniKeys2Path ini="${ado.quality.mapping.file}" pathid="reference.policy.path.list"/>
+        <hlm:iniKeys2Path ini="${policy.mapping.file}" pathid="reference.policy.path.list"/>
         <runtarget target="render-validate-policy" />
         <hlm:record name="${temp.build.dir}/${build.id}_validate-policy.ant.log" action="stop" />
     </target>
--- a/buildframework/helium/tools/release/release.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/release/release.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -32,43 +32,7 @@
     @type string
     @scope private
     -->
-    <property name="release.log.dir" location="${build.log.dir}/release"/>       
-    
-    
-    <!--* @property release.grace.service
-    The Grace service used
-    @type string
-    @editable required
-    @scope public
-    -->
-
-    <!--* @property release.grace.product
-    The Grace product used
-    @type string
-    @editable required
-    @scope public
-    -->
-
-    <!--* @property release.grace.mail.to
-    To whom the completion mail is sent to
-    @type string
-    @editable required
-    @scope public
-    -->
-
-    <!--* @property release.grace.mail.subject
-    The subject of the Grace upload completion mail
-    @type string
-    @editable required
-    @scope public
-    -->
-
-    <!--* @property release.grace.mail.message
-    The message contents of the Grace upload completion mail
-    @type string
-    @editable required
-    @scope public
-    -->
+    <property name="release.log.dir" location="${build.log.dir}/release"/>
     
     <!--* @property robot.release.enabled
     Set to true to do build robot release after completing the build and if it successful.
@@ -94,13 +58,10 @@
     
     <!-- Check, is robot release is enabled -->
     <condition property="internal.robot.release.enabled">
-        <and>
-            <or>
-                <istrue value="${robot.release.enabled}"/>
-                <isset property="do.robot.release"/>
-            </or>
-            <isset property="s60.build.robot.path"/>
-        </and>    
+        <or>
+            <istrue value="${robot.release.enabled}"/>
+            <isset property="do.robot.release"/>
+        </or> 
     </condition>
 
     <fileset id="release.files" dir="${publish.dir}">
@@ -152,16 +113,15 @@
 mconfigstr = project.getProperty('s60.build.robot.date')
 if mconfigstr != None:
     for configstr in mconfigstr.split(';'):
-        config = map(lambda x: x.strip(), configstr.split(','))
-        try:
-            if ido.is_in_interval(int(config[0]), config[1], int(config[2]), config[3]):
-                self.log("It is release time!")
-                projects.append(config[4])
-                project.setProperty('robot.release.project', ",".join(projects))
-            else:
-                self.log("It is not release time!")
-        except Exception, e:
-            self.log("'%s' invalid configuration." % configstr)
+        config = [x.strip() for x in configstr.split(',')]
+        if len(config) < 4:
+            raise Exception(configstr + ' is invalid config')
+        if ido.is_in_interval(int(config[0]), config[1], int(config[2]), config[3]):
+            self.log("It is release time!")
+            projects.append(config[4])
+            project.setProperty('robot.release.project', ",".join(projects))
+        else:
+            self.log("It is not release time!")
 else:
     self.log("'s60.build.robot.date' is not defined.")
 ]]>
@@ -173,19 +133,21 @@
     zip them all and send to the specified location. There is only one but mandatory 
     property to tell the location of the build server which is "s60.build.robot.path".
     -->
-    <target name="ido-sources-to-s60-build-robot" if="internal.robot.release.enabled" depends="ido-create-ado-mapping,check-robot-release,lookup-email">
+    <target name="ido-sources-to-s60-build-robot" if="internal.robot.release.enabled" depends="check-robot-release,lookup-email">
         <if>
             <isset property="robot.release.project"/>
             <then>
+                <property name="robot.mapping.file" location="${build.output.dir}/build/ado_mapping_robot.ini" />
+                <hlm:createAdoMappingMacro adoMapFile="${robot.mapping.file}" />
                 <!-- Location of the ready.txt FMPP template (override that property if you want to customize the content).
                 @type string
                 @scope private
                 -->
-                <property name="ido.template.robot.ready" location="${helium.dir}/tools/common/templates/ido/ready.txt.ftl" />
+                <property name="ido.template.robot.ready" location="${helium.dir}/tools/release/templates/ready.txt.ftl" />
                 <tempfile property="s60robot.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}" />
-                <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-robot-zip.ant.xml.ftl" outputFile="${s60robot.dynamic.config}">
+                <fmpp sourceFile="${helium.dir}/tools/release/templates/ido-robot-zip.ant.xml.ftl" outputFile="${s60robot.dynamic.config}">
                     <data expandProperties="yes">
-                            inputfile: antProperty(ado.mapping.file)
+                            inputfile: antProperty(robot.mapping.file)
                             ant: antProperties()
                             data: eval('
                                 java.io.FileInputStream pin = new java.io.FileInputStream(filename);
--- a/buildframework/helium/tools/release/scm_release.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/release/scm_release.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -40,7 +40,7 @@
         * update
         * maintain the work area
      -->
-    <target name="release-work-area">
+    <target name="release-work-area" if="internal.ccm.enabled">
         <mkdir dir="${release.log.dir}" />
         <hlm:record name="${release.log.dir}/${build.id}_release_work_area.log" action="start"/>
         <runtarget target="get-ccm-password"/>
@@ -61,25 +61,14 @@
 # enabling logging
 logging.basicConfig(level=logging.INFO)
 
-builder = None           
+configBuilder = configuration.NestedConfigurationBuilder(open(ant.get_property(r'${prep.delivery.conf.parsed}'), 'r'))
+configSet = configBuilder.getConfiguration()
+password = ant.get_property(r'${ccm.user.password}')
+builder = preparation.PreparationBuilder(configSet.getConfigurations(), ant.get_property(r'${ccm.user.login}'), password, cache=ant.get_property(r'${ccm.cache.xml}'))
 try:
-    configBuilder = configuration.NestedConfigurationBuilder(open(ant.get_property(r'${prep.delivery.conf.parsed}'), 'r'))
-    configSet = configBuilder.getConfiguration()
-    password = ant.get_property(r'${ccm.user.password}')
-    builder = preparation.PreparationBuilder(configSet.getConfigurations(), ant.get_property(r'${ccm.user.login}'), password, cache=ant.get_property(r'${ccm.cache.xml}'))
     builder.extract_release_data(r'${release.log.dir}/${build.id}_releasable.xml')
+finally:
     builder.close()
-except Exception, e:
-    print "ERROR: error found during preparation phase:" 
-    for l in traceback.format_exc().splitlines(False):
-        print "ERROR: %s" % l
-    print "ERROR: this is a critical error, build will fail now:"
-    for l in str(e).splitlines(False):
-        print "ERROR: %s" % l
-    if builder != None:
-        builder.close()
-    sys.exit(-1)
-sys.exit(0)
                 </hlm:python>
             </try>
             <finally>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/release/templates/ido-robot-zip.ant.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,46 @@
+<#--
+============================================================================ 
+Name        : ido-robot-zip.ant.xml.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+<?xml version="1.0"?>
+<project name="ido-zip" default="all">
+    <target name="all">
+        <delete file="${ant['build.output.dir']}/s60Sources.7z" failonerror="false"/>
+        <#if ((data?keys?size > 0) && (ant['robot.release.project']?split(';')?size > 0))>
+            <#list data?keys as name>
+                <#list ant['robot.release.project']?split(',') as project>
+                    <#if name?replace('\\', '/')?lower_case?contains("/${project}/${project}"?lower_case)>
+                    <#-- 7za u test.7z  output/analysisdata/ -->
+                    <exec executable="7za" dir="${name}/../">
+                        <arg value="u"/>
+                        <arg value="-xr!*/internal/*"/>
+                        <arg value="-xr!*/doc/*"/>
+                        <arg value="-xr!_ccmwaid.inf"/>
+                        <arg value="-xr!abld.bat"/>
+                        <arg value="${ant['build.output.dir']}/s60Sources.7z"/>
+                        <arg value="${name?split("/")?last}/"/>
+                    </exec>                    
+                    </#if>
+                </#list>
+            </#list>
+        </#if>
+        <copy todir="${ant['s60.build.robot.path']}" file="${ant['build.output.dir']}/s60Sources.7z" failonerror="false" />        
+    </target>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/tools/release/templates/ready.txt.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -0,0 +1,29 @@
+<#--
+============================================================================ 
+Name        : ready.txt.ftl 
+Part of     : Helium 
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+This component and the accompanying materials are made available
+under the terms of the License "Eclipse Public License v1.0"
+which accompanies this distribution, and is available
+at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+Initial Contributors:
+Nokia Corporation - initial contribution.
+
+Contributors:
+
+Description:
+
+============================================================================
+--> 
+ido_name:${ant['build.name']}
+date(gt):${pp.now?string("EEE MMM d HH:mm:ss yyyy")}
+source_path:${ant['ccm.project.wa_path']}
+<#if ant?keys?seq_contains('email.from')>email:${ant['email.from']}</#if>
+<#if ant?keys?seq_contains('robot.email.to')><#list ant['robot.email.to']?split(',') as email>
+email:${email}
+</#list></#if>
+
--- a/buildframework/helium/tools/release/templates/release_ccm_project.ant.xml.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/release/templates/release_ccm_project.ant.xml.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -1,6 +1,6 @@
 <#--
 ============================================================================ 
-Name        : modificationset.log.xml.ftl 
+Name        : release_ccm_project.ant.xml.ftl 
 Part of     : Helium 
 
 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
--- a/buildframework/helium/tools/relnotes/relnotes.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/relnotes/relnotes.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -207,10 +207,7 @@
         print 'Error: ' + waroot + ' must be a synergy project and still be in database'
     else:
         project.setProperty("ccm.toplevel.project", str(cmproject))
-    session.close()
-except Exception, ex:
-    print 'Caught exception: ' + str(ex)
-    traceback.print_exc()
+finally:
     if session:
         session.close()
         </script>
@@ -230,10 +227,7 @@
     session = ccmutil.get_session(database, username, password, engine, dbpath)
     cmproject = session.create(ant.get_property(r'${ccm.toplevel.project}'))
     print cmproject.baseline
-    session.close()
-except Exception, ex:
-    print 'Caught exception: ' + str(ex)
-    traceback.print_exc()
+finally:
     if session:
         session.close()
         </hlm:python>
--- a/buildframework/helium/tools/rombuild/features/helium_upct.mk	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/rombuild/features/helium_upct.mk	Wed Oct 13 16:31:27 2010 +0800
@@ -127,7 +127,7 @@
 
 %-create-upct-config:
 	@echo Building $*
-	-@imaker -p$(PRODUCT_NAME) -c$(COREPLAT_NAME) -f /epoc32/rom/config/helium_upct.mk -f $* step-CREATE_UPCT_CONF
+	-@imaker -p$(PRODUCT_NAME) -f /epoc32/rom/config/helium_upct.mk -f $* step-CREATE_UPCT_CONF
 
 create-upct-configs: $(foreach config,$(ALL_UPCT_CONFS),$(config)-create-upct-config)
 
@@ -140,7 +140,7 @@
 
 %-create-makeupct-config:
 	@echo Building $*
-	-@imaker -p$(PRODUCT_NAME) -c$(COREPLAT_NAME) -f /epoc32/rom/config/helium_upct.mk -f $* step-MAKEUPCT_FOTA_CNF
+	-@imaker -p$(PRODUCT_NAME) -f /epoc32/rom/config/helium_upct.mk -f $* step-MAKEUPCT_FOTA_CNF
 
 create-makeupct-configs: $(foreach config,$(ALL_MAKEUPCT_CONFS),$(config)-create-makeupct-config)
 
--- a/buildframework/helium/tools/rombuild/imaker.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/rombuild/imaker.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -29,7 +29,7 @@
     <!--* @property imaker.engine
     Defines which accelerator to use for running iMaker. (default value from build.system property)
     @type string
-    @scope private
+    @scope public
     -->
     
     <condition property="imaker.engine" value="imaker.engine.ec" else="imaker.engine.default">
@@ -116,7 +116,7 @@
         @type string
         @scope private
         -->
-        <property name="rombuild.buildinfo.output" location="${build.drive}${env.EPOCROOT}epoc32/rom/config/image_conf_buildinfo.mk" />
+        <property name="rombuild.buildinfo.output" location="${build.drive}/epoc32/rom/config/image_conf_buildinfo.mk" />
         <fmpp sourceFile="${rombuild.buildinfo.template}" outputFile="${rombuild.buildinfo.output}">
             <data expandProperties="yes">
                 ant: antProperties()
--- a/buildframework/helium/tools/testing/ats/ats.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/testing/ats/ats.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -25,7 +25,7 @@
     <description>
     ATS testing targets.
     </description>
-    
+          
     <!--* @property ats.enabled
     Value must be set to execute ats-test target.
     @type boolean
@@ -34,12 +34,88 @@
     @since 11.0
     -->
     
+    <!--* @property ats.bootuptest.enabled
+    Value must be set to execute ats-bootup-test target.
+    @type boolean
+    @scope public
+    @since 12.0
+    -->
+
     <!--* @property internal.ats.enabled
     Set to run ats targests if ats.enabled set to true.
     @type boolean
     @scope private
     -->
+
+    <!--* @property ats.aste.testasset.location
+    Location of SW Test Assets, if the TestAsset is not packaged then it is first compressed to a .zip  file. It should be a UNC path.
+    @type string
+    @editable required
+    @scope public
+    -->
+
+    <!--* @property eunit.test.package
+    The EUnit package name to be unzipped on the environment, for executing EUnit tests.
+    @type string
+    @scope public
+    -->
+
+    <!--* @property ats.script.type
+    There are two types of ats script files to send drop to ATS server, runx and import; only difference is that with import  ATS doesn't have to have access rights to testdrop.zip file, as it is sent to the system over http and import doesn't need network shares. If that is not needed import should not be used. Default value is runx as import involves heavy processing on ATS server.
+    @type string
+    @scope public
+    -->
+
+    <!--* @property tsrc.path.list
+    Contains list of the tsrc directories. Gets the list from system definition layer files. Assuming that the test components are defined already in te layers.sysdef.xml  files to get compiled. Not recommended, but the property value can be set if there are no System Definition file(s), and tsrc directories paths to set manually.
+    @type string
+    @scope public
+    -->
+
+    <!--* @property ats.diamonds.signal
+    Should be true  so at end of the build diamonds is checked for test results and Helium fails if tests failed.
+    @type string
+    @scope public
+    -->
+
+    <!-- Contains a test filterset name. A filterset is used to select/unselect test components. The filter(s) is/are effective when the same filters are defined in the package definition file for component(s).
+    @type string
+    @editable required
+    @scope public
+    @since 10.79
+    -->
+    <property name="ats.test.filterset" value="sysdef.filters.test" />
+    <hlm:sysdefFilterSet id="sysdef.filters.test" >
+        <filter filter="test" />
+    </hlm:sysdefFilterSet>
     
+    <!--* @property tdriver.asset.location
+    The location of the test asset where ruby test files, sip profiles, hardware data etc are located.
+    @type string
+    @editable required
+    @scope public
+    -->
+    
+    <!--* @property tdriver.test.profiles
+    Test profiles to be executed should be mentioned in this comma separated list e.g., 'bat, fute'.
+    @type string
+    @editable required
+    @scope public
+    -->
+    
+    <!--* @property tdriver.tdrunner.enabled
+    Mustbe set to 'true' if TDrunner is engine is to be used. If true .sip files are used otherwise .rb (ruby) files are used to execute tests.
+    @type boolean
+    @editable required
+    @scope public
+    -->
+
+    <!--* @property tdriver.template.file
+    Location of the TDriver template file if user wants to use own template file instead of the default one.
+    @type string
+    @scope public
+    -->
+
     <!--* @property enabled.ats
     Value must be set to execute ats-test target. - deprecated: Start using ats.enabled property.
     @type boolean
@@ -77,12 +153,19 @@
     @scope public
     @since 11.0
     -->
-    
+
     <!--* @property internal.ats4.enabled
     Set if ats4.enabled is set to true. To run ats4 dependent targets.
     @type boolean
     @scope private
     -->
+
+    <!-- Execute test cases using stf on ats4. Defaults to True, Set it to False if you do not want to enable stf.
+    @type boolean
+    @scope public
+    @since 12.0
+    -->
+    <property name="ats.stf.enabled" value="true"/>
     
     <!--* @property ats.product.name
     Name of the product to be tested. For example: "PRODUCT"
@@ -106,14 +189,14 @@
     -->
     
     <!--* @property ats.password
-    Password for ATS. This password might be different from NOE or HTTP/UNIX password.
+    Password for ATS3. This password might be different from NOE or HTTP/UNIX password.
     @type string
     @editable required
     @scope public
     -->
     
     <!--* @property ats.username
-    Username for ATS server. This is NOT the NOE or HTTP/UNIX username.
+    Username for ATS3 server. This is NOT the NOE or HTTP/UNIX username.
     @type string
     @editable required
     @scope public
@@ -163,16 +246,16 @@
     @deprecated since 11.0
     -->
     
-    <!--* @property matti.enabled
-    Value must be set to true to enable testing with matti.
+    <!--* @property ats.tdriver.enabled
+    Value must be set to true to enable testing with TDriver.
     @type boolean
     @editable required
     @scope public
     @since 11.0
     -->
     
-    <!--* @property internal.matti.enabled
-    Set to run matti targets if matti.enabled is set to true.
+    <!--* @property internal.ats.tdriver.enabled
+    Set to run TDriver targets if ats.tdriver.enabled is set to true.
     @type boolean
     @scope private
     -->
@@ -185,12 +268,6 @@
     @since 11.0
     -->
     
-    <!--* @property ats.delta.enabled
-    Set to run ats delta target if  ats.delta.enabled set to true.
-    @type boolean
-    @scope private
-    -->
-    
     <!--* @property ats.disable.java.importer
     To disable java importer for ats. - deprecated: Start using ats.java.importer.enabled property.
     @type boolean
@@ -199,7 +276,7 @@
     @deprecated since 11.0
     -->
         
-    <!-- To disable java importer for ats
+    <!-- To disable java importer for ats3
     @type boolean
     @editable required
     @scope public
@@ -277,12 +354,17 @@
             <isset property="enabled.aste"/>
         </or>
     </condition>
-    
+
+    <!-- Check if bootup testing is enabled -->
+    <condition property="internal.ats.bootuptest.enabled">
+        <istrue value="${ats.bootuptest.enabled}" />
+    </condition>
+
     <!-- Check is the ast4 enabled -->
     <condition property="internal.ats4.enabled" value="true" else="false">
         <istrue value="${ats4.enabled}" />
     </condition>
-    
+
     <!-- Check is the ats emulator enabled -->
     <condition property="internal.ats.emulator.enabled">
         <or>
@@ -291,9 +373,13 @@
         </or>
     </condition>
     
-    <!-- Check is the ats matti enabled -->
-    <condition property="internal.matti.enabled">
-        <istrue value="${matti.enabled}" />
+    <!-- Check is the ats TDriver enabled -->
+    <condition property="internal.ats.tdriver.enabled">
+        <or>
+            <istrue value="${ats.tdriver.enabled}" />
+            <istrue value="${tdriver.enabled}" />
+            <istrue value="${matti.enabled}" />
+        </or>
     </condition>
     
     <!-- Check is the ats ats delta enabled -->
@@ -321,7 +407,21 @@
         </or>
     </condition>
     
+    <!-- Should be "true" if coverage measurement and dynamic analysis (CTC) tool support is to be used by ATS. Default value is "false", the values are case-sensitive.
+    @type boolean
+    @editable required
+    @scope public
+    -->
+    <property name="ats.ctc.enabled" value="false"/>
     
+    <!--* @property internal.ats.ctc.enabled
+    Set to run the ats ctc targets.
+    @type boolean
+    @scope private
+    -->
+    <condition property="internal.ats.ctc.enabled">
+        <istrue value="${ats.ctc.enabled}" />
+    </condition>
     
     <!--  -->
     <fileset id="reference.ats.flash.images" dir="${release.images.dir}">
@@ -345,7 +445,7 @@
     <fileset id="reference.ats.sis.images" dir="${ats.sis.images.dir}">
         <include name="**/*.sis" />
     </fileset>
-    <!-- Limit of minimum number of sis files to execute matti-test target, otherwise MATTI-drop.zip will not be generated. Default value is "1" files.
+    <!-- Limit of minimum number of sis files to execute tdriver-test target, otherwise TDriver-drop.zip will not be generated. Default value is "1" files.
     @type string
     @scope public
     -->
@@ -406,20 +506,26 @@
         <hlm:generateBuildStatus file="${test.log.dir}/${build.id}_aste.log" />
     </target>
 
-    <!-- The target creates the MATTI_drop.zip file including test.xml for MATTI tests. This target is executable.-->
-    <target name="matti-test" if="internal.matti.enabled">
+    <!-- Old target for tdriver-test. Deprecated in Helium 12 -->
+    <target name="matti-test">
+        <runtarget target="tdriver-test" />
+    </target>
+    
+    <!-- The target creates the TDriver_drop.zip file including test.xml for TDriver tests. This target is executable.-->
+    <target name="tdriver-test" if="internal.ats.tdriver.enabled">
         <mkdir dir="${test.log.dir}"/>
         <runtarget target="load-property-from-cache-file" />
         <hlm:filterRecordStartMacro pattern="${ats.password}" category="ats"/>
-        <runtarget target="do-ats-matti" />
-        <hlm:filterRecordStopMacro log="${test.log.dir}/${build.id}_matti.log" append="false"/>
+        <runtarget target="copy-mon-sym" />
+        <runtarget target="do-ats-tdriver" />
+        <hlm:filterRecordStopMacro log="${test.log.dir}/${build.id}_tdriver.log" append="false"/>
         <hlm:metadatarecord database="${metadata.dbfile}">
             <hlm:textmetadatainput>
-                <fileset casesensitive="false" file="${test.log.dir}/${build.id}_matti.log" />
-                <metadatafilterset refid="filterset.matti" />
+                <fileset casesensitive="false" file="${test.log.dir}/${build.id}_tdriver.log" />
+                <metadatafilterset refid="filterset.tdriver" />
             </hlm:textmetadatainput>
         </hlm:metadatarecord>
-        <hlm:generateBuildStatus file="${test.log.dir}/${build.id}_matti.log" />
+        <hlm:generateBuildStatus file="${test.log.dir}/${build.id}_tdriver.log" />
     </target>
 
     <!-- Sends drop file to ATS/ASTE. Please see `ats-test` for description. -->
@@ -455,6 +561,7 @@
                 <condition property="ats4.libs" value="${helium.dir}/extensions/nokia/external/ats4" else="${helium.dir}/external/antlibs">
                     <available type="dir" file="${helium.dir}/extensions/nokia/external/ats4"/>
                 </condition>
+                <echo message="Uploading using: -url http://${ats.server}/ServerService -path ${ats.drop.location.file} ${ats.import.arg}"/>
                 <java classname="com.nokia.ats.util.server.CommandLineClient" fork="true" maxmemory="1024m" failonerror="true">
                     <classpath>
                         <pathelement path="${java.class.path}"/>
@@ -511,7 +618,7 @@
     ic = None
     try:
         ic = atsant.IConfigATS(project.getProperty('release.images.dir'), project.getProperty('ats.product.name'))
-    except Exception, ex:
+    except IOError, ex:
         print ex
     if ic:
         project.setProperty('ats.flash.images', ic.findimages())
@@ -538,6 +645,11 @@
     <!-- Sets values common for ATS, this is a dependent target and shouldn't be used as an individual target -->
     <target name="ats-common">
         <property name="ats.config.file" value="" />
+
+        <!-- Text in name of PKG files to use eg. 'sanity' would only use xxxsanity.pkg files from components.
+        @type string
+        @scope public
+        -->
         <property name="ats.specific.pkg" value="" />
         
         <!-- Product HardWare ID (HWID) attached to ATS. By default the value of HWID is not set.
@@ -615,30 +727,17 @@
         @editable required
         -->
         <property name="ats.trace.enabled" value="false"/>
-        
-        <!-- Should be "true" if coverage measurement and dynamic analysis (CTC) tool support is to be used by ATS. Default value is "false", the values are case-sensitive.
+        <!-- Should be ``true`` so a set is used for each pkg file in a component, this allows tests to run in parallel on several devices.
         @type boolean
-        @editable required
-        @scope public
-        -->
-        <property name="ats.ctc.enabled" value="false"/>
-        
-        <!--* @property internal.ats.ctc.enabled
-        Set to run the ats ctc targets.
-        @type boolean
-        @scope private
-        -->
-        <condition property="internal.ats.ctc.enabled">
-            <istrue value="${ats.ctc.enabled}" />
-        </condition>
-        
-        <!-- Flags for EUnit exerunner can be set by setting the value of this variable. The default flags are set to "/E S60AppEnv /R Off".
-        @type boolean
-        @editable required
         @scope public
         -->
         <property name="ats.multiset.enabled" value="false"/>
-                    
+        
+        <!-- Flags for EUnit exerunner can be set by setting the value of this variable. The default flags are set to "/E S60AppEnv /R Off".
+        @type string
+        @editable required
+        @scope public
+        -->         
         <property name="eunitexerunner.flags" value="/E S60AppEnv /R Off" />
             
         <!--* @property ats.obey.pkgfiles.rule.enabled
@@ -685,10 +784,32 @@
     <!-- Sets default values for the ASTE, this is a dependent target and shouldn't be used as an individual target -->
     <target name="ats-set-defaults-aste" depends="ats-common">
         <var name="ats.drop.file" value="ATSAsteDrop.zip" />
+        <!-- Type of test to run. Default is 'smoke'.
+        @type string
+        @scope public
+        -->
         <property name="ats.aste.test.type" value="smoke" />
+        <!-- These are the cases that which tests should be run from the TestAsset. For example, value can be set as 100,101,102,103,105,106,. A comma is needed to separate case IDs
+        @type string
+        @scope public
+        -->
         <property name="ats.aste.testasset.caseids" value="100,101,102,103,105,106,107,108,109,110,111,112,113,114,115" />
+        <!-- Version of the software to be tested. For example: 'W81'
+        @type string
+        @editable required
+        @scope public
+        -->
         <property name="ats.aste.software.version" value="${build.id}" />
+        <!-- Variant Language to be tested. Default is 'English'
+        @type string
+        @scope public
+        -->
         <property name="ats.aste.language" value="English" />
+        <!-- Flash images releases, for example 'SPP 51.32'.
+        @type string
+        @editable required
+        @scope public
+        -->
         <property name="ats.aste.software.release" value="${build.name}" />
         <!-- Modify the plan name if you have understanding of test.xml file or leave it as it is. Default value is "plan"
         @type string
@@ -802,8 +923,10 @@
                     <arg value="--config=${ats.config.file}" />
                     <arg value="--obey-pkgfiles=${internal.ats.obey.pkgfiles.rule.enabled}" />
                     <arg value="--ats4-enabled=${internal.ats4.enabled}" />
+                    <arg value="--ats-stf-enabled=${ats.stf.enabled}" />
                     <arg value="--specific-pkg=${ats.specific.pkg}" />
                     <arg value="--hti=${ats.hti.enabled}" />
+                    <arg value="--minimum-execution-blocks=${ats.minimum.execution.blocks.enabled}" />
                     <arg value="--verbose" />
                     <arg line="${module.tsrc.@{module}}" />
                 </exec>
@@ -914,10 +1037,11 @@
     <macrodef name="evalidMacro" uri="http://www.nokia.com/helium">
         <attribute name="dir"/>
         <sequential>
-            <runtarget target="ido-create-ado-mapping"/>
+            <property name="evalid.mapping.file" location="${build.output.dir}/build/ado_mapping_evalid.ini" />
+            <hlm:createAdoMappingMacro adoMapFile="${evalid.mapping.file}" />
             <hlm:python>
 import delta_zip
-delta_zip.evalidAdomapping(r'${build.drive}', r'@{dir}', r'${ado.mapping.file}')
+delta_zip.evalidAdomapping(r'${build.drive}', r'@{dir}', r'${evalid.mapping.file}')
             </hlm:python>
         </sequential>
     </macrodef>
@@ -945,8 +1069,8 @@
         </script>
     </target>
     
-    <!-- Common target to run ats, aste and matti -->
-    <target name="run-test" depends="ats-test,ats-aste,matti-test"/>
+    <!-- Common target to run ats, aste and TDriver -->
+    <target name="run-test" depends="ats-test,ats-aste,tdriver-test"/>
     
     <!-- Zip build area for emulator -->
     <target name="ats-emulator-zip" if="internal.ats.emulator.enabled">
@@ -986,48 +1110,109 @@
         <runtarget target="do-ats-test" />
     </target>
 
-    <!-- a dependant target please do not call directly use matti-test,
-     target calls the MATTI script that creates the MATTI_drop.zip file and runs the tests
+    <!-- a dependant target please do not call directly use tdriver-test,
+     target calls the TDriver script that creates the TDriver_drop.zip file and runs the tests
      listed in test.rb.  ats-set-flash-image-path and ats-set-sis-flash-image-path look for lists of files-->
-    <target name="do-ats-matti" depends="ats-set-flash-image-path" >
+    <target name="do-ats-tdriver" depends="ats-set-flash-image-path" >
         <runtarget target="ats-set-defaults-stifeunit" />
+
+        <!-- Separate but similar property to ats.test.timeout for TDriver tests.
+        @type string
+        @editable required
+        @scope public
+        -->
+        <property name="tdriver.test.timeout" value="60" />
+        <!-- There are special sis files required to execute with test execution. This is a comma separated list in which several sis files can be deifned in a certain format like '<src file on build area>#<destination to save the file on memory card>#<destination to install the file>' e.g. <x:dir1abc.sis#f:memory1abc.sis#c:phonememoryprivateabc.sis>
+        @type string
+        @editable required
+        @scope public
+        -->
+        <property name="tdriver.sis.files" value=""/>
+        <!-- TDrunner parameters are set using this property. e.g. 'teardown ordered'.
+        @type string
+        @editable required
+        @scope public
+        -->
+        <property name="tdriver.tdrunner.parameters" value=""/>
+        <!-- TDriver test parameters can be given through TDriver parameters xml file.
+        @type string
+        @editable required
+        @scope public
+        -->
+        <property name="tdriver.parameters" value=""/>
+        <!-- Alias name for the test cases to be used in test.xml files for ATS4 drops only. 
+        @type string
+        @scope public
+        @since 11.0
+        -->
+        <property name="ats.alias.name" value="sut_s60"/>
+        <!-- The Subject for the ATS report email. This email is received in the end of the test execution.
+        @type string
+        @scope public
+        -->
+        <property name="ats.email.subject" value="${build.id} TDriver test results"/>
+        <!-- This specifies email format. E.g. to receive email without attachment 'simplelogger'.
+        @type string
+        @scope public
+        -->
+        <property name="ats.email.format" value="simplelogger"/>
+        <fail unless="tdriver.asset.location" message="Error: tdriver.asset.location property not defined" />
+        
         <!--need to set theseup for use by do-ats-test target-->
         <mkdir dir="${build.output.dir}/ats" />
-        <var name="ats.drop.file" value="ATSMattiDrop.zip" />
-        <!-- execute the MattiDrops.py script with parameters-->
+        <var name="ats.drop.file" value="ATSTDriverDrop.zip" />
+        <!-- execute the tdriver.py script with parameters-->
         <exec executable="python" resultproperty="script.response">
-            <arg line="-m ats3.matti2" />
+            <arg line="-m ats3.tdriver" />
             <arg value="--build-drive=${build.drive}" />
-            <arg value="--test-profiles=${matti.test.profiles}" />      <!--"all, !bat1" -->
-            <arg value="--sierra-enabled=${matti.sierra.enabled}" />    <!--"true/false" -->
-            <arg value="--matti-timeout=${matti.test.timeout}" />       <!--"600" -->
+            <arg value="--test-profiles=${tdriver.test.profiles}" />      <!--"all, !bat1" -->
+            <arg value="--tdrunner-enabled=${tdriver.tdrunner.enabled}" />    <!--"true/false" -->
+            <arg value="--tdriver-timeout=${tdriver.test.timeout}" />       <!--"600" -->
             <arg value="${internal.ats.diamonds.arg}" />
-            <arg value="--testasset-location=${matti.asset.location}" />    <!--"local and/or network drive" -->
-            <arg value="--file-store=${ats.output.dir}" />              <!--"network drive" -->
-            <arg value="--testrun-name=${ats.testrun.name}" />          <!--"Matti_Profile_Name" -->
+            <arg value="--testasset-location=${tdriver.asset.location}" />    <!--"local and/or network drive" -->
+            <arg value="--file-store=${ats.report.location}" />                <!--"network drive" -->
+            <arg value="--testrun-name=${ats.testrun.name}" />          <!--"TDriver_Profile_Name" -->
             <arg value="--alias-name=${ats.alias.name}" />                        <!--"agents_alias_Name" -->
             <arg value="--device-type=${ats.product.name}" />
             <arg value="--flash-images=${ats.flash.images}" /> 
             <arg value="--drop-file=${build.output.dir}/ats/${ats.drop.file}" />
             <arg value="--minimum-flash-images=${ats.flashfiles.minlimit}" />
-            <arg value="--template-loc=${matti.template.file}" />             <!--"local and/or network drive. No comma separated list" -->
+            <arg value="--template-loc=${tdriver.template.file}" />             <!--"local and/or network drive. No comma separated list" -->
             <arg value="--email-format=${ats.email.format}" />          <!--"Email Formatting. e.g. simplelogger" -->
-            <arg value="--email-subject=${ats.email.subject}" />        <!--"Email Subject. e.g. Matti testing" -->
+            <arg value="--email-subject=${ats.email.subject}" />        <!--"Email Subject. e.g. TDriver testing" -->
             <arg value="--report-email=${ats.email.list}" /> 
             <arg value="--ats4-enabled=${internal.ats4.enabled}" />
-            <arg value="--matti-sis-files=${matti.sis.files}" />        <!--"src#store#dst, src#store#dst" -->
-            <arg value="--matti-parameters=${matti.parameters}" />
-            <arg value="--sierra-parameters=${matti.sierra.parameters}" />    <!--Additional sierra parameters for matti task e.g. ordered teardown -->
+            <arg value="--tdriver-sis-files=${tdriver.sis.files}" />        <!--"src#store#dst, src#store#dst" -->
+            <arg value="--tdriver-parameters=${tdriver.parameters}" />
+            <arg value="--tdrunner-parameters=${tdriver.tdrunner.parameters}" />    <!--Additional TDrunner parameters for tdriver task e.g. ordered teardown -->
+            <arg value="--ctc-enabled=${ats.ctc.enabled}" />
         </exec>
-        
-        <!-- Unset the internal property to overwrite with new value-->
-        <var name="internal.ats.upload.enabled" unset="true"/>
-        <!-- set internal property if python returns 0 value for matti test drop creation --> 
-        <condition property="internal.ats.upload.enabled">
-            <equals arg1="${script.response}" arg2="0" />
-        </condition>
         <runtarget target="do-ats-test" />
     </target>
 
+    <!-- The target is used to test ROM image files that whether device boots up -->
+    <target name="ats-bootup-test" depends="ats-common,ats-set-flash-image-path" if="internal.ats.bootuptest.enabled">
+        <!--need to set the setup for use by do-ats-test target-->
+        <mkdir dir="${build.output.dir}/ats" />
+        <var name="ats.drop.file" value="ATSBootupDrop.zip" />
+        <!-- execute the bootup_testing.py script with parameters-->
+        <exec executable="python" resultproperty="script.response">
+            <arg line="-m ats3.bootup_testing" />
+            <arg value="--build-drive=${build.drive}" />
+            <arg value="${internal.ats.diamonds.arg}" />
+            <arg value="--file-store=${ats.report.location}" />         <!--"network drive" -->
+            <arg value="--testrun-name=${ats.testrun.name}" />          <!--"bootup_test" -->
+            <arg value="--alias-name=${ats.alias.name}" />              <!--"agents_alias_Name" -->
+            <arg value="--device-type=${ats.product.name}" />
+            <arg value="--flash-images=${ats.flash.images}" /> 
+            <arg value="--drop-file=${build.output.dir}/ats/${ats.drop.file}" />
+            <arg value="--minimum-flash-images=${ats.flashfiles.minlimit}" />
+            <arg value="--email-format=${ats.email.format}" />          <!--"Email Formatting. e.g. simplelogger" -->
+            <arg value="--email-subject=${ats.email.subject}" />        <!--"Email Subject. e.g. TDriver testing" -->
+            <arg value="--report-email=${ats.email.list}" /> 
+            <arg value="--ats4-enabled=${internal.ats4.enabled}" />
+        </exec>
+        <runtarget target="do-ats-test" />
+    </target>
 
 </project>
--- a/buildframework/helium/tools/testing/ats/templates/ats4_naviengine_template.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/testing/ats/templates/ats4_naviengine_template.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -87,7 +87,7 @@
         <action>
             <type>EmailAction</type>
             <parameters>
-                <parameter value="Release testing" name="subject"/>
+                <parameter value="ATS test results {{ test_plan['testrun_name'] }}" name="subject"/>
                 <parameter value="{{ test_plan['report_email'] }}" name="to"/>
                 <parameter value="simplelogger" name="format"/>
             </parameters>
--- a/buildframework/helium/tools/testing/ats/templates/monsym-file-list.txt.ftl	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/testing/ats/templates/monsym-file-list.txt.ftl	Wed Oct 13 16:31:27 2010 +0800
@@ -20,6 +20,6 @@
 ============================================================================
 -->
 ${ant['build.drive']}/mon.sym
-<#list data["//unit"] as unit>
+<#list data["//unit[@bldFile]"] as unit>
 ${ant['build.drive']}${unit.@bldFile}/mon.sym
 </#list>
--- a/buildframework/helium/tools/testing/eunit/eunit.ant.xml	Wed Oct 13 16:27:55 2010 +0800
+++ b/buildframework/helium/tools/testing/eunit/eunit.ant.xml	Wed Oct 13 16:31:27 2010 +0800
@@ -40,12 +40,6 @@
     @scope public
     -->
     
-    <!--* @property eunitexerunner.flags
-    Flags for EUnit exerunner can be set by setting the value of this variable. The default flags are set to "/E S60AppEnv /R Off".
-    @type string
-    @editable required
-    @scope public
-    -->
 
     <!-- Unzip test package to build drive. -->
     <target name="prepare-eunit" if="internal.ats.enabled">
--- a/sbsv2/raptor/util/Makefile	Wed Oct 13 16:27:55 2010 +0800
+++ b/sbsv2/raptor/util/Makefile	Wed Oct 13 16:31:27 2010 +0800
@@ -1,5 +1,5 @@
 
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -38,7 +38,7 @@
   ifneq ($(filter $(HOSTPLATFORM),win),win)
     # Some tools not built for windows
     # Some of these don't support our special clean mode
-    TARGETS:=$(TARGETS) bash make python codewarrior bvcpp gccxml dialog
+    TARGETS:=$(TARGETS) bash make python codewarrior bvcpp dialog
     #  Build pvm and pvmgmake later when they have been corrected
     # pvmgmake  pvm
   endif
Binary file sbsv2/raptor/util/ext/gccxml.tar.gz has changed
--- a/sbsv2/raptor/util/gccxml.mk	Wed Oct 13 16:27:55 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# Utility makefile 
-#
-
-GCCXML_TAR:=$(SBS_HOME)/util/ext/gccxml.tar.gz
-
-
-define b_gccxml
-
-.PHONY:: gccxml
-
-all:: gccxml
-
-gccxml: $(INSTALLROOT)/bin/gccxml_cc1plus
-	
-$(INSTALLROOT)/bin/gccxml_cc1plus: $(GCCXML_TAR)
-	cd $(INSTALLROOT) && \
-	tar -xzf $(GCCXML_TAR) 
-
-endef
-
-$(eval $(b_gccxml))
-
-
-
-