| <?xml version="1.0"?> |
| <!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 run SYSTEM "file:./../../../config/run.xml"> |
| <!ENTITY testProperties SYSTEM "./build.properties"> |
| ]> |
| |
| |
| <project name="cci" basedir="." default="usage"> |
| |
| &commonSetup; |
| &commonBuild; |
| &testProperties; |
| &run; |
| |
| <target name="all" depends="build,setup,deploy,run,undeploy,unsetup"/> |
| <target name="run-dp-test" depends="build,setup,deploy-dp,run,undeploy-dp,unsetup"/> |
| <target name="run-test" depends="build,deploy,run,undeploy"/> |
| |
| <target name="clean" depends="init-common"> |
| <delete dir="${build.classes.dir}"/> |
| <delete dir="${assemble.dir}"/> |
| <delete dir="${assemble.dir}/rar"/> |
| <delete file="${assemble.dir}/${rarname}.rar"/> |
| <antcall target="create-dboutfile"/> |
| </target> |
| |
| <target name="compile" depends="clean"> |
| <antcall target="compile-cci"> |
| <param name="src" value="ejb"/> |
| </antcall> |
| <antcall target="compile-cci"> |
| <param name="src" value="client"/> |
| </antcall> |
| </target> |
| |
| |
| <!-- |
| Custom target for compilation with local libraries for connector |
| --> |
| <target name="compile-cci" depends="init-common"> |
| <mkdir dir="${build.classes.dir}"/> |
| <javac srcdir="${src}" |
| destdir="${build.classes.dir}" |
| classpath="${s1astest.classpath}:${cciblackbox.path}" |
| failonerror="true"/> |
| </target> |
| |
| <target name="create-derby-proc" depends="init-common"> |
| <jar destfile="${assemble.dir}/cci-derby-proc.jar" update="true" |
| includes="${build.classes.dir}/**/SampleExternalMethods.class"/> |
| </target> |
| |
| <target name="build" depends="compile"> |
| <antcall target="build-ear-common"> |
| <param name="ejbjar.classes" |
| value="**/*Local*.class, **/*Remote*.class, **/*Bean*.class"/> |
| <param name="appclientjar.classes" |
| value="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Client*.class"/> |
| </antcall> |
| </target> |
| |
| <target name="deploy" depends="init-common"> |
| <antcall target="package-rar"/> |
| <antcall target="deploy-rar"> |
| <param name="tx.mode" value="tx"/> |
| </antcall> |
| <antcall target="create-pool"> |
| <param name="tx.mode" value="tx"/> |
| </antcall> |
| <antcall target="create-resource"> |
| <param name="tx.mode" value="tx"/> |
| </antcall> |
| <antcall target="reconfig-common"/> |
| <antcall target="deploy-common"/> |
| </target> |
| |
| <target name="deploy-dp" depends="init-common"> |
| <antcall target="create-pool"> |
| <param name="tx.mode" value="tx"/> |
| </antcall> |
| <antcall target="create-resource"> |
| <param name="tx.mode" value="tx"/> |
| </antcall> |
| <antcall target="deploy-common"/> |
| </target> |
| |
| <target name="undeploy"> |
| <antcall target="delete-resource"/> |
| <antcall target="delete-pool"/> |
| <antcall target="undeploy-rar"/> |
| <antcall target="reconfig-common"/> |
| <antcall target="undeploy-common"/> |
| </target> |
| |
| <target name="undeploy-dp"> |
| <antcall target="delete-resource"/> |
| <antcall target="delete-pool"/> |
| <antcall target="reconfig-common"/> |
| <antcall target="undeploy-common"/> |
| </target> |
| |
| <target name="run" depends="init-common"> |
| <antcall target="runclient-common"> |
| <param name="appclient.application.args" value="standalone"/> |
| </antcall> |
| </target> |
| |
| <!-- setup --> |
| <target name="setup" depends="init-common, build"> |
| <antcall target="drop-sql"/> |
| <antcall target="create-sql"/> |
| </target> |
| |
| <!-- unsetup --> |
| <target name="unsetup" depends="init-common"> |
| <antcall target="drop-sql"/> |
| </target> |
| |
| <target name="create-pool"> |
| <antcall target="create-connector-connpool-common"> |
| <param name="ra.name" value="cciblackbox-${tx.mode}"/> |
| <param name="connection.defname" |
| value="jakarta.resource.cci.ConnectionFactory"/> |
| <param name="connector.conpool.name" value="CCI-CONNPOOL"/> |
| </antcall> |
| </target> |
| |
| <target name="create-resource"> |
| <antcall target="create-connector-resource-common"> |
| <param name="connector.conpool.name" value="CCI-CONNPOOL"/> |
| <param name="connector.jndi.name" value="eis/CCIEIS"/> |
| </antcall> |
| </target> |
| |
| <target name="delete-pool"> |
| <antcall target="delete-connector-connpool-common"> |
| <param name="connector.conpool.name" value="CCI-CONNPOOL"/> |
| </antcall> |
| </target> |
| |
| <target name="delete-resource"> |
| <antcall target="delete-connector-resource-common"> |
| <param name="connector.jndi.name" value="eis/CCIEIS"/> |
| </antcall> |
| </target> |
| |
| <target name="deploy-rar"> |
| <antcall target="deploy-rar-common"> |
| <param name="rarfile" |
| value="${assemble.dir}/${rarname}.rar" /> |
| </antcall> |
| </target> |
| |
| <target name="undeploy-rar"> |
| <antcall target="undeploy-rar-common"> |
| <param name="undeployrar" |
| value="cciblackbox-tx" /> |
| </antcall> |
| </target> |
| |
| |
| <!-- create the appclient jar file with custom classes--> |
| <target name="appclient-jar" depends="init-common"> |
| <property name="appclientjar.classes" |
| value="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Client*.class"/> |
| <antcall target="package-appclientjar-common"> |
| <param name="appclientjar.files" |
| value="${build.classes.dir}"/> |
| <param name="appclient.jar" |
| value="${assemble.dir}/${appname}-client.jar"/> |
| </antcall> |
| </target> |
| |
| <!-- create/delete JVM options --> |
| <target name="create-JVM-options"> |
| <exec executable="${ASADMIN}" failonerror="false"> |
| <arg line="create-jvm-options"/> |
| <arg line="${as.props}"/> |
| <arg line=":-Djdbc.drivers=${jdbc.drivers}"/> |
| </exec> |
| <antcall target="reconfig-common" /> |
| </target> |
| |
| <target name="delete-JVM-options"> |
| <exec executable="${ASADMIN}" failonerror="false"> |
| <arg line="delete-jvm-options"/> |
| <arg line="${as.props}"/> |
| <arg line=":-Djdbc.drivers=${jdbc.drivers}"/> |
| </exec> |
| <antcall target="reconfig-common" /> |
| </target> |
| |
| <target name="create-rar"> |
| <copy file="descriptor/ra.xml" |
| tofile="${assemble.dir}/rar/META-INF/ra.xml"/> |
| <copy file="${env.APS_HOME}/sqetests/connector/lib/cciblackbox-tx.jar" |
| tofile="${assemble.dir}/rar/cciblackbox-tx.jar"/> |
| <replace file="${assemble.dir}/rar/META-INF/ra.xml" |
| token="DBURL" value="${db.url}"/> |
| </target> |
| |
| <target name="package-rar" depends="init-common"> |
| <mkdir dir="${assemble.dir}/rar"/> |
| <mkdir dir="${assemble.dir}/rar/META-INF"/> |
| <antcall target="create-rar"/> |
| <jar destfile="${assemble.dir}/${rarname}.rar" update="true"> |
| <fileset dir="${assemble.dir}/rar"> |
| </fileset> |
| <metainf dir="${assemble.dir}/rar/META-INF"> |
| </metainf> |
| </jar> |
| </target> |
| |
| |
| |
| |
| <!-- Set classpath-suffix for pointbase --> |
| |
| <target name="create-dboutfile" depends="init-common"> |
| <mkdir dir="${build.classes.dir}"/> |
| <touch file="${build.classes.dir}/setupDBTables.out"/> |
| </target> |
| |
| <!-- db setup --> |
| <target name="create-sql" depends="init-common"> |
| <antcall target="execute-sql-common"> |
| <param name="sql.file" value="sql/cci-derby.sql"/> |
| </antcall> |
| </target> |
| |
| <target name="drop-sql" depends="init-common"> |
| <antcall target="execute-sql-common"> |
| <param name="sql.file" value="sql/cci-derby-drop.sql"/> |
| </antcall> |
| </target> |
| |
| <target name="usage"> |
| <antcall target="usage-common"/> |
| </target> |
| |
| </project> |