rendered paste bodyIndex: etc/antinstall/antinstall-config-component.xml
===================================================================
--- etc/antinstall/antinstall-config-component.xml (revision 7115)
+++ etc/antinstall/antinstall-config-component.xml (working copy)
@@ -2,12 +2,13 @@
<installer
ui="swing,text,text-auto"
loadDefaults="true"
- verbose="true"
- debug="true"
- lookAndFeel="jgoodies"
+ verbose="false"
+ debug="false"
+ info="true"
+ lookAndFeel="com.jgoodies.looks.plastic.PlasticXPLookAndFeel"
name="@COMPONENT_NAME@"
- windowIcon="/resources/logo.gif"
- defaultImageResource="/resources/title_logo.gif"
+ windowIcon="/resources/logo.png"
+ defaultImageResource="/resources/Logo_Nice_h50.jpg"
minJavaVersion="1.4"
antialiased="true"
finishButtonText="Install">
@@ -24,7 +25,8 @@
<page
type="license"
name="license"
- title="License Agreement"
+ title="License Agreement"
+ usePaging="true"
subtitle="Please review the license terms before installing @COMPONENT_NAME@"
htmlResource="/@COMPONENT_ID@/ef_root/plugins/@COMPONENT_ID@/etc/eula.html"
textResource="/@COMPONENT_ID@/ef_root/plugins/@COMPONENT_ID@/etc/eula.txt">
@@ -55,49 +57,12 @@
<page
ifTarget="component_@COMPONENT_ID@"
type="input"
- name="enable_@COMPONENT_ID@"
- subtitle="Choose authentication options"
- title="@COMPONENT_NAME@ Configuration">
+ name="enable_activedirectory"
+ title="@COMPONENT_NAME@ Configuration"
+ subtitle="Choose authentication options">
<select defaultValue="false" displayText="Choose authentication enabling, then click Next." property="default.auth.mgr">
<option value="false" text="No"/>
- <option value="@COMPONENT_ID@" text="Yes"/>
- </select>
- </page>
-
- <page
- ifTarget="component_@COMPONENT_ID@"
- ifProperty="${default.auth.mgr}==@COMPONENT_ID@"
- type="input"
- name="properties_@COMPONENT_ID@_ldapsearch"
- title="@COMPONENT_NAME@ Configuration">
- <comment displayText="Specify the 'ldapsearch' location. ${CONTINUE}"/>
- <file
- property="@COMPONENT_ID@.ldapsearch"
- displayText="Location of 'ldapsearch'"
- defaultValue=""
- checkExists="true"/>
- </page>
-
- <page
- ifTarget="component_@COMPONENT_ID@"
- ifProperty="${default.auth.mgr}==@COMPONENT_ID@"
- type="input"
- name="properties_@COMPONENT_ID@_ldapserver"
- title="@COMPONENT_NAME@ Configuration">
- <comment displayText="Specify the ActiveDirectory server host. ${CONTINUE}"/>
- <text property="@COMPONENT_ID@.server" displayText="ActiveDirectory server" defaultValue=""/>
- </page>
-
- <page
- ifTarget="component_@COMPONENT_ID@"
- ifProperty="${default.auth.mgr}==@COMPONENT_ID@"
- type="input"
- name="properties_@COMPONENT_ID@_secure"
- title="@COMPONENT_NAME@ Configuration">
- <comment displayText="Specify if the server uses secure connection. ${CONTINUE}"/>
- <select displayText="ActiveDirectory Secure" property="@COMPONENT_ID@.secure" defaultValue="false">
- <option text="Yes" value="true"/>
- <option text="No" value="false"/>
+ <option value="activedirectory" text="Yes"/>
</select>
</page>
@@ -105,70 +70,87 @@
ifTarget="component_@COMPONENT_ID@"
ifProperty="${default.auth.mgr}==@COMPONENT_ID@"
type="input"
- name="properties_@COMPONENT_ID@_port"
- title="@COMPONENT_NAME@ Configuration">
- <comment displayText="Specify the ActiveDirectory server port. ${CONTINUE}"/>
- <text property="@COMPONENT_ID@.port" displayText="ActiveDirectory Port" defaultValue=""/>
+ name="properties_@COMPONENT_ID@_ldapsearch"
+ title="Authentication Manager Configuration"
+ subtitle="Specify the 'ldapsearch' location">
+ <comment displayText="Specify the location of the 'ldapsearch' program. ${CONTINUE}"/>
+ <file property="activedirectory.ldapsearch"
+ displayText="Location of 'ldapsearch'"
+ defaultValue="/usr/bin/ldapsearch"
+ defaultValueWin=""
+ checkExists="true"/>
</page>
- <page
+ <page
+ mode="swing"
ifTarget="component_@COMPONENT_ID@"
ifProperty="${default.auth.mgr}==@COMPONENT_ID@"
type="input"
- name="properties_@COMPONENT_ID@_base"
- title="@COMPONENT_NAME@ Configuration"
- postDisplayTarget="component_@COMPONENT_ID@_post_check_server">
- <comment displayText="Specify the @COMPONENT_NAME@ base. ${CONTINUE}"/>
- <text property="@COMPONENT_ID@.base" displayText="ActiveDirectory Base" defaultValue=""/>
- </page>
-
- <page
- ifTarget="component_@COMPONENT_ID@"
- ifProperty="(${default.auth.mgr}==@COMPONENT_ID@) AND (${@COMPONENT_ID@.servercheck.failed}==true)"
- type="input"
- name="properties_@COMPONENT_ID@_checkserver_ignore"
- title="@COMPONENT_NAME@ Configuration"
- postDisplayTarget="component_@COMPONENT_ID@_post_check_server">
- <comment displayText="The server check failed."/>
- <comment displayText="Current settings:"/>
- <comment displayText=" ActiveDirectory Server: ${@COMPONENT_ID@.server}"/>
- <comment displayText=" ActiveDirectory Port: ${@COMPONENT_ID@.port}"/>
- <select displayText="Do you want to ignore the test and continue?" property="@COMPONENT_ID@.servercheck.ignore" defaultValue="false">
- <option text="Yes" value="true"/>
- <option text="No" value="false"/>
- </select>
+ name="properties_@COMPONENT_ID@_activedirectoryserver_swing"
+ title="Authentication Manager Configuration"
+ subtitle="Specify the information needed to query the ActiveDirectory server"
+ postDisplayTarget="component_activedirectory_post_check_activedirectory_server">
+ <comment displayText="Specify the contact information for the ActiveDirectory server and the default ActiveDirectory base Distinguished Name. ${CONTINUE}"/>
+ <text displayText="Name of the host on which the ActiveDirectory server is located"
+ defaultValue="${ef.host}"
+ property="activedirectory.server"/>
+ <ext-validated displayText="TCP port on which the ActiveDirectory server listens for requests"
+ defaultValue="389"
+ format="numeric"
+ property="activedirectory.port"
+ validationClass="com.enginframe.install.antinstaller.validator.PortValidator"/>
+ <checkbox displayText="Use a secure connection (TLS)"
+ property="activedirectory.secure"
+ defaultValue="false">
+ </checkbox>
+ <ext-validated displayText="Default base Distinguished Name"
+ defaultValue=""
+ property="activedirectory.base"
+ validationClass="com.enginframe.install.antinstaller.validator.DistinguishedNameValidator"/>
</page>
- <page
+ <!-- text variant of the previous page, we need a to turn the
+ checkbutton into a question -->
+ <page
+ mode="text"
ifTarget="component_@COMPONENT_ID@"
ifProperty="${default.auth.mgr}==@COMPONENT_ID@"
type="input"
- name="properties_@COMPONENT_ID@_username_password_step1"
- title="@COMPONENT_NAME@ Configuration"
- postDisplayTarget="component_@COMPONENT_ID@_post_check_auth">
- <comment displayText="Specify username and password to test authentication. ${CONTINUE}"/>
- <text property="@COMPONENT_ID@.bindas" displayText="Bind as" defaultValue=""/>
- <password property="@COMPONENT_ID@.bindpwd" displayText="Bind password" regex="^.*$" textMask="true" defaultValue="password"/>
- <text property="@COMPONENT_ID@.user" displayText="Username" defaultValue=""/>
- <password property="@COMPONENT_ID@.userpw" displayText="Password" textMask="true" regex="^.*$" defaultValue="password"/>
+ name="properties_@COMPONENT_ID@_activedirectoryserver_text"
+ title="Authentication Manager Configuration"
+ subtitle="Specify the information needed to query the ActiveDirectory server"
+ postDisplayTarget="component_activedirectory_post_check_activedirectory_server">
+ <comment displayText="Specify the contact information for the ActiveDirectory server and the default ActiveDirectory Base Name. ${CONTINUE}"/>
+ <text displayText="Name of the host on which the ActiveDirectory server is located"
+ defaultValue="${ef.host}"
+ property="activedirectory.server"/>
+ <ext-validated displayText="TCP port on which the ActiveDirectory server listens for requests"
+ defaultValue="389"
+ format="numeric"
+ property="activedirectory.port"
+ validationClass="com.enginframe.install.antinstaller.validator.PortValidator"/>
+ <checkbox displayText="Does the ActiveDirectory server require a secure connection (TLS)?"
+ property="activedirectory.secure"
+ defaultValue="false">
+ </checkbox>
+ <ext-validated displayText="Default base Distinguished Name"
+ defaultValue=""
+ property="activedirectory.base"
+ validationClass="com.enginframe.install.antinstaller.validator.DistinguishedNameValidator"/>
</page>
<page
ifTarget="component_@COMPONENT_ID@"
- ifProperty="(${default.auth.mgr}==@COMPONENT_ID@) AND (${@COMPONENT_ID@.authcheck.failed}==true)"
+ ifProperty="(${default.auth.mgr}==@COMPONENT_ID@) AND (${@COMPONENT_ID@.servercheck.failed}==false)"
type="input"
- name="properties_@COMPONENT_ID@_username_password_step2"
+ name="properties_@COMPONENT_ID@_username_password"
title="@COMPONENT_NAME@ Configuration"
- postDisplayTarget="component_@COMPONENT_ID@_post_check_auth">
- <comment displayText="Specify username and password to test authentication. ${CONTINUE}"/>
+ subtitle="Specify username and password to test authentication"
+ postDisplayTarget="component_@COMPONENT_ID@_post_check_@COMPONENT_ID@_auth">
<text property="@COMPONENT_ID@.bindas" displayText="Bind as" defaultValue=""/>
- <password property="@COMPONENT_ID@.bindpwd" displayText="Bind password" textMask="true" regex="^.*$" defaultValue="password"/>
+ <password property="@COMPONENT_ID@.bindpwd" displayText="Bind password" regex="^.*$" textMask="true" defaultValue=""/>
<text property="@COMPONENT_ID@.user" displayText="Username" defaultValue=""/>
- <password property="@COMPONENT_ID@.userpw" displayText="Password" textMask="true" regex="^.*$" defaultValue="password"/>
- <select displayText="Skip authentication check?" property="@COMPONENT_ID@.authcheck.ignore" defaultValue="false">
- <option text="Yes" value="true"/>
- <option text="No" value="false"/>
- </select>
+ <password property="@COMPONENT_ID@.userpw" displayText="Password" textMask="true" regex="^.*$" defaultValue=""/>
</page>
<page
Index: etc/antinstall/build-component.xml
===================================================================
--- etc/antinstall/build-component.xml (revision 7115)
+++ etc/antinstall/build-component.xml (working copy)
@@ -4,200 +4,182 @@ This is the build.xml run by AntInstalle
-->
<project name="ActiveDirectory Plug-In Installer" default="" basedir=".">
- <!-- this is required to pick up the properties generated during the install pages -->
- <property file="${basedir}/efinstall.config"/>
+ <!-- this is required to pick up the properties generated during the install pages -->
+ <property file="${basedir}/efinstall.config"/>
- <target name="init">
- <!--
- <fail message="TODO: Fill in init target for plugin-only installation"/>
- -->
- </target>
-
- <!-- post display target used to get the root dir -->
- <target name="antinstaller_set_root_dir">
- <taskdef resource="net/sf/antcontrib/antlib.xml"/>
-
- <propertyregex
- property="nice.root.dir.tmp"
- input="${nice.root.dir.ui}"
- regexp="\\"
- replace="/"
- global="true"
- defaultValue="${nice.root.dir.ui}"
- />
-
- <!-- set globals needed by the install -->
- <antinstaller-property name="nice.root.dir" value="${nice.root.dir.tmp}"/>
- <antinstaller-property name="ef.root.dir" value="${nice.root.dir.tmp}/enginframe"/>
- </target>
-
- <target name="component_activedirectory_post_check_auth">
- <taskdef resource="net/sf/antcontrib/antlib.xml"/>
- <if>
- <equals arg1="${activedirectory.secure}" arg2="true"/>
- <then>
- <property name="activedirectory.options" value="-Z"/>
- </then>
- <else>
- <property name="activedirectory.options" value=""/>
- </else>
- </if>
- <!-- Was:
- _ad_command="${EF_AD_SEARCH} \
- -x ${EF_ADLDAP_OPTIONS} \
- -h \"${EF_AD_SERVER}\" \
- -p \"${EF_AD_PORT}\" \
- -b \"${EF_AD_BASE}\" \
- \"sAMAccountName=${_my_username}\" \
- -D \"cn=${EF_AD_BINDAS},${EF_AD_BASE}\" \
- -w \"${EF_AD_BINDPWD}\" \
- -->
-
- <exec outputproperty="activedirectory.authcheck.step1.output" executable="${activedirectory.ldapsearch}" resultproperty="activedirectory.authcheck.step1.res">
- <arg value="-x"/>
- <arg value="${activedirectory.options}"/>
- <arg value="-h"/>
- <arg value="${activedirectory.server}"/>
- <arg value="-p"/>
- <arg value="${activedirectory.port}"/>
- <arg value="-b"/>
- <arg value="${activedirectory.base}"/>
- <arg value="sAMAccountName=${activedirectory.user}"/>
- <arg value="-D"/>
- <arg value="cn=${activedirectory.bindas},${activedirectory.base}"/>
- <arg value="-w"/>
- <arg value="${activedirectory.bindpwd}"/>
- </exec>
- <antinstaller-log message="Result step1: ${activedirectory.authcheck.step1.res}"/>
- <antinstaller-log message="Output step1: ${activedirectory.authcheck.step1.output}"/>
-
- <if>
- <equals arg1="${activedirectory.authcheck.step1.res}" arg2="0"/>
- <then>
-
- <!-- Was:
- _ad_distinguishedname="`echo \"${_ad_output}\" \
- | $EF_GREP 'dn:' \
- | $EF_SED 's/dn: //g'`"
- -->
- <property name="activedirectory.dn" value="..."/>
+ <target name="init">
+ <fail message="TODO: Fill in init target for plugin-only installation"/>
+ </target>
+
+ <!-- post display target used to get the root dir -->
+ <target name="antinstaller_set_root_dir">
+ <taskdef resource="net/sf/antcontrib/antlib.xml"/>
+
+ <propertyregex
+ property="nice.root.dir.tmp"
+ input="${nice.root.dir.ui}"
+ regexp="\\"
+ replace="/"
+ global="true"
+ defaultValue="${nice.root.dir.ui}"
+ />
+
+ <!-- set globals needed by the install -->
+ <antinstaller-property name="nice.root.dir" value="${nice.root.dir.tmp}"/>
+ <antinstaller-property name="ef.root.dir" value="${nice.root.dir.tmp}/enginframe"/>
+ </target>
+
+ <target name="component_activedirectory_post_check_activedirectory_server">
+ <taskdef resource="net/sf/antcontrib/antlib.xml"/>
+ <if>
+ <equals arg1="${activedirectory.secure}" arg2="true"/>
+ <then>
+ <property name="activedirectory.options" value="-Z"/>
+ </then>
+ <else>
+ <property name="activedirectory.options" value=""/>
+ </else>
+ </if>
+ <property name="activedirectorycheck.argline" value="-x ${activedirectory.options} -h ${activedirectory.server} -p ${activedirectoryp.port} -b ${activedirectory.base}"/>
+ <antinstaller-log message="Calling ${activedirectory.ldapsearch} ${activedirectorycheck.argline}"/>
+
+ <exec executable="${activedirectory.ldapsearch}"
+ resultproperty="activedirectory.servercheck.res"
+ timeout="10000">
+ <arg line="${activedirectorycheck.argline}"/>
+ </exec>
+ <antinstaller-log message="Result: ${activedirectory.servercheck.res}"/>
+
+ <if>
+ <or>
+ <equals arg1="${activedirectory.servercheck.res}" arg2="0"/>
+ <equals arg1="${activedirectory.servercheck.res}" arg2="4"/> <!-- size limit exceeded -->
+ </or>
+ <then>
+ <antinstaller-property name="activedirectory.servercheck.failed" value="false"/>
+ </then>
+ <else>
+ <antinstaller-property name="activedirectory.servercheck.failed" value="true"/>
+ <if>
+ <equals arg1="${activedirectory.servercheck.res}" arg2="32"/>
+ <then>
+ <antinstaller-prompt message="The specified Base Name is not valid. Do you want to skip this check and continue the installation?" property="continue"/>
+ </then>
+ <elseif>
+ <equals arg1="${activedirectory.servercheck.res}" arg2="34"/>
+ <then>
+ <antinstaller-prompt message="The syntax of the specified Base Name is not valid. Do you want to skip this check and continue the installation?" property="continue"/>
+ </then>
+ </elseif>
+ <else>
+ <antinstaller-prompt message="Unable to contact the specified ActiveDirectory Server. Do you want to skip this check and continue the installation?" property="continue"/>
+ </else>
+ </if>
+ <if>
+ <equals arg1="${continue}" arg2="yes"/>
+ <then>
+ <antinstaller-log message="Skipping ActiveDirectory credentials check."/>
+ </then>
+ <else>
+ <fail message="Error querying ActiveDirectory Server. Exit code: ${activedirectory.servercheck.res}"/>
+ </else>
+ </if>
+ </else>
+ </if>
+ </target>
+ <target name="component_activedirectory_post_check_activedirectory_auth">
+ <taskdef resource="net/sf/antcontrib/antlib.xml"/>
+ <if>
+ <equals arg1="${activedirectory.secure}" arg2="true"/>
+ <then>
+ <property name="activedirectory.options" value="-Z"/>
+ </then>
+ <else>
+ <property name="activedirectory.options" value=""/>
+ </else>
+ </if>
- <!-- Was:
- _ad_command="${EF_AD_SEARCH} \
- -x -n ${EF_ADLDAP_OPTIONS} \
- -h \"${EF_AD_SERVER}\" \
- -p \"${EF_AD_PORT}\" \
- -b \"${EF_AD_BASE}\" \
- -D \"${_ad_distinguishedname}\" \
- -w \"${_my_password}\" \
- -->
- <exec outputproperty="activedirectory.authcheck.step2.output" executable="${activedirectory.ldapsearch}" resultproperty="activedirectory.authcheck.step2.res">
- <arg value="-x"/>
- <arg value="-n"/>
- <arg value="${activedirectory.options}"/>
- <arg value="-h"/>
- <arg value="${activedirectory.server}"/>
- <arg value="-p"/>
- <arg value="${activedirectory.port}"/>
- <arg value="-b"/>
- <arg value="${activedirectory.base}"/>
- <arg value="-D"/>
- <arg value="${activedirectory.dn}"/>
- <arg value="-w"/>
- <arg value="${activedirectory.userpwd}"/>
- </exec>
- <antinstaller-log message="Result step2: ${activedirectory.authcheck.step2.res}"/>
- <antinstaller-log message="Output step2: ${activedirectory.authcheck.step2.output}"/>
-
- <if>
- <equals arg1="${activedirectory.authcheck.step2.res}" arg2="0"/>
- <then>
- <antinstaller-property name="activedirectory.authcheck.failed" value="false"/>
- </then>
- <else>
- <antinstaller-message message="Unable to log on ActiveDirectory Server. Exit code: ${activedirectory.authcheck.step2.res}"/>
- <antinstaller-property name="activedirectory.authcheck.failed" value="true"/>
- <if>
- <equals arg1="activedirectory.authcheck.ignore" arg2="false"/>
- <then>
- <fail message="Unable to log on ActiveDirectory Server. Exit code: ${activedirectory.authcheck.step2.res}"/>
- </then>
- </if>
- </else>
- </if>
- </then>
- <else>
- <antinstaller-message message="Unable to log on ActiveDirectory Server. Exit code: ${activedirectory.authcheck.step1.res}"/>
- <antinstaller-property name="activedirectory.authcheck.failed" value="true"/>
- <if>
- <equals arg1="activedirectory.authcheck.ignore" arg2="false"/>
- <then>
- <fail message="Unable to log on ActiveDirectory Server. Exit code: ${activedirectory.authcheck.step1.res}"/>
- </then>
- </if>
- </else>
- </if>
- </target>
-
- <target name="component_activedirectory_post_check_server">
- <taskdef resource="net/sf/antcontrib/antlib.xml"/>
- <if>
- <equals arg1="${activedirectory.secure}" arg2="true"/>
- <then>
- <property name="activedirectory.options" value="-Z"/>
- </then>
- <else>
- <property name="activedirectory.options" value=""/>
- </else>
- </if>
- <antinstaller-log message="Calling ${activedirectory.ldapsearch} with args:"/>
- <antinstaller-log message="-x"/>
- <antinstaller-log message="${activedirectory.options}"/>
- <antinstaller-log message="-h"/>
- <antinstaller-log message="${activedirectory.server}"/>
- <antinstaller-log message="-p"/>
- <antinstaller-log message="${activedirectory.port}"/>
- <antinstaller-log message="-b"/>
- <antinstaller-log message="${activedirectory.base}"/>
-
- <!-- Was:
- _ad_command="${EF_AD_SEARCH} \
- -x ${EF_ADLDAP_OPTIONS} \
- -h \"${EF_AD_SERVER}\" \
- -p \"${EF_AD_PORT}\" \
- -b \"${EF_AD_BASE}\" \
- -->
-
- <exec executable="${activedirectory.ldapsearch}" resultproperty="activedirectory.servercheck.res">
- <arg value="-x"/>
- <arg value="${activedirectory.options}"/>
- <arg value="-h"/>
- <arg value="${activedirectory.server}"/>
- <arg value="-p"/>
- <arg value="${activedirectory.port}"/>
- <arg value="-b"/>
- <arg value="${activedirectory.base}"/>
- </exec>
- <antinstaller-log message="Result: ${activedirectory.servercheck.res}"/>
-
- <if>
- <equals arg1="${activedirectory.servercheck.res}" arg2="0"/>
- <then>
- <antinstaller-property name="activedirectory.servercheck.failed" value="false"/>
- </then>
- <else>
- <antinstaller-message message="Unable to contact ActiveDirectory Server. Exit code: ${activedirectory.servercheck.res}"/>
- <antinstaller-property name="activedirectory.servercheck.failed" value="true"/>
- <if>
- <equals arg1="activedirectory.servercheck.ignore" arg2="false"/>
- <then>
- <fail message="Unable to contact ActiveDirectory Server. Exit code: ${activedirectory.servercheck.res}"/>
- </then>
- </if>
- </else>
- </if>
- </target>
+ <exec outputproperty="activedirectory.authcheck.step1.output"
+ executable="${activedirectory.ldapsearch}"
+ resultproperty="activedirectory.authcheck.step1.res">
+ <arg value="-x"/>
+ <arg value="${activedirectory.options}"/>
+ <arg value="-h"/>
+ <arg value="${activedirectory.server}"/>
+ <arg value="-p"/>
+ <arg value="${activedirectory.port}"/>
+ <arg value="-b"/>
+ <arg value="${activedirectory.base}"/>
+ <arg value="sAMAccountName=${activedirectory.user}"/>
+ <arg value="-D"/>
+ <arg value="cn=${activedirectory.bindas},${activedirectory.base}"/>
+ <arg value="-w"/>
+ <arg value="${activedirectory.bindpwd}"/>
+ </exec>
+ <antinstaller-log message="Result step1: ${activedirectory.authcheck.step1.res}"/>
+ <antinstaller-log message="Output step1: ${activedirectory.authcheck.step1.output}"/>
+
+ <if>
+ <equals arg1="${activedirectory.authcheck.step1.res}" arg2="0"/>
+ <then>
+ <property name="activedirectory.dn" value="..."/>
+
+ <exec outputproperty="activedirectory.authcheck.step2.output"
+ executable="${activedirectory.ldapsearch}"
+ resultproperty="activedirectory.authcheck.step2.res">
+ <arg value="-x"/>
+ <arg value="-n"/>
+ <arg value="${activedirectory.options}"/>
+ <arg value="-h"/>
+ <arg value="${activedirectory.server}"/>
+ <arg value="-p"/>
+ <arg value="${activedirectory.port}"/>
+ <arg value="-b"/>
+ <arg value="${activedirectory.base}"/>
+ <arg value="-D"/>
+ <arg value="${activedirectory.dn}"/>
+ <arg value="-w"/>
+ <arg value="${activedirectory.userpwd}"/>
+ </exec>
+ <antinstaller-log message="Result step2: ${activedirectory.authcheck.step2.res}"/>
+ <antinstaller-log message="Output step2: ${activedirectory.authcheck.step2.output}"/>
+
+ <if>
+ <equals arg1="${activedirectory.authcheck.step2.res}" arg2="0"/>
+ <then>
+ <antinstaller-property name="activedirectory.authcheck.failed" value="false"/>
+ </then>
+ <else>
+ <antinstaller-property name="activedirectory.authcheck.failed" value="true"/>
+ <antinstaller-prompt message="Unable to log on ActiveDirectory Server. Do you want to skip this check and continue the installation?" property="continue"/>
+ <if>
+ <equals arg1="${continue}" arg2="yes"/>
+ <then>
+ <antinstaller-log message="Skipping ActiveDirectory credentials check."/>
+ </then>
+ <else>
+ <fail message="Unable to log on ActiveDirectory Server. Exit code: ${activedirectory.authcheck.step2.res}"/>
+ </else>
+ </if>
+ </else>
+ </if>
+ </then>
+ <else>
+ <antinstaller-property name="activedirectory.servercheck.failed" value="true"/>
+ <antinstaller-prompt message="Unable to contact ActiveDirectory Server. Do you want to skip this check and continue the installation?" property="continue"/>
+ <if>
+ <equals arg1="${continue}" arg2="yes"/>
+ <then>
+ <antinstaller-log message="Skipping ActiveDirectory credentials check."/>
+ </then>
+ <else>
+ <fail message="Could not contact ActiveDirectory Server. Exit code: ${activedirectory.authcheck.step1.res}"/>
+ </else>
+ </if>
+ </else>
+ </if>
+ </target>
<target name="component_activedirectory_enable">
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
@@ -212,70 +194,62 @@ This is the build.xml run by AntInstalle
</if>
</target>
- <target name="component_activedirectory" depends="init,component_activedirectory_enable">
- <!-- A simple copy of os/ef_root to ${ef.root.dir} -->
- <unzip src="${antinstaller.jar}" dest="${ef.root.dir}">
- <patternset>
- <include name="activedirectory/ef_root/**/*"/>
- </patternset>
- <globmapper from="activedirectory/ef_root/*" to="*" handledirsep="true"/>
- </unzip>
- <!-- Was:
- efinstall_modifyfile \
+ <target name="component_activedirectory" depends="init,component_activedirectory_enable">
+ <!-- A simple copy of os/ef_root to ${ef.root.dir} -->
+ <unzip src="${antinstaller.jar}" dest="${ef.root.dir}">
+ <patternset>
+ <include name="activedirectory/ef_root/**/*"/>
+ </patternset>
+ <globmapper from="activedirectory/ef_root/*" to="*" handledirsep="true"/>
+ </unzip>
+ <!-- Was:
+ efinstall_modifyfile \
"${EF_ROOT}/plugins/activedirectory/conf/ef.auth.conf" \
-->
- <patternset id="activedirectory.patternsets.replaced.files">
- <include name="plugins/activedirectory/conf/ef.auth.conf"/>
- </patternset>
- <!-- Backup files to *.efsave -->
- <copy verbose="true" todir="${ef.root.dir}">
- <fileset dir="${ef.root.dir}">
- <patternset refid="activedirectory.patternsets.replaced.files"/>
- </fileset>
- <globmapper from="*" to="*.efsave"/>
- </copy>
-
- <!-- Was:
- -e "s/_EF_ad_server/${EF_AD_SERVER}/g" \
- -e "s/_EF_ad_port/${EF_AD_PORT}/g" \
- -e "s/_EF_ad_base/${EF_AD_BASE}/g" \
- -e "s/_EF_ad_search/${_ef_adsearch}/g" \
- -e "s/_EF_ad_bindas/${EF_AD_BINDAS}/g" \
- -e "s/_EF_ad_bindpwd/${EF_AD_BINDPWD}/g" \
- -->
- <!-- Replace files -->
- <replace summary="true" dir="${ef.root.dir}">
- <patternset refid="activedirectory.patternsets.replaced.files"/>
-
- <replacefilter token="_EF_ad_server" value="${activedirectory.server}"/>
- <replacefilter token="_EF_ad_port" value="${activedirectory.port}"/>
- <replacefilter token="_EF_ad_base" value="${activedirectory.base}"/>
- <replacefilter token="_EF_ad_search" value="${activedirectory.ldapsearch}"/>
- <replacefilter token="_EF_ad_bindas" value="${activedirectory.bindas}"/>
- <replacefilter token="_EF_ad_bindpwd" value="${activedirectory.bindpwd}"/>
- </replace>
-
- <delete dir="${ef.root.dir}">
- <include name="plugins/activedirectory/conf/ef.auth.conf.efsave"/>
- </delete>
-
- <chmod perm="755">
- <fileset dir="${ef.root.dir}/plugins/activedirectory">
- <include name="bin/"/>
- </fileset>
- <dirset dir="${ef.root.dir}/plugins/activedirectory">
- <include name="conf"/>
- <include name="etc"/>
- </dirset>
- </chmod>
- <chmod perm="644">
- <fileset dir="${ef.root.dir}/plugins/activedirectory">
- <include name="conf/*"/>
- <include name="etc/*"/>
- </fileset>
- </chmod>
- </target>
-
- <target name="cleanuptarget" depends="">
- </target>
-</project>
\ No newline at end of file
+ <patternset id="activedirectory.patternsets.replaced.files">
+ <include name="plugins/activedirectory/conf/ef.auth.conf"/>
+ </patternset>
+ <!-- Backup files to *.efsave -->
+ <copy verbose="true" todir="${ef.root.dir}">
+ <fileset dir="${ef.root.dir}">
+ <patternset refid="activedirectory.patternsets.replaced.files"/>
+ </fileset>
+ <globmapper from="*" to="*.efsave"/>
+ </copy>
+
+ <!-- Replace files -->
+ <replace summary="true" dir="${ef.root.dir}">
+ <patternset refid="activedirectory.patternsets.replaced.files"/>
+
+ <replacefilter token="_EF_ad_server" value="${activedirectory.server}"/>
+ <replacefilter token="_EF_ad_port" value="${activedirectory.port}"/>
+ <replacefilter token="_EF_ad_base" value="${activedirectory.base}"/>
+ <replacefilter token="_EF_ad_search" value="${activedirectory.ldapsearch}"/>
+ <replacefilter token="_EF_ad_bindas" value="${activedirectory.bindas}"/>
+ <replacefilter token="_EF_ad_bindpwd" value="${activedirectory.bindpwd}"/>
+ </replace>
+
+ <delete dir="${ef.root.dir}">
+ <include name="plugins/activedirectory/conf/ef.auth.conf.efsave"/>
+ </delete>
+
+ <chmod perm="755">
+ <fileset dir="${ef.root.dir}/plugins/activedirectory">
+ <include name="bin/"/>
+ </fileset>
+ <dirset dir="${ef.root.dir}/plugins/activedirectory">
+ <include name="conf"/>
+ <include name="etc"/>
+ </dirset>
+ </chmod>
+ <chmod perm="644">
+ <fileset dir="${ef.root.dir}/plugins/activedirectory">
+ <include name="conf/*"/>
+ <include name="etc/*"/>
+ </fileset>
+ </chmod>
+ </target>
+
+ <target name="cleanuptarget" depends="">
+ </target>
+</project>