--- a/buildframework/helium/tools/preparation/password.ant.xml Wed Jun 16 16:51:40 2010 +0300
+++ b/buildframework/helium/tools/preparation/password.ant.xml Fri Aug 13 14:59:05 2010 +0300
@@ -106,13 +106,13 @@
<!-- Retrieve the ccm password from the .netrc file and store it into ccm.password property.
Requires ccm.enabled tobe set to 'true' to work.-->
- <target name="ccm-password" if="run.ccm">
+ <target name="ccm-password" if="internal.ccm.enabled">
<hlm:netrcPasswordMacro output-prop="ccm.password.rc" result-prop="ccm.password.available" type="synergy"/>
</target>
<!-- Retrieve the ccm username from the .netrc file and store it into ccm.username property.
Requires ccm.enabled tobe set to 'true' to work. -->
- <target name="ccm-username" if="run.ccm">
+ <target name="ccm-username" if="internal.ccm.enabled">
<hlm:netrcUsernameMacro output-prop="ccm.login.rc" result-prop="ccm.username.available" type="synergy"/>
</target>
@@ -124,96 +124,84 @@
- ccm.user.password
it requires ccm.database to be set to the wanted database and ccm.enabled to set to 'true'.
-->
- <target name="get-ccm-password" depends="ccm-password,ccm-username" unless="ccm.user.password">
+ <target name="get-ccm-password" depends="ccm-password,ccm-username" unless="ccm.user.password" if="internal.ccm.enabled">
+ <hlm:filterRecordStartMacro pattern="${ccm.password.rc}" category="ccm"/>
<if>
- <isset property="run.ccm"/>
+ <not>
+ <and>
+ <isset property="ccm.login.rc"/>
+ <isset property="ccm.password.rc"/>
+ </and>
+ </not>
<then>
- <hlm:filterRecordStartMacro pattern="${ccm.password.rc}" category="ccm"/>
- <if>
- <not>
- <and>
- <isset property="ccm.login.rc"/>
- <isset property="ccm.password.rc"/>
- </and>
- </not>
+ <if>
+ <isset property="ccm.login.popup.disable"/>
<then>
- <if>
- <isset property="ccm.login.popup.disable"/>
- <then>
- <echo>Error: Unable to read synergy username and password from .netrc file.</echo>
- <property name="skip.password.validation" value="true"/>
- </then>
- <else>
- <!-- Contains the user name for CCM by reading the information from .netrc file.
- @type string
- @scope private
- -->
- <property name="ccm.user.login" value="${env.USERNAME}"/>
- <antform title="Synergy login information">
- <label>Unable to read synergy username and password from h:\.netrc file.</label>
- <textProperty label="ccm login:" property="ccm.user.login"/>
- <textProperty label="ccm password:" property="ccm.user.password" password="true"/>
- </antform>
- <property name="ccm.password.available" value="1"/>
- <!-- Unix username.
- @type string
- @scope private
- -->
- <property name="unix.username" value="${env.USERNAME}"/>
- <!-- Unix password
- @type string
- @scope private
- -->
- <property name="unix.password" value="${ccm.user.password}"/>
- <!-- Equal 0 if the unix password if available
- @type string
- @scope private
- -->
- <property name="unix.password.available" value="1"/>
- </else>
- </if>
- </then>
+ <echo>Error: Unable to read synergy username and password from .netrc file.</echo>
+ <property name="skip.password.validation" value="true"/>
+ </then>
<else>
<!-- Contains the user name for CCM by reading the information from .netrc file.
@type string
@scope private
-->
- <property name="ccm.user.login" value="${ccm.login.rc}"/>
- <!-- Contains the password for CCM user name by reading the information from .netrc file.
+ <property name="ccm.user.login" value="${env.USERNAME}"/>
+ <antform title="Synergy login information">
+ <label>Unable to read synergy username and password from h:\.netrc file.</label>
+ <textProperty label="ccm login:" property="ccm.user.login"/>
+ <textProperty label="ccm password:" property="ccm.user.password" password="true"/>
+ </antform>
+ <property name="ccm.password.available" value="1"/>
+ <!-- Unix username.
+ @type string
+ @scope private
+ -->
+ <property name="unix.username" value="${env.USERNAME}"/>
+ <!-- Unix password
@type string
@scope private
-->
- <property name="ccm.user.password" value="${ccm.password.rc}"/>
- </else>
+ <property name="unix.password" value="${ccm.user.password}"/>
+ <!-- Equal 0 if the unix password if available
+ @type string
+ @scope private
+ -->
+ <property name="unix.password.available" value="1"/>
+ </else>
</if>
- <antcall target="ccm-check"/>
- <hlm:filterRecordStopMacro/>
</then>
- <!--echo> ccm not enabled so not get password</echo-->
+ <else>
+ <!-- Contains the user name for CCM by reading the information from .netrc file.
+ @type string
+ @scope private
+ -->
+ <property name="ccm.user.login" value="${ccm.login.rc}"/>
+ <!-- Contains the password for CCM user name by reading the information from .netrc file.
+ @type string
+ @scope private
+ -->
+ <property name="ccm.user.password" value="${ccm.password.rc}"/>
+ </else>
</if>
+ <antcall target="ccm-check"/>
+ <hlm:filterRecordStopMacro/>
</target>
<!-- check synergy is available needs ccm.enabled to be set to 'true' as well.-->
- <target name="ccm-check" unless="skip.password.validation">
+ <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>
- <isset property="run.ccm"/>
+ <equals arg1="${ccm.session.created}" arg2="-1"/>
<then>
- <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>
+ <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>