blob: 5f311a1a64217644f274ab369a9962a6c0f166e5 [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE project [
<!--
Copyright (c) 2017, 2020 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 embeddedCommon SYSTEM "../embedded.xml">
<!ENTITY testproperties SYSTEM "build.properties">
]>
<project name="ejb-ejb31-embedded-mdb-App" default="usage" basedir=".">
&embeddedCommon;
&commonSetup;
&commonBuild;
&commonRun;
&testproperties;
<target name="all" depends="build,setup,run,unsetup"/>
<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="client"/>
</antcall>
</target>
<target name="build" depends="compile">
<!-- package ourselves to include persistence.xml -->
<mkdir dir="${assemble.dir}"/>
<jar jarfile="${assemble.dir}/${appname}-ejb.jar"
basedir="${build.classes.dir}"
update="true"
includes ="**/S*.class">
</jar>
<delete dir="${build.classes.dir}/org"/>
</target>
<target name="setup" depends="init-common">
<echo message="...Starting DAS to create JMS resources...."/>
<antcall target="startDomain"/>
<exec executable="${ASADMIN}" failonerror="false">
<arg line="--user ${admin.user} --host ${admin.host} --port ${admin.port} --echo=true --terse=true"/>
<arg line="create-jms-resource"/>
<arg line="--restype"/>
<arg line="jakarta.jms.QueueConnectionFactory"/>
<arg line="jms/ejb_mdb_QCF"/>
</exec>
<exec executable="${ASADMIN}" failonerror="false">
<arg line="--user ${admin.user} --host ${admin.host} --port ${admin.port} --echo=true --terse=true"/>
<arg line="create-jmsdest"/>
<arg line="--desttype"/>
<arg line="queue"/>
<arg line="ejb_mdb_QCF"/>
</exec>
<exec executable="${ASADMIN}" failonerror="false">
<arg line="--user ${admin.user} --host ${admin.host} --port ${admin.port} --echo=true --terse=true"/>
<arg line="create-jms-resource"/>
<arg line="--restype"/>
<arg line="jakarta.jms.Queue"/>
<arg line="--property"/>
<arg line="imqDestinationName=ejb_mdb_Queue"/>
<arg line="jms/ejb_mdb_Queue"/>
</exec>
<antcall target="stopDomain"/>
<echo message="Domain has beed STOPPED to run the test"/>
</target>
<target name="unsetup" depends="init-common">
<echo message="...Starting DAS to delete JMS resources...."/>
<antcall target="startDomain"/>
<exec executable="${ASADMIN}" failonerror="false">
<arg line="--user ${admin.user} --host ${admin.host} --port ${admin.port} --echo=true --terse=true"/>
<arg line="delete-jms-resource"/>
<arg line="jms/ejb_mdb_QCF"/>
</exec>
<exec executable="${ASADMIN}" failonerror="false">
<arg line="--user ${admin.user} --host ${admin.host} --port ${admin.port} --echo=true --terse=true"/>
<arg line="delete-jmsdest"/>
<arg line="--desttype"/>
<arg line="queue"/>
<arg line="ejb_mdb_QCF"/>
</exec>
<exec executable="${ASADMIN}" failonerror="false">
<arg line="--user ${admin.user} --host ${admin.host} --port ${admin.port} --echo=true --terse=true"/>
<arg line="delete-jms-resource"/>
<arg line="jms/ejb_mdb_Queue"/>
</exec>
<!-- Should domain be stopped? -->
<antcall target="stopDomain"/>
<echo message="Domain has beed STOPPED"/>
</target>
<target name="run" depends="init-common">
<antcall target="run_se"/>
</target>
<target name="run_se" depends="init-common">
<echo message="Running with ${embedded.classpath} in classpath"/>
<java fork="on"
failonerror="true"
classpath="${assemble.dir}/${appname}-ejb.jar:${embedded.classpath}:${build.classes.dir}:${env.APS_HOME}/lib/reporter.jar"
classname="${se.client}">
<jvmarg value="--add-opens=java.base/java.lang=ALL-UNNAMED" />
<jvmarg value="--add-opens=java.naming/javax.naming.spi=ALL-UNNAMED" />
<arg line="${jndiroot}"/>
<!--
<jvmarg value="-Dorg.glassfish.ejb.embedded.keep-temporary-files=true"/>
-->
</java>
</target>
<target name="usage">
<antcall target="usage-common"/>
</target>
</project>