-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathbuild.xml
1410 lines (1351 loc) · 54.8 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
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
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<project name="MOVES" default="targets" basedir=".">
<condition property="java7">
<javaversion exactly="1.7"/>
</condition>
<condition property="java8">
<javaversion exactly="1.8"/>
</condition>
<condition property="java9">
<javaversion exactly="9"/>
</condition>
<condition property="java10">
<javaversion exactly="10"/>
</condition>
<condition property="java11">
<javaversion exactly="11"/>
</condition>
<condition property="java17">
<javaversion exactly="17"/>
</condition>
<condition property="atleastJava9">
<javaversion atleast="9"/>
</condition>
<condition property="atleastJava11">
<javaversion atleast="11"/>
</condition>
<target name="targets">
<echo message=""/>
<echo message="ant build file for MOVES"/>
<echo message=""/>
<echo message="Available targets:"/>
<echo message="-------------------------------------------------------------------------------"/>
<echo message="clean - delete previously built .class files"/>
<echo message="compile - compile changed Java classes"/>
<echo message="compileall - compile all Java classes"/>
<echo message="go - compile all Go code for all configurations (64-bit, 32-bit, Linux)"/>
<echo message="go32 - compile all Go code for 32-bit architecture"/>
<echo message="go32local - compile all Go code using the Go compiler at ${user.dir}\go32. " />
<echo message=" Expect errors if you do not have a Go compiler installed here." />
<echo message="go64 - compile all Go code for 64-bit architecture"/>
<echo message="compilejavago - compile all Java classes and Go (64-bit) code"/>
<echo message="-------------------------------------------------------------------------------"/>
<echo message="docs - generate Java docs"/>
<echo message="algorithms - generate algorithm HTML file (DEPRECATED)" />
<echo message="-------------------------------------------------------------------------------"/>
<echo message="all - compile java and go, generate docs, and run alltests (DEPRECATED)"/>
<echo message="alltests - all tests (DEPRECATED)"/>
<echo message="cleantests - delete all previously built test results (DEPRECATED)"/>
<echo message="guitests - all GUI unit tests in testdata/abbot/production (DEPRECATED)"/>
<echo message="inprogressguitests - all GUI unit tests in testdata/abbot/inprogress (DEPRECATED)"/>
<echo message="508tests - run Section 508 tests (DEPRECATED)" />
<echo message="costello - run the Costello tool for building GUI test scripts (DEPRECATED)" />
<echo message="recenttests - recent tests, as set by development (DEPRECATED)"/>
<echo message="testcleanup - delete intermediate files generated during tests (DEPRECATED)"/>
<echo message="slowqueries - analyze MySQL slow queries (DEPRECATED)" />
<echo message="errormessages- generate error message RTF file (DEPRECATED)" />
<echo message="-------------------------------------------------------------------------------"/>
<echo message="startmysql - start a local copy of MySQL (DEPRECATED)" />
<echo message="stopmysql - stop the local copy of MySQL (DEPRECATED)" />
<echo message="-------------------------------------------------------------------------------"/>
<echo message="rungui - display the main MOVES user interface"/>
<echo message="runworker - display the MOVES Worker user interface"/>
<echo message="crungui - compile and run the main MOVES user interface"/>
<echo message="crunworker - compile and run the MOVES Worker user interface"/>
<echo message="-------------------------------------------------------------------------------"/>
<echo message="1worker - start 1 local worker using the manyworkers.txt configuration " />
<echo message=" file. If running on the same computer as main MOVES, this" />
<echo message=" should be run in a separate command window. The worker will" />
<echo message=" shutdown after there have been no TODO or InProgress files " />
<echo message=" present for 2 minutes. Before using, edit manyworkers.txt to use" />
<echo message=" your system's sharedDistributedFolderPath. " />
<echo message=" Use -Dnoshutdown=1 to prevent the worker from shutting down when" />
<echo message=" work is no longer available. This can be useful for runs where" />
<echo message=" MOVES takes more than 2 minutes to produce TODO files. In this" />
<echo message=" case, when the worker processes are no longer needed, they can" />
<echo message=" be manually shut down by pressing Ctrl+C at the prompt." />
<echo message=" ant 1worker -Dnoshutdown=1" />
<echo message="2workers - like 1worker but with 2 concurrent workers" />
<echo message=" ant 2workers -Dnoshutdown=1" />
<echo message="3workers - like 1worker but with 3 concurrent workers" />
<echo message=" ant 3workers -Dnoshutdown=1" />
<echo message="manyworkers - like 1worker but with a user defined number of workers." />
<echo message=" Use -Dmaxworkers=N to be set where N is the desired number of" />
<echo message=" workers to be started. Note: Using more than 3 workers is" />
<echo message=" unlikely to measurably improve performance." />
<echo message=" ant manyworkers -Dmaxworkers=N" />
<echo message="-------------------------------------------------------------------------------"/>
<echo message="maketodo - start MOVES to only generate TODO files without picking up DONE" />
<echo message=" files or deleting TODO, DONE, or InProgress files upon exiting. " />
<echo message=" Use -Drunspec= to name the one runspec that will be used. Before" />
<echo message=" using, edit maketodo.txt to use your system's " />
<echo message=" sharedDistributedFolderPath." />
<echo message=" ant maketodo -Drunspec=c:\myrunspecs\runspec1.mrs" />
<echo message="main1worker - start MOVES with a single worker and wait for its DONE files." />
<echo message=" Like maketodo, use -Drunspec= to specify the runspec. Before " />
<echo message=" using, edit both maketodo.txt and manyworkers.txt for your " />
<echo message=" system's masterFolderPath and workFolderPath settings, " />
<echo message=" respectively." />
<echo message=" ant main1worker -Drunspec=c:\myrunspecs\runspec1.mrs" />
<echo message="pickup - start MOVES to only pickup DONE files. Use -Dpdspec= to name the" />
<echo message=" PDSpec XML file that will be used. Before using, edit " />
<echo message=" maketodo.txt to use your system's sharedDistributedFolderPath." />
<echo message=" ant pickup -Dpdspec=c:\myinfo\filestoget.xml" />
<echo message="makejre - creates a Java Runtime Environment in .\jre that only contains" />
<echo message=" the Java components used by MOVES." />
<echo message="-------------------------------------------------------------------------------"/>
<echo message="makeamazon - create amazon/movesamazon.jar utilities" />
<echo message="jarcode - create a jar of the code for use with Amazon. Use -Dbuild= to " />
<echo message=" to specify the build date. The resulting file name will be" />
<echo message=" yyyymmdd_code.jar" />
<echo message=" ant jarcode -Dbuild=yyyymmdd" />
<echo message="-------------------------------------------------------------------------------"/>
<echo message="setlogin - store database user and password if the defaults have changed" />
<echo message=" ant setlogin -Duser=moves -Dpassword=secret" />
<echo message="-------------------------------------------------------------------------------"/>
<echo message="convert3_db_to_5 - convert a MOVES3 database for use with MOVES5. Specify" />
<echo message=" the name of the starting database with -Dinput= and name the" />
<echo message=" resulting database with -Doutput= argument. IMPORTANT: see" />
<echo message=" database\ConversionScripts\InputDatabaseConverstionHelp.pdf" />
<echo message=" ant convert3_db_to_5 -Dinput=m3_in -Doutput=m5_in" />
<echo message="-------------------------------------------------------------------------------"/>
<echo message="convert4_db_to_5 - convert a MOVES4 database for use with MOVES5. Specify" />
<echo message=" the name of the starting database with -Dinput= and name the" />
<echo message=" resulting database with -Doutput= argument. IMPORTANT: see" />
<echo message=" database\ConversionScripts\InputDatabaseConverstionHelp.pdf" />
<echo message=" ant convert4_db_to_5 -Dinput=m4_in -Doutput=m5_in" />
<echo message="-------------------------------------------------------------------------------"/>
<echo message="dbimporter - run the MOVES Data Importers. IMPORTANT: Generate XML " />
<echo message=" file from the Tools tab of the County or Project Data " />
<echo message=" Manager, and then edit as needed."/>
<echo message=" ant dbimporter -Dimport=c:\mydbimporter.xml" />
<echo message="-------------------------------------------------------------------------------"/>
<echo message="onroadNEIQA - run the onroad NEI QA scripts against one or more input " />
<echo message=" databases. Use -Dinput= argument to provide the name of the" />
<echo message=" database. If providing more than one database, either comma" />
<echo message=" separate the names and quote the whole argument, or list the" />
<echo message=" database names one per line in a text file and supply the path" />
<echo message=" to this file in -Dinput. Use -Doutput= to specify the output" />
<echo message=" file path; file types can be .xls(x), .txt, or .csv. For help," />
<echo message=" see database\NEIQA\NEIQAInstructions.pdf" />
<echo message=" ant onroadNEIQA -Dinput="cXXXXXyYYYY_ZZZZZZZZ,cAAAAAyYYYY_ZZZZZZZZ" -Doutput=QA_Report.xlsx" />
<echo message=" ant onroadNEIQA -Dinput=db_list.txt -Doutput=QA_Report.xlsx" />
<echo message="nonroadNEIQA - run the nonroad NEI QA scripts. Usage has the same arguments" />
<echo message=" as the onroadNEIQA command. " />
<echo message="-------------------------------------------------------------------------------"/>
<echo message="oniTool - run the ONI Tool against one or more input databases. Use" />
<echo message=" -Dinput= argument to provide the name of the database. If" />
<echo message=" providing more than one database, either comma separate the" />
<echo message=" names and quote the whole argument, or list the database" />
<echo message=" names one per line in a text file and supply the path to this" />
<echo message=" file in -Dinput. When running the ONI Tool via the command" />
<echo message=" line, the output is saved to a table called "onitooloutput"" />
<echo message=" in each input database. For additional help, see" />
<echo message=" database\ONITool\InstructionsForONITool.pdf and " />
<echo message=" docs\ONIToolCommandLine.md" />
<echo message=" ant oniTool -Dinput="cXXXXXyYYYY_in,cZZZZZyYYYY_in"" />
<echo message=" ant oniTool -Dinput=db_list.txt" />
<echo message="-------------------------------------------------------------------------------"/>
<echo message="avftTool - run the AVFT Tool. Use -Dspec= argument to provide the path" />
<echo message=" to the tool specification file. If you need help creating" />
<echo message=" this file, make your intended tool selections in the AVFT Tool"/>
<echo message=" GUI, then use the "Save Settings" button to create a" />
<echo message=" specification file. For additional help, see" />
<echo message=" .\gov\epa\otaq\moves\master\gui\avfttool\AVFTToolHelp.pdf" />
<echo message=" ant avftTool -Dspec=c:\avfttool_spec.xml" />
<echo message=" ant avftTool -Dspec=c:\avfttool_spec.xml -DinputAVFTdb=cXXXXXavftinput -DoutputAVFTdb=cXXXXX_in" />
<echo message="-------------------------------------------------------------------------------"/>
<echo message="run - Execute a runspec. " />
<echo message=" Use -Drunspec= to name the one runspec that will be used." />
<echo message=" ant run -Drunspec=c:\myrunspecs\runspec1.mrs" />
</target>
<path id="classpath">
<pathelement location="." />
<pathelement location="libs/ant-contrib-1.0b3.jar" />
<pathelement location="libs/commons-io-2.11.0.jar" />
<pathelement location="libs/commons-lang-2.2.jar" />
<pathelement location="libs/dom.jar" />
<pathelement location="libs/jai_codec.jar" />
<pathelement location="libs/jai_core.jar" />
<pathelement location="libs/jakarta-regexp-1.3.jar" />
<pathelement location="libs/jaxp-api.jar" />
<pathelement location="libs/jlfgr-1_0.jar" />
<pathelement location="libs/junit-4.5.jar" />
<pathelement location="libs/mysql-connector-java-5.1.17-bin.jar" />
<pathelement location="libs/sax.jar" />
<pathelement location="libs/xercesImpl.jar" />
<pathelement location="libs/xml-apis.jar" />
<pathelement location="libs/abbot/abbot.jar" />
<pathelement location="libs/abbot/costello.jar" />
<pathelement location="libs/poi/commons-codec-1.5.jar" />
<pathelement location="libs/poi/commons-logging-1.1.jar" />
<pathelement location="libs/poi/dom4j-1.6.1.jar" />
<pathelement location="libs/poi/jsr173_1.0_api.jar" />
<pathelement location="libs/poi/ooxml-schemas-1.0.jar" />
<pathelement location="libs/poi/poi-3.9-20121203.jar" />
<pathelement location="libs/poi/poi-ooxml-3.9-20121203.jar" />
<pathelement location="libs/poi/stax-api-1.0.1.jar" />
<pathelement location="libs/poi/xmlbeans-2.3.0.jar" />
<pathelement location="amazon/libs/aws-java-sdk-1.1.4.jar" />
<pathelement location="amazon/libs/commons-codec-1.3.jar" />
<pathelement location="amazon/libs/commons-httpclient-3.0.1.jar" />
<pathelement location="amazon/libs/commons-logging-1.1.1.jar" />
<pathelement location="amazon/libs/jackson-core-asl-1.4.3.jar" />
<pathelement location="amazon/libs/mail-1.4.3.jar" />
<pathelement location="amazon/libs/stax-1.2.0.jar" />
<pathelement location="amazon/libs/stax-api-1.0.1.jar" />
</path>
<target name="init">
</target>
<target name="all" depends="compileall,go,docs,alltests">
</target>
<target name="clean" depends="init">
<delete>
<fileset dir="." includes="**/*.class"/>
</delete>
</target>
<target name="cleantests" depends="init">
<delete dir="./junitreports" quiet="true" />
</target>
<target name="compile" depends="init">
<javac srcdir="." includes="**/*.java" debug="on" deprecation="on" includeantruntime="no">
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<classpath refid="classpath" />
</javac>
</target>
<target name="compileall" depends="clean,compile">
</target>
<target name="compilejavago" depends="compileall,go64">
</target>
<target name="docs" depends="init">
<delete dir="./javadocs" quiet="true" />
<mkdir dir="./javadocs" />
<javadoc destdir="./javadocs" author="true" version="true" private="true" windowtitle="MOVES">
<doctitle><![CDATA[<br>MOVES</br>]]></doctitle>
<packageset dir="." defaultexcludes="yes">
<include name="gov/epa/otaq/gis/**" />
<include name="gov/epa/otaq/moves/**" />
</packageset>
</javadoc>
</target>
<target name="go64" depends="">
<!-- Build the 64-bit versions of the Go calculator and generators -->
<echo message="Building the 64-bit version of the Go calculator with the system-wide Go compiler."/>
<exec executable="go" spawn="false" dir="${user.dir}/calc/" output="gocalc64output.txt" failifexecutionfails="true">
<env key="GOARCH" value="amd64"/>
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
<arg value="-o" />
<arg value="externalcalculatorgo64.exe" />
<arg value="externalcalculatorgo.go" />
</exec>
<echo message="Building the 64-bit version of the Go generator with the system-wide Go compiler."/>
<exec executable="go" spawn="false" dir="${user.dir}/generators/" output="gogenerators64output.txt" failifexecutionfails="true">
<env key="GOARCH" value="amd64"/>
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
<arg value="-mod" />
<arg value="vendor" />
<arg value="-o" />
<arg value="externalgenerator64.exe" />
<arg value="externalgenerator.go" />
</exec>
</target>
<target name="go32" depends="">
<!-- Build the 32-bit versions of the Go calculator and generators -->
<echo message="Building the 32-bit version of the Go calculator with the system-wide Go compiler."/>
<exec executable="go" spawn="false" dir="${user.dir}/calc/" output="gocalc32output.txt" failifexecutionfails="true">
<env key="GOARCH" value="386"/>
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
<arg value="-o" />
<arg value="externalcalculatorgo32.exe" />
<arg value="externalcalculatorgo.go" />
</exec>
<echo message="Building the 32-bit version of the Go generator with the system-wide Go compiler."/>
<exec executable="go" spawn="false" dir="${user.dir}/generators/" output="gogenerators32output.txt" failifexecutionfails="true">
<env key="GOARCH" value="386"/>
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
<arg value="-mod" />
<arg value="vendor" />
<arg value="-o" />
<arg value="externalgenerator32.exe" />
<arg value="externalgenerator.go" />
</exec>
</target>
<target name="go32local" depends="">
<!-- Build the 32-bit versions of the Go calculator and generators using the local \go32 compiler -->
<echo message="Building the 32-bit version of the Go calculator with the local \go32 compiler. Expect errors if no \go32 directory exists."/>
<exec executable="${user.dir}\go32\bin\go" spawn="false" dir="${user.dir}/calc/" output="gocalc32localoutput.txt" failifexecutionfails="true">
<env key="Path" value="${user.dir}\go32\bin\;${env.Path}" />
<env key="GOARCH" value="386"/>
<env key="GOMAXPROCS" value="4"/>
<env key="GOROOT" value="${user.dir}\go32\" />
<arg value="build" />
<arg value="-o" />
<arg value="externalcalculatorgo32.exe" />
<arg value="externalcalculatorgo.go" />
</exec>
<echo message="Building the 32-bit version of the Go generators with the local \go32 compiler. Expect errors if no \go32 directory exists."/>
<exec executable="${user.dir}\go32\bin\go" spawn="false" dir="${user.dir}/generators/" output="gogenerator32localoutput.txt" failifexecutionfails="true">
<env key="Path" value="${user.dir}\go32\bin\;${env.Path}" />
<env key="GOARCH" value="386"/>
<env key="GOMAXPROCS" value="4"/>
<env key="GOROOT" value="${user.dir}\go32\" />
<arg value="build" />
<arg value="-mod" />
<arg value="vendor" />
<arg value="-o" />
<arg value="externalgeneratorgo32.exe" />
<arg value="externalgenerator.go" />
</exec>
</target>
<target name="go" depends="">
<!-- Build all Go executables (64-bit, 32-bit, and using the local \go32 compiler) -->
<echo message="Building the default 32/64 version of the Go calculator for Linux with the system-wide Go compiler."/>
<exec executable="go" spawn="false" dir="${user.dir}/calc/" output="gocalclinuxoutput.txt" failifexecutionfails="true">
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
<arg value="-o" />
<arg value="externalcalculatorgo" />
<arg value="externalcalculatorgo.go" />
</exec>
<echo message="Building the default 32/64 version of the Go calculator with the system-wide Go compiler."/>
<exec executable="go" spawn="false" dir="${user.dir}/calc/" output="gocalcdefaultoutput.txt" failifexecutionfails="true">
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
<arg value="-o" />
<arg value="externalcalculatorgo.exe" />
<arg value="externalcalculatorgo.go" />
</exec>
<echo message="Building the 64-bit version of the Go calculator with the system-wide Go compiler. Expect errors if on a 32-bit system."/>
<exec executable="go" spawn="false" dir="${user.dir}/calc/" output="gocalc64output.txt" failifexecutionfails="false">
<env key="GOARCH" value="amd64"/>
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
<arg value="-o" />
<arg value="externalcalculatorgo64.exe" />
<arg value="externalcalculatorgo.go" />
</exec>
<echo message="Building the 32-bit version of the Go calculator with the system-wide Go compiler."/>
<exec executable="go" spawn="false" dir="${user.dir}/calc/" output="gocalc32output.txt" failifexecutionfails="true">
<env key="GOARCH" value="386"/>
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
<arg value="-o" />
<arg value="externalcalculatorgo32.exe" />
<arg value="externalcalculatorgo.go" />
</exec>
<echo message="Building the 32-bit version of the Go calculator with the local \go32 compiler. Expect errors if no \go32 directory exists."/>
<exec executable="${user.dir}\go32\bin\go" spawn="false" dir="${user.dir}/calc/" output="gocalc32localoutput.txt" failifexecutionfails="false">
<env key="Path" value="${user.dir}\go32\bin\;${env.Path}" />
<env key="GOARCH" value="386"/>
<env key="GOMAXPROCS" value="4"/>
<env key="GOROOT" value="${user.dir}\go32\" />
<arg value="build" />
<arg value="-o" />
<arg value="externalcalculatorgo32.exe" />
<arg value="externalcalculatorgo.go" />
</exec>
<echo message="Building the default 32/64 version of the Go generators for Linux with the system-wide Go compiler."/>
<exec executable="go" spawn="false" dir="${user.dir}/generators/" output="gogeneratorslinuxoutput.txt" failifexecutionfails="true">
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
<arg value="-mod" />
<arg value="vendor" />
<arg value="-o" />
<arg value="externalgenerator" />
<arg value="externalgenerator.go" />
</exec>
<echo message="Building the default 32/64 version of the Go generators with the system-wide Go compiler."/>
<exec executable="go" spawn="false" dir="${user.dir}/generators/" output="gogeneratorsdefaultoutput.txt" failifexecutionfails="true">
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
<arg value="-mod" />
<arg value="vendor" />
<arg value="-o" />
<arg value="externalgenerator.exe" />
<arg value="externalgenerator.go" />
</exec>
<echo message="Building the 64-bit version of the Go generators with the system-wide Go compiler. Expect errors if on a 32-bit system."/>
<exec executable="go" spawn="false" dir="${user.dir}/generators/" output="gogenerators64output.txt" failifexecutionfails="false">
<env key="GOARCH" value="amd64"/>
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
<arg value="-mod" />
<arg value="vendor" />
<arg value="-o" />
<arg value="externalgenerator64.exe" />
<arg value="externalgenerator.go" />
</exec>
<echo message="Building the 32-bit version of the Go generators with the system-wide Go compiler."/>
<exec executable="go" spawn="false" dir="${user.dir}/generators/" output="gogenerators32output.txt" failifexecutionfails="true">
<env key="GOARCH" value="386"/>
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
<arg value="-mod" />
<arg value="vendor" />
<arg value="-o" />
<arg value="externalgenerator32.exe" />
<arg value="externalgenerator.go" />
</exec>
<echo message="Building the 32-bit version of the Go generators with the local \go32 compiler. Expect errors if no \go32 directory exists."/>
<exec executable="${user.dir}\go32\bin\go" spawn="false" dir="${user.dir}/generators/" output="gogenerator32localoutput.txt" failifexecutionfails="false">
<env key="Path" value="${user.dir}\go32\bin\;${env.Path}" />
<env key="GOARCH" value="386"/>
<env key="GOMAXPROCS" value="4"/>
<env key="GOROOT" value="${user.dir}\go32\" />
<arg value="build" />
<arg value="-mod" />
<arg value="vendor" />
<arg value="-o" />
<arg value="externalgeneratorgo32.exe" />
<arg value="externalgenerator.go" />
</exec>
</target>
<target name="crungui" depends="compile,go64">
<java classname="gov.epa.otaq.moves.master.gui.MOVESGUI" fork="yes" maxmemory="2048m">
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<classpath refid="classpath" />
</java>
</target>
<target name="crunworker" depends="compile,go64">
<java classname="gov.epa.otaq.moves.worker.gui.WorkerGUI" fork="yes" maxmemory="512m">
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<classpath refid="classpath" />
</java>
</target>
<target name="rungui" depends="">
<java classname="gov.epa.otaq.moves.master.gui.MOVESGUI" fork="yes" maxmemory="2048m">
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<classpath refid="classpath" />
</java>
</target>
<target name="runworker" depends="">
<java classname="gov.epa.otaq.moves.worker.gui.WorkerGUI" fork="yes" maxmemory="512m">
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<classpath refid="classpath" />
</java>
</target>
<target name="testcleanup">
<delete quiet="true" file="./testdata/junit_test_runspec.xml" />
<delete quiet="true" file="./Temp_BaseRateByAge_1_2030_21_101_0.txt" />
<delete quiet="true" file="./test0.txt" />
<delete quiet="true" file="./testdata/GeneratedDone.jar" />
<delete quiet="true" file="./testdata/gisBasics.jpg" />
<delete quiet="true" file="./testdata/gisMap1.jpg" />
<delete quiet="true" file="./testdata/gisStatesAndCounties.jpg" />
<delete quiet="true" file="./testdata/reread_junit_test_runspec.cso" />
<delete quiet="true" file="./testdata/graph/graph1.dot" />
<delete quiet="true" file="./testdata/graph/graph1linear.dot" />
</target>
<target name="alltests" depends="compile">
<mkdir dir="./junitreports" />
<mkdir dir="./junitreports/html" />
<junit fork="yes" printsummary="yes" haltonerror="no" haltonfailure="no">
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<classpath refid="classpath" />
<formatter type="xml" />
<batchtest fork="yes" todir="./junitreports">
<fileset dir="./">
<include name="**/gov/epa/otaq/**/*Test.java" />
</fileset>
</batchtest>
</junit>
<junitreport todir="./junitreports">
<fileset dir="./junitreports">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="./junitreports/html"/>
</junitreport>
<antcall target="testcleanup"></antcall>
</target>
<target name="fasttests" depends="compile">
<mkdir dir="./junitreports" />
<mkdir dir="./junitreports/html" />
<junit fork="yes" printsummary="yes" haltonerror="no" haltonfailure="no">
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<formatter type="xml" />
<batchtest fork="yes" todir="./junitreports">
<fileset dir="./">
<include name="**/gov/epa/otaq/moves/systemtests/fast/*Test.java" />
</fileset>
</batchtest>
</junit>
<junitreport todir="./junitreports">
<fileset dir="./junitreports">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="./junitreports/html"/>
</junitreport>
<antcall target="testcleanup"></antcall>
</target>
<target name="508tests" depends="compile">
<mkdir dir="./junitreports" />
<mkdir dir="./junitreports/html" />
<junit fork="yes" printsummary="yes" haltonerror="no" haltonfailure="no">
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<formatter type="xml" />
<batchtest fork="yes" todir="./junitreports">
<fileset dir="./">
<include name="**/gov/epa/otaq/moves/systemtests/test508/*.java" />
</fileset>
</batchtest>
</junit>
<junitreport todir="./junitreports">
<fileset dir="./junitreports">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="./junitreports/html"/>
</junitreport>
<antcall target="testcleanup"></antcall>
</target>
<target name="guitests" depends="compile">
<mkdir dir="./junitreports" />
<mkdir dir="./junitreports/html" />
<junit fork="yes" printsummary="withOutAndErr" haltonerror="no" haltonfailure="no">
<sysproperty key="abbot.testsuite.path" value="testdata/abbot/production"/>
<test name="gov.epa.otaq.moves.common.ScriptTestSuite" fork="yes" todir="./junitreports"/>
<formatter type="xml" />
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<classpath refid="classpath" />
</junit>
<junitreport todir="./junitreports">
<fileset dir="./junitreports">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="./junitreports/html"/>
</junitreport>
<antcall target="testcleanup"></antcall>
</target>
<target name="inprogressguitests" depends="compile">
<mkdir dir="./junitreports" />
<mkdir dir="./junitreports/html" />
<junit fork="yes" printsummary="withOutAndErr" haltonerror="no" haltonfailure="no">
<sysproperty key="abbot.testsuite.path" value="testdata/abbot/inprogress"/>
<test name="gov.epa.otaq.moves.common.ScriptTestSuite" fork="yes" todir="./junitreports"/>
<formatter type="xml" />
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<classpath refid="classpath" />
</junit>
<junitreport todir="./junitreports">
<fileset dir="./junitreports">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="./junitreports/html"/>
</junitreport>
<antcall target="testcleanup"></antcall>
</target>
<target name="recenttests" depends="compile">
<mkdir dir="./junitreports" />
<mkdir dir="./junitreports/html" />
<junit fork="yes" printsummary="yes" haltonerror="no" haltonfailure="no">
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<classpath refid="classpath" />
<formatter type="xml" />
<batchtest fork="yes" todir="./junitreports">
<fileset dir="./">
<include name="**/gov/epa/otaq/moves/master/implementation/ghg/BaseRateGeneratorTest.java" />
</fileset>
</batchtest>
</junit>
<junitreport todir="./junitreports">
<fileset dir="./junitreports">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="./junitreports/html"/>
</junitreport>
<antcall target="testcleanup"></antcall>
</target>
<target name="slowqueries" depends="compile">
<java classname="gov.epa.otaq.moves.tools.MySQLSlowQueryAnalyzer" fork="yes" maxmemory="1000m">
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<classpath refid="classpath" />
</java>
</target>
<target name="errormessages" depends="compile">
<java classname="gov.epa.otaq.moves.tools.messages.MessageDocumentor" fork="yes" maxmemory="512m">
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<classpath refid="classpath" />
<arg value="MOVESMessages.rtf" />
<arg value="gov" />
</java>
</target>
<target name="errormessagesauto" depends="compile">
<java classname="gov.epa.otaq.moves.tools.messages.MessageDocumentor" fork="yes" maxmemory="512m" output="errormessages.txt">
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<classpath refid="classpath" />
<arg value="MOVESMessages.rtf" />
<arg value="gov" />
</java>
</target>
<target name="algorithms" depends="compile">
<java classname="gov.epa.otaq.moves.tools.messages.DocumentBuilder" fork="yes" maxmemory="512m">
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<classpath refid="classpath" />
<arg value="MOVESAlgorithms.html" />
<arg value="database" />
<arg value="gov" />
<arg value="calc" />
</java>
</target>
<target name="costello" depends="compile">
<java classname="abbot.editor.Costello" fork="yes" maxmemory="512m">
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<classpath refid="classpath" />
</java>
</target>
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="libs/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<macrodef name="appendworkercsv">
<sequential>
<math result="workercondition" operand1="${workercounter}" operation="min" operand2="1" datatype="int" />
<math result="workercountertemp" operand1="${workercounter}" operation="-" operand2="1" datatype="int" />
<var name="workercounter" value="${workercountertemp}" />
<if>
<equals arg1="${workercondition}" arg2="1" />
<then>
<if>
<equals arg1="${workercsv}" arg2="" />
<then>
<var name="workercsv" value="w" />
</then>
<else>
<var name="workercsv" value="${workercsv},w" />
</else>
</if>
</then>
</if>
</sequential>
</macrodef>
<macrodef name="makeworkerlist">
<sequential>
<var name="workercounter" value="${maxworkers}" />
<var name="workercsv" value="" />
<var name="workercondition" value="0" />
<var name="workercountertemp" value="" />
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<appendworkercsv/>
<echo>maxworkers = ${maxworkers}</echo>
<!-- <echo>workercsv = ${workercsv}</echo> -->
</sequential>
</macrodef>
<target name="subworker">
<echo>Launching a worker...</echo>
<if>
<isset property="noshutdown" />
<then>
<java classname="gov.epa.otaq.moves.worker.WorkerCommandLine" fork="yes" maxmemory="512m" spawn="false">
<classpath refid="classpath" />
<arg value="-config=manyworkers.txt" />
</java>
</then>
<else>
<java classname="gov.epa.otaq.moves.worker.WorkerCommandLine" fork="yes" maxmemory="512m" spawn="false">
<classpath refid="classpath" />
<arg value="-autoshutdown" />
<arg value="-config=manyworkers.txt" />
</java>
</else>
</if>
<echo>Worker finished.</echo>
</target>
<target name="1worker" depends="">
<var name="maxworkers" value="1" />
<antcall target="manyworkers" />
</target>
<target name="2workers" depends="">
<var name="maxworkers" value="2" />
<antcall target="manyworkers" />
</target>
<target name="3workers" depends="">
<var name="maxworkers" value="3" />
<antcall target="manyworkers" />
</target>
<target name="manyworkers">
<makeworkerlist/>
<delete dir="manyworkers" />
<mkdir dir="manyworkers" />
<mkdir dir="manyworkers/workerfolder" />
<var name="didstartmysql" value="0" />
<sleep seconds="5" /> <!-- allow any external MySQL daemon a chance to startup before we go looking for it -->
<if>
<socket server="127.0.0.1" port="3306"/>
<then>
<echo>MySQL is already running and will not be automatically shutdown by this instance.</echo>
</then>
<else>
<echo>Starting mysqld...</echo>
<mkdir dir="mysql/data/mysqltemp" />
<exec executable="mysql/bin/mysqld" spawn="true">
<arg value="--defaults-file=mysql/my.ini" />
<arg value="--bind-address=127.0.0.1" />
<arg value="--console" />
<arg value="--skip-grant-tables" />
<arg value="--standalone" />
<arg value="--tmpdir=mysqltemp" />
</exec>
<waitfor maxwait="30" maxwaitunit="second">
<socket server="127.0.0.1" port="3306"/>
</waitfor>
<echo>Confirmed MySQL started because its socket has been found.</echo>
<var name="didstartmysql" value="1" />
</else>
</if>
<foreach list="${workercsv}" target="subworker" param="workerfortemp" delimiter="," parallel="true" maxthreads="${maxworkers}" />
<if>
<equals arg1="${didstartmysql}" arg2="1" />
<then>
<echo>Stopping mysqld via the mysqladmin tool...</echo>
<exec executable="mysql/bin/mysqladmin" spawn="false">
<arg value="--defaults-file=mysql/my.ini" />
<arg value="--no-beep" />
<arg value="--shutdown_timeout=30" />
<arg value="shutdown" />
</exec>
<echo>Workers and mysql have been shutdown.</echo>
</then>
<else>
<echo>Workers have been shutdown, but not MySQL since it was already running.</echo>
</else>
</if>
</target>
<target name="startmysql">
<if>
<socket server="127.0.0.1" port="3306"/>
<then>
<echo>MySQL is already running.</echo>
</then>
<else>
<echo>Starting mysqld...</echo>
<mkdir dir="mysql/data/mysqltemp" />
<exec executable="mysql/bin/mysqld" spawn="true">
<arg value="--defaults-file=mysql/my.ini" />
<arg value="--bind-address=127.0.0.1" />
<arg value="--console" />
<arg value="--skip-grant-tables" />
<arg value="--standalone" />
<arg value="--tmpdir=mysqltemp" />
</exec>
<waitfor maxwait="30" maxwaitunit="second">
<socket server="127.0.0.1" port="3306"/>
</waitfor>
<echo>Confirmed MySQL started because its socket has been found.</echo>
</else>
</if>
</target>
<target name="stopmysql">
<echo>Stopping mysqld via the mysqladmin tool...</echo>
<exec executable="mysql/bin/mysqladmin" spawn="false">
<arg value="--defaults-file=mysql/my.ini" />
<arg value="--no-beep" />
<arg value="--shutdown_timeout=30" />
<arg value="shutdown" />
</exec>
<echo>MySQL has been shutdown.</echo>
</target>
<target name="maketodo" depends="">
<if>
<and>
<isset property="runspec" />
<not>
<equals arg1="${runspec}" arg2="" />
</not>
</and>
<then>
<var name="didstartmysql" value="0" />
<sleep seconds="5" /> <!-- allow any external MySQL daemon a chance to startup before we go looking for it -->
<if>
<socket server="127.0.0.1" port="3306"/>
<then>
<echo>MySQL is already running and will not be automatically shutdown by this instance.</echo>
</then>
<else>
<echo>Starting mysqld...</echo>
<mkdir dir="mysql/data/mysqltemp" />
<exec executable="mysql/bin/mysqld" spawn="true">
<arg value="--defaults-file=mysql/my.ini" />
<arg value="--bind-address=127.0.0.1" />
<arg value="--console" />
<arg value="--skip-grant-tables" />
<arg value="--standalone" />
<arg value="--tmpdir=mysqltemp" />
</exec>
<waitfor maxwait="30" maxwaitunit="second">
<socket server="127.0.0.1" port="3306"/>
</waitfor>
<echo>Confirmed MySQL started because its socket has been found.</echo>
<var name="didstartmysql" value="1" />
</else>
</if>
<echo>Launching MOVES...</echo>
<java classname="gov.epa.otaq.moves.master.commandline.MOVESCommandLine" fork="yes" maxmemory="512m" spawn="false">
<sysproperty key="MOVES_CONFIGURATION_FILE_NAME" value="maketodo.txt" />
<classpath refid="classpath" />
<arg value="-onlytodo" />
<arg value="-r" />
<arg value="${runspec}" />
</java>
<echo>MOVES finished.</echo>
<if>
<equals arg1="${didstartmysql}" arg2="1" />
<then>
<echo>Stopping mysqld via the mysqladmin tool...</echo>
<exec executable="mysql/bin/mysqladmin" spawn="false">
<arg value="--defaults-file=mysql/my.ini" />
<arg value="--no-beep" />
<arg value="--shutdown_timeout=30" />
<arg value="shutdown" />
</exec>
<echo>MOVES and mysql have been shutdown.</echo>
</then>
<else>
<echo>MOVES has been shutdown, but not MySQL since it was already running.</echo>
</else>
</if>
</then>
<else>
<echo>ERROR: A runspec was not provided. Use -Drunspec=somefile.mrs</echo>
</else>
</if>
</target>
<target name="main1worker" depends="">
<delete dir="manyworkers" />
<mkdir dir="manyworkers" />
<mkdir dir="manyworkers/workerfolder" />
<if>
<and>
<isset property="runspec" />
<not>
<equals arg1="${runspec}" arg2="" />
</not>
</and>
<then>
<var name="didstartmysql" value="0" />
<sleep seconds="5" /> <!-- allow any external MySQL daemon a chance to startup before we go looking for it -->
<if>
<socket server="127.0.0.1" port="3306"/>
<then>
<echo>MySQL is already running and will not be automatically shutdown by this instance.</echo>
</then>
<else>
<echo>Starting mysqld...</echo>
<mkdir dir="mysql/data/mysqltemp" />
<exec executable="mysql/bin/mysqld" spawn="true">
<arg value="--defaults-file=mysql/my.ini" />
<arg value="--bind-address=127.0.0.1" />
<arg value="--console" />
<arg value="--skip-grant-tables" />
<arg value="--standalone" />
<arg value="--tmpdir=mysqltemp" />
</exec>
<waitfor maxwait="30" maxwaitunit="second">
<socket server="127.0.0.1" port="3306"/>
</waitfor>
<echo>Confirmed MySQL started because its socket has been found.</echo>
<var name="didstartmysql" value="1" />
</else>
</if>
<echo>Launching MOVES, which will launch a worker...</echo>
<java classname="gov.epa.otaq.moves.master.commandline.MOVESCommandLine" fork="yes" maxmemory="512m" spawn="false">
<sysproperty key="MOVES_CONFIGURATION_FILE_NAME" value="maketodo.txt" />
<classpath refid="classpath" />
<arg value="-workerconfig=manyworkers.txt" />
<arg value="-r" />
<arg value="${runspec}" />
</java>
<echo>MOVES and 1 worker finished.</echo>
<if>
<equals arg1="${didstartmysql}" arg2="1" />
<then>
<echo>Stopping mysqld via the mysqladmin tool...</echo>
<exec executable="mysql/bin/mysqladmin" spawn="false">
<arg value="--defaults-file=mysql/my.ini" />
<arg value="--no-beep" />
<arg value="--shutdown_timeout=30" />
<arg value="shutdown" />