blob: 6b3b7d80e9087f3b41e610db08666c5a7c8d3df8 [file] [log] [blame]
Vinay Vishal57171472018-09-18 20:22:00 +05301<?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čekf4dc06a2021-05-17 12:10:57 +020039
Vinay Vishal57171472018-09-18 20:22:00 +053040 <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čekf4dc06a2021-05-17 12:10:57 +020047 <property name="hasWebclient" value="yes"/>
Vinay Vishal57171472018-09-18 20:22:00 +053048 <antcall target="webclient-war-common">
49 <param name="hasWebclient" value="yes"/>
David Matějčekf4dc06a2021-05-17 12:10:57 +020050 <param name="webclient.war.classes" value="**/*.class"/>
Vinay Vishal57171472018-09-18 20:22:00 +053051 </antcall>
52
53 <javac srcdir="." classpath="${env.APS_HOME}/lib/reportbuilder.jar"
54 includes="WebTest.java"/>
55
David Matějčekf4dc06a2021-05-17 12:10:57 +020056 </target>
Vinay Vishal57171472018-09-18 20:22:00 +053057
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čekf4dc06a2021-05-17 12:10:57 +020070
Vinay Vishal57171472018-09-18 20:22:00 +053071 <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čekf4dc06a2021-05-17 12:10:57 +020097
Vinay Vishal57171472018-09-18 20:22:00 +053098 <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čekf4dc06a2021-05-17 12:10:57 +0200113 </target>
Vinay Vishal57171472018-09-18 20:22:00 +0530114
115 <target name="usage">
116 <antcall target="usage-common"/>
117 </target>
118
119</project>