blob: 5657ee7a3bdeb6258df29c1ac4b1f24efe252cce [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">
<!ENTITY database SYSTEM "../config/database.xml">
]>
<project name="web2connector" default="usage" basedir=".">
&database;
&commonSetup;
&commonBuild;
&commonRun;
&testproperties;
<target name="all" depends="build, setup, deploy-ear, run-ear, undeploy-ear, unsetup" />
<target name="clean" depends="init-common">
<antcall target="clean-common" />
</target>
<target name="setup">
<antcall target="execute-sql-connector">
<param name="sql.file" value="sql/simpleBank.sql" />
</antcall>
<antcall target="create-ra-config" />
<antcall target="deploy-rar-common">
<param name="rarfile"
value="${env.APS_HOME}/connectors-ra-redeploy/rars/target/connectors-ra-redeploy-rars.rar"
/>
</antcall>
<antcall target="create-pool" />
<antcall target="create-resource" />
<antcall target="create-admin-object" />
</target>
<!-- Standalone connectors-ra-redeploy-rars resource adapter -->
<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="standalone-ra-pool" />
<param name="extra-params" value="--matchconnections=false" />
</antcall>
<antcall target="set-oracle-props">
<param name="pool.type" value="connector" />
<param name="conpool.name" value="standalone-ra-pool" />
</antcall>
</target>
<target name="create-resource">
<antcall target="create-connector-resource-common">
<param name="connector.conpool.name" value="standalone-ra-pool" />
<param name="connector.jndi.name" value="jdbc/ejb-subclassing" />
</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=DBUSER:NoOfRows=1"
/>
<param name="operand.props" value="eis/jdbcAdmin" />
</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/jdbcAdmin" />
</antcall>
<!--<antcall target="reconfig-common"/>-->
</target>
<target name="restart">
<antcall target="restart-server-instance-common" />
</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>
<!--<antcall target="reconfig-common"/>-->
</target>
<target name="unsetup">
<antcall target="execute-sql-connector">
<param name="sql.file" value="sql/dropBankTables.sql" />
</antcall>
<antcall target="delete-resource" />
<antcall target="delete-pool" />
<antcall target="delete-admin-object" />
<antcall target="undeploy-rar-common">
<param name="undeployrar" value="connectors-ra-redeploy-rars" />
</antcall>
</target>
<target name="delete-pool">
<antcall target="delete-connector-connpool-common">
<param name="connector.conpool.name" value="standalone-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="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb" />
</antcall>
<antcall target="compile-servlet" />
</target>
<target name="compile-servlet" depends="init-common">
<mkdir dir="${build.classes.dir}" />
<echo message="common.xml: Compiling test source files" level="verbose" />
<javac srcdir="servlet"
destdir="${build.classes.dir}"
classpath="${s1astest.classpath}:${env.APS_HOME}/connectors-ra-redeploy/jars/target/classes"
debug="on"
failonerror="true"
/>
</target>
<target name="build" depends="compile">
<property name="hasWebclient" value="yes" />
<antcall target="webclient-war-common">
<param name="hasWebclient" value="yes" />
<param name="webclient.war.classes" value="**/*.class" />
</antcall>
<antcall target="ejb-jar-common">
<param name="ejbjar.classes" value="**/*.class" />
</antcall>
<delete file="${assemble.dir}/${appname}.ear" />
<mkdir dir="${assemble.dir}" />
<mkdir dir="${build.classes.dir}/META-INF" />
<ear earfile="${assemble.dir}/${appname}App.ear" appxml="${application.xml}">
<fileset dir="${assemble.dir}">
<include name="*.jar" />
<include name="*.war" />
</fileset>
</ear>
</target>
<target name="deploy-ear" depends="init-common">
<antcall target="deploy-common" />
</target>
<target name="deploy-war" depends="init-common">
<antcall target="deploy-war-common" />
</target>
<target name="run-war" depends="init-common">
<antcall target="runwebclient-common">
<param name="testsuite.id" value="web-to-connector (stand-alone war and rar based)" />
</antcall>
</target>
<target name="run-ear" depends="init-common">
<antcall target="runwebclient-common">
<param name="testsuite.id" value="web-to-connector (ear based)" />
</antcall>
</target>
<target name="undeploy-ear" depends="init-common">
<antcall target="delete-ra-config" />
<antcall target="undeploy-common" />
</target>
<target name="undeploy-war" depends="init-common">
<antcall target="undeploy-war-common" />
</target>
<target name="usage">
<antcall target="usage-common" />
</target>
</project>