1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
<project name="ICEpush integration builds" default="package.all"> |
24 |
|
25 |
|
26 |
|
27 |
<target name="package.all"> |
28 |
<antcall target="clean-all" /> |
29 |
<antcall target="package.basic" /> |
30 |
<antcall target="package.jsp" /> |
31 |
<antcall target="package.gwt" /> |
32 |
<antcall target="package.jquery" /> |
33 |
<antcall target="package.prototype" /> |
34 |
<antcall target="package.spring" /> |
35 |
<antcall target="package.wicket" /> |
36 |
<antcall target="package.grails" /> |
37 |
</target> |
38 |
|
39 |
<target name="package.basic"> |
40 |
<property name="target" value="basic" /> |
41 |
<delete dir="./dist/${target}" /> |
42 |
<mkdir dir="./dist/${target}" /> |
43 |
<copy todir="./dist/${target}"> |
44 |
<fileset dir="." includes="core/** lib/**" /> |
45 |
</copy> |
46 |
<mkdir dir="./dist/${target}/samples" /> |
47 |
<copy todir="./dist/${target}" file="./build-common.xml" /> |
48 |
<copy file="./etc/build-${target}.xml" tofile="./dist/${target}/build.xml" /> |
49 |
<copy file="./etc/ReadMe-${target}.html" tofile="./dist/${target}/ReadMe.html" /> |
50 |
<copy file="./etc/ICEpush.png" todir="./dist/${target}/"/> |
51 |
<copy file="build.properties" todir="./dist/${target}" /> |
52 |
<copy todir="./dist/${target}/samples" file="./etc/samples.properties" overwrite="true" /> |
53 |
<copy todir="./dist/${target}/samples"> |
54 |
<fileset dir="./samples" excludes="**/build/** **/dist/**" includes="icechat/api/** |
55 |
icechat/beans/** |
56 |
icechat/common/** |
57 |
icechat/ajax/** |
58 |
icechat/lib/** |
59 |
icechat/auth/** |
60 |
icechat/build-common.properties |
61 |
icechat/build-common.xml |
62 |
basic/**"> |
63 |
</fileset> |
64 |
</copy> |
65 |
<antcall target="zip.distribution" /> |
66 |
<delete dir="./dist/${target}" /> |
67 |
</target> |
68 |
|
69 |
<target name="package.jsp"> |
70 |
<property name="target" value="jsp" /> |
71 |
<build.package /> |
72 |
</target> |
73 |
|
74 |
<target name="package.gwt"> |
75 |
<property name="target" value="gwt" /> |
76 |
<build.package /> |
77 |
</target> |
78 |
|
79 |
<target name="package.jquery"> |
80 |
<property name="target" value="jquery" /> |
81 |
<build.package icechat.extra.includes="icechat/auth/** icechat/ajax/**" /> |
82 |
</target> |
83 |
|
84 |
<target name="package.prototype"> |
85 |
<property name="target" value="prototype" /> |
86 |
<build.package icechat.extra.includes="icechat/auth/** icechat/ajax/**" /> |
87 |
</target> |
88 |
|
89 |
<target name="package.wicket"> |
90 |
<property name="target" value="wicket" /> |
91 |
<build.package icechat.extra.includes="icechat/cdi/**" /> |
92 |
</target> |
93 |
|
94 |
<target name="package.spring"> |
95 |
<property name="target" value="spring" /> |
96 |
<antcall target="base.package" /> |
97 |
<copy todir="./dist/${target}/integration"> |
98 |
<fileset dir="./integration" includes="jsp/**" /> |
99 |
</copy> |
100 |
<copy todir="./dist/${target}/samples" file="./etc/samples.properties" overwrite="true" /> |
101 |
<bundle.icechat extra.includes="icechat/web/spring/**" /> |
102 |
<antcall target="zip.distribution" /> |
103 |
<delete dir="./dist/${target}" /> |
104 |
</target> |
105 |
|
106 |
<target name="package.grails"> |
107 |
<property name="target" value="grails" /> |
108 |
<build.package /> |
109 |
</target> |
110 |
|
111 |
<macrodef name="build.package"> |
112 |
<attribute name="icechat.extra.includes" default="" /> |
113 |
<sequential> |
114 |
<antcall target="base.package" /> |
115 |
<copy todir="./dist/${target}/samples" file="./etc/samples.properties" overwrite="true" /> |
116 |
<bundle.icechat extra.includes="@{icechat.extra.includes}" /> |
117 |
<antcall target="zip.distribution" /> |
118 |
<delete dir="./dist/${target}" /> |
119 |
</sequential> |
120 |
</macrodef> |
121 |
|
122 |
<target name="base.package"> |
123 |
<delete dir="./dist/${target}" /> |
124 |
<mkdir dir="./dist/${target}" /> |
125 |
<copy todir="./dist/${target}"> |
126 |
<fileset dir="." includes="core/** lib/** integration/${target}/**" excludes="integration/${target}/build.xml integration/${target}/samples/**" /> |
127 |
</copy> |
128 |
<mkdir dir="./dist/${target}/samples" /> |
129 |
<copy todir="./dist/${target}" file="./build-common.xml" /> |
130 |
<copy file="./etc/build-${target}.xml" tofile="./dist/${target}/build.xml" /> |
131 |
<copy file="./etc/ReadMe-${target}.html" tofile="./dist/${target}/ReadMe.html" /> |
132 |
<copy file="./etc/ICEpush.png" todir="./dist/${target}/"/> |
133 |
<copy file="build.properties" todir="./dist/${target}" /> |
134 |
<copy todir="./dist/${target}/samples"> |
135 |
<fileset dir="./integration/${target}/samples" excludes="build.xml" /> |
136 |
</copy> |
137 |
|
138 |
</target> |
139 |
|
140 |
<target name="zip.distribution"> |
141 |
<zip destfile="./dist/icepush-${target}.zip" basedir="./dist/${target}"> |
142 |
</zip> |
143 |
</target> |
144 |
|
145 |
<macrodef name="bundle.icechat"> |
146 |
<attribute name="extra.includes" default="" /> |
147 |
<sequential> |
148 |
<copy todir="./dist/${target}/samples"> |
149 |
<fileset dir="./samples" excludes="**/build/** **/dist/**" includes="icechat/api/** |
150 |
icechat/auth/** |
151 |
icechat/beans/** |
152 |
icechat/common/** |
153 |
icechat/${target}/** |
154 |
icechat/lib/** |
155 |
icechat/build-common.properties |
156 |
icechat/build-common.xml |
157 |
@{extra.includes}"> |
158 |
</fileset> |
159 |
</copy> |
160 |
</sequential> |
161 |
</macrodef> |
162 |
|
163 |
<target name="clean-all"> |
164 |
<clean /> |
165 |
<ant dir="./core" target="clean" /> |
166 |
|
167 |
<clean.with.path.offset target="jsp" /> |
168 |
|
169 |
<clean.with.path.offset target="gwt" /> |
170 |
<ant target="clean" dir="./samples/icechat/gwt" /> |
171 |
|
172 |
<clean.with.path.offset target="spring" /> |
173 |
<ant target="clean" dir="./samples/icechat/spring" /> |
174 |
|
175 |
<clean.with.path.offset target="jquery" /> |
176 |
<ant target="clean" dir="./samples/icechat/jquery" /> |
177 |
|
178 |
<clean.with.path.offset target="prototype" /> |
179 |
<ant target="clean" dir="./samples/icechat/prototype" /> |
180 |
|
181 |
<clean.with.path.offset target="wicket" /> |
182 |
<ant target="clean" dir="./samples/icechat/wicket" /> |
183 |
</target> |
184 |
|
185 |
<macrodef name="clean"> |
186 |
<element name="add.filesets" optional="true" /> |
187 |
<sequential> |
188 |
<delete failonerror="false" includeEmptyDirs="true"> |
189 |
<fileset dir="${build.dir}" /> |
190 |
<fileset dir="${dist.dir}" /> |
191 |
<add.filesets /> |
192 |
</delete> |
193 |
</sequential> |
194 |
</macrodef> |
195 |
|
196 |
<macrodef name="clean.with.path.offset"> |
197 |
<attribute name="target" /> |
198 |
<sequential> |
199 |
<echo>Cleaning Inegration @{target}</echo> |
200 |
<ant target="clean" dir="./integration/@{target}" /> |
201 |
</sequential> |
202 |
</macrodef> |
203 |
|
204 |
|
205 |
|
206 |
</project> |