This repository was archived by the owner on Aug 17, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcommon-dynamic_web_app.xml
More file actions
executable file
·173 lines (129 loc) · 5.26 KB
/
common-dynamic_web_app.xml
File metadata and controls
executable file
·173 lines (129 loc) · 5.26 KB
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!--
*
* Copyright (c) 2005, 2006, 2007 jmochel
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* Neither the name of the <ORGANIZATION> nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="commonbuild-dynamic_web_app" default="Build">
<!-- Sets the type that this XML file is designed for -->
<property name="comp.src.main.conf.dir" value="${basedir}/WebContent"/>
<property name="component.type" value="j2ee_war" />
<import file="./common.xml"/>
<!--
This component level build file contains the targets
necessary to build the given types of components inside of
the common build system.
#############################################
Component Directory Structure
#############################################
/project/components/component1
/project/components/component1/build.xml
/project/components/component1/src
/project/components/component1/src/main
/project/components/component1/src/main/java
/project/components/component1/src/main/conf
/project/components/component1/src/test
/project/components/component1/src/test/java
/project/components/component1/src/test/conf
/project/components/component1/target/classes
/project/components/component1/target/test-classes
/project/components/component1/target/distrib
/project/components/component1/target/reports
/project/components/component1/target/reports/testing
-->
<!--
====================================
Validation and Configuration Targets
====================================
-->
<!--
Prep is the common preparation target.
-->
<target name="Prep.j2ee_war">
<mkdir dir="${comp.target.dist.war.dir}"/>
<mkdir dir="${comp.target.dist.jar.dir}"/>
</target>
<!--
====================================
Generate Code and Resources
====================================
-->
<!--
Gen is the common source code generation target.
-->
<target name="Gen.j2ee_war">
<filter token="COMPONENT.VERSION" value="${component.version}"/>
<copy todir="${comp.gen.src.main.conf.dir}" filtering="true" >
<fileset dir="${comp.src.main.conf.dir}" includes="web.xml"/>
</copy>
</target>
<!--
====================================
Build
====================================
-->
<target name="Build.j2ee_war" depends="Compile.Core.Java, Compile.Test.Java"/>
<!--
====================================
Component Package and Test
====================================
-->
<!--
Pkg is the common packaging target.
-->
<!--
Packages an J2EE WAR using the ANT WAR Task
-->
<target name="Pkg.j2ee_war" depends="Pkg.Core.j2ee_war, Pkg.Test.j2ee_war, Pkg.Src.j2ee_war"/>
<target name="Pkg.Core.j2ee_war">
<!-- Copy the jars and flatten their paths for the WAR -->
<mkdir dir="${comp.target.dist.dir}/lib"/>
<copy todir="${comp.target.dist.dir}/lib" >
<mapper type="flatten"/>
<fileset refid="rslvd.deploy.set" />
</copy>
<war
destfile="${comp.target.dist.dir}/wars/${ivy.module}-${component.version}.war"
webxml="${comp.src.main.conf.dir}/WEB-INF/web.xml"
>
<classes dir="${comp.target.main.classes.dir}"/>
<fileset dir="${comp.src.main.conf.dir}" includes="**/*" excludes="web.xml"/>
<lib dir="${comp.target.dist.dir}/lib"/>
</war>
</target>
<target name="Pkg.Test.j2ee_war">
<jar basedir="${comp.target.test.classes.dir}" jarfile="${comp.target.dist.jar.dir}/${ivy.module}-test-${component.version}.jar"/>
</target>
<target name="Pkg.Src.j2ee_war">
<jar basedir="${comp.src.dir}" jarfile="${comp.target.dist.jar.dir}/${ivy.module}-src-${component.version}.jar"/>
</target>
<!--
Verify is the common verification target.
-->
<target name="Verify.war"/>
</project>