blob: 650c5ae9332a60f0f317e0acdd6340135ba4b585 [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!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 testproperties SYSTEM "file:./build.properties">
<!ENTITY run SYSTEM "file:./../../../../config/run.xml">
]>
<project name="robean" default="usage" basedir=".">
&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">
<antcall target="clean-common"/>
</target>
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
</antcall>
<antcall target="compile-common">
<param name="src" value="testng-client"/>
</antcall>
</target>
<target name="build" depends="compile">
<antcall target="build-ear-common">
<param name="ejbjar.classes"
value="**/Address*.class,**/Customer*.class,**/PKString*.class" />
<param name="appclientjar.classes"
value="**/Address*.class,**/Customer*.class,**/PKString*.class,**/*Client*.class" />
</antcall>
</target>
<target name="setup" depends="init-common,compile">
<echo message="sql/create_${db.type}.sql"/>
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/create_${db.type}.sql"/>
</antcall>
<antcall target="deploy-jdbc-common">
<param name="jdbc.conpool.name" value="bmp-robean-pool"/>
<param name="jdbc.resource.name" value="jdbc/bmp-robean"/>
</antcall>
</target>
<target name="deploy" depends="init-common">
<echo message="Deploying via asadmin..."/>
<antcall target="deploy-common"/>
</target>
<target name="sql" depends="init-common">
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/create_${db.type}.sql"/>
</antcall>
</target>
<target name="run" depends="init-common">
<exec executable="${APPCLIENT}" failonerror="false">
<arg line="-client ${assemble.dir}/${appname}AppClient.jar" />
<env key="APPCPATH" path="${env.APS_HOME}/lib/testng.jar"/>
</exec>
</target>
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
</target>
<target name="unsetup" depends="init-common">
<antcall target="undeploy-jdbc-common">
<param name="jdbc.conpool.name" value="bmp-robean-pool"/>
<param name="jdbc.resource.name" value="jdbc/bmp-robean"/>
</antcall>
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/drop_${db.type}.sql"/>
</antcall>
</target>
<target name="usage">
<antcall target="usage-common"/>
</target>
<target name="retrieve-client-jar" depends="init-common">
<copy todir="${assemble.dir}">
<fileset dir="${deployed-apps}/${appname}App_1/">
<include name="${appname}AppClient.jar"/>
</fileset>
</copy>
</target>
<target name="autodeploy-ear" depends="init-common">
<echo message="Dropping the app under the autodeploy dir..."/>
<delete file="${autodeploy.dir}/${appname}App.ear_deployed" failonerror="false"/>
<copy file="${assemble.dir}/${appname}App.ear"
todir="${autodeploy.dir}"/>
</target>
<target name="autodeploy" depends="autodeploy-ear, sleep-till-autodeploy, retrieve-client-jar"/>
<target name="sleep-till-autodeploy">
<echo message="Waiting for autodeploy of app to complete..."/>
<sleep minutes="2"/>
</target>
<target name="restart">
<antcall target="restart-server-instance-common"/>
</target>
</project>