-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
344 lines (294 loc) · 14.6 KB
/
build.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
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<!-- When you are using NetBeans 5, just rename this file -->
<!-- to build.xml. You can then use the normal menu items -->
<!-- run, debug, build and so forth from within NetBeans. -->
<!-- This file controls the build process. -->
<!-- The most important target is the j2mepolish-target, -->
<!-- which controls for what devices the application should -->
<!-- be created and so on. -->
<!-- -->
<!-- Important: when you have no Wireless Toolkit installed -->
<!-- you need to define the "preverify"-attribute -->
<!-- of the <build>-element of the J2ME Polish task. -->
<!-- -->
<!-- When you call Ant from the command-line, you can -->
<!-- call "ant test j2mepolish" to skip the obfuscation -->
<!-- and to build the example for fewer handsets. -->
<!-- The default target builds and obfuscates the example. -->
<!-- -->
<!-- The full documentation can be found at -->
<!-- http://www.j2mepolish.org -->
<!-- -->
<!-- Have fun! -->
<project
name="GoldenPOS"
default="j2mepolish">
<!-- extend the default NetBeans build script: -->
<import file="nbproject/build-impl.xml"/>
<!-- import user specific properties -->
<property file="${user.name}.properties" />
<!-- The polish.home property needs to point to the directory -->
<!-- containing the J2ME Polish installation. -->
<property name="polish.home" location="polish" />
<!-- import global properties -->
<property file="${polish.home}/global.properties" />
<property name="wtk.home" value="C:\WTK2.5.2" />
<!-- the home of the server based web application - is needed in the deploy-war target -->
<property name="webapps.home" location="/Users/robertvirkus/dev/apache-tomcat-5.5.17/webapps" />
<!-- Definition of the J2ME Polish task: -->
<taskdef name="j2mepolish"
classname="de.enough.polish.ant.PolishTask"
classpath="${polish.home}/lib/enough-j2mepolish-build.jar"
/>
<!-- Definition of the present helper task: -->
<taskdef name="present"
classname="de.enough.polish.ant.PresentTask"
classpath="${polish.home}/lib/enough-j2mepolish-build.jar"/>
<!-- build targets, each target can be called via "ant [name]",
e.g. "ant clean", "ant test j2mepolish" or just "ant" for calling the default-target -->
<target name="setdeploy"
description="Call this target first to set the OTA download-URL, e.g. ant setdeploy j2mepolish"
>
<property name="deploy-url" value="http://www.company.com/download/" />
</target>
<target name="enableDebug"
description="Call this target first to skip the obfuscation step, call the emulator and start the debugger, e.g. ant enableDebug j2mepolish"
>
<property name="debug" value="true" />
</target>
<target name="test"
description="Call this target first to skip the obfuscation step and call the emulator, e.g. ant test j2mepolish"
>
<property name="test" value="true" />
<property name="dir.work" value="build/test" />
</target>
<target name="j2mepolish-init"
depends="init"
>
<property name="test" value="false" />
<property name="dir.work" value="build/real" />
<property name="deploy-url" value="" />
</target>
<!-- In this target the J2ME Polish task is used. -->
<!-- It has 3 sections: -->
<!-- 1. The info-section defines some general information -->
<!-- 2. The deviceRequirements-section chooses the devices -->
<!-- for which the application is optimized. -->
<!-- 3. The build-section controls the actual build -->
<!-- process. -->
<target name="j2mepolish"
depends="j2mepolish-init"
description="This is the controller for the J2ME build process."
>
<j2mepolish>
<!-- general settings -->
<info
name="GoldenPOS"
version="2.0.1"
description="Facturador Mobil IPX"
vendorName="IpxServer"
infoUrl="http://localhost"
jarName="GoldenPOS.jar"
jarUrl="${deploy-url}GoldenPOS.jar"
copyright="Copyright 2014. Todos los Derechos Reservados."
/>
<!-- selection of supported devices -->
<deviceRequirements if="config.active:defined and (test or enableCompilerMode)" >
<requirement name="Identifier" value="${config.active}" />
</deviceRequirements>
<deviceRequirements if="device:defined and (test or enableCompilerMode)" unless="config.active:defined">
<requirement name="Identifier" value="${device}" />
</deviceRequirements>
<deviceRequirements unless="test or enableCompilerMode">
<requirement name="Identifier" value="${devices}" />
</deviceRequirements>
<!-- build settings -->
<build
symbols="polish.skipArgumentCheck"
usePolishGui="true"
javacTarget="1.4"
binaryLibraries="lib/netbeans_midp_components_basic.jar;lib/microlog-logger-core-2.3.5.jar;lib/microlog-logger-midp-file-2.3.5.jar;lib/kxml2-2.3.0.jar;lib/microlog-logger-midp-2.3.5.jar"
>
<!-- midlets definition -->
<midlet class="com.mobiwire.startup.StartApp" name="GoldenPOS" icon="icon.png"/>
<!-- project-wide variables - used for preprocessing. -->
<!-- You can set localized variables in the resources/messages.txt files as well. -->
<variables includeAntProperties="true" >
<!-- use the advanced menubar mode that offers near-native command handling and positioning, on BB and Android use native commands: -->
<variable
name="polish.FullScreen"
value="menu"
unless="polish.blackberry || polish.android"
/>
<!-- activate text input over J2ME Polish TextFields (without opening a new TextBox for each input:
<variable name="polish.TextField.useDirectInput" value="true" />
- activate input of symbols: -
<variable name="polish.TextField.supportSymbolsEntry" value="true" />
<variable name="polish.TextField.Symbols" value=""@#()<>&;,.:!/\~$%^*" />
- activate switching to the native (e.g.T9) input mode: -
<variable name="polish.TextField.allowNativeModeSwitch" value="true" />
- use the advanced menubar mode that offers near-native command handling and positioning -
<variable name="polish.MenuBar.useExtendedMenuBar" value="true" />
- suppress List-select commands -
<variable name="polish.List.suppressSelectCommand" value="true" />
-
You can also suppress ir rename the Add Symbol command:
<variable name="polish.TextField.suppressAddSymbolCommand" value="true" if="polish.key.AddSymbolKey:defined" />
<variable name="polish.command.entersymbol" value="Add Symbol" />
-->
<variable name ="polish.util.TableData" value="true"/>
<variable name="polish.useScrollBar" value="true" />
<variable name="polish.MenuBar.useExtendedMenuBar" value="false" />
<variable name="polish.TextField.useDirectInput" value="true" />
<!-- <variable name="polish.TextField.allowNativeModeSwitch" value="true" />-->
<variable name="polish.TextField.includeInputInfo" value="true" />
<variable name="polish.TextField.useDirectInput" value="true"/>
<variable name="polish.TextField.suppressClearCommand" value="true"/>
<variable name="polish.ChoiceGroup.suppressSelectCommand" value="true"/>
<!-- <variable name="polish.ChoiceGroup.suppressMarkCommands" value="true"/>-->
<variable name="polish.List.suppressSelectCommand" value="true" />
<variable name="polish.command.delete.priority" value="0"/>
<variable name="polish.ScreenInfo.enable" value="true" />
<variable name="polish.ScreenInfo.enable" value="true" />
<variable name="polish.TextField.charactersKey1" value =".qz1"/>
<variable name="polish.TextField.charactersKey2" value ="a\u00E1bc2"/>
<variable name="polish.TextField.charactersKey3" value ="de\u00E9f3"/>
<variable name="polish.TextField.charactersKey4" value ="ghi\u00ED4"/>
<variable name="polish.TextField.charactersKey5" value ="jkl5"/>
<variable name="polish.TextField.charactersKey6" value ="mno\u00F1\u00f36"/>
<variable name="polish.TextField.charactersKey7" value ="prs7"/>
<variable name="polish.TextField.charactersKey8" value ="tu\u00FAv8"/>
<variable name="polish.TextField.charactersKey9" value ="wxy9"/>
<variable name="polish.TextField.charactersKey0" value =" +0"/>
<variable name="polish.TextField.charactersKeyPound" value ="#@:()\u0026\u00BF?$!/_"/>
</variables>
<!-- obfuscator settings: always obfuscate -->
<!--
<obfuscator name="ProGuard" unless="test or dontobfuscate" />
-->
<!-- debug/log settings: only include debug setting when the test-property is true -->
<debug level="info" verbose="true" logTimestamp="true" if="test">
<filter level="debug" package="com.mobiwire"/>
<!--
<filter level="debug" class="de.enough.polish.ui.TabbedForm"/>
<filter level="debug" class="de.enough.polish.ui.Container"/>
<filter level="debug" class="de.enough.polish.ui.Screen"/>
<filter level="debug" class="de.enough.polish.ui.MenuBar"/>
-->
</debug>
<resources
dir="resources"
defaultexcludes="no"
excludes="readme.txt">
</resources>
<!--Sign the MIDLET with a self-signed certificate-->
<!-- <sign key="mobiprint"
keystore="keystore.jks"
password="changeit"/>-->
</build>
<!-- execution of emulator(s) -->
<emulator
wait="true"
trace="none"
securityDomain="manufacturer"
enableProfiler="false"
enableMemoryMonitor="false"
enableNetworkMonitor="true"
if="test and not debug"
>
<!--
<parameter name="-Xjam" value="transient=http://localhost:8080/${polish.jadName}" />
-->
</emulator>
<emulator
wait="true"
securityDomain="manufacturer"
enableProfiler="false"
enableMemoryMonitor="false"
enableNetworkMonitor="true"
if="debug"
>
<!-- Attach the emulator to the NetBeans debugger: -->
<debugger name="antcall" target="connect-debugger" port="6001" />
</emulator>
</j2mepolish>
</target>
<target name="build-war" description="builds the server war file for Tomcat or other J2EE/Servlet Containers.">
<present file="dist/client-rmi-classes.jar" failMessage="Please run either the j2mepolish or the build-all target first." />
<copy file="${polish.home}/lib/enough-j2mepolish-rmi.jar" todir="dist" />
<delete dir="bin/server" />
<mkdir dir="bin/server" />
<javac srcdir="source/server" destdir="bin/server" classpath="dist/client-rmi-classes.jar:dist/enough-j2mepolish-rmi.jar" />
<jar destfile="dist/gameserver.jar" basedir="bin/server" excludes="**/CVS" />
<war
destfile="dist/gameserver.war"
webxml="source/server/web.xml"
>
<lib dir="dist" includes="client-rmi-classes.jar,enough-j2mepolish-rmi.jar,gameserver.jar" />
</war>
</target>
<target name="deploy-war" depends="build-war" description="builds and deploys the war file to $webapps.home">
<copy file="dist/gameserver.war" todir="${webapps.home}" />
</target>
<target name="build-all" depends="clean,j2mepolish,build-war" description="builds both the client and the server code of the application"/>
<target
name="emulator"
depends="test,j2mepolish"
description="invokes the emulator"
>
</target>
<target name="clean"
description="allows a clean build. You should call [ant clean] whenever you made changes to devices.xml, vendors.xml or groups.xml">
<delete dir="build" />
<delete dir="dist" includes="**/*" />
</target>
<target
name="cleanbuild"
description="allows a clean build. You should call [ant cleanbuild] whenever you made changes to devices.xml, vendors.xml or groups.xml"
depends="clean, j2mepolish"
/>
<target name="debug" description="debugs the project" depends="enableDebug, test, j2mepolish" />
<target name="deploy"
description="Deploys the applications. Currently empty."
depends="j2mepolish"
/>
<!-- NetBeans specific build targets: -->
<target name="run"
depends="test, j2mepolish"
>
</target>
<target name="rebuild"
depends="clean, j2mepolish"
>
</target>
<target name="rebuild-all"
depends="clean, j2mepolish"
>
</target>
<target name="jar"
depends="j2mepolish"
>
</target>
<target name="jar-all"
depends="j2mepolish"
>
</target>
<target name="clean-all"
depends="clean"
>
</target>
<target name="deploy-all"
depends="deploy"
>
</target>
<target name="enable-compiler-mode">
<property name="enableCompilerMode" value="true" />
</target>
<target name="compile-single"
depends="enable-compiler-mode, j2mepolish"
>
</target>
<target name="connect-debugger">
<property name="jpda.port" value="${polish.debug.port}" />
<antcall target="nbdebug"/>
</target>
</project>