forked from apache/royale-asjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ApproveFlexJS.xml
807 lines (736 loc) · 36.4 KB
/
ApproveFlexJS.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
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="ApproveApacheFlexJS" default="main" basedir=".">
<!-- Required for OSX 10.6 / Snow Leopard Performance. -->
<!-- Java 7 on Mac requires OSX 10.7.3 or higher and is 64-bit only -->
<!-- local.d32 is set/used in build.properties so this needs to be done first. -->
<condition property="local.d32" value="-d32">
<and>
<os family="windows"/>
<equals arg1="${sun.arch.data.model}" arg2="64"/>
<equals arg1="${os.arch}" arg2="x86_64"/>
<equals arg1="${ant.java.version}" arg2="1.6"/>
</and>
</condition>
<condition property="isMac" value="mac">
<os family="mac" />
</condition>
<condition property="isWindows" value="windows">
<os family="windows" />
</condition>
<condition property="isLinux" value="linux">
<and>
<os family="unix" />
<not>
<isset property="isMac" />
</not>
</and>
</condition>
<condition property="package.suffix" value="zip">
<os family="windows" />
</condition>
<property name="package.suffix" value="tar.gz" />
<property name="src.rat.report" value="${basedir}/rat-report-src.txt"/>
<property name="bin.rat.report" value="${basedir}/rat-report-bin.txt"/>
<property name="doc.rat.report" value="${basedir}/rat-report-doc.txt"/>
<property name="apache.rat.jar" value="apache-rat-0.11.jar" />
<property name="apache.rat.tasks.jar" value="apache-rat-tasks-0.11.jar" />
<property name="apache.rat.url" value="http://search.maven.org/remotecontent?filepath=org/apache/rat/apache-rat/0.11" />
<property name="apache.rat.tasks.url" value="http://search.maven.org/remotecontent?filepath=org/apache/rat/apache-rat-tasks/0.11" />
<property file="${basedir}/approvefalcon.properties"/>
<property name="mac.text.display" value="cat" />
<property name="win.text.display" value="type" />
<property name="linux.text.display" value="cat" />
<property environment="env"/>
<property name="build.target" value="main" />
<available file="${env.APPDATA}/npm/jshint.cmd"
type="file"
property="jshint" value="${env.APPDATA}/npm/jshint.cmd" />
<property name="jshint" value="jshint" />
<available file="${env.ProgramFiles}/Mozilla Firefox/firefox.exe"
type="file"
property="browser" value="${env.ProgramFiles}/Mozilla Firefox/firefox.exe" />
<available file="${env.ProgramFiles(x86)}/Mozilla Firefox/firefox.exe"
type="file"
property="browser" value="${env.ProgramFiles}/Mozilla Firefox/firefox.exe" />
<condition property="do.copy.downloads" >
<isset property="download.cache.dir" />
</condition>
<fail message="The ANT_HOME environment variable is not set."
unless="env.ANT_HOME"/>
<available file="${env.AIR_HOME}"
type="dir"
property="AIR_HOME" value="${env.AIR_HOME}" />
<fail message="The AIR_HOME property is not set in environment or command-line."
unless="AIR_HOME"/>
<available file="${env.PLAYERGLOBAL_HOME}"
type="dir"
property="PLAYERGLOBAL_HOME" value="${env.PLAYERGLOBAL_HOME}" />
<fail message="The PLAYERGLOBAL_HOME property is not set in environment or command-line."
unless="PLAYERGLOBAL_HOME"/>
<available file="${env.FLASHPLAYER_DEBUGGER}"
type="file"
property="FLASHPLAYER_DEBUGGER" value="${env.FLASHPLAYER_DEBUGGER}" />
<fail message="The FLASHPLAYER_DEBUGGER property is not set in environment or command-line."
unless="FLASHPLAYER_DEBUGGER"/>
<available file="${env.FALCON_HOME}"
type="dir"
property="FALCON_HOME" value="${env.FALCON_HOME}" />
<available file="${env.FALCONJX_HOME}"
type="dir"
property="FALCONJX_HOME" value="${env.FALCONJX_HOME}" />
<available file="${env.FLEXUNIT_HOME}"
type="dir"
property="FLEXUNIT_HOME" value="${env.FLEXUNIT_HOME}" />
<available file="${env.FLEX_HOME}"
type="dir"
property="FLEX_SDK_HOME" value="${env.FLEX_HOME}" />
<available file="${env.ANT_HOME}/lib/${apache.rat.jar}"
type="file"
property="apache.rat.found"/>
<available file="${env.ANT_HOME}/lib/${apache.rat.tasks.jar}"
type="file"
property="apache.rat.tasks.found"/>
<fail message="The release version is not set. Specify -Drelease.version=<release version (e.g. 3.1, 3.2, etc)>"
unless="release.version"/>
<condition property="package.url.path"
value="http://apacheflexbuild.cloudapp.net:8080/job/flex-asjs/lastSuccessfulBuild/artifact/out">
<not>
<isset property="rc" />
</not>
</condition>
<condition property="bin.package.url.path"
value="${package.url.path}">
<not>
<isset property="rc" />
</not>
</condition>
<condition property="doc.package.url.path"
value="${package.url.path}">
<not>
<isset property="rc" />
</not>
</condition>
<property name="package.url.path" value="https://dist.apache.org/repos/dist/dev/flex/flexjs/${release.version}/rc${rc}" />
<property name="package.url.name" value="apache-flex-flexjs-${release.version}-src" />
<property name="bin.package.url.path" value="${package.url.path}/binaries" />
<property name="bin.package.url.name" value="apache-flex-flexjs-${release.version}-bin" />
<property name="doc.package.url.path" value="${package.url.path}/doc" />
<property name="doc.package.url.name" value="apache-flex-flexjs-${release.version}-asdocs" />
<condition property="zip.package">
<equals arg1="zip" arg2="${package.suffix}" />
</condition>
<target name="display-text-mac" if="isMac">
<echo>========================= Begin ${file} ==============================</echo>
<exec executable="${mac.text.display}" >
<arg value="${file}" />
</exec>
<echo>========================= End ${file} ==============================</echo>
</target>
<target name="display-text-win" if="isWindows">
<pathconvert targetos="windows" property="winfile">
<path path="${file}" />
</pathconvert>
<echo>========================= Begin ${winfile} ==============================</echo>
<exec executable="cmd.exe" >
<arg value="/c" />
<arg value="${win.text.display}" />
<arg value="${winfile}" />
</exec>
<echo>========================= End ${winfile} ==============================</echo>
</target>
<target name="display-text-linux" if="isLinux">
<echo>========================= Begin ${file} ==============================</echo>
<exec executable="${linux.text.display}" >
<arg value="${file}" />
</exec>
<echo>========================= End ${file} ==============================</echo>
</target>
<target name="install-rat" depends="install-rat.jar,install-rat.tasks.jar" />
<target name="install-rat.jar" unless="apache.rat.found">
<get src="${apache.rat.url}/${apache.rat.jar}" dest="${env.ANT_HOME}/lib/${apache.rat.jar}" />
</target>
<target name="install-rat.tasks.jar" unless="apache.rat.tasks.found">
<get src="${apache.rat.tasks.url}/${apache.rat.tasks.jar}" dest="${env.ANT_HOME}/lib/${apache.rat.tasks.jar}" />
</target>
<target name="rat-taskdef" description="Rat taskdef">
<typedef resource="org/apache/rat/anttasks/antlib.xml"
uri="antlib:org.apache.rat.anttasks"
classpathref="anttask.classpath"/>
</target>
<target name="main" depends="install-rat,download,check-sigs,uncompress,rat-check,binary-rat,doc-rat,check-notices,build,approve" description="Perform required release approval steps">
</target>
<target name="main-no-download" depends="install-rat,check-sigs,uncompress,rat-check,binary-rat,doc-rat,check-notices,build,approve" description="Perform required release approval steps">
</target>
<target name="test" >
<echo>${rat.report}.bin.txt</echo>
<replaceregexp file="${rat.report}.bin.txt" match="..AL.*" replace="" byline="true"/>
</target>
<target name="display-text" >
<antcall target="display-text-mac" />
<antcall target="display-text-win" />
<antcall target="display-text-linux" />
</target>
<target name="display-text-test" >
<antcall target="display-text" >
<param name="file" value="${basedir}/rat-report.txt" />
</antcall>
</target>
<target name="download" description="download the release package">
<get src="${package.url.path}/${package.url.name}.${package.suffix}"
dest="${basedir}/${package.url.name}.${package.suffix}" />
<get src="${package.url.path}/${package.url.name}.${package.suffix}.md5"
dest="${basedir}/${package.url.name}.${package.suffix}.md5" />
<get src="${bin.package.url.path}/${bin.package.url.name}.${package.suffix}"
dest="${basedir}/${bin.package.url.name}.${package.suffix}" />
<get src="${bin.package.url.path}/${bin.package.url.name}.${package.suffix}.md5"
dest="${basedir}/${bin.package.url.name}.${package.suffix}.md5" />
<get src="${doc.package.url.path}/${doc.package.url.name}.zip"
dest="${basedir}/${doc.package.url.name}.zip" />
<get src="${doc.package.url.path}/${doc.package.url.name}.zip.md5"
dest="${basedir}/${doc.package.url.name}.zip.md5" />
<antcall target="get_asc" />
</target>
<target name="get_asc" if="rc" >
<get src="${package.url.path}/${package.url.name}.${package.suffix}.asc"
dest="${basedir}/${package.url.name}.${package.suffix}.asc" />
<get src="${bin.package.url.path}/${bin.package.url.name}.${package.suffix}.asc"
dest="${basedir}/${bin.package.url.name}.${package.suffix}.asc" />
<get src="${doc.package.url.path}/${doc.package.url.name}.zip.asc"
dest="${basedir}/${doc.package.url.name}.zip.asc" />
</target>
<target name="check-sigs" description="check md5 and gpg sigs">
<replace file="${basedir}/${package.url.name}.${package.suffix}.md5"
token=" " />
<checksum file="${basedir}/${package.url.name}.${package.suffix}" algorithm="md5" verifyproperty="md5.ok" />
<condition property="MD5Invalid">
<not>
<equals arg1="${md5.ok}" arg2="true" />
</not>
</condition>
<fail message="MD5 checksum did not match" if="MD5Invalid" />
<replace file="${basedir}/${bin.package.url.name}.${package.suffix}.md5"
token=" " />
<checksum file="${basedir}/${bin.package.url.name}.${package.suffix}" algorithm="md5" verifyproperty="bin.md5.ok" />
<condition property="BinaryMD5Invalid">
<not>
<equals arg1="${bin.md5.ok}" arg2="true" />
</not>
</condition>
<fail message="Binary Package MD5 checksum did not match" if="BinaryMD5Invalid" />
<replace file="${basedir}/${doc.package.url.name}.zip.md5"
token=" " />
<checksum file="${basedir}/${doc.package.url.name}.zip" algorithm="md5" verifyproperty="doc.md5.ok" />
<condition property="DocMD5Invalid">
<not>
<equals arg1="${doc.md5.ok}" arg2="true" />
</not>
</condition>
<fail message="Doc Package MD5 checksum did not match" if="DocMD5Invalid" />
<antcall target="gpg_check" />
</target>
<target name="gpg_check" if="rc">
<exec executable="gpg" failonerror="true">
<arg value="--verify" />
<arg value="${basedir}/${package.url.name}.${package.suffix}.asc" />
<arg value="${basedir}/${package.url.name}.${package.suffix}" />
</exec>
<exec executable="gpg" failonerror="true">
<arg value="--verify" />
<arg value="${basedir}/${bin.package.url.name}.${package.suffix}.asc" />
<arg value="${basedir}/${bin.package.url.name}.${package.suffix}" />
</exec>
<exec executable="gpg" failonerror="true">
<arg value="--verify" />
<arg value="${basedir}/${doc.package.url.name}.zip.asc" />
<arg value="${basedir}/${doc.package.url.name}.zip" />
</exec>
</target>
<target name="uncompress" depends="pre-clean, untar-file, unzip-file" />
<target name="pre-clean" description="remove old uncompressed package" >
<delete dir="${basedir}/${package.url.name}" failonerror="false" />
<delete dir="${basedir}/${bin.package.url.name}" failonerror="false" />
<delete dir="${basedir}/${doc.package.url.name}" failonerror="false" />
</target>
<target name="untar-file" unless="zip.package" description="Untars zipFile">
<untar src="${basedir}/${package.url.name}.${package.suffix}"
dest="${basedir}" compression="gzip"/>
<untar src="${basedir}/${bin.package.url.name}.${package.suffix}"
dest="${basedir}" compression="gzip"/>
<unzip src="${basedir}/${doc.package.url.name}.zip"
dest="${basedir}/${doc.package.url.name}"/>
</target>
<target name="unzip-file" if="zip.package" description="Unzips zipFile">
<unzip src="${basedir}/${package.url.name}.${package.suffix}"
dest="${basedir}/${package.url.name}"/>
<unzip src="${basedir}/${bin.package.url.name}.${package.suffix}"
dest="${basedir}/${bin.package.url.name}"/>
<unzip src="${basedir}/${doc.package.url.name}.${package.suffix}"
dest="${basedir}/${doc.package.url.name}"/>
</target>
<target name="rat-check" >
<echo message="Checking files at ${basedir}/${package.url.name}, report is ${src.rat.report}"/>
<rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
reportFile="${src.rat.report}">
<fileset dir="${basedir}/${package.url.name}">
<!-- exclude media (png, gif, jpg, mp3, flv) -->
<exclude name="**/*.png"/>
<exclude name="**/*.gif"/>
<exclude name="**/*.jpg"/>
<exclude name="**/*.mp3"/>
<exclude name="**/*.flv"/>
<!-- JSON doesn't really have a comment format -->
<exclude name="**/*.json"/>
<!-- JSHint properties file -->
<exclude name="frameworks/js/jshint.properties"/>
<exclude name="frameworks/js/.jshintrc"/>
<!-- fragments -->
<exclude name="LICENSE.bin"/>
<exclude name="LICENSE.base"/>
<exclude name="**/META-INF/DEPENDENCIES" />
</fileset>
</rat:report>
<antcall target="display-text" >
<param name="file" value="${src.rat.report}" />
</antcall>
<input
message="Check that there are no unknown or unapproved licenses or archives. Is it ok?"
validargs="y,n"
defaultvalue="y"
addproperty="rat.license.ok"/>
<echo>filtering out AL files to make it easier to see binary files</echo>
<copy file="${src.rat.report}" tofile="${src.rat.report}.bin.txt" />
<replaceregexp file="${src.rat.report}.bin.txt" match="..AL.*" replace="__AL" byline="true"/>
<replaceregexp file="${src.rat.report}.bin.txt" flags="gs" match="__AL." replace="" byline="false"/>
<antcall target="display-text" >
<param name="file" value="${src.rat.report}.bin.txt" />
</antcall>
<input
message="Check that there are no unexpected binaries. Is it ok?"
validargs="y,n"
defaultvalue="n"
addproperty="rat.binaries.ok"/>
</target>
<target name="binary-rat" >
<echo message="Checking files at ${basedir}/${bin.package.url.name}, report is ${bin.rat.report}"/>
<rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
reportFile="${bin.rat.report}">
<fileset dir="${basedir}/${bin.package.url.name}">
<!-- exclude media (png, gif, jpg, mp3, flv) -->
<exclude name="**/*.png"/>
<exclude name="**/*.gif"/>
<exclude name="**/*.jpg"/>
<exclude name="**/*.mp3"/>
<exclude name="**/*.flv"/>
<!-- JSON doesn't really have a comment format -->
<exclude name="**/*.json"/>
<!-- JSHint properties file -->
<exclude name="frameworks/js/jshint.properties"/>
<exclude name="frameworks/js/.jshintrc"/>
<!-- fragments -->
<exclude name="LICENSE.bin"/>
<exclude name="LICENSE.base"/>
<exclude name="**/META-INF/DEPENDENCIES" />
<!-- Google Closure Library -->
<exclude name="js/lib/google/**"/>
<!-- compiled output -->
<exclude name="frameworks/projects/*/target/**"/>
<!-- swcs -->
<exclude name="frameworks/libs/Binding.swc"/>
<exclude name="frameworks/libs/Charts.swc"/>
<exclude name="frameworks/libs/Collections.swc"/>
<exclude name="frameworks/libs/Core.swc"/>
<exclude name="frameworks/libs/CreateJS.swc"/>
<exclude name="frameworks/libs/DragDrop.swc"/>
<exclude name="frameworks/libs/Effects.swc"/>
<exclude name="frameworks/libs/Flat.swc"/>
<exclude name="frameworks/libs/Formatters.swc"/>
<exclude name="frameworks/libs/GoogleMaps.swc"/>
<exclude name="frameworks/libs/Graphics.swc"/>
<exclude name="frameworks/libs/HTML.swc"/>
<exclude name="frameworks/libs/HTML5.swc"/>
<exclude name="frameworks/libs/JQuery.swc"/>
<exclude name="frameworks/libs/Mobile.swc"/>
<exclude name="frameworks/libs/Network.swc"/>
<exclude name="frameworks/libs/Reflection.swc"/>
<exclude name="frameworks/libs/Storage.swc"/>
<exclude name="frameworks/libs/XML.swc"/>
<exclude name="frameworks/externs/Binding.swc"/>
<exclude name="frameworks/externs/Charts.swc"/>
<exclude name="frameworks/externs/Collections.swc"/>
<exclude name="frameworks/externs/Core.swc"/>
<exclude name="frameworks/externs/CreateJS.swc"/>
<exclude name="frameworks/externs/DragDrop.swc"/>
<exclude name="frameworks/externs/Effects.swc"/>
<exclude name="frameworks/externs/Flat.swc"/>
<exclude name="frameworks/externs/Formatters.swc"/>
<exclude name="frameworks/externs/GoogleMaps.swc"/>
<exclude name="frameworks/externs/Graphics.swc"/>
<exclude name="frameworks/externs/HTML.swc"/>
<exclude name="frameworks/externs/HTML5.swc"/>
<exclude name="frameworks/externs/JQuery.swc"/>
<exclude name="frameworks/externs/Mobile.swc"/>
<exclude name="frameworks/externs/Network.swc"/>
<exclude name="frameworks/externs/Reflection.swc"/>
<exclude name="frameworks/externs/Storage.swc"/>
<exclude name="frameworks/externs/XML.swc"/>
</fileset>
</rat:report>
<antcall target="display-text" >
<param name="file" value="${bin.rat.report}" />
</antcall>
<input
message="Check that there are no unknown or unapproved licenses or archives. Is it ok?"
validargs="y,n"
defaultvalue="y"
addproperty="rat.bin.license.ok"/>
<echo>filtering out AL files to make it easier to see binary files</echo>
<copy file="${bin.rat.report}" tofile="${bin.rat.report}.bin.txt" />
<replaceregexp file="${bin.rat.report}.bin.txt" match="..AL.*" replace="__AL" byline="true"/>
<replaceregexp file="${bin.rat.report}.bin.txt" flags="gs" match="__AL." replace="" byline="false"/>
<antcall target="display-text" >
<param name="file" value="${bin.rat.report}.bin.txt" />
</antcall>
<input
message="Check that there are no unexpected binaries. Is it ok?"
validargs="y,n"
defaultvalue="n"
addproperty="rat.bin.binaries.ok"/>
</target>
<target name="doc-rat" >
<echo message="Checking files at ${basedir}/${doc.package.url.name}, report is ${doc.rat.report}"/>
<rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
reportFile="${doc.rat.report}">
<fileset dir="${basedir}/${doc.package.url.name}">
<!-- exclude generated html -->
<exclude name="asdoc/index.html"/>
<exclude name="asdoc/index-*.html"/>
<exclude name="asdoc/google/maps/**/*.html"/>
<exclude name="asdoc/org/**/*.html"/>
<exclude name="asdoc/package*.html"/>
<exclude name="asdoc/all-classes.html"/>
<exclude name="asdoc/all-index*.html"/>
<exclude name="asdoc/class-*.html"/>
<exclude name="asdoc/title-bar.html"/>
<exclude name="asdoc/Namespace.html"/>
<exclude name="asdoc/QName.html"/>
<!-- exclude log -->
<exclude name="asdoc/validation_errors.log"/>
</fileset>
</rat:report>
<antcall target="display-text" >
<param name="file" value="${doc.rat.report}" />
</antcall>
<input
message="Check that there are no unknown or unapproved licenses or archives. Is it ok?"
validargs="y,n"
defaultvalue="y"
addproperty="rat.doc.license.ok"/>
<echo>filtering out AL files to make it easier to see binary files</echo>
<copy file="${doc.rat.report}" tofile="${doc.rat.report}.bin.txt" />
<replaceregexp file="${doc.rat.report}.bin.txt" match="..AL.*" replace="__AL" byline="true"/>
<replaceregexp file="${doc.rat.report}.bin.txt" flags="gs" match="__AL." replace="" byline="false"/>
<antcall target="display-text" >
<param name="file" value="${doc.rat.report}.bin.txt" />
</antcall>
<input
message="Check that there are no unexpected binaries. Is it ok?"
validargs="y,n"
defaultvalue="n"
addproperty="rat.doc.binaries.ok"/>
</target>
<target name="check-notices" description="open each notice file for review, grep for a few things" >
<fail message="README not in package">
<condition>
<not>
<available file="${basedir}/${package.url.name}/README" />
</not>
</condition>
</fail>
<fail message="RELEASE_NOTES not in package">
<condition>
<not>
<available file="${basedir}/${package.url.name}/RELEASE_NOTES" />
</not>
</condition>
</fail>
<fail message="NOTICE not in package">
<condition>
<not>
<available file="${basedir}/${package.url.name}/NOTICE" />
</not>
</condition>
</fail>
<fail message="LICENSE not in package">
<condition>
<not>
<available file="${basedir}/${package.url.name}/LICENSE" />
</not>
</condition>
</fail>
<antcall target="display-text" >
<param name="file" value="${basedir}/${package.url.name}/README" />
</antcall>
<input
message="Check the README for version numbers, spelling, grammar, accuracy. Is it ok?"
validargs="y,n"
defaultvalue="y"
addproperty="readme.ok"/>
<antcall target="display-text" >
<param name="file" value="${basedir}/${package.url.name}/RELEASE_NOTES" />
</antcall>
<input
message="Check the RELEASE_NOTES for copyright years, spelling, grammar, accuracy. Is it ok?"
validargs="y,n"
defaultvalue="y"
addproperty="releasenotes.ok"/>
<antcall target="display-text" >
<param name="file" value="${basedir}/${package.url.name}/NOTICE" />
</antcall>
<input
message="Check the NOTICE for required notices from third-parties. Is it ok?"
validargs="y,n"
defaultvalue="y"
addproperty="notice.ok"/>
<antcall target="display-text" >
<param name="file" value="${basedir}/${package.url.name}/LICENSE" />
</antcall>
<input
message="Check the LICENSE for the Apache License and third-party licenses. Is it ok?"
validargs="y,n"
defaultvalue="y"
addproperty="license.ok"/>
<antcall target="display-text" >
<param name="file" value="${basedir}/${bin.package.url.name}/NOTICE" />
</antcall>
<input
message="Check the binary package NOTICE for required notices from third-parties. Is it ok?"
validargs="y,n"
defaultvalue="y"
addproperty="bin.notice.ok"/>
<antcall target="display-text" >
<param name="file" value="${basedir}/${bin.package.url.name}/LICENSE" />
</antcall>
<input
message="Check the binary package LICENSE for the Apache License and third-party licenses. Is it ok?"
validargs="y,n"
defaultvalue="y"
addproperty="bin.license.ok"/>
<antcall target="display-text" >
<param name="file" value="${basedir}/${doc.package.url.name}/asdoc/NOTICE" />
</antcall>
<input
message="Check the doc package NOTICE for required notices from third-parties. Is it ok?"
validargs="y,n"
defaultvalue="y"
addproperty="doc.notice.ok"/>
<antcall target="display-text" >
<param name="file" value="${basedir}/${doc.package.url.name}/asdoc/LICENSE" />
</antcall>
<input
message="Check the doc package LICENSE for the Apache License and third-party licenses. Is it ok?"
validargs="y,n"
defaultvalue="y"
addproperty="doc.license.ok"/>
</target>
<target name="ask.build">
<input
message="The final step is to run the build and any tests the build script runs. This can take several minutes. You will be asked to accept the Adobe license for the font jars. Press y to start the build."
validargs="y"
defaultvalue="y" />
</target>
<target name="build" depends="ask.build,ask-font,get.dependencies,copy.downloads">
<property name="no.lint" value="true" />
<ant dir="${basedir}/${package.url.name}" target="main" />
<ant dir="${basedir}/${package.url.name}" target="examples" />
</target>
<target name="copy.downloads" if="${do.copy.downloads}" description="instead of actually downloading all of the dependencies, you can save lots of time by just copying from some other folder in some other SDK.">
<echo>Copying downloads</echo>
<copy todir="${basedir}/${package.url.name}/in" >
<fileset dir="${download.cache.dir}" />
</copy>
</target>
<!-- Prompt before downloading. -->
<target name="ask-font" unless="font.donot.ask"
description="Prompt the user before downloading BlaseDS">
<property name="font.prompt.text"
value="Apache Flex can optionally integrate with Adobe's embedded font support.
${line.separator}This feature requires a few font jars from the Adobe Flex SDK.
${line.separator}The Adobe SDK license agreement for Adobe Flex 4.6 applies to these jars.
${line.separator}This license is not compatible with the Apache v2 license.
${adobe.flex.license}
${line.separator}Do you want to install these jars from the Adobe Flex SDK?"/>
<input
message="${font.prompt.text}"
validargs="y,n"
defaultvalue="n"
addproperty="input.font.download"/>
<condition property="do.font.install">
<equals arg1="y" arg2="${input.font.download}"/>
</condition>
<!-- Only ask once per ant run. -->
<property name="font.donot.ask" value="set"/>
</target>
<target name="get.dependencies" depends="set.falcon.flags,get.falcon.if.needed,get.sdk.if.needed,get.flexunit.if.needed" />
<target name="set.falcon.flags" >
<condition property="falcon.nightly">
<and>
<not>
<isset property="FALCON_HOME" />
</not>
<not>
<isset property="rc" />
</not>
</and>
</condition>
<condition property="falcon.rc">
<and>
<not>
<isset property="FALCON_HOME" />
</not>
<isset property="rc" />
</and>
</condition>
</target>
<target name="get.falcon.if.needed" depends="get.falcon.nightly,get.falcon.rc" unless="FALCON_HOME" />
<target name="get.falcon.nightly" if="falcon.nightly">
<property name="kit.jx.prefix" value="apache-flex-falconjx-${release.version}"/>
<property name="binary.jx.kit" value="${kit.jx.prefix}-bin"/>
<get src="http://apacheflexbuild.cloudapp.net:8080/job/flex-falcon/lastSuccessfulBuild/artifact/out/${binary.jx.kit}.zip"
dest="${basedir}/${binary.jx.kit}.zip" verbose="true" skipexisting="true"/>
<get src="http://apacheflexbuild.cloudapp.net:8080/job/flex-falcon/lastSuccessfulBuild/artifact/out/${binary.jx.kit}.zip.md5"
dest="${basedir}/${binary.jx.kit}.zip.md5" verbose="true" skipexisting="true"/>
<checksum file="${basedir}/${binary.jx.kit}.zip" algorithm="md5" verifyproperty="falcon.md5.ok" />
<condition property="FalconMD5Invalid">
<not>
<equals arg1="${falcon.md5.ok}" arg2="true" />
</not>
</condition>
<fail message="MD5 checksum did not match" if="FalconMD5Invalid" />
<unzip src="${basedir}/${binary.jx.kit}.zip" dest="${basedir}/falconjx" />
<ant dir="${basedir}/falconjx/compiler/src/main/resources" antfile="downloads.xml" />
<property name="FALCON_HOME" value="${basedir}/falconjx/compiler" />
<property name="FALCONJX_HOME" value="${basedir}/falconjx/js" />
<ant dir="${basedir}/falconjx/compiler-jx" antfile="${basedir}/falconjx/compiler-jx/src/main/resources/downloads.xml"/>
</target>
<target name="get.falcon.rc" if="falcon.rc">
<property name="kit.jx.prefix" value="apache-flex-falconjx-${release.version}"/>
<property name="binary.jx.kit" value="${kit.jx.prefix}-bin"/>
<get src="https://dist.apache.org/repos/dist/dev/flex/falcon/${release.version}/rc1/binaries/${binary.jx.kit}.zip"
dest="${basedir}/${binary.jx.kit}.zip" verbose="true" skipexisting="true"/>
<get src="https://dist.apache.org/repos/dist/dev/flex/falcon/${release.version}/rc1/binaries/${binary.jx.kit}.zip.md5"
dest="${basedir}/${binary.jx.kit}.zip.md5" verbose="true" skipexisting="true"/>
<checksum file="${basedir}/${binary.jx.kit}.zip" algorithm="md5" verifyproperty="falcon.md5.ok" />
<condition property="FalconMD5Invalid">
<not>
<equals arg1="${falcon.md5.ok}" arg2="true" />
</not>
</condition>
<fail message="MD5 checksum did not match" if="FalconMD5Invalid" />
<unzip src="${basedir}/${binary.jx.kit}.zip" dest="${basedir}/falconjx" />
<ant dir="${basedir}/falconjx/compiler/src/main/resources" antfile="downloads.xml" />
<property name="FALCON_HOME" value="${basedir}/falconjx/compiler" />
<property name="FALCONJX_HOME" value="${basedir}/falconjx/js" />
<ant dir="${basedir}/falconjx/compiler-jx" antfile="${basedir}/falconjx/compiler-jx/src/main/resources/downloads.xml"/>
</target>
<target name="get.flexunit.if.needed" unless="FLEXUNIT_HOME" >
<property name="binary.flexunit.kit" value="apache-flex-flexunit-4.2.0-4.12.0-bin"/>
<get src="https://archive.apache.org/dist/flex/flexunit/4.2.0/binaries/${binary.flexunit.kit}.zip"
dest="${basedir}/${binary.flexunit.kit}.zip" verbose="true" skipexisting="true"/>
<get src="https://archive.apache.org/dist/flex/flexunit/4.2.0/binaries/${binary.flexunit.kit}.zip.md5"
dest="${basedir}/${binary.flexunit.kit}.zip.md5" verbose="true" skipexisting="true"/>
<checksum file="${basedir}/${binary.flexunit.kit}.zip" algorithm="md5" verifyproperty="flexunit.md5.ok" />
<condition property="FlexUnitMD5Invalid">
<not>
<equals arg1="${flexunit.md5.ok}" arg2="true" />
</not>
</condition>
<fail message="MD5 checksum did not match" if="FlexUnitMD5Invalid" />
<unzip src="${basedir}/${binary.flexunit.kit}.zip" dest="${basedir}/flexunit" />
<property name="FLEXUNIT_HOME" value="${basedir}/flexunit" />
</target>
<target name="get.sdk.if.needed" depends="get.sdk" unless="FLEX_SDK_HOME" />
<target name="get.sdk">
<property name="kit.sdk.prefix" value="apache-flex-sdk-4.14.1"/>
<property name="binary.sdk.kit" value="${kit.sdk.prefix}-bin"/>
<get src="https://archive.apache.org/dist/flex/4.14.1/binaries/${binary.sdk.kit}.zip"
dest="${basedir}/${binary.sdk.kit}.zip" verbose="true" skipexisting="true"/>
<get src="https://archive.apache.org/dist/flex/4.14.1/binaries/${binary.sdk.kit}.zip.md5"
dest="${basedir}/${binary.sdk.kit}.zip.md5" verbose="true" skipexisting="true"/>
<checksum file="${basedir}/${binary.sdk.kit}.zip" algorithm="md5" verifyproperty="sdk.md5.ok" />
<condition property="SDKMD5Invalid">
<not>
<equals arg1="${sdk.md5.ok}" arg2="true" />
</not>
</condition>
<fail message="MD5 checksum did not match" if="SDKMD5Invalid" />
<unzip src="${basedir}/${binary.sdk.kit}.zip" dest="${basedir}/sdk" />
<ant dir="${basedir}/sdk/frameworks" antfile="downloads.xml" />
<property name="FLEX_SDK_HOME" value="${basedir}/sdk" />
</target>
<target name="approve" >
<condition property="vote" value="+1">
<and>
<equals arg1="${rat.license.ok}" arg2="y" />
<equals arg1="${rat.binaries.ok}" arg2="y" />
<equals arg1="${rat.bin.license.ok}" arg2="y" />
<equals arg1="${rat.bin.binaries.ok}" arg2="y" />
<equals arg1="${rat.doc.license.ok}" arg2="y" />
<equals arg1="${rat.doc.binaries.ok}" arg2="y" />
<equals arg1="${readme.ok}" arg2="y" />
<equals arg1="${releasenotes.ok}" arg2="y" />
<equals arg1="${notice.ok}" arg2="y" />
<equals arg1="${license.ok}" arg2="y" />
<equals arg1="${bin.notice.ok}" arg2="y" />
<equals arg1="${bin.license.ok}" arg2="y" />
<equals arg1="${doc.notice.ok}" arg2="y" />
<equals arg1="${doc.license.ok}" arg2="y" />
</and>
</condition>
<property name="vote" value="-1" />
<echo>
${vote}
Package ${package.url.path}/${package.url.name}.${package.suffix}
Java ${ant.java.version}
OS: ${os.name} ${os.arch} ${os.version}
Source kit signatures match: y
Source kit builds: y
README is ok: ${readme.ok}
RELEASE_NOTES is ok: ${releasenotes.ok}
NOTICE is ok: ${notice.ok}
LICENSE is ok: ${license.ok}
No unapproved licenses or archives: ${rat.license.ok}
No unapproved binaries: ${rat.binaries.ok}
Package ${bin.package.url.path}/${bin.package.url.name}.${package.suffix}
Binary kit signatures match: y
NOTICE is ok: ${bin.notice.ok}
LICENSE is ok: ${bin.license.ok}
No unapproved licenses or archives in binary package: ${rat.bin.license.ok}
No unapproved binaries in binary package: ${rat.bin.binaries.ok}
Package ${doc.package.url.path}/${doc.package.url.name}.zip
Doc kit signatures match: y
NOTICE is ok: ${doc.notice.ok}
LICENSE is ok: ${doc.license.ok}
No unapproved licenses or archives in doc package: ${rat.doc.license.ok}
No unapproved binaries in doc package: ${rat.doc.binaries.ok}
</echo>
<fail>
<condition>
<equals arg1="-1" arg2="${vote}"/>
</condition>
</fail>
</target>
</project>