| <?xml version="1.0"?> | |
| <!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 run SYSTEM "./../../../../../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-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> | |
| <antcall target="compile-cci"> | |
| <param name="src" value="servlet" /> | |
| </antcall> | |
| <javac srcdir="." | |
| classpath="${env.APS_HOME}/lib/reporter.jar" | |
| includes="client/WebTest.java" | |
| destdir="." | |
| /> | |
| </target> | |
| <target name="create-pool"> | |
| <antcall target="create-connector-connpool-common"> | |
| <param name="ra.name" value="connector-embedded-cciApp#cciblackbox-${tx.mode}" /> | |
| <param name="connection.defname" value="jakarta.resource.cci.ConnectionFactory" /> | |
| <param name="connector.conpool.name" value="EMBEDDED-CCI-CONNPOOL" /> | |
| </antcall> | |
| </target> | |
| <target name="create-resource"> | |
| <antcall target="create-connector-resource-common"> | |
| <param name="connector.conpool.name" value="EMBEDDED-CCI-CONNPOOL" /> | |
| <param name="connector.jndi.name" value="eis/EMBEDDEDCCIEIS" /> | |
| </antcall> | |
| </target> | |
| <target name="delete-pool"> | |
| <antcall target="delete-connector-connpool-common"> | |
| <param name="connector.conpool.name" value="EMBEDDED-CCI-CONNPOOL" /> | |
| </antcall> | |
| </target> | |
| <target name="delete-resource"> | |
| <antcall target="delete-connector-resource-common"> | |
| <param name="connector.jndi.name" value="eis/EMBEDDEDCCIEIS" /> | |
| </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}:${bundles.dir}/cciblackbox-tx.jar" | |
| failonerror="true" | |
| /> | |
| </target> | |
| <target name="create-pb-proc" depends="init-common"> | |
| <jar destfile="${build.classes.dir}/cci-pb-proc.jar" | |
| update="true" | |
| includes="${build.classes.dir}/client/*SampleExternalMethods.class*" | |
| /> | |
| </target> | |
| <target name="build"> | |
| <antcall target="build-embedded-ear" /> | |
| </target> | |
| <target name="package-embedded-ejb"> | |
| <antcall target="package-ejbjar-common"> | |
| <param name="ejb-jar.xml" value="descriptor/ejb-jar.xml" /> | |
| <param name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml" /> | |
| <param name="ejbjar.classes" value="**/*Local*.class, **/*Remote*.class, **/*Bean*.class" /> | |
| <param name="ejbjar.files" value="${build.classes.dir}" /> | |
| <param name="ejb.jar" value="${assemble.dir}/cci-embedded-ejb.jar" /> | |
| </antcall> | |
| </target> | |
| <target name="build-embedded-ear" depends="compile"> | |
| <delete file="${assemble.dir}/connector-embeddedApp.ear" /> | |
| <mkdir dir="${assemble.dir}" /> | |
| <copy file="descriptor/application.xml" tofile="${assemble.dir}/application.xml" /> | |
| <mkdir dir="${build.classes.dir}/META-INF" /> | |
| <antcall target="package-embedded-ejb" /> | |
| <antcall target="package-rar" /> | |
| <antcall target="webclient-war-common"> | |
| <param name="hasWebclient" value="yes" /> | |
| <param name="appname" value="cci-embedded" /> | |
| <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> | |
| <ear earfile="${assemble.dir}/${appname}App.ear" appxml="${assemble.dir}/application.xml"> | |
| <fileset dir="${assemble.dir}"> | |
| <include name="cci-embedded-ejb.jar" /> | |
| <include name="cciblackbox-tx.rar" /> | |
| <include name="cci-embedded-client.jar" /> | |
| <include name="cci-embedded-web.war" /> | |
| </fileset> | |
| <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar" /> | |
| </ear> | |
| </target> | |
| <target name="deploy" depends="init-common"> | |
| <antcall target="deploy-common" /> | |
| </target> | |
| <target name="undeploy"> | |
| <antcall target="undeploy-common" /> | |
| </target> | |
| <target name="run" depends="init-common"> | |
| <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> | |
| </target> | |
| <target name="usage"> | |
| <antcall target="usage-common" /> | |
| </target> | |
| <!-- ================================================================ --> | |
| <!-- Target to 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> | |
| <!-- ======================================================= --> | |
| <!-- JVM options --> | |
| <!-- ======================================================= --> | |
| <target name="create-JVM-options"> | |
| <exec executable="${ASADMIN}" failonerror="false"> | |
| <arg line="create-jvm-options" /> | |
| <arg line="--user ${admin.user}" /> | |
| <arg line="--passwordfile ${env.APS_HOME}/devtests/connector/config/password.txt" /> | |
| <arg line="--host ${admin.host}" /> | |
| <arg line="--port ${admin.port}" /> | |
| <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="--user ${admin.user}" /> | |
| <arg line="--passwordfile ${env.APS_HOME}/devtests/connector/config/password.txt" /> | |
| <arg line="--host ${admin.host}" /> | |
| <arg line="--port ${admin.port}" /> | |
| <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="descriptor/sun-ra.xml" tofile="${assemble.dir}/rar/META-INF/sun-ra.xml" /> | |
| <copy file="${bundles.dir}/cciblackbox-tx.jar" tofile="${assemble.dir}/rar/cciblackbox-tx.jar" | |
| /> | |
| <copy file="${env.APS_HOME}/sqetests/connector/lib/cci-derby-proc.jar" | |
| tofile="${assemble.dir}/rar/cci-derby-proc.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> | |
| <!-- db setup --> | |
| <target name="create-sql"> | |
| <antcall target="execute-sql-common"> | |
| <param name="sql.file" value="sql/cci-pb.sql" /> | |
| </antcall> | |
| </target> | |
| <target name="drop-sql"> | |
| <antcall target="execute-sql-common"> | |
| <param name="sql.file" value="sql/cci-pb-drop.sql" /> | |
| </antcall> | |
| </target> | |
| <!-- Set classpath-suffix for pointbase --> | |
| <!-- setup --> | |
| <target name="setup" depends="init-common"> | |
| <antcall target="drop-sql" /> | |
| <antcall target="create-sql" /> | |
| </target> | |
| <!-- unsetup --> | |
| <target name="unsetup" depends="init-common"> | |
| <antcall target="drop-sql" /> | |
| </target> | |
| <target name="create-dboutfile" depends="init-common"> | |
| <mkdir dir="${build.classes.dir}" /> | |
| <exec executable="touch"> | |
| <arg line="${build.classes.dir}/setupDBTables.out" /> | |
| </exec> | |
| </target> | |
| </project> |