| <?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="deployment-ejb30-war-servlet" default="all" basedir="."> | |
| &commonBuild; | |
| <property name="testName" value="deployment-ejb30-war-servlet"/> | |
| <property name="archivedir" value="${build}/archives"/> | |
| <target name="prepare" depends="init"> | |
| <mkdir dir="${build}"/> | |
| <mkdir dir="${archivedir}"/> | |
| <property name="web.war" value="${archivedir}/${testName}.war"/> | |
| </target> | |
| <target name="compile" depends="prepare"> | |
| <javac srcdir="${basedir}" destdir="${build}" debug="on" | |
| failonerror="true" | |
| includes="WebTest.java"> | |
| <classpath refid="gfv3.classpath"/> | |
| </javac> | |
| <javac srcdir="${basedir}/web" destdir="${build}" debug="on" | |
| failonerror="true"> | |
| <classpath refid="gfv3.classpath"/> | |
| </javac> | |
| </target> | |
| <target name="create.user" depends="setAsadminArgsWithoutPassword"> | |
| <antcall target="common.createuser.asadmin"> | |
| <param name="arg.list" | |
| value="--groups j2ee --authrealmname file j2ee"/> | |
| <param name="password" value="j2ee"/> | |
| </antcall> | |
| </target> | |
| <target name="delete.user" depends="setAsadminArgs"> | |
| <antcall target="common.run.asadmin"> | |
| <param name="arg.list" | |
| value="delete-file-user ${ASADMIN-ARGS} --authrealmname file j2ee"/> | |
| </antcall> | |
| </target> | |
| <target name="assemble" depends="compile"> | |
| <war destfile="${web.war}" webxml="descriptor/web.xml"> | |
| <classes dir="${build}" excludes="WebTest.class"/> | |
| <webinf dir="descriptor"> | |
| <include name="sun-web.xml"/> | |
| </webinf> | |
| </war> | |
| </target> | |
| <target name="deploy.asadmin" depends="prepare"> | |
| <antcall target="common.deploy.asadmin"> | |
| <param name="arg.list" value="--name ${testName} ${web.war}"/> | |
| <param name="testName" value="${testName}"/> | |
| </antcall> | |
| </target> | |
| <target name="redeploy.asadmin" depends="prepare"> | |
| <antcall target="common.redeploy.asadmin"> | |
| <param name="arg.list" value="--name ${testName} ${web.war}"/> | |
| <param name="testName" value="${testName}"/> | |
| </antcall> | |
| </target> | |
| <target name="undeploy.asadmin" depends="prepare"> | |
| <antcall target="common.undeploy.asadmin"> | |
| <param name="arg.list" value="${testName}"/> | |
| <param name="testName" value="${testName}"/> | |
| </antcall> | |
| </target> | |
| <target name="runweb" depends="prepare,setHttpPort2"> | |
| <javaWithResult fork="true" failonerror="false" jvm="${JAVA}" | |
| classname="WebTest" resultproperty="result" | |
| output="${build}/${log.id}.output.log"> | |
| <arg value="${http.host}"/> | |
| <arg value="${depltest.port}"/> | |
| <arg value="${testName}"/> | |
| <classpath> | |
| <pathelement location="${build}"/> | |
| </classpath> | |
| </javaWithResult> | |
| <antcall target="processResult"> | |
| <param name="result" value="${result}"/> | |
| <param name="log" value="${build}/${log.id}.output.log"/> | |
| </antcall> | |
| </target> | |
| <target name="private-all"> | |
| <antcall target="create.user"/> | |
| <antcall target="assemble"/> | |
| <antcall target="declare-test"> | |
| <param name="description" value="ejb30/war/servlet Test asadmin deploy"/> | |
| </antcall> | |
| <antcall target="deploy.asadmin"/> | |
| <antcall target="runweb"> | |
| <param name="log.id" value="1"/> | |
| </antcall> | |
| <antcall target="declare-test"> | |
| <param name="description" value="ejb30/war/servlet Test asadmin redeploy"/> | |
| </antcall> | |
| <antcall target="redeploy.asadmin"/> | |
| <antcall target="runweb"> | |
| <param name="log.id" value="2"/> | |
| </antcall> | |
| <antcall target="undeploy.asadmin"/> | |
| <antcall target="delete.user"/> | |
| </target> | |
| </project> |