blob: 2313d4440bfa56e3c48bda85a124fb4d3f3cdae3 [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE project [
<!--
Copyright (c) 2017, 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 "./../../../../config/properties.xml">
<!ENTITY commonBuild SYSTEM "./../../../../config/common.xml">
<!ENTITY commonRun SYSTEM "./../../../../config/run.xml">
<!ENTITY testproperties SYSTEM "./build.properties">
]>
<project name="force-deploy-rar" default="usage" basedir=".">
&commonSetup;
&commonBuild;
&commonRun;
&testproperties;
<target name="all" depends="build,setup,run" />
<target name="clean" depends="init-common">
<antcall target="clean-common" />
</target>
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb" />
<param name="s1astest.classpath"
value="${s1astest.classpath}:${bundles.dir}/connectors-ra-redeploy-jars.jar"
/>
</antcall>
<antcall target="compile-common">
<param name="src" value="client" />
</antcall>
<antcall target="compile-common">
<param name="src" value="servlet" />
</antcall>
<javac srcdir="."
classpath="${env.APS_HOME}/lib/reporter.jar"
includes="client/WebTest.java"
destdir="."
/>
</target>
<target name="build" depends="compile">
<antcall target="webclient-war-common">
<param name="hasWebclient" value="yes" />
<param name="appname" value="force-deploy-rar" />
<param name="web.xml" value="descriptor/web.xml" />
<param name="sun-web.xml" value="descriptor/sun-web.xml" />
<param name="webclient.war.classes" value="servlet/*.class, beans/*.class" />
</antcall>
<antcall target="build-ear-common">
<param name="ejbjar.classes" value="**/*Vers*.class" />
</antcall>
</target>
<target name="setup" depends="init-common" />
<target name="setupone" depends="init-common">
<antcall target="create-ra-config" />
<antcall target="deploy-rar-common">
<param name="rarfile" value="${bundles.dir}/connectors-ra-redeploy-rars.rar" />
<param name="force" value="true" />
</antcall>
</target>
<target name="setuptwo" depends="init-common">
<!-- Applications must have the same filename, which is used as an application name -->
<copy file="${bundles.dir}/connectors-ra-redeploy-rars-v2.rar" tofile="connectors-ra-redeploy-rars.rar" />
<antcall target="deploy-rar-common">
<param name="rarfile" value="connectors-ra-redeploy-rars.rar" />
<param name="force" value="true" />
</antcall>
</target>
<target name="deploy" depends="init-common">
<antcall target="deploy-common" />
</target>
<target name="run" depends="init-common">
<!-- Running the redeploy cycle (twice) to test version 1 classes getting reset after verison 2 is undeployed -->
<antcall target="runCycle" />
<antcall target="runCycle" />
</target>
<target name="runCycle" depends="init-common">
<antcall target="setupone" />
<antcall target="create-pool" />
<antcall target="create-resource" />
<antcall target="create-admin-object" />
<antcall target="deploy" />
<java classname="client.WebTest">
<arg value="${http.host}" />
<arg value="${http.port}" />
<arg value="${contextroot}" />
<arg value=" 1 " />
<classpath>
<pathelement location="${env.APS_HOME}/lib/reporter.jar" />
<pathelement location="." />
</classpath>
</java>
<antcall target="undeploy-common" />
<antcall target="setuptwo" />
<antcall target="deploy" />
<java classname="client.WebTest">
<arg value="${http.host}" />
<arg value="${http.port}" />
<arg value="${contextroot}" />
<arg value=" 2 " />
<classpath>
<pathelement location="${env.APS_HOME}/lib/reporter.jar" />
<pathelement location="." />
</classpath>
</java>
<antcall target="unsetup" />
</target>
<target name="unsetup" depends="init-common">
<antcall target="undeploy" />
</target>
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common" />
<antcall target="undeploy-rar-common">
<param name="undeployrar" value="connectors-ra-redeploy-rars" />
<param name="cascade" value="true" />
</antcall>
</target>
<target name="create-admin-object" depends="init-common">
<antcall target="asadmin-common">
<param name="admin.command"
value="create-admin-object --target ${appserver.instance.name} --restype com.sun.jdbcra.spi.JdbcSetupAdmin --raname connectors-ra-redeploy-rars --property TableName=customer2:JndiName=jdbc/ejb-subclassing:SchemaName=connector:NoOfRows=1"
/>
<param name="operand.props" value="eis/testAdmin" />
</antcall>
</target>
<target name="delete-admin-object" depends="init-common">
<antcall target="asadmin-common">
<param name="admin.command" value="delete-admin-object" />
<param name="operand.props" value="--target ${appserver.instance.name} eis/testAdmin" />
</antcall>
</target>
<target name="create-ra-config" depends="init-common">
<antcall target="asadmin-common">
<param name="admin.command"
value="create-resource-adapter-config --property RAProperty=VALID"
/>
<param name="operand.props" value="connectors-ra-redeploy-rars" />
</antcall>
</target>
<target name="delete-ra-config" depends="init-common">
<antcall target="asadmin-common">
<param name="admin.command" value="delete-resource-adapter-config" />
<param name="operand.props" value="connectors-ra-redeploy-rars" />
</antcall>
</target>
<target name="create-pool">
<antcall target="create-connector-connpool-common">
<param name="ra.name" value="connectors-ra-redeploy-rars" />
<param name="connection.defname" value="javax.sql.DataSource" />
<param name="connector.conpool.name" value="versiontest-ra-pool" />
<param name="failonerror" value="true" />
</antcall>
</target>
<target name="create-resource">
<antcall target="create-connector-resource-common">
<param name="connector.conpool.name" value="versiontest-ra-pool" />
<param name="connector.jndi.name" value="jdbc/ejb-subclassing" />
<param name="failonerror" value="true" />
</antcall>
</target>
<target name="delete-pool">
<antcall target="delete-connector-connpool-common">
<param name="connector.conpool.name" value="versiontest-ra-pool" />
</antcall>
</target>
<target name="delete-resource">
<antcall target="delete-connector-resource-common">
<param name="connector.jndi.name" value="jdbc/ejb-subclassing" />
</antcall>
</target>
<target name="usage">
<antcall target="usage-common" />
</target>
</project>