blob: 233fc846b0a9501e4d8c13cfacc0b2eb4f65e952 [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 commonBuild SYSTEM "./../../../../config/common.xml">
]>
<project name="deployment-ejb31-jndivalidation-resourceref-CorrectQueueRes-App" default="all" basedir=".">
&commonBuild;
<property name="testName" value="deployment-ejb31-jndivalidation-resourceref-CorrectQueueRes"/>
<property name="archivedir" value="${build}/archives"/>
<property name="contextroot" value="${testName}"/>
<target name="prepare" depends="init">
<mkdir dir="${build}"/>
<mkdir dir="${archivedir}"/>
<property name="all.jar" value="${archivedir}/${testName}-ejb.jar"/>
</target>
<target name="compile" depends="prepare">
<javac srcdir="src" destdir="${build}" debug="on" failonerror="true">
<classpath refid="gfv3.classpath"/>
</javac>
</target>
<target name="assemble" depends="compile">
<jar destfile="${all.jar}">
<metainf dir="META-INF" />
<fileset dir="${build}"/>
</jar>
</target>
<target name="deploy.jms.queue" depends="prepare">
<antcall target="common.create.jms.resource">
<param name="dest.type" value="queue"/>
<param name="dest.name" value="deployment_jndivalidation_queue"/>
<param name="res.type" value="jakarta.jms.Queue"/>
<param name="jms.resource.name" value="jms/deployment_jndivalidation_queue"/>
</antcall>
</target>
<target name="undeploy.jms.queue" depends="prepare">
<antcall target="common.delete.jms.resource">
<param name="jms.resource.name" value="jms/deployment_jndivalidation_queue"/>
<param name="dest.type" value="queue"/>
<param name="dest.name" value="deployment_jndivalidation_queue"/>
</antcall>
</target>
<target name="deploy.asadmin" depends="assemble">
<property name="arg.list" value="deploy ${ASADMIN-ARGS} --retrieve ${archivedir} --name ${testName}-ejb --contextroot ${testName} ${all.jar}"/>
<echo message="${ASADMIN} ${arg.list}"/>
<exec executable="${ASADMIN}" resultproperty="return.code" failonerror="false">
<arg line="${arg.list}"/>
</exec>
<condition property="deploy.failed" value="0">
<equals arg1="0" arg2="${return.code}" />
</condition>
<condition property="deploy.failed" value="1">
<not>
<equals arg1="0" arg2="${return.code}" />
</not>
</condition>
<antcall target="processResult">
<param name="result" value="${deploy.failed}"/>
</antcall>
</target>
<target name="undeploy.asadmin" depends="prepare">
<antcall target="common.undeploy.asadmin">
<param name="arg.list" value="${testName}-ejb"/>
<param name="testName" value="${testName}-ejb"/>
</antcall>
</target>
<target name="private-all">
<antcall target="declare-test">
<param name="description" value="ejb31/jndivalidation/resourceref/CorrectQueueRes Test asadmin deploy"/>
</antcall>
<antcall target="deploy.jms.queue"/>
<antcall target="deploy.asadmin"/>
<antcall target="undeploy.asadmin"/>
<antcall target="undeploy.jms.queue"/>
</target>
</project>