Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
| 2 | <!-- |
| 3 | |
| 4 | Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. |
| 5 | |
| 6 | This program and the accompanying materials are made available under the |
| 7 | terms of the Eclipse Public License v. 2.0, which is available at |
| 8 | http://www.eclipse.org/legal/epl-2.0. |
| 9 | |
| 10 | This Source Code may also be made available under the following Secondary |
| 11 | Licenses when the conditions for such availability set forth in the |
| 12 | Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
| 13 | version 2 with the GNU Classpath Exception, which is available at |
| 14 | https://www.gnu.org/software/classpath/license.html. |
| 15 | |
| 16 | SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
| 17 | |
| 18 | --> |
| 19 | |
| 20 | <!DOCTYPE project [ |
| 21 | <!ENTITY commonSetup SYSTEM "./../../../config/properties.xml"> |
| 22 | <!ENTITY commonBuild SYSTEM "./../../../config/common.xml"> |
| 23 | <!ENTITY run SYSTEM "./../../../config/run.xml"> |
| 24 | <!ENTITY testproperties SYSTEM "./build.properties"> |
| 25 | ]> |
| 26 | |
| 27 | <project name="webcontainer_unittest" default="all" basedir="."> |
| 28 | |
| 29 | &commonSetup; |
| 30 | &commonBuild; |
| 31 | &testproperties; |
| 32 | &run; |
| 33 | |
| 34 | <target name="all" depends="build,deploy,runfirst,redeployKeepSessions,runsecond,redeployKeepState,runthird,undeploy"/> |
| 35 | |
| 36 | <target name="clean" depends="init-common"> |
| 37 | <antcall target="clean-common"/> |
| 38 | </target> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 39 | |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 40 | <target name="compile" depends="clean"> |
| 41 | <antcall target="compile-common"> |
| 42 | <param name="src" value="servlet"/> |
| 43 | </antcall> |
| 44 | </target> |
| 45 | |
| 46 | <target name="build" depends="compile"> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 47 | <property name="hasWebclient" value="yes"/> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 48 | <antcall target="webclient-war-common"> |
| 49 | <param name="hasWebclient" value="yes"/> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 50 | <param name="webclient.war.classes" value="**/*.class"/> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 51 | </antcall> |
| 52 | |
| 53 | <javac srcdir="." classpath="${env.APS_HOME}/lib/reportbuilder.jar" |
| 54 | includes="WebTest.java"/> |
| 55 | |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 56 | </target> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 57 | |
| 58 | <target name="deploy" depends="init-common"> |
| 59 | <antcall target="deploy-war-common"/> |
| 60 | </target> |
| 61 | |
| 62 | <target name="redeployKeepSessions" depends="init-common"> |
| 63 | <echo message="Redeploying keepSessions ${assemble.dir}/${appname}-web.war from ${basedir}." |
| 64 | level="verbose"/> |
| 65 | <antcall target="asadmin-common-ignore-fail"> |
| 66 | <param name="admin.command" value="redeploy"/> |
| 67 | <param name="operand.props" value="--properties keepSessions=true --name=${appname}-web ${assemble.dir}/${appname}-web.war"/> |
| 68 | </antcall> |
| 69 | </target> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 70 | |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 71 | <target name="redeployKeepState" depends="init-common"> |
| 72 | <echo message="Redeploying keepState ${assemble.dir}/${appname}-web.war from ${basedir}." |
| 73 | level="verbose"/> |
| 74 | <antcall target="asadmin-common-ignore-fail"> |
| 75 | <param name="admin.command" value="redeploy"/> |
| 76 | <param name="operand.props" value="--keepstate=true --name=${appname}-web ${assemble.dir}/${appname}-web.war"/> |
| 77 | </antcall> |
| 78 | </target> |
| 79 | |
| 80 | <target name="runfirst" depends="init-common"> |
| 81 | <antcall target="run"> |
| 82 | <param name="run.name" value="first"/> |
| 83 | </antcall> |
| 84 | </target> |
| 85 | |
| 86 | <target name="runsecond" depends="init-common"> |
| 87 | <antcall target="run"> |
| 88 | <param name="run.name" value="second"/> |
| 89 | </antcall> |
| 90 | </target> |
| 91 | |
| 92 | <target name="runthird" depends="init-common"> |
| 93 | <antcall target="run"> |
| 94 | <param name="run.name" value="third"/> |
| 95 | </antcall> |
| 96 | </target> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 97 | |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 98 | <target name="run" depends="init-common"> |
| 99 | <java classname="WebTest"> |
| 100 | <arg value="${http.host}"/> |
| 101 | <arg value="${http.port}"/> |
| 102 | <arg value="${contextroot}"/> |
| 103 | <arg value="${run.name}"/> |
| 104 | <classpath> |
| 105 | <pathelement location="${env.APS_HOME}/lib/reportbuilder.jar"/> |
| 106 | <pathelement location="."/> |
| 107 | </classpath> |
| 108 | </java> |
| 109 | </target> |
| 110 | |
| 111 | <target name="undeploy" depends="init-common"> |
| 112 | <antcall target="undeploy-war-common"/> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 113 | </target> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 114 | |
| 115 | <target name="usage"> |
| 116 | <antcall target="usage-common"/> |
| 117 | </target> |
| 118 | |
| 119 | </project> |