forked from mcidasv/mcidasv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
1214 lines (1082 loc) · 56.3 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
<?xml version="1.0"?>
<!-- $Id$ -->
<project name="mcidasv" default="info">
<!-- Directory definitions -->
<property name="base.dir" location="." />
<property name="build.dir" location="${base.dir}/build/antbuild" />
<property name="dist.dir" location="${base.dir}/dist" />
<property name="lib.dir" location="${base.dir}/lib" />
<property name="sharedlib.dir" location="${lib.dir}/share" />
<property name="linuxx86lib.dir" location="${lib.dir}/linux-i586" />
<property name="linuxx64lib.dir" location="${lib.dir}/linux-amd64" />
<property name="windowsx86lib.dir" location="${lib.dir}/windows-i586" />
<property name="windowsx64lib.dir" location="${lib.dir}/windows-amd64" />
<property name="macosxlib.dir" location="${lib.dir}/macosx" />
<property name="idvlib.dir" location="${base.dir}/../IDV/lib" />
<property name="resource.dir" location="${base.dir}/edu/wisc/ssec/mcidasv/resources" />
<property name="release.dir" location="${base.dir}/release" />
<property name="tools.dir" location="${base.dir}/tools" />
<property name="webstart.dir" location="${release.dir}/webstart" />
<property name="sm.dir" location="${base.dir}/edu/wisc/ssec/mcidasv/startupmanager" />
<property name="doc.dir" location="${base.dir}/docs" />
<property name="javadoc.dir" location="${doc.dir}/javadoc" />
<property name="userguide.dir" location="${doc.dir}/userguide" />
<property name="heap.dir" location="/tmp/mcidasv-heapdump.hprof" />
<!--
This section attempts to set the path to the local ADDE servers in
a platform independent way. In order to take advantage of this, you
MUST install McIDAS-V into the directory suggested by the installer.
The installer will suggest the following (depending on platform):
Windows: C:\Program Files\McIDAS-V-System
Linux : /home/YOUR_USER/McIDAS-V-System
OS X : /Applications/McIDAS-V-System
If you need to use a specific path, you must run Ant like so:
ant -Daddeservers.dir="<McIDAS-V INSTALL PATH>/adde" <TARGET>
Some examples:
ant -Daddeservers.dir="/Applications/mcidasv/nightly/adde" jar.runlarge
ant -Daddeservers.dir="C:\\mcidasv\\nightly\\adde" jar.runlarge
-->
<condition property="addeservers.dir" value="C:\\Program Files\\McIDAS-V-System\\adde">
<os family="windows" />
</condition>
<condition property="addeservers.dir" value="/home/${user.name}/McIDAS-V-System/adde">
<and>
<os family="unix"/>
<not>
<os family="mac"/>
</not>
</and>
</condition>
<condition property="addeservers.dir" value="/Applications/McIDAS-V-System/adde">
<os family="mac" />
</condition>
<!-- end of local server path stuff -->
<!--
This section attempts to set the McIDAS-V userpath (where RESOLV.SRV is)
in a platform independent way. In order to take advantage of this, you
simply need to have run McIDAS-V.
The installer will suggest the following (depending on platform):
Windows: C:\Users\YOUR_USER\McIDAS-V
Linux : /home/YOUR_USER/McIDAS-V
OS X : /Users/YOUR_USER/Documents/McIDAS-V
If you need to use a specific path, you must run Ant like so:
ant -Duserpath.dir="<USER PATH>" <TARGET>
Some examples:
ant -Duserpath.dir="/tmp/mcidasv" jar.runlarge
ant -Duserpath.dir="C:\\temp\\mcidasv" jar.runlarge
-->
<condition property="userpath.dir" value="${user.home}\\McIDAS-V">
<os family="windows" />
</condition>
<condition property="userpath.dir" value="${user.home}/McIDAS-V">
<and>
<os family="unix"/>
<not>
<os family="mac"/>
</not>
</and>
</condition>
<condition property="userpath.dir" value="${user.home}/Documents/McIDAS-V">
<os family="mac" />
</condition>
<!-- end of userpath stuff -->
<!-- Attempt to load the version property file -->
<property file="${resource.dir}/version.properties" />
<property name="media.dir" location="${base.dir}/../install4j/media" />
<property name="source.file" value="McIDAS-V_${mcidasv.version.major}.${mcidasv.version.minor}${mcidasv.version.release}_source.jar" />
<!-- Binary file definitions -->
<property name="java.bin" location="../java_jdk/bin/java" />
<property name="jhindexer.bin" location="../jh2.0/javahelp/bin/jhindexer" />
<property name="install4jc.bin" location="${base.dir}/../install4j/bin/install4jc" />
<!-- Required library jar file names -->
<property name="visad.jar" value="visad.jar" />
<property name="idv.jar" value="idv.jar" />
<!-- Property file names -->
<property name="ver.props" value="${resource.dir}/version.properties" />
<property name="build.props" value="${resource.dir}/build.properties" />
<!-- Jar file names -->
<property name="app.jarname" value="mcidasv.jar" />
<property name="local-idv.jarname" value="local-idv.jar" />
<property name="javadoc.jarname" value="mcv_javadoc.jar" />
<property name="userguide.jarname" value="mcv_userguide.jar" />
<property name="source.jarname" value="mcv_source.jar" />
<!-- Jar signing -->
<property name="key.store" location="${release.dir}/mcv-keystore" />
<property name="key.alias" value="McIDAS-V" />
<!-- Main class for jar and run targets -->
<property name="app.mainclass" value="edu.wisc.ssec.mcidasv.McIDASV" />
<!-- Main class for startup manager -->
<property name="app.smclass"
value="edu.wisc.ssec.mcidasv.startupmanager.StartupManager" />
<property name="app.smjar" value="startupmanager.jar" />
<!-- Properties for the Jython console -->
<property name="jython.class" value="edu.wisc.ssec.mcidasv.jython.Console" />
<property name="jython.jarfile" value="console.jar" />
<property name="jython.dir" value="${base.dir}/edu/wisc/ssec/mcidasv/jython" />
<property name="jython.lib" value="${idvlib.dir}/jython.jar" />
<!-- Run target options -->
<!-- run.log.levels may be one of: TRACE, DEBUG, INFO, WARN, ERROR or OFF -->
<property name="run.log.level" value="INFO" />
<property name="run.smallheap" value="1024m" />
<property name="run.largeheap" value="6656m" />
<property name="logback.default.config" value="${userpath.dir}/logback.xml" />
<!-- VisAD Properties -->
<!-- visad.texturemax is a workaround for the bizarro problem detailed at
dcdbs.ssec.wisc.edu/mcidasv/forums/viewtopic.php?f=24&t=1378 -->
<property name="visad.texturemax" value="4096" />
<!-- Compiler options -->
<property name="debug.flag" value="true" />
<property name="deprecation.flag" value="false" />
<property name="source.ver" value="1.7" />
<property name="target.ver" value="1.7" />
<!-- Which warnings to show, use javac -X for help -->
<property name="xlint" value="deprecation" />
<!-- Javadoc options -->
<property name="javadoc.level" value="private" />
<!-- Use these properties to make changing the versions of related JARs
(see SLF4J or Logback) a bit less tedious. -->
<property name="slf4j.version" value="1.7.7" />
<property name="logback.version" value="1.1.2" />
<property name="miglayout.version" value="4.2" />
<property name="jogamp.version" value="2.2.1" />
<!-- note that the J3D JARs available from http://jogamp.org/deployment/java3d/
do not (as of 20140915) have the version string in the filenames.
this must be done manually for now. -->
<property name="java3d.version" value="1.6.0-pre11" />
<!-- The CLASSPATH specified within McV's manifest -->
<property name="jar.base.classpath" value="gluegen-rt-${jogamp.version}.jar gluegen-${jogamp.version}.jar joal-${jogamp.version}.jar jocl-${jogamp.version}.jar jogl-all-${jogamp.version}.jar sysout-over-slf4j-1.0.2.jar miglayout-core-${miglayout.version}.jar miglayout-swing-${miglayout.version}.jar eventbus-1.4.jar logback-core-${logback.version}.jar logback-classic-${logback.version}.jar log4j-over-slf4j-${slf4j.version}.jar slf4j-api-${slf4j.version}.jar local-idv.jar repositorytds.jar commons-math3-3.3.jar rsyntaxtextarea-2.5.3.jar jul-to-slf4j-${slf4j.version}.jar local-idv.jar visad.jar idv.jar repositorytds.jar mcv_userguide.jar JSatTrak.jar swingx-common-1.6.5-1.jar j3dcore-${java3d.version}.jar j3dutils-${java3d.version}.jar vecmath-${java3d.version}.jar" />
<!-- List of McIDAS-V jars -->
<fileset id="mcv.libs" dir="${dist.dir}">
<include name="swingx-common-1.6.5-1.jar" />
<include name="sysout-over-slf4j-1.0.2.jar" />
<include name="miglayout-core-${miglayout.version}.jar" />
<include name="miglayout-swing-${miglayout.version}.jar" />
<include name="eventbus-1.4.jar" />
<include name="logback-core-${logback.version}.jar" />
<include name="logback-classic-${logback.version}.jar" />
<include name="log4j-over-slf4j-${slf4j.version}.jar" />
<include name="slf4j-api-${slf4j.version}.jar" />
<include name="local-idv.jar" />
<include name="repositorytds.jar" />
<include name="commons-math3-3.3.jar" />
<include name="rsyntaxtextarea-2.5.3.jar" />
<include name="jul-to-slf4j-${slf4j.version}.jar" />
<include name="JSatTrak.jar"/>
<include name="j3dcore-${java3d.version}.jar" />
<include name="j3dutils-${java3d.version}.jar" />
<include name="vecmath-${java3d.version}.jar" />
<include name="gluegen-rt-${jogamp.version}.jar" />
<include name="gluegen-${jogamp.version}.jar" />
<include name="joal-${jogamp.version}.jar" />
<include name="jocl-${jogamp.version}.jar" />
<include name="jogl-all-noawt.jar" />
<include name="jogl-all-${jogamp.version}.jar" />
</fileset>
<!-- List of IDV jars -->
<fileset id="idv.libs" dir="${dist.dir}">
<include name="auxdata.jar" />
<include name="local-visad.jar" />
<include name="visad.jar" />
<include name="jython.jar" />
<include name="external.jar" />
<include name="ncIdv.jar" />
<include name="idv.jar" />
<include name="repositorytds.jar" />
</fileset>
<fileset id="linux_x64.libs" dir="${dist.dir}">
<include name="gluegen-${jogamp.version}-natives-linux-amd64.jar" />
<include name="gluegen-rt-${jogamp.version}-natives-linux-amd64.jar" />
<include name="joal-${jogamp.version}-natives-linux-amd64.jar" />
<include name="jocl-${jogamp.version}-natives-linux-amd64.jar" />
<include name="jogl-all-${jogamp.version}-natives-linux-amd64.jar" />
</fileset>
<fileset id="linux_x86.libs" dir="${dist.dir}">
<include name="gluegen-${jogamp.version}-natives-linux-i586.jar" />
<include name="gluegen-rt-${jogamp.version}-natives-linux-i586.jar" />
<include name="joal-${jogamp.version}-natives-linux-i586.jar" />
<include name="jocl-${jogamp.version}-natives-linux-i586.jar" />
<include name="jogl-all-${jogamp.version}-natives-linux-i586.jar" />
</fileset>
<fileset id="windows_x64.libs" dir="${dist.dir}">
<include name="gluegen-${jogamp.version}-natives-windows-amd64.jar" />
<include name="gluegen-rt-${jogamp.version}-natives-windows-amd64.jar" />
<include name="joal-${jogamp.version}-natives-windows-amd64.jar" />
<include name="jocl-${jogamp.version}-natives-windows-amd64.jar" />
<include name="jogl-all-${jogamp.version}-natives-windows-amd64.jar" />
</fileset>
<fileset id="windows_x86.libs" dir="${dist.dir}">
<include name="gluegen-${jogamp.version}-natives-windows-i586.jar" />
<include name="gluegen-rt-${jogamp.version}-natives-windows-i586.jar" />
<include name="joal-${jogamp.version}-natives-windows-i586.jar" />
<include name="jocl-${jogamp.version}-natives-windows-i586.jar" />
<include name="jogl-all-${jogamp.version}-natives-windows-i586.jar" />
</fileset>
<fileset id="macosx.libs" dir="${dist.dir}">
<include name="gluegen-${jogamp.version}-natives-macosx-universal.jar" />
<include name="gluegen-rt-${jogamp.version}-natives-macosx-universal.jar" />
<include name="joal-${jogamp.version}-natives-macosx-universal.jar" />
<include name="jocl-${jogamp.version}-natives-macosx-universal.jar" />
<include name="jogl-all-${jogamp.version}-natives-macosx-universal.jar" />
</fileset>
<!-- Shared classpath -->
<path id="app.classpath">
<pathelement location="${dist.dir}/mcidasv.jar" />
<pathelement location="${dist.dir}/local-idv.jar" />
<fileset refid="mcv.libs" />
<fileset refid="idv.libs" />
</path>
<path id="linux_x64.app.classpath">
<pathelement location="${dist.dir}/mcidasv.jar" />
<pathelement location="${dist.dir}/local-idv.jar" />
<fileset refid="mcv.libs" />
<fileset refid="idv.libs" />
<fileset refid="linux_x64.libs" />
</path>
<path id="linux_x86.app.classpath">
<pathelement location="${dist.dir}/mcidasv.jar" />
<pathelement location="${dist.dir}/local-idv.jar" />
<fileset refid="mcv.libs" />
<fileset refid="idv.libs" />
<fileset refid="linux_x86.libs" />
</path>
<path id="windows_x64.app.classpath">
<pathelement location="${dist.dir}/mcidasv.jar" />
<pathelement location="${dist.dir}/local-idv.jar" />
<fileset refid="mcv.libs" />
<fileset refid="idv.libs" />
<fileset refid="windows_x64.libs" />
</path>
<path id="windows_x86.app.classpath">
<pathelement location="${dist.dir}/mcidasv.jar" />
<pathelement location="${dist.dir}/local-idv.jar" />
<fileset refid="mcv.libs" />
<fileset refid="idv.libs" />
<fileset refid="windows_x86.libs" />
</path>
<path id="macosx.app.classpath">
<pathelement location="${dist.dir}/mcidasv.jar" />
<pathelement location="${dist.dir}/local-idv.jar" />
<fileset refid="mcv.libs" />
<fileset refid="idv.libs" />
<fileset refid="macosx.libs" />
</path>
<path id="bundle.classpath">
<pathelement location="${dist.dir}/mcidasv.jar" />
<pathelement location="${dist.dir}/local-idv.jar" />
<fileset refid="mcv.libs" />
<fileset refid="idv.libs" />
</path>
<!-- Files to include in application jar -->
<patternset id="jar.includes">
<include name="edu/**/*.class" />
<include name="edu/**/resources/**/*" />
<include name="edu/**/images/**/*" />
<include name="logback.xml" />
<include name="logback-stdout.xml" />
</patternset>
<!-- Files to include in local-idv jar -->
<patternset id="local-idv.includes">
<include name="ucar/**/*.class" />
<include name="visad/**/*.class" />
<include name="HTTPClient/**/*.class" />
<include name="Jama/**/*.class" />
<include name="gnu/**/*.class" />
<include name="loci/**/*.class" />
<include name="ncsa/**/*.class" />
<include name="nom/**/*.class" />
</patternset>
<!-- Files to include in the startup manager jar -->
<patternset id="startupmanager.includes">
<include name="edu/**/startupmanager/*.class" />
<include name="edu/**/startupmanager/options/*.class" />
<include name="edu/wisc/ssec/mcidasv/resources/icons/prefs/*" />
<include name="edu/wisc/ssec/mcidasv/Constants.class" />
<include name="edu/**/images/mcidasv_logo.gif" />
</patternset>
<!-- Files that needed by the Jython console JAR. -->
<patternset id="jython.includes">
<include name="edu/wisc/ssec/mcidasv/util/Contract.class" />
<include name="edu/wisc/ssec/mcidasv/jython/**/*.class" />
</patternset>
<macrodef name="git">
<attribute name="command" />
<attribute name="dir" default="" />
<attribute name="remote" default="origin" />
<attribute name="branch" default="master" />
<element name="args" optional="true" />
<sequential>
<echo message="git @{command} @{remote} @{branch}" />
<exec executable="git" dir="@{dir}">
<arg value="@{command}" />
<arg value="@{remote}" />
<arg value="@{branch}" />
<args/>
</exec>
</sequential>
</macrodef>
<macrodef name="git-pull-rebase">
<attribute name="dir" default="" />
<attribute name="remote" default="origin" />
<attribute name="branch" default="master" />
<sequential>
<echo message="git stash" />
<exec executable="git" dir="@{dir}">
<arg value="stash" />
</exec>
<echo message="git fetch @{remote}" />
<exec executable="git" dir="@{dir}">
<arg value="fetch" />
<arg value="@{remote}" />
</exec>
<echo message="git pull --rebase @{remote} @{branch}" />
<exec executable="git" dir="@{dir}">
<arg value="pull" />
<arg value="--rebase" />
<arg value="@{remote}" />
<arg value="@{branch}" />
</exec>
<echo message="git stash pop" />
<exec executable="git" dir="@{dir}">
<arg value="stash" />
<arg value="pop" />
</exec>
</sequential>
</macrodef>
<!-- Controls the status of Java's assertion feature. -->
<assertions id="mcv.assertions">
<!-- Enable all assertions: -->
<!-- <enable/> -->
<!-- Disable all assertions (remember the system assert attr above! -->
<!-- <disable/> -->
<disable/>
<!--
Enable assertions for the Mcv choosers, but disable any assertions in
VisAD's HDF5 package:
-->
<!-- <enable package="edu.wisc.ssec.mcidasv.chooser"/> -->
<!-- <disable package="visad.data.hdf5"/> -->
</assertions>
<!-- Print out some of the setting for this build file -->
<target name="info" description="Print various significant property values">
<echo>
== ANT =======================
ant java version: ${ant.java.version}
ant lib dir: ${ant.library.dir}
ant home: ${ant.home}
ant basedir: ${base.dir}
== JAVA ======================
java home: ${java.home}
java version: ${java.runtime.version}
javadoc access: ${javadoc.level}
== COMPILER OPTIONS ==========
source: ${source.ver}
target: ${target.ver}
debug(-g): ${debug.flag}
deprecation: ${deprecation.flag}
Xlint warn: ${xlint}
== PROPERTIES ================
libdir: ${lib.dir}
idvlibdir: ${idvlib.dir}
javadoc: ${javadoc.dir}
User Guide: ${userguide.dir}
Main Class: ${app.mainclass}
== VERSIONS ==================
JogAmp (jogl/joal/jocl/gluegen): ${jogamp.version}
Java3D: ${java3d.version}
SLF4J: ${slf4j.version}
Logback: ${logback.version}
MigLayout: ${miglayout.version}
</echo>
</target>
<!-- Delete all class files and temporary build files -->
<target name="clean" description="Delete all class files and temporary build files">
<delete dir="${dist.dir}" failonerror="false" />
<delete dir="${javadoc.dir}" failonerror="false" />
<delete dir="${base.dir}/build" failonerror="false" />
<delete failonerror="false">
<fileset dir="${base.dir}/edu" includes="**/*.class" />
</delete>
<delete failonerror="false">
<fileset dir="${base.dir}/ucar" includes="**/*.class" />
</delete>
<delete file="${build.props}" failonerror="false" />
<mkdir dir="${dist.dir}" />
<mkdir dir="${javadoc.dir}" />
<mkdir dir="${build.dir}" />
</target>
<target name="gitupdate" description="Get the latest McIDAS-V source from Github.">
<git-pull-rebase dir="${base.dir}" />
</target>
<target name="processdocs" description="Keep Git up to date with changes that were presumably synced from web server.">
<exec executable="${basedir}/tools/process_dreamweaver_changes.php" dir="${basedir}/tools" />
</target>
<target name="jythondocs" description="Generate HTML from McIDAS-V Jython docstrings.">
<exec executable="${basedir}/tools/apidocs/make_html_docs.sh" dir="${basedir}/tools/apidocs" />
</target>
<target name="getidvjars" description="Get the latest IDV jar files from Unidata">
<exec executable="${basedir}/tools/get_idv_latest.sh" dir="${basedir}/tools" />
</target>
<target name="getvisadjar" description="Get the latest VisAD jar file from SSEC">
<exec executable="${basedir}/tools/get_visad_latest.sh" dir="${basedir}/tools" />
</target>
<target name="copy.build.props" description="Set build properties">
<tstamp>
<format property="build.date" pattern="yyyy-MM-dd HH:mm"
timezone="UTC" />
</tstamp>
<copy file="${ver.props}" tofile="${build.dir}/edu/wisc/ssec/mcidasv/resources/build.properties" overwrite="true">
<filterset>
<filter token="DATE" value="${build.date}" />
<filter token="NIGHTLY" value="" />
</filterset>
</copy>
</target>
<!-- Set nightly build properties -->
<target name="copy.nightly.props" description="Set nightly build properties">
<tstamp>
<format property="build.date" pattern="yyyy-MM-dd HH:mm"
timezone="UTC" />
</tstamp>
<copy file="${ver.props}" tofile="${build.dir}/edu/wisc/ssec/mcidasv/resources/build.properties" overwrite="true">
<filterset>
<filter token="DATE" value="${build.date}" />
<filter token="NIGHTLY" value="(nightly)" />
</filterset>
</copy>
</target>
<target name="_build.linux.x86" description="" if="isLinux.x86">
<echo>Building linuxx86</echo>
<copy todir="${dist.dir}" preservelastmodified="true">
<fileset dir="${linuxx86lib.dir}" includes="**/*.jar" />
</copy>
<javac srcdir="${base.dir}" destdir="${build.dir}" source="${source.ver}" target="${target.ver}"
debug="${debug.flag}" deprecation="${deprecation.flag}" includeantruntime="false">
<compilerarg value="-Xlint:${xlint}" />
<classpath refid="linux_x86.app.classpath" />
</javac>
</target>
<target name="_build.linux.x86_64" description="" if="isLinux.x86_64">
<echo>Building linuxx64</echo>
<copy todir="${dist.dir}" preservelastmodified="true">
<fileset dir="${linuxx64lib.dir}" includes="**/*.jar" />
</copy>
<javac srcdir="${base.dir}" destdir="${build.dir}" source="${source.ver}" target="${target.ver}"
debug="${debug.flag}" deprecation="${deprecation.flag}" includeantruntime="false">
<compilerarg value="-Xlint:${xlint}" />
<classpath refid="linux_x64.app.classpath" />
</javac>
</target>
<target name="_build.windows.x86" description="" if="isWindows.x86">
<echo>Building winx86</echo>
<copy todir="${dist.dir}" preservelastmodified="true">
<fileset dir="${windowsx86lib.dir}" includes="**/*.jar" />
</copy>
<javac srcdir="${base.dir}" destdir="${build.dir}" source="${source.ver}" target="${target.ver}"
debug="${debug.flag}" deprecation="${deprecation.flag}" includeantruntime="false">
<compilerarg value="-Xlint:${xlint}" />
<classpath refid="windows_x86.app.classpath" />
</javac>
</target>
<target name="_build.windows.x86_64" description="" if="isWindows.x86_64">
<echo>Building winx64</echo>
<copy todir="${dist.dir}" preservelastmodified="true">
<fileset dir="${windowsx64lib.dir}" includes="**/*.jar" />
</copy>
<javac srcdir="${base.dir}" destdir="${build.dir}" source="${source.ver}" target="${target.ver}"
debug="${debug.flag}" deprecation="${deprecation.flag}" includeantruntime="false">
<compilerarg value="-Xlint:${xlint}" />
<classpath refid="windows_x64.app.classpath" />
</javac>
</target>
<target name="_build.macosx" description="" if="isMac">
<echo>Building macosx</echo>
<copy todir="${dist.dir}" preservelastmodified="true">
<fileset dir="${macosxlib.dir}" includes="**/*.jar" />
</copy>
<javac srcdir="${base.dir}" destdir="${build.dir}" source="${source.ver}" target="${target.ver}"
debug="${debug.flag}" deprecation="${deprecation.flag}" includeantruntime="false">
<compilerarg value="-Xlint:${xlint}" />
<classpath refid="macosx.app.classpath" />
</javac>
</target>
<!-- Build the edu tree -->
<target name="build" description="Build the edu tree">
<mkdir dir="${build.dir}" />
<mkdir dir="${dist.dir}" />
<copy todir="${dist.dir}" preservelastmodified="true">
<fileset dir="${idvlib.dir}" includes="**/*.jar" />
<!--<fileset dir="${lib.dir}" includes="**/*.jar" />-->
<fileset dir="${sharedlib.dir}" includes="**/*.jar" />
</copy>
<javac srcdir="${base.dir}" destdir="${build.dir}" source="${source.ver}" target="${target.ver}"
debug="${debug.flag}" deprecation="${deprecation.flag}" includeantruntime="false">
<compilerarg value="-Xlint:${xlint}" />
<classpath refid="app.classpath" />
</javac>
<condition property="isLinux.x86">
<os family="unix" arch="x86" />
</condition>
<condition property="isLinux.x86_64">
<or>
<and>
<os family="unix" arch="x86_64"/>
<not>
<os family="mac"/>
</not>
</and>
<and>
<os family="unix" arch="amd64"/>
<not>
<os family="mac"/>
</not>
</and>
</or>
</condition>
<condition property="isWindows.x86">
<os family="windows" arch="x86" />
</condition>
<condition property="isWindows.x86_64">
<os family="windows" arch="x86_64" />
</condition>
<condition property="isMac">
<os family="mac" />
</condition>
<antcall target="_build.linux.x86" />
<antcall target="_build.linux.x86_64" />
<antcall target="_build.windows.x86" />
<antcall target="_build.windows.x86_64" />
<antcall target="_build.macosx" />
<copy todir="${build.dir}" preservelastmodified="true">
<fileset dir="${base.dir}">
<patternset refid="jar.includes" />
<patternset refid="local-idv.includes" />
</fileset>
</copy>
</target>
<!-- Build only the startup manager -->
<target name="startupmanager" depends="build"
description="Build only the startup manager">
<tstamp prefix="jar" />
<!-- <mkdir dir="${dist.dir}" /> -->
<jar destfile="${dist.dir}/${app.smjar}" index="true">
<!-- <fileset dir="${base.dir}"> -->
<fileset dir="${build.dir}">
<patternset refid="startupmanager.includes" />
</fileset>
<manifest>
<attribute name="Build-By" value="${user.name}" />
<attribute name="Build-Date" value="${jar.TODAY} ${jar.TSTAMP}" />
<attribute name="Class-Path"
value="idv.jar mcidasv.jar mcv_userguide.jar" />
<attribute name="Main-Class" value="${app.smclass}" />
</manifest>
</jar>
</target>
<!-- Create the standalone Jython console jar file -->
<target name="jar.jython" depends="build"
description="Create the standalone Jython console jar file">
<!-- <mkdir dir="${dist.dir}" /> -->
<tstamp prefix="jar" />
<jar destfile="${dist.dir}/${jython.jarfile}">
<!-- <fileset dir="${base.dir}"> -->
<fileset dir="${build.dir}">
<patternset refid="jython.includes" />
</fileset>
<manifest>
<attribute name="Build-By" value="${user.name}" />
<attribute name="Build-Date" value="${jar.TODAY} ${jar.TSTAMP}" />
<attribute name="Class-Path" value="sysout-over-slf4j-1.0.2.jar miglayout-core-4.2.jar miglayout-swing-4.2.jar eventbus-1.4.jar logback-core-1.1.1.jar logback-classic-1.1.1.jar log4j-over-slf4j-1.7.6.jar slf4j-api-1.7.6.jar local-idv.jar repositorytds.jar commons-math3-3.2.jar rsyntaxtextarea-2.5.1.jar jul-to-slf4j-1.7.6.jar local-idv.jar visad.jar idv.jar repositorytds.jar mcv_userguide.jar" />
<attribute name="Main-Class" value="${jython.class}" />
</manifest>
</jar>
</target>
<!-- Jar the base application jar file -->
<target name="jar.base" description="Jar the base application jar file">
<!-- <mkdir dir="${dist.dir}" /> -->
<!-- <delete file="${dist.dir}/${app.jarname}" failonerror="false" /> -->
<tstamp prefix="jar" />
<manifestclasspath property="mcidasv.class.path" jarfile="${dist.dir}/{${app.jarname}">
<!--<classpath refid="app.classpath" />-->
<classpath refid="linux_x64.app.classpath" />
<classpath refid="linux_x86.app.classpath" />
<classpath refid="windows_x64.app.classpath" />
<classpath refid="windows_x86.app.classpath" />
<classpath refid="macosx.app.classpath" />
</manifestclasspath>
<jar destfile="${dist.dir}/${app.jarname}" index="false">
<!-- <fileset dir="${base.dir}"> -->
<fileset dir="${build.dir}">
<patternset refid="jar.includes" />
</fileset>
<manifest>
<attribute name="Build-By" value="${user.name}" />
<attribute name="Build-Date" value="${jar.TODAY} ${jar.TSTAMP}" />
<attribute name="Class-Path" value="${mcidasv.class.path}" />
<attribute name="Main-Class" value="${app.mainclass}" />
</manifest>
</jar>
</target>
<!-- Jar the local-idv jar file -->
<target name="jar.local-idv" description="Jar the local-idv jar file">
<!-- <mkdir dir="${dist.dir}" /> -->
<!-- <delete file="${dist.dir}/${local-idv.jarname}" failonerror="false" /> -->
<tstamp prefix="jar" />
<manifestclasspath property="local-idv.class.path" jarfile="${dist.dir}/{${local-idv.jarname}">
<!--<classpath refid="app.classpath" />-->
<classpath refid="linux_x64.app.classpath" />
<classpath refid="linux_x86.app.classpath" />
<classpath refid="windows_x64.app.classpath" />
<classpath refid="windows_x86.app.classpath" />
<classpath refid="macosx.app.classpath" />
</manifestclasspath>
<jar destfile="${dist.dir}/${local-idv.jarname}" index="false">
<!-- <fileset dir="${base.dir}"> -->
<fileset dir="${build.dir}">
<patternset refid="local-idv.includes" />
</fileset>
<manifest>
<attribute name="Build-By" value="${user.name}" />
<attribute name="Build-Date" value="${jar.TODAY} ${jar.TSTAMP}" />
<attribute name="Class-Path" value="${local-idv.class.path}" />
<attribute name="Main-Class" value="${app.mainclass}" />
</manifest>
</jar>
</target>
<!-- Create jar files and documentation -->
<!-- <target name="jar"
depends="clean, build, copy.build.props, jar.base, jar.local-idv"
description="Create jar files and documentation" />
-->
<target name="jar"
depends="build, copy.build.props, jar.base, jar.local-idv"
description="Create jar files and documentation" />
<!-- Create nightly jar files and documentation -->
<target name="jar.nightly"
depends="clean, build, copy.nightly.props, jar.base, jar.local-idv"
description="Create nightly jar files and documentation" />
<!-- Create signed jar files -->
<target name="signjar" depends="jar" description="Create signed jar files">
<signjar jar="${dist.dir}/${app.jarname}" alias="${key.alias}"
keystore="${key.store}" storepass="${storepass}" />
<signjar jar="${dist.dir}/${local-idv.jarname}" alias="${key.alias}"
keystore="${key.store}" storepass="${storepass}" />
<signjar jar="${dist.dir}/mcv_userguide.jar" alias="${key.alias}"
keystore="${key.store}" storepass="${storepass}" />
</target>
<!-- Include dependencies in single jar file -->
<!-- this doesn't appear to work when j3d/jogl is included… -->
<target name="singlejar" depends="clean, auxdata.nodocs, ncidv.nolog, build"
description="Include dependencies in single jar file">
<mkdir dir="${dist.dir}" />
<mkdir dir="${build.dir}" />
<unzip dest="${build.dir}">
<fileset refid="mcv.libs" />
<fileset refid="idv.libs" />
<!-- <fileset refid="newj3d.libs" /> -->
</unzip>
<!-- Override default VisAD classes with custom ones -->
<unzip src="${idvlib.dir}/local-visad.jar" dest="${build.dir}" />
<!-- Override default IDV classes with custom ones -->
<!-- <unzip src="${idvlib.dir}/local-idv.jar" dest="${build.dir}" /> -->
<!-- <copy todir="${build.dir}">
<fileset dir="${.dir}">
<patternset refid="jar.includes" />
<patternset refid="local-idv.includes" />
</fileset>
</copy>
-->
<delete dir="${build.dir}/META-INF" failonerror="false" />
<tstamp prefix="jar" />
<jar destfile="${dist.dir}/${app.jarname}" basedir="${build.dir}" index="false">
<manifest>
<attribute name="Build-By" value="${user.name}" />
<attribute name="Build-Date" value="${jar.TODAY} ${jar.TSTAMP}" />
<attribute name="Main-Class" value="${app.mainclass}" />
</manifest>
</jar>
</target>
<!-- Create distribution product -->
<target name="dist"
depends="auxdata.nodocs, ncidv.nolog, jar, startupmanager, javadoc.jar, userguide.jar"
description="Create distribution product" >
<!-- <copy file="${base.dir}/edu/wisc/ssec/mcidasv/util/GetMem.class" tofile="${dist.dir}/GetMem.class" failonerror="false" />
<copy file="${base.dir}/edu/wisc/ssec/mcidasv/util/GetVer.class" tofile="${dist.dir}/GetVer.class" failonerror="false" /> -->
<copy file="${build.dir}/edu/wisc/ssec/mcidasv/util/GetMem.class" tofile="${dist.dir}/GetMem.class" failonerror="false" />
<copy file="${build.dir}/edu/wisc/ssec/mcidasv/util/GetVer.class" tofile="${dist.dir}/GetVer.class" failonerror="false" />
</target>
<!-- Create nightly webstart distribution product -->
<target name="nightly"
depends="gitupdate, auxdata.nodocs, ncidv.nolog, jar.nightly, startupmanager, javadoc.jar, userguide.jar, source"
description="Create nightly webstart distribution product" />
<!-- Build and run McIDAS-V application (small memory) -->
<target name="jar.run" depends="jar" description="Build and run McIDAS-V application (small memory)">
<java classname="${app.mainclass}" fork="true" maxmemory="${run.smallheap}">
<classpath>
<path refid="app.classpath" />
<pathelement location="${dist.dir}/${app.jarname}" />
</classpath>
<assertions refid="mcv.assertions"/>
<sysproperty key="logback.configurationFile" value="${logback.default.config}" />
</java>
</target>
<!-- Build and run McIDAS-V application (large memory) -->
<target name="jar.runlarge" depends="jar" description="Build and run McIDAS-V application (large memory)">
<java fork="true" maxmemory="${run.largeheap}" dir="${dist.dir}" jar="${dist.dir}/mcidasv.jar">
<classpath refid="app.classpath" />
<assertions refid="mcv.assertions"/>
<jvmarg value="-XX:+UseConcMarkSweepGC" />
<jvmarg value="-XX:+CMSClassUnloadingEnabled" />
<jvmarg value="-XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses" />
<jvmarg value="-XX:MaxPermSize=512m" />
<jvmarg value="-noverify" />
<!--<jvmarg value="-XX:+DoEscapeAnalysis" />-->
<!--
The following two lines will allow the JVM to dump the heap's
contents on an OutOfMemory exception (very helpful!).
${heap.dir} defaults to "/tmp/mcidasv-heapdump.hprof" but feel free
to change it.
-->
<jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" />
<jvmarg value="-XX:HeapDumpPath=${heap.dir}" />
<!--
<sysproperty key="debug.localadde.rootdir" value="${addeservers.dir}" />
<sysproperty key="debug.adde.reqs" value="false" />
-->
<!--<sysproperty key="textureWidthMax" value="${visad.texturemax}" />-->
<sysproperty key="java.ext.dirs" value="${java.home}/lib/ext" />
<sysproperty key="java.library.path" value="${java.home}/lib/ext" />
<sysproperty key="loglevel" value="${run.log.level}" />
<sysproperty key="mcv.userpath" value="${userpath.dir}" />
<sysproperty key="mcv.logpath" value="${userpath.dir}/mcidasv.log" />
<sysproperty key="debug.adde.reqs" value="true" />
<sysproperty key="idv.usetimedriver" value="true" />
<sysproperty key="debug.localadde.rootdir" value="${addeservers.dir}" />
<sysproperty key="logback.configurationFile" value="${logback.default.config}" />
<sysproperty key="visad.java3d.textureNpot" value="true" />
<sysproperty key="visad.java3d.imageByRef" value="true" />
<sysproperty key="visad.java3d.geometryByRef" value="true" />
<sysproperty key="python.security.respectJavaAccessibility" value="false" />
<!--
<sysproperty key="sun.java2d.opengl" value="True" />
<sysproperty key="sun.java2d.trace" value="log,timestamp,count,out:./java2d.log,verbose" />
-->
<arg value="-forceaqua" />
<arg value="-userpath" />
<arg value="${userpath.dir}" />
</java>
</target>
<target name="debug.runlarge" depends="jar" description="Build and run McIDAS-V application (large memory)">
<java classname="${app.mainclass}" fork="true" maxmemory="${run.largeheap}">
<classpath refid="app.classpath" />
<assertions refid="mcv.assertions"/>
<!-- Prepares the JVM for a debugging session on port 8001 -->
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=y"/>
<!-- flags for attempting to workaround PermGen issues -->
<jvmarg value="-XX:+UseConcMarkSweepGC" />
<jvmarg value="-XX:+CMSClassUnloadingEnabled" />
<jvmarg value="-XX:+CMSPermGenSweepingEnabled" />
<jvmarg value="-XX:MaxPermSize=512m" />
<!-- Misc performance flags -->
<!--
<jvmarg value="-noverify" />
<jvmarg value="-XX:+DoEscapeAnalysis" />
-->
<!--
You might want to uncomment the following two lines. They'll have the
JVM dump the heap's contents on an OutOfMemory exception (very helpful!)
${heap.dir} defaults to "/tmp/javaheaps/", but feel free to change it.
-->
<jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" />
<jvmarg value="-XX:HeapDumpPath=${heap.dir}" />
<sysproperty key="java.ext.dirs" value="${java.home}/lib/ext" />
<sysproperty key="java.library.path" value="${java.home}/lib/ext" />
<sysproperty key="textureWidthMax" value="${visad.texturemax}" />
<sysproperty key="mcv.userpath" value="${userpath.dir}" />
<sysproperty key="mcv.logpath" value="${userpath.dir}/mcidasv.log" />
<sysproperty key="debug.localadde.rootdir" value="${addeservers.dir}" />
<sysproperty key="debug.adde.reqs" value="true" />
<sysproperty key="logback.configurationFile" value="${logback.default.config}" />
<sysproperty key="python.security.respectJavaAccessibility" value="false" />
<!--<sysproperty key="idv.usetimedriver" value="true" />-->
<arg value="-forceaqua" />
<arg value="-userpath" />
<arg value="${userpath.dir}" />
</java>
</target>
<!--<target name="debug.runlarge" depends="jar" description="Build and run McIDAS-V application (large memory)">
<java classname="${app.mainclass}" fork="true" maxmemory="${run.largeheap}">
<classpath>
<path refid="app.classpath" />
<pathelement location="${dist.dir}/${app.jarname}" />
</classpath>
<assertions refid="mcv.assertions"/>
<sysproperty key="logback.configurationFile" value="${logback.default.config}" />
<jvmarg value="-Xserver" />
<jvmarg value="-noverify" />
<jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" />
<jvmarg value="-XX:HeapDumpPath=${heap.dir}" />
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=y"/>
<sysproperty key="debug.localadde.rootdir" value="${addeservers.dir}" />
<sysproperty key="debug.adde.reqs" value="false" />
<arg value="-forceaqua" />
<arg value="-userpath" />
<arg value="/Users/jbeavers/Documents/McIDAS-V" />
</java>
</target>-->
<!-- Run McIDAS-V application (small memory) -->
<target name="run" description="Run McIDAS-V application (small memory)">
<java classname="${app.mainclass}" fork="true" maxmemory="${run.smallheap}">
<classpath>
<path refid="app.classpath" />
<pathelement location="${dist.dir}/${app.jarname}" />
</classpath>
<assertions refid="mcv.assertions"/>
<!-- Disables bytecode verification; seems to bring the snappy -->
<!-- <jvmarg value="-noverify" /> -->
<!-- This will make the JVM output the contents of the heap upon You can
control the output directory and/or filename with HeapDumpPath...
but it requires HeapDumpOnOutOfMemoryError to be enabled. -->
<!-- <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" /> -->
<!-- <jvmarg value="-XX:HeapDumpPath=${heap.dir}" /> -->
<!-- Allows you to point at arbitrary local ADDE servers -->
<!-- <sysproperty key="debug.localadde.rootdir" value="${addeservers.dir}" /> -->
<!-- Forces McIDAS-V to use Apple's Aqua L&F (only on OS X) -->
<!-- <arg value="-forceaqua" /> -->
<sysproperty key="logback.configurationFile" value="${logback.default.config}" />
<sysproperty key="python.security.respectJavaAccessibility" value="false" />
</java>
</target>
<!-- Run McIDAS-V application (large memory) -->
<target name="runlarge" description="Run McIDAS-V application (large memory)">
<java classname="${app.mainclass}" fork="true" maxmemory="${run.largeheap}">
<classpath>
<path refid="app.classpath" />
<pathelement location="${dist.dir}/${app.jarname}" />
</classpath>
<assertions refid="mcv.assertions"/>
<!-- Disables bytecode verification; seems to bring the snappy -->
<!-- <jvmarg value="-noverify" /> -->
<!-- This will make the JVM output the contents of the heap upon You can
control the output directory and/or filename with HeapDumpPath...
but it requires HeapDumpOnOutOfMemoryError to be enabled. -->
<!-- <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" /> -->
<!-- <jvmarg value="-XX:HeapDumpPath=${heap.dir}" /> -->
<!-- Allows you to point at arbitrary local ADDE servers -->
<!-- <sysproperty key="debug.localadde.rootdir" value="${addeservers.dir}" /> -->
<!-- Forces McIDAS-V to use Apple's Aqua L&F (only on OS X) -->
<!-- <arg value="-forceaqua" /> -->
<jvmarg value="-noverify" />
<jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" />
<jvmarg value="-XX:HeapDumpPath=${heap.dir}" />
<!-- flags for attempting to workaround PermGen issues -->
<jvmarg value="-XX:+UseConcMarkSweepGC" />
<jvmarg value="-XX:+CMSClassUnloadingEnabled" />
<jvmarg value="-XX:+CMSPermGenSweepingEnabled" />
<jvmarg value="-XX:MaxPermSize=512m" />
<sysproperty key="debug.localadde.rootdir" value="${addeservers.dir}" />
<sysproperty key="debug.adde.reqs" value="true" />
<sysproperty key="python.security.respectJavaAccessibility" value="false" />
<!--<sysproperty key="logback.configurationFile" value="${logback.default.config}" />-->
<arg value="-forceaqua" />
</java>
</target>
<!-- Generate the javadoc documentation -->
<target name="javadoc" description="Generate the javadoc documentation">
<tstamp>
<format property="javadoc.build.date" pattern="yyyy-MM-dd HH:mm Z" timezone="UTC" />
</tstamp>