blob: c7397470f7597ca19fa5d2f4492776661849a4a2 [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE project [
<!--
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
<!ENTITY eeCommonBuild SYSTEM "file:./../../../../../config/ee-common.xml">
<!ENTITY pTestproperties SYSTEM "file:./../build.properties">
<!ENTITY testproperties SYSTEM "file:./build.properties">
]>
<project name="lookup" default="usage" basedir=".">
&commonSetup;
&commonBuild;
&eeCommonBuild;
&pTestproperties;
&testproperties;
<target name="all" depends="clean,build,setup,deploy,run,undeploy,unsetup"/>
<target name="run-test" depends="build,deploy,run,undeploy"/>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
<target name="setup"/>
<target name="unsetup"/>
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
</antcall>
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
</target>
<target name="build" depends="compile">
<antcall target="build-ear-common"/>
</target>
<target name="deploy" depends="init-common">
<antcall target="deploy-ee">
<param name="appserver.instance.name" value="ee-event-cluster"/>
</antcall>
<antcall target="restart-cluster"/>
<antcall target="copy-client-jar"/>
</target>
<target name="copy-client-jar" depends="init-common">
<copy file="${admin.domain.dir}/${admin.domain}/applications/j2ee-apps/${appname}App/${appname}AppClient.jar" todir="${assemble.dir}" failonerror="false"/>
</target>
<target name="restart-cluster" depends="init-common">
<antcall target="stop-cluster-common">
<param name="cluster.name" value="ee-event-cluster"/>
</antcall>
<antcall target="start-cluster-common">
<param name="cluster.name" value="ee-event-cluster"/>
</antcall>
</target>
<target name="deploy-ee" depends="init-common" if="ee">
<echo message="So you are using Enterprise Version eh ?"/>
<property name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
<exec executable="${ASADMIN}" failonerror="false">
<arg line="deploy"/>
<arg line="--user ${admin.user}"/>
<arg line="--password ${admin.password}"/>
<arg line="--host ${admin.host}"/>
<arg line="--port ${admin.port}"/>
<arg line="--target ${appserver.instance.name}"/>
<arg line="--type ${apptype}"/>
<arg line="--retrieve ${assemble.dir}"/>
<!-- deployed.app defaults to ${assemble.dir}/${appname}App.ear defined in properties.xml-->
<arg line="${deployed.app}"/>
</exec>
<echo message="Deployment on target server ${appserver.instance.name} successful"/>
</target>
<target name="run" depends="init-common">
<antcall target="run-test-0" />
<antcall target="run-test-1" />
<antcall target="run-test-2" />
<antcall target="run-test-5" />
<antcall target="run-test-7" />
<antcall target="run-test-9" />
<antcall target="run-test-3" />
<antcall target="run-test-4" />
<antcall target="run-test-6" />
<antcall target="run-test-8" />
<antcall target="run-test-10" />
</target>
<target name="run-test-1" depends="init-common">
<antcall target="create-jdbc-res-pool"/>
<antcall target="create-jdbc-res"/>
<!-- antcall target="runclient-common"/ -->
<antcall target="run-standalone-client">
<param name="test.id" value="1"/>
<param name="orb.port" value="${orb.listener1.port}"/>
</antcall>
<antcall target="run-standalone-client">
<param name="test.id" value="1"/>
<param name="orb.port" value="${orb.listener1.port.two}"/>
</antcall>
</target>
<target name="run-test-2" depends="init-common">
<!-- antcall target="runclient-common"/ -->
<antcall target="run-standalone-client">
<param name="test.id" value="2"/>
<param name="orb.port" value="${orb.listener1.port}"/>
</antcall>
<antcall target="run-standalone-client">
<param name="test.id" value="2"/>
<param name="orb.port" value="${orb.listener1.port.two}"/>
</antcall>
</target>
<target name="run-test-3" depends="init-common">
<antcall target="delete-jdbc-res"/>
<!-- antcall target="delete-jdbc-res-reference"/ -->
<!-- antcall target="runclient-common"/ -->
<antcall target="run-standalone-client">
<param name="test.id" value="3"/>
<param name="orb.port" value="${orb.listener1.port}"/>
</antcall>
<antcall target="run-standalone-client">
<param name="test.id" value="3"/>
<param name="orb.port" value="${orb.listener1.port.two}"/>
</antcall>
</target>
<target name="run-test-4" depends="init-common">
<antcall target="delete-jdbc-res-pool"/>
<!-- antcall target="delete-jdbc-res-pool-reference"/ -->
<!-- antcall target="runclient-common"/ -->
<antcall target="run-standalone-client">
<param name="test.id" value="4"/>
<param name="orb.port" value="${orb.listener1.port}"/>
</antcall>
<antcall target="run-standalone-client">
<param name="test.id" value="4"/>
<param name="orb.port" value="${orb.listener1.port.two}"/>
</antcall>
</target>
<target name="run-test-0" depends="init-common">
<!-- antcall target="runclient-common"/ -->
<antcall target="run-standalone-client">
<param name="test.id" value="0"/>
<param name="orb.port" value="${orb.listener1.port}"/>
</antcall>
<antcall target="run-standalone-client">
<param name="test.id" value="0"/>
<param name="orb.port" value="${orb.listener1.port.two}"/>
</antcall>
</target>
<target name="run-test-5" depends="init-common">
<!-- antcall target="create-persistence-res"/ -->
<antcall target="create-persistence-res"/>
<!-- antcall target="runclient-common"/ -->
<antcall target="run-standalone-client">
<param name="test.id" value="5"/>
<param name="orb.port" value="${orb.listener1.port}"/>
</antcall>
<antcall target="run-standalone-client">
<param name="test.id" value="5"/>
<param name="orb.port" value="${orb.listener1.port.two}"/>
</antcall>
</target>
<target name="run-test-6" depends="init-common">
<!-- antcall target="delete-persistence-res-reference"/ -->
<antcall target="delete-persistence-res"/>
<!-- antcall target="runclient-common"/ -->
<antcall target="run-standalone-client">
<param name="test.id" value="6"/>
<param name="orb.port" value="${orb.listener1.port}"/>
</antcall>
<antcall target="run-standalone-client">
<param name="test.id" value="6"/>
<param name="orb.port" value="${orb.listener1.port.two}"/>
</antcall>
</target>
<target name="run-test-7" depends="init-common">
<!-- antcall target="create-jms-res"/ -->
<antcall target="create-jms-res"/>
<!-- antcall target="runclient-common"/ -->
<antcall target="run-standalone-client">
<param name="test.id" value="7"/>
<param name="orb.port" value="${orb.listener1.port}"/>
</antcall>
<antcall target="run-standalone-client">
<param name="test.id" value="7"/>
<param name="orb.port" value="${orb.listener1.port.two}"/>
</antcall>
</target>
<target name="run-test-8" depends="init-common">
<!-- antcall target="delete-jms-res-reference"/ -->
<antcall target="delete-jms-res"/>
<!-- antcall target="runclient-common"/ -->
<antcall target="run-standalone-client">
<param name="test.id" value="8"/>
<param name="orb.port" value="${orb.listener1.port}"/>
</antcall>
<antcall target="run-standalone-client">
<param name="test.id" value="8"/>
<param name="orb.port" value="${orb.listener1.port.two}"/>
</antcall>
</target>
<target name="run-test-9" depends="init-common">
<!-- antcall target="create-javamail-res"/ -->
<antcall target="create-javamail-res"/>
<!-- antcall target="runclient-common"/ -->
<antcall target="run-standalone-client">
<param name="test.id" value="9"/>
<param name="orb.port" value="${orb.listener1.port}"/>
</antcall>
<antcall target="run-standalone-client">
<param name="test.id" value="9"/>
<param name="orb.port" value="${orb.listener1.port.two}"/>
</antcall>
</target>
<target name="run-test-10" depends="init-common">
<!-- antcall target="delete-javamail-res-reference"/ -->
<antcall target="delete-javamail-res"/>
<!-- antcall target="runclient-common"/ -->
<antcall target="run-standalone-client">
<param name="test.id" value="10"/>
<param name="orb.port" value="${orb.listener1.port}"/>
</antcall>
<antcall target="run-standalone-client">
<param name="test.id" value="10"/>
<param name="orb.port" value="${orb.listener1.port.two}"/>
</antcall>
</target>
<target name="create-jdbc-res-pool" depends="init-common">
<antcall target="create-jdbc-connpool-common">
<param name="appserver.instance.name" value="ee-event-cluster"/>
</antcall>
</target>
<target name="delete-jdbc-res-pool" depends="init-common">
<antcall target="delete-jdbc-connpool-common">
<param name="appserver.instance.name" value="ee-event-cluster"/>
</antcall>
</target>
<target name="delete-jdbc-res-pool-reference" depends="init-common">
<antcall target="delete-resource-reference-common">
<param name="target.name" value="ee-event-cluster"/>
<param name="resource.name" value="${jdbc.conpool.name}"/>
</antcall>
</target>
<target name="create-persistence-res" depends="init-common">
<antcall target="create-persistence-resource-common">
<param name="appserver.instance.name" value="ee-event-cluster"/>
</antcall>
</target>
<target name="delete-persistence-res" depends="init-common">
<antcall target="delete-persistence-resource-common">
<param name="appserver.instance.name" value="ee-event-cluster"/>
</antcall>
</target>
<target name="create-jdbc-res" depends="init-common">
<antcall target="create-jdbc-resource-common">
<param name="appserver.instance.name" value="ee-event-cluster"/>
</antcall>
</target>
<target name="delete-jdbc-res" depends="init-common">
<antcall target="delete-jdbc-resource-common">
<param name="appserver.instance.name" value="ee-event-cluster"/>
</antcall>
</target>
<target name="create-jms-res" depends="init-common">
<antcall target="create-jms-resource-common">
<param name="appserver.instance.name" value="ee-event-cluster"/>
</antcall>
</target>
<target name="delete-jms-res" depends="init-common">
<antcall target="delete-jms-resource-common">
<param name="appserver.instance.name" value="ee-event-cluster"/>
</antcall>
</target>
<target name="create-javamail-res" depends="init-common">
<antcall target="create-javamail-resource-common">
<param name="appserver.instance.name" value="ee-event-cluster"/>
</antcall>
</target>
<target name="delete-javamail-res" depends="init-common">
<antcall target="delete-javamail-resource-common">
<param name="appserver.instance.name" value="ee-event-cluster"/>
</antcall>
</target>
<target name="delete-jdbc-res-reference" depends="init-common">
<antcall target="delete-resource-reference-common">
<param name="target.name" value="ee-event-cluster"/>
<param name="resource.name" value="${jdbc.resource.name}"/>
</antcall>
</target>
<target name="delete-persistence-res-reference" depends="init-common">
<antcall target="delete-resource-reference-common">
<param name="target.name" value="ee-event-cluster"/>
<param name="resource.name" value="${pm.resource.name}"/>
</antcall>
</target>
<target name="delete-jms-res-reference" depends="init-common">
<antcall target="delete-resource-reference-common">
<param name="target.name" value="ee-event-cluster"/>
<param name="resource.name" value="${jms.resource.name}"/>
</antcall>
</target>
<target name="delete-mail-res-reference" depends="init-common">
<antcall target="delete-mail-reference-common">
<param name="target.name" value="ee-event-cluster"/>
<param name="resource.name" value="${javamail.resource.name}"/>
</antcall>
</target>
<!-- =============================================== -->
<!-- Target to run the standalone client without ACC -->
<!-- =============================================== -->
<target name="run-standalone-client" depends="init-common">
<property name="jndi.name" value="lookupbean"/>
<property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
<property name="ctxfactory"
value="com.sun.enterprise.naming.SerialInitContextFactory"/>
<!--
<property name="ctxfactory"
value="com.sun.jndi.cosnaming.CNCtxFactory"/>
-->
<echo message="provider.url used is ${provider.url}"/>
<java classname="${test.client}"
classpath="${s1astest.classpath}:${assemble.dir}/${appname}AppClient.jar"
failonerror="true" fork="true">
<jvmarg value="-DtestId=${test.id}"/>
<jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
<jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
<arg value="${provider.url}"/>
<arg value="${ctxfactory}"/>
<arg value="${jndi.name}"/>
</java>
</target>
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common">
<param name="appserver.instance.name" value="ee-event-cluster"/>
</antcall>
<antcall target="restart-cluster"/>
</target>
<target name="usage">
<antcall target="usage-common"/>
</target>
</project>