| <?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="web-ejbsubclassingApp" default="usage" basedir="."> |
| |
| &database; |
| &commonSetup; |
| &commonBuild; |
| &commonRun; |
| &testproperties; |
| |
| <!-- |
| <target name="all" depends="build,setup,deploy-war, run-war, undeploy-war, deploy-ear, run-ear, undeploy-ear, unsetup"/> |
| |
| <target name="run-test" depends="build,deploy-war, run-war, undeploy-war, deploy-ear, run-ear, undeploy-ear"/> |
| --> |
| <target name="all" depends="build, deploy-ear, setup, run-ear, unsetup, undeploy-ear"/> |
| |
| <!-- |
| <antcall target="build"/> |
| <antcall target="setup"/> |
| <antcall target="deploy-war"/> |
| <antcall target="run-war"/> |
| <antcall target="undeploy-war"/> |
| <antcall target="deploy-ear"/> |
| <antcall target="run-ear"/> |
| <antcall target="undeploy-ear"/> |
| <antcall target="unsetup"/> |
| </target> |
| --> |
| |
| <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-pool"/> |
| <antcall target="create-resource"/> |
| <antcall target="create-admin-object"/> |
| |
| </target> |
| <target name="create-pool"> |
| <antcall target="create-connector-connpool-common"> |
| <param name="ra.name" value="${appname}App#connectors-ra-redeploy-rars"/> |
| <param name="connection.defname" value="javax.sql.DataSource"/> |
| <param name="connector.conpool.name" value="embedded-ra-pool"/> |
| </antcall> |
| <antcall target="set-oracle-props"> |
| <param name="pool.type" value="connector"/> |
| <param name="conpool.name" value="embedded-ra-pool"/> |
| </antcall> |
| </target> |
| <target name="create-resource"> |
| <antcall target="create-connector-resource-common"> |
| <param name="connector.conpool.name" value="embedded-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 ${appname}App#connectors-ra-redeploy-rars --property TableName=customer2:JndiName=jdbc/ejb-subclassing:SchemaName=connector: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> |
| </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="${appname}App#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="${appname}App#connectors-ra-redeploy-rars"/> |
| </antcall> |
| </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"/> |
| </target> |
| |
| <target name="delete-pool"> |
| <antcall target="delete-connector-connpool-common"> |
| <param name="connector.conpool.name" value="embedded-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}:${bundles.dir}/connectors-ra-redeploy-jars.jar" |
| 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> |
| <fileset dir="${bundles.dir}"> |
| <include name="connectors-ra-redeploy-rars.rar"/> |
| </fileset> |
| </ear> |
| </target> |
| |
| |
| <target name="deploy-ear" depends="init-common"> |
| <antcall target="create-ra-config"/> |
| <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-ejb (stand-alone war based)"/> |
| </antcall> |
| </target> |
| |
| <target name="run-ear" depends="init-common"> |
| <antcall target="runwebclient-common"> |
| <param name="testsuite.id" value="web-to-ejb (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> |