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