481N/A ! The contents of this file are subject to the terms of the 481N/A ! Common Development and Distribution License, Version 1.0 only 481N/A ! (the "License"). You may not use this file except in compliance 481N/A ! You can obtain a copy of the license at 481N/A ! See the License for the specific language governing permissions 481N/A ! and limitations under the License. 481N/A ! When distributing Covered Code, include this CDDL HEADER in each 481N/A ! file and include the License file at 481N/A ! add the following below this CDDL HEADER, with the fields enclosed 481N/A ! by brackets "[]" replaced with your own identifying information: 873N/A ! Portions Copyright [yyyy] [name of copyright owner] 481N/A ! Portions Copyright 2006-2007 Sun Microsystems, Inc. 1878N/A<
project name="opends-tests-installer" basedir="." default="usage">
481N/A Installer ant file for the server
481N/A This allows tests that need a running instance of the product to easily
3824N/A <!-- this one has to be loaded first since it's used in 3842N/A value="${MAJOR_VERSION}.${MINOR_VERSION}.${POINT_VERSION}" />
3842N/A <!-- this is an optional file if you want to pass custom values --> 3842N/A <!-- this is the file where the default values are defined --> 481N/A <!-- Define default values for mandatory properties in case the 2976N/A property files would not be found 2976N/A <!-- Usage section - top --> 2650N/A status : reports if product is installed
and/
or running
481N/A bootstrap : installs and configure the product
481N/A wipeout : stops and uninstalls the product
install : installs the product
configure : set the server up to listen on a given port
start : start the product unless it is already running
stop : stop the product if it is already running
uninstall : uninstall the product if it is installed
<!-- Usage section - bottom --> <!-- Installation section - top --> <
target name="install-do" description="deploy the product bits" <
target name="install" depends="status-do,install-do"/>
<!-- end of install related targets --> <!-- Uninstallation section - top --> <
target name="uninstall-do" description="Uninstall the product" <
target name="uninstall" depends="status-do,stop-do,uninstall-do"/>
<!-- Uninstallation section - bottom --> <!-- Configuration secton - top --> <
target name="configure-do" description="configures product to listen on the right port number" <
echo message="basedir=[${basedir}]" />
<!-- building the classpath to run the configurator --> <!-- provide the arguments here --> <
arg value="--configClass"/>
<
arg value="--configFile"/>
<
target name="configure" depends="status-do,configure-do"/>
<!-- Configuration section - bottom --> <!-- Start section - top --> description="start the product" <
target name="start" depends="status-do,start-do"/>
<!-- Start section - bottom --> <!-- Stop section - top --> description="stop the server">
<
target name="stop" depends="status-do,stop-do"/>
<
echo message="Give the server some time to shut down and release locks..." />
<!-- Stop section - bottom --> <!-- Status section - top --> <
target name="status-do" description="gather status">
<
antcall target="is-product-running?"/>
<
antcall target="is-product-not-running?"/>
<
echo message="Could not find ${product.name} installation." />
<!-- end of installation status --> <
target name="status" depends="status-do,is-product-installed?,is-product-not-installed?"/>
<!-- Status section - bottom --> <!-- macros - chained operations --> <
target name="bootstrap">
<
echo message="Bootstrap: wipe the plate clean in case there is a previous install"/>
<
antcall target="wipeout" />
<
echo message="Bootstrap: install the product" />
<
antcall target="install" />
<
antcall target="configure" />
<
antcall target="start" />
<
echo message="Wipeout: removing product" />
<
antcall target="uninstall" />
<!-- end of macros related targets-->