-
Notifications
You must be signed in to change notification settings - Fork 144
/
annotations-common.xml
132 lines (110 loc) · 5.3 KB
/
annotations-common.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!--
Copyright (c) 2017, 2022 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
-->
<property environment="env"/>
<property file="${env.APS_HOME}/config.properties"/>
<target name="all" depends="clean, compile, run, undeploy, report"/>
<target name="clean">
<delete dir="${env.APS_HOME}/build/module/classes"/>
</target>
<path id="classpath">
<fileset dir="${env.S1AS_HOME}/modules">
<include name="*.jar"/>
</fileset>
<fileset dir="${env.APS_HOME}/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${env.APS_HOME}/lib/target">
<include name="*.jar"/>
</fileset>
</path>
<target name="compile">
<mkdir dir="${env.APS_HOME}/build/module/classes"/>
<basename file="${src-name}" property="server" suffix=".java"/>
<dirname file="${src-name}" property="directory"/>
<basename file="${directory}" property="pkg-name"/>
<property name="class-name" value="${pkg-name}/${server}.class"/>
<echo message="Compiling into ${pkg-name}/${server}.class"/>
<javac srcdir="." destdir="${env.S1AS_HOME}/domains/domain1/autodeploy"
includes="${src-name}">
<classpath refid="classpath"/>
</javac>
</target>
<target name="compile-client">
<javac srcdir="." destdir="${env.APS_HOME}/build/module/classes"
classpath="${mvn.lib.dir}/reporter.jar:${env.S1AS_HOME}/lib/jakartaee.jar:${env.S1AS_HOME}/modules/webservices-osgi.jar:${build.classes.dir}/client"
includes="${client-src-name}"/>
</target>
<target name="deploy">
<antcall target="compile"/>
</target>
<target name="undeploy">
<basename file="${src-name}" property="server" suffix=".java"/>
<dirname file="${src-name}" property="directory"/>
<basename file="${directory}" property="pkg-name"/>
<property name="class-name" value="${pkg-name}/${server}.class"/>
<echo message="Removing file ${class-name} from autodeploy directory"/>
<delete file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}"/>
<waitfor maxwait="100" maxwaitunit="second">
<or>
<available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_undeployed"/>
<available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_undeployFailed"/>
</or>
</waitfor>
<condition property="undeploy_succeeded">
<available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_undeployed"/>
</condition>
<condition property="undeploy_failed">
<available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_undeployFailed"/>
</condition>
</target>
<target name="report" depends="internal-report-success, internal-report-failure">
<delete file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_*"/>
</target>
<target name="run">
<waitfor maxwait="100" maxwaitunit="second">
<or>
<available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_deployed"/>
<available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_deployFailed"/>
</or>
</waitfor>
<condition property="deploy_succeeded">
<available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_deployed"/>
</condition>
<condition property="deploy_failed">
<available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_deployFailed"/>
</condition>
<antcall target="internal-run"/>
<antcall target="internal-report-failure"/>
</target>
<target name="internal-run" if="deploy_succeeded">
<basename file="${client-src-name}" property="client" suffix=".java"/>
<dirname file="${client-src-name}" property="client-directory"/>
<basename file="${client-directory}" property="client-pkg-name"/>
<property name="client-class-name" value="${client-pkg-name}/${client}.class"/>
<echo message="wsimporting http://${http.host}:${http.port}/${server}/${server}Service?WSDL"/>
<exec executable="${env.S1AS_HOME}/bin/wsimport">
<arg line="-keep -d ${env.APS_HOME}/build/module/classes http://${http.host}:${http.port}/${server}/${server}Service?WSDL"/>
</exec>
<antcall target="compile-client"/>
<echo message="Running appclient with ${client-pkg-name}.${client}"/>
<unjar src="${env.APS_HOME}/lib/target/reporter.jar" dest="${env.APS_HOME}/build/module/classes"/>
<exec executable="${env.S1AS_HOME}/bin/appclient" dir="${env.APS_HOME}/build/module/classes">
<arg value="${client-pkg-name}.${client}"/>
</exec>
</target>
<target name="internal-report-success" if="undeploy_succeeded">
<antcall target="report-success"/>
</target>
<target name="internal-report-failure" if="undeploy_failed, deploy_failed">
<antcall target="report-failure"/>
</target>