| <?xml version="1.0" encoding="ISO-8859-1"?> |
| <!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 commonBuild SYSTEM "./../../../config/common.xml"> |
| ]> |
| |
| <project name="NoAppXml" default="usage" basedir="."> |
| |
| &commonBuild; |
| |
| <property name="testName" value="NoAppXml2"/> |
| |
| <target name="prepare" depends="init"> |
| <property name="util.jar" value="${build}/lib/util.jar"/> |
| <property name="ejb.jar" value="${build}/ejb/ejb.jar"/> |
| <property name="web.war" value="${build}/web/web.war"/> |
| <property name="portable.ear" value="${build}/${testName}.ear"/> |
| <property name="appclient.jar" value="${build}/client/appclient.jar"/> |
| <property name="deployplan.jar" value="${build}/${testName}-deployplan.jar"/> |
| </target> |
| |
| <target name="compile" depends="prepare"> |
| <mkdir dir="${build}"/> |
| <mkdir dir="${build}/lib"/> |
| <mkdir dir="${build}/ejb"/> |
| <mkdir dir="${build}/client"/> |
| <mkdir dir="${build}/web"/> |
| <javac srcdir="." |
| destdir="${build}" |
| debug="on" |
| failonerror="true"> |
| <classpath refid="gfv3.classpath"/> |
| </javac> |
| </target> |
| |
| <target name="assemble" depends="compile"> |
| <jar destfile="${util.jar}"> |
| <fileset dir="${build}" |
| includes="com/sun/s1asdev/deployment/noappxml/util/**.class"/> |
| </jar> |
| <jar destfile="${ejb.jar}" manifest="ejb/MANIFEST.MF"> |
| <fileset dir="${build}" |
| includes="com/sun/s1asdev/deployment/noappxml/ejb/**.class"/> |
| </jar> |
| <war destfile="${web.war}" webxml="web/web.xml"> |
| <fileset dir="web" |
| includes="**.html"/> |
| </war> |
| <jar destfile="${appclient.jar}" manifest="client/MANIFEST.MF"> |
| <fileset dir="${build}" |
| includes="com/sun/s1asdev/deployment/noappxml/client/**.class, |
| com/sun/s1asdev/deployment/noappxml/ejb/Sful.class, |
| com/sun/s1asdev/deployment/noappxml/ejb/Sless.class"/> |
| </jar> |
| <jar destfile="${portable.ear}"> |
| <fileset dir="${build}" includes="lib/util.jar, ejb/ejb.jar, web/web.war, client/appclient.jar"/> |
| </jar> |
| </target> |
| |
| <target name="deploy.asadmin" depends="prepare"> |
| <antcall target="common.deploy.asadmin"> |
| <param name="arg.list" value="--retrieve . ${portable.ear}"/> |
| <param name="testName" value="${testName}"/> |
| </antcall> |
| </target> |
| |
| <target name="redeploy.asadmin" depends="prepare"> |
| <antcall target="common.redeploy.asadmin"> |
| <param name="arg.list" value="--retrieve . ${portable.ear}"/> |
| <param name="testName" value="${testName}"/> |
| </antcall> |
| </target> |
| |
| <target name="undeploy.asadmin"> |
| <antcall target="common.undeploy.asadmin"> |
| <param name="arg.list" value="${testName}"/> |
| <param name="testName" value="${testName}"/> |
| </antcall> |
| </target> |
| |
| <target name="deploy.jsr88" depends="prepare"> |
| <antcall target="common.deploy.jsr88"> |
| <param name="arg.list" value="${portable.ear} ${deployplan.jar}"/> |
| </antcall> |
| </target> |
| |
| <target name="deploy-stream.jsr88" depends="prepare"> |
| <antcall target="common.deploy-stream.jsr88"> |
| <param name="arg.list" value="${portable.ear} ${deployplan.jar}"/> |
| </antcall> |
| </target> |
| |
| <target name="redeploy.jsr88" depends="prepare"> |
| <antcall target="common.run.jsr88"> |
| <param name="command" value="redeploy"/> |
| <param name="arg.list" value="${testName}-portable ${portable.ear} ${deployplan.jar}"/> |
| </antcall> |
| </target> |
| |
| <target name="redeploy-stream.jsr88" depends="prepare"> |
| <antcall target="common.run.jsr88"> |
| <param name="command" value="redeploy-stream"/> |
| <param name="arg.list" value="${testName}-portable ${portable.ear} ${deployplan.jar}"/> |
| </antcall> |
| </target> |
| |
| <target name="undeploy.jsr88"> |
| <antcall target="common.undeploy.jsr88"> |
| <param name="arg.list" value="${testName}-portable"/> |
| </antcall> |
| </target> |
| |
| <target name="undeploy-stream.jsr88"> |
| <antcall target="common.undeploy.jsr88"> |
| <param name="arg.list" value="all"/> |
| </antcall> |
| </target> |
| |
| <target name="runclient" depends="prepare,setOrbPort2,setHttpPort2"> |
| <exec executable="${APPCLIENT}" |
| resultproperty="result" |
| failonerror="false" |
| output="${build}/${log.id}.output.log"> |
| <arg line="-targetserver ${appclient.targetservers} -client ${testName}Client.jar http://${http.host}:${depltest.port}/web"/> |
| </exec> |
| <antcall target="processResult"> |
| <param name="result" value="${result}"/> |
| <param name="log" value="${build}/${log.id}.output.log"/> |
| </antcall> |
| </target> |
| |
| <target name="private-all" depends="private-all-pe-ee, private-all-ee"/> |
| |
| <!-- the following is run in both PE and EE environment --> |
| <target name="private-all-pe-ee"> |
| <antcall target="assemble"/> |
| |
| <antcall target="declare-test"> |
| <param name="description" value="descriptor_free/ear/no_appxml_2 Test asadmin deploy"/> |
| </antcall> |
| <antcall target="deploy.asadmin"/> |
| <antcall target="runclient"> |
| <param name="log.id" value="1"/> |
| </antcall> |
| |
| <antcall target="declare-test"> |
| <param name="description" value="descriptor_free/ear/no_appxml_2 Test asadmin re-deploy"/> |
| </antcall> |
| <antcall target="redeploy.asadmin"/> |
| <antcall target="runclient"> |
| <param name="log.id" value="2"/> |
| </antcall> |
| <antcall target="undeploy.asadmin"/> |
| <delete file="${testName}Client.jar"/> |
| </target> |
| |
| <!-- the following is run only in EE environment --> |
| <target name="private-all-ee" depends="prepare" if="EE"> |
| <echo message="Running tests specific to EE"/> |
| </target> |
| |
| <target name="clobber" depends="clean"> |
| <delete dir="${build}"/> |
| <delete file="client.log"/> |
| <delete file="results.html"/> |
| <delete file="tests-results.xml"/> |
| </target> |
| |
| <target name="usage"> |
| <antcall target="all"/> |
| </target> |
| |
| </project> |