1 <?xml version=
"1.0" encoding=
"utf-8"?>
3 ********************************** DO NOT EDIT **********************************
5 This file will be replaced during upgrades so DO NOT EDIT this file. If you need to
6 adjust the process, reading and understanding this file is the first step.
8 In most cases, the adjustments can be achieved by setting properties or providing one
9 of the "hooks" in the form of a "-before-" or "-after-" target. Whenever possible, look
10 for one of these solutions.
12 Failing that, you can copy whole targets to your build.xml file and it will overrride
13 the target provided here. Doing that can create problems for upgrading to newer
14 versions of Cmd so it is not recommended but it will be easier to manage than editing
15 this file in most cases.
17 <project name=
"app-build-impl">
19 ===============================================================
20 helper targets for ant integrations with IDE's
21 (human readable target names)
22 ===============================================================
24 <target name=
"-before-build-testing"/>
25 <target name=
"-build-testing" depends=
"testing,build"/>
26 <target name=
"-after-build-testing"/>
27 <target name=
"build-testing"
28 depends=
"-before-build-testing,
30 -after-build-testing"/>
32 <target name=
"Build - Testing"
33 description=
"Create a Testing build of this project"
34 depends=
"build-testing"/>
36 <target name=
"-before-build-production"/>
37 <target name=
"-build-production" depends=
"production,build"/>
38 <target name=
"-after-build-production"/>
39 <target name=
"build-production"
40 depends=
"-before-build-production,
42 -after-build-production"/>
44 <target name=
"Build - Production"
45 description=
"Create a Production build of this project"
46 depends=
"build-production"/>
48 <target name=
"-before-build-native"/>
49 <target name=
"-build-native" depends=
"native,build"/>
50 <target name=
"-after-build-native"/>
51 <target name=
"build-native"
52 depends=
"-before-build-native,
54 -after-build-native"/>
56 <target name=
"Build - Native"
57 description=
"Create a Native build of this project"
58 depends=
"build-native"/>
60 <target name=
"-before-start-local-webserver"/>
61 <target name=
"-start-local-webserver" depends=
"init">
64 ${cmd.dir}/sencha fs web -port=${build.web.port} start -map=${build.web.root}
68 <target name=
"-after-start-local-webserver"/>
69 <target name=
"start-local-webserver"
70 depends=
"-before-start-local-webserver,
71 -start-local-webserver,
72 -after-start-local-webserver"/>
74 <target name=
"WebServer - Start Local"
75 description=
"Starts a local webserver for this project"
76 depends=
"start-local-webserver"/>
78 <target name=
"-before-compass-watch"/>
79 <target name=
"-compass-watch" depends=
"init">
81 compass watch ${app.sass.dir}
84 <target name=
"-after-compass-watch"/>
85 <target name=
"compass-watch"
86 depends=
"-before-compass-watch,
88 -after-compass-watch"/>
90 <target name=
"Compass - Watch"
91 description=
"Opens terminal and watches for SASS updates"
92 depends=
"compass-watch"/>
95 ===============================================================
97 ===============================================================
99 <target name=
"production"
100 description=
"Sets the build environment to production.">
101 <property name=
"build.environment" value=
"production"/>
104 <target name=
"testing"
105 description=
"Sets the build environment to testing.">
106 <property name=
"build.environment" value=
"testing"/>
109 <target name=
"native"
110 description=
"Sets the build environment to native.">
111 <property name=
"build.environment" value=
"native"/>
114 <target name=
"package"
115 description=
"Sets the build environment to package.">
116 <property name=
"build.environment" value=
"package"/>
121 ===============================================================
123 uses targets from find-cmd-impl.xml to detect the current
124 install of Sencha Cmd
125 ===============================================================
127 <import file=
"${basedir}/.sencha/app/find-cmd-impl.xml"/>
128 <target name=
"init-cmd"
129 depends=
"find-cmd-in-path,
130 find-cmd-in-environment,
132 <echo>Using Sencha Cmd from ${cmd.dir} for ${ant.file}
</echo>
135 load the sencha.jar ant task definitions.
137 NOTE: the 'loaderref' attribute stores this task def's class loader
138 on the project by that name, so it will be sharable across sub-projects.
139 This fixes out-of-memory issues, as well as increases performance.
141 To supoprt this, it is recommended that any customizations that use
142 'ant' or 'antcall' tasks set 'inheritrefs=true' on those tasks, in order
143 to propagate the senchaloader reference to those subprojects.
145 The sencha 'x-ant-call' task, which extends 'antcall' and defaults
146 'inheritrefs' to true, may be used in place of antcall in
147 build process customizations.
149 <taskdef resource=
"com/sencha/ant/antlib.xml"
150 classpath=
"${cmd.dir}/sencha.jar"
151 loaderref=
"senchaloader"/>
154 Some operations require sencha.jar in the current java classpath,
155 so this will extend the java.lang.Thread#contextClassLoader with the
156 specified java classpath entries
159 <jar path=
"${cmd.dir}/sencha.jar"/>
160 </x-extend-classpath>
164 ===============================================================
166 uses targets from init-impl.xml to load Sencha Cmd config
167 system properties and ant task definitions
168 ===============================================================
170 <import file=
"${basedir}/.sencha/app/init-impl.xml"/>
177 -before-init-defaults,
179 -after-init-defaults,
183 ===============================================================
185 this is the starting point for the build process. The 'depends'
186 attribute on the -build target controls the ordering of the
187 different build phases
188 ===============================================================
190 <target name=
"-before-build"/>
191 <target name=
"-build"
200 <target name=
"-after-build"/>
202 depends=
"init,-before-build,-build,-after-build"
203 description=
"Builds the application"/>
206 ===============================================================
208 removes all artifacts from the output build directories
209 ===============================================================
211 <target name=
"-before-clean"/>
212 <target name=
"-clean">
213 <delete dir=
"${build.dir}"/>
214 <delete dir=
"${build.temp.dir}"/>
216 <target name=
"-after-clean"/>
219 description=
"Removes all build output produced by the 'build' target">
220 <x-ant-call unless=
"skip.clean">
221 <target name=
"-before-clean"/>
222 <target name=
"-clean"/>
223 <target name=
"-after-clean"/>
228 ===============================================================
230 uses targets from watch-impl.xml to initiate the application
231 watch process using instrumented state from the compiler
232 ===============================================================
234 <import file=
"${basedir}/.sencha/app/watch-impl.xml"/>
235 <target name=
"watch">
236 <property name=
"build.optimize" value=
""/>
238 <target name=
"-before-watch"/>
239 <target name=
"-watch"/>
240 <target name=
"-after-watch"/>
245 ===============================================================
247 uses targets from js-impl.xml to produce the output js files
248 containing needed application and framework js classes
249 ===============================================================
251 <import file=
"${basedir}/.sencha/app/js-impl.xml"/>
254 description=
"Builds the output javascript file(s)">
255 <x-ant-call unless=
"skip.js">
256 <target name=
"-before-js"/>
258 <target name=
"-after-js"/>
263 ===============================================================
265 uses targets from sass-impl.xml to produce the output css
266 files for the application's styling
267 ===============================================================
269 <import file=
"${basedir}/.sencha/app/sass-impl.xml"/>
272 description=
"Builds the Sass files using Compass.">
273 <x-ant-call unless=
"skip.sass">
274 <target name=
"-before-sass"/>
275 <target name=
"-sass"/>
276 <target name=
"-after-sass"/>
281 ===============================================================
283 uses targets from resources-impl.xml to copy resources from
284 the application and required packages to the output directory
285 ===============================================================
287 <import file=
"${basedir}/.sencha/app/resources-impl.xml"/>
288 <target name=
"resources"
290 description=
"Copy resources to build folder.">
291 <x-ant-call unless=
"skip.resources">
292 <target name=
"-before-resources"/>
294 <!-- Legacy targets: -->
295 <target name=
"-before-inherit-resources"/>
296 <target name=
"-before-copy-resources"/>
298 <target name=
"-resources"/>
300 <!-- Legacy targets: -->
301 <target name=
"-after-copy-resources"/>
302 <target name=
"-after-inherit-resources"/>
304 <target name=
"-after-resources"/>
310 ===============================================================
312 uses targets from slice-impl.xml to extract theme images from
313 the application for use with older browsers that don't
314 support modern css features
315 ===============================================================
317 <import file=
"${basedir}/.sencha/app/slice-impl.xml"/>
320 description=
"Slices CSS3 theme to produce non-CSS3 images and sprites.">
321 <x-ant-call unless=
"skip.slice">
322 <target name=
"-before-slice"/>
323 <target name=
"-slice"/>
324 <target name=
"-after-slice"/>
329 Theme - this is a legacy support target for extjs 4.1 apps. It redirects
330 to the "slice" ant target
334 description=
"Builds the application's theme(s) images using the slicer (Ext JS 4.1 only).">
335 <x-ant-call unless=
"skip.theme">
336 <target name=
"-before-theme"/>
337 <target name=
"slice"/>
338 <target name=
"-after-theme"/>
343 Refresh Theme - uses targets from refresh-impl.xml to rebuild the current
346 <target name=
"refresh-theme"
348 description=
"Rebuilds the currently enabled app theme (Ext JS 4.1 only).">
349 <x-ant-call unless=
"skip.theme">
350 <target name=
"-before-refresh-theme"/>
351 <target name=
"-refresh-theme"/>
352 <target name=
"-after-refresh-theme"/>
357 ===============================================================
359 uses targets from refresh-impl.xml to generate bootstrapping
360 information for the application
361 ===============================================================
363 <import file=
"${basedir}/.sencha/app/refresh-impl.xml"/>
364 <target name=
"refresh"
366 description=
"Refreshes the application bootstrap data.">
367 <x-ant-call unless=
"skip.refresh">
368 <target name=
"-before-refresh"/>
369 <target name=
"-refresh"/>
370 <target name=
"-after-refresh"/>
375 ===============================================================
377 uses targets from page-impl.xml to generate the output markup
378 file and associated microloader / app manifest
379 ===============================================================
381 <import file=
"${basedir}/.sencha/app/page-impl.xml"/>
384 description=
"Builds the application's HTML page.">
385 <x-ant-call unless=
"skip.page">
386 <target name=
"-before-page"/>
387 <target name=
"-page"/>
388 <target name=
"-after-page"/>
393 ===============================================================
395 uses targets from resolve-impl.xml to detect dynamic app
396 dependencies using phantomjs
397 ===============================================================
399 <import file=
"${basedir}/.sencha/app/resolve-impl.xml"/>
400 <target name=
"resolve"
402 description=
"Resolve application dependencies dynamically.">
403 <x-ant-call unless=
"skip.resolve">
404 <target name=
"-before-resolve"/>
405 <target name=
"-resolve"/>
406 <target name=
"-after-resolve"/>
411 ===============================================================
413 uses targets from packager-impl.xml to run native packager
414 applications to produce stand-alone installable web apps from
415 this built Cmd application
416 ===============================================================
418 <import file=
"${basedir}/.sencha/app/packager-impl.xml"/>
419 <target name=
"native-package"
421 description=
"Builds native packages of the application">
422 <x-ant-call unless=
"skip.native-package">
423 <target name=
"-before-native-package"/>
424 <target name=
"-native-package"/>
425 <target name=
"-after-native-package"/>
430 ===============================================================
432 displays all current ant properties
433 ===============================================================
435 <target name=
".props" depends=
"init"
436 description=
"Lists all properties defined for the build">
441 ===============================================================
443 displays the help message
444 ===============================================================
446 <target name=
".help" depends=
"init"
447 description=
"Provides help on the build script">
448 <x-get-project-targets property=
"help.message"/>
450 <echo><![CDATA[${help.message}
451 This is the main build script for your application.
453 The following properties can be used to disable certain steps in the build
456 * skip.page Do not build the HTML page.
457 * skip.js Do not build the output js code file(s)
458 * skip.resources Do not copy resources to the build directory
459 * skip.sass Do not build the SASS.
460 * skip.slice Do not build the theme image slicer.
461 * skip.theme Do not build the theme images.
463 The following properties can be used to modify the build process.
465 * build.compression.yui Specify yui compression for the build
467 * build.compression.closure Specify closure compression for the build
469 * build.compression.uglify Specify uglify compression for the build
471 * build.options Set general options for the build
472 (eg: enable a debug build)
474 To modify any of the previous build specific options, see:
475 ${basedir}/.sencha/app/${build.environment}.properties
477 * build.operations Insert commands into the compile command
480 * app.page.name Set the input and output page file
481 for the compile command.
483 * build.classes.name Specify the compiled js file
486 For details about how these options affect your build, see
488 ${basedir}/.sencha/app/build-impl.xml
490 These options can be stored in a local.properties file in this folder or in the
491 local.properties file in the workspace.
493 Alternatively, these can be supplied on the command line. For example:
495 ant -Dskip.sass=
1 build
497 To see all currently defined properties, do this: