<!--
! CDDL HEADER START
!
! The contents of this file are subject to the terms of the
! Common Development and Distribution License, Version 1.0 only
! (the "License"). You may not use this file except in compliance
! with the License.
!
! You can obtain a copy of the license at
! trunk/opends/resource/legal-notices/OpenDS.LICENSE
! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! When distributing Covered Code, include this CDDL HEADER in each
! file and include the License file at
! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
! add the following below this CDDL HEADER, with the fields enclosed
! by brackets "[]" replaced with your own identifying information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CDDL HEADER END
!
!
! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
<project name="user">
<description>
Configure user variables.
</description>
<target name="configure">
<echo>* STAF configuration</echo>
<input message=" Enter path to repository directory:"
defaultvalue="${repository.dir}"
addproperty="repository.dir.input"/>
<input message=" Use default STAF/services version and configuration?"
defaultvalue="${staf.default}"
validargs="true,false"
addproperty="staf.default.input"/>
<if>
<equals arg1="${staf.default.input}" arg2="false"/>
<then>
<input message=" Enter STAF version:"
defaultvalue="${staf.version}"
addproperty="staf.version.input"/>
<input message=" Enter STAF port:"
defaultvalue="${staf.port}"
addproperty="staf.port.input"/>
<input message=" Enter STAX version:"
defaultvalue="${stax.version}"
addproperty="stax.version.input"/>
<input message=" Enter Email service version:"
defaultvalue="${email.version}"
addproperty="email.version.input"/>
<input message=" Enter Event service version:"
defaultvalue="${event.version}"
addproperty="event.version.input"/>
<input message=" Enter EventManager service version:"
defaultvalue="${eventmanager.version}"
addproperty="eventmanager.version.input"/>
<input message=" Enter HTTP service version:"
defaultvalue="${http.version}"
addproperty="http.version.input"/>
<input message=" Enter Tomcat service version:"
defaultvalue="${tomcat.version}"
addproperty="tomcat.version.input"/>
<input message=" Enter Glassfish service version:"
defaultvalue="${glassfish.version}"
addproperty="glassfish.version.input"/>
<input message=" Enter SunWebserver download url:"
defaultvalue="${sunwebserver.url}"
addproperty="sunwebserver.url.input"/>
<input message=" Enter SunWebserver service version:"
defaultvalue="${sunwebserver.version}"
addproperty="sunwebserver.version.input"/>
</then>
<else>
<property name="staf.version.input" value="${staf.version}"/>
<property name="staf.port.input" value="${staf.port}"/>
<property name="stax.version.input" value="${stax.version}"/>
<property name="email.version.input" value="${email.version}"/>
<property name="event.version.input" value="${event.version}"/>
<property name="eventmanager.version.input" value="${eventmanager.version}"/>
<property name="http.version.input" value="${http.version}"/>
<property name="tomcat.version.input" value="${tomcat.version}"/>
<property name="glassfish.version.input" value="${glassfish.version}"/>
<property name="sunwebserver.url.input" value="${sunwebserver.url}"/>
<property name="sunwebserver.version.input" value="${sunwebserver.version}"/>
</else>
</if>
<echo>* Proxy configuration</echo>
<input message=" Use proxy?"
defaultvalue="${proxy.enabled}"
validargs="true,false"
addproperty="proxy.enabled.input"/>
<if>
<equals arg1="${proxy.enabled.input}" arg2="true"/>
<then>
<input message=" Enter proxy host:"
defaultvalue="${proxy.host}"
addproperty="proxy.host.input"/>
<input message=" Enter proxy port:"
defaultvalue="${proxy.port}"
addproperty="proxy.port.input"/>
<input message=" Enter proxy user:"
defaultvalue="${proxy.user}"
addproperty="proxy.user.input"/>
<input message=" Enter proxy password:"
defaultvalue="${proxy.pass}"
addproperty="proxy.pass.input"/>
</then>
<else>
<property name="proxy.host.input" value="${proxy.host}"/>
<property name="proxy.port.input" value="${proxy.port}"/>
<property name="proxy.user.input" value="${proxy.user}"/>
<property name="proxy.pass.input" value="${proxy.pass}"/>
</else>
</if>
<echo>* Email configuration</echo>
<input message=" Send report email?"
defaultvalue="${email.enabled}"
validargs="true,false"
addproperty="email.enabled.input"/>
<if>
<equals arg1="${email.enabled.input}" arg2="true"/>
<then>
<input message=" Send email to:"
defaultvalue="${email.to}"
addproperty="email.to.input"/>
<input message=" Enter email server host:"
defaultvalue="${email.server.host}"
addproperty="email.server.host.input"/>
<input message=" Enter email server port:"
defaultvalue="${email.server.port}"
addproperty="email.server.port.input"/>
</then>
<else>
<property name="email.to.input" value="${email.to}"/>
<property name="email.server.host.input" value="${email.server.host}"/>
<property name="email.server.port.input" value="${email.server.port}"/>
</else>
</if>
<echo>Saving ...</echo>
<echo file="${basedir}/user.properties"># User-defined values
# This file is generated by "build user-configure" command
repository.dir=${repository.dir.input}
staf.default=${staf.default.input}
staf.port=${staf.port.input}
staf.version=${staf.version.input}
stax.version=${stax.version.input}
email.version=${email.version.input}
event.version=${event.version.input}
eventmanager.version=${eventmanager.version.input}
http.version=${http.version.input}
tomcat.version=${tomcat.version.input}
glassfish.version=${glassfish.version.input}
sunwebserver.url=${sunwebserver.url.input}
sunwebserver.version=${sunwebserver.version.input}
proxy.enabled=${proxy.enabled.input}
proxy.host=${proxy.host.input}
proxy.port=${proxy.port.input}
proxy.user=${proxy.user.input}
proxy.pass=${proxy.pass.input}
email.enabled=${email.enabled.input}
email.to=${email.to.input}
email.server.host=${email.server.host.input}
email.server.port=${email.server.port.input}</echo>
</target>
</project>