-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathbuild.xml
795 lines (661 loc) · 35.1 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
<!--
=== Run release_all to do a full build and create all installers ===
This build file contains build targets that can be used by people downloading the source
to do a clean compile of their own JX version, e.g. clean, build, jar and dist. (The last
one, 'dist', includes all the previous targets.)
*However* it also contains some targets that are specific to Chris Betts's local build, that
are used to produce the packaged versions with the platform specific installers or do other
packaging work. So generally folks wanting to compile JX on their own would *not* want to
use the 'release', 'build_help', 'build_installers' or 'jar_jxworkbench' targets.
... uploading to sourceforge:
sftp pegacat,[email protected]
(Connecting to frs.sourceforge.net...)
(Password:)
sftp> cd /home/frs/project/j/jx/jxplorer
sftp> ls
(OldFiles jxplorer)
sftp> cd jxplorer
sftp> ls
... etc ...
-->
<project name="JXplorer" default="build">
<!--
Default property values that may be overriden by developers.
-->
<property name="jars" value="jars"/>
<property name="jasper" value="jasper"/>
<property name="src" value="src"/>
<property name="help" value="help"/>
<property name="dist" value="dist"/>
<property name="git" value="git"/>
<property name="dist_jxworkbench" value="dist_jxworkbench"/>
<property name="jasper_jars" value="jasper/lib"/>
<property name="jasper_reports" value="jasper/reports"/>
<property name="testprovider" value="testprovider"/>
<property name="compile.debug" value="on"/>
<property name="compile.optimize" value="on"/>
<property name="docs" value="docs"/>
<property name="apidocs" value="${docs}/api"/>
<property name="build_number_file" value="${src}/com/ca/directory/BuildNumber.java" />
<!--
Properties that may not be overriden by developers.
-->
<!-- VERSION NUMBER - IMPORTANT! -> also update in BitRock jxplorer.xml file and jxworkbench.xml file,
and makesure you have a README.${version_number} file, and that it is listed explicitly in jxplorer.xml and jxworkbench.xml -->
<property name="version_number" value="3.3.1.2"/>
<property name="version" value="JXv${version_number}"/>
<property name="classes" value="classes"/>
<property name="report" value="build_reports/"/>
<property name="release" value="../jxplorer_releases/release${version}"/>
<property name="installer_project_file" value="jxplorer.xml"/>
<property name="installer_output_dir" value="installers"/>
<property name="tempdoc_dir" value="tempdoc"/>
<property name="jxw_version" value="JXW_v${version_number}"/>
<property name="release_jxw" value="../jxplorer_releases/release_${jxw_version}"/>
<property name="installer_jxw_project_file" value="jxworkbench.xml"/>
<property name="installer_jxw_output_dir" value="installers"/>
<!--
Include developer's own property values.
-->
<property file="build.properties"/>
<path id="lib">
<fileset dir="${jars}" includes="*.jar"/>
<fileset dir="${jasper}/lib" includes="*.jar"/>
<fileset dir="${jasper}/lib_extras/" includes="*.jar"/>
</path>
<target name="init">
<tstamp>
<format property="init.timestamp" pattern="yyyy-MM-dd HH:mm z"/>
</tstamp>
</target>
<target name="build" depends="build_number" description="Build all Java code">
<mkdir dir="${classes}"/>
<javac srcdir="${src}"
destdir="${classes}"
classpathref="lib"
debug="${compile.debug}"
optimize="${compile.optimize}"
deprecation="off"
nowarn="off"
target="1.6"
source="1.6"
verbose="off">
</javac>
</target>
<target name="build_number" depends="init"
description="Rewrites the 'BuildNumber.java' file to set compile time stamp.">
<property name="build.number" value="${version} ${init.timestamp}"/>
<echo file="${build_number_file}">
package com.ca.directory;
// automatically generated by ant build.xml file.
//THIS FILE MUST NOT BE ADDED TO svn OR THE LIVE MAKE SYSTEM
public class BuildNumber
{
public static String value = "JXplorer (build ${version} ${init.timestamp})";
}
</echo>
</target>
<target name="clean" depends="init" description="Cleans all build artifacts">
<delete file="jxplorer.jar"/>
<delete file="${build_number_file}"/>
<delete dir="${classes}"/>
<delete dir="${dist}"/>
<delete dir="${release}"/>
<delete dir="${report}"/>
<delete dir="${docs}"/>
<delete dir="${installer_output_dir}"/>
<delete dir="${tempdoc_dir}"/>
</target>
<!-- ================================================================== -->
<!-- Genjar targets for producing the various jars for the project -->
<!-- ================================================================== -->
<!-- IS THERE SOME WAY TO GET THE Class-Path ATTRIBUTE TO USE THE 'lib' PATH DIRECTLY?? -->
<target name="jar" depends="build" description="Compiles and jars jxplorer.jar">
<jar jarfile="${jars}/jxplorer.jar">
<fileset dir="${classes}"
excludes="com/**/*Test.class
com/**/*TestSuite.class
com/pegacat/**/*.class"/>
<manifest>
<attribute name="Created-By" value="${user.name}"/>
<attribute name="Build-Version" value="${version}"/>
<attribute name="Class-Path" value="jxplorer.jar help.jar jhall.jar junit.jar log4j-1.2.8.jar"/>
<attribute name="Main-Class" value="com.ca.directory.jxplorer.JXplorer"/>
<section name="com/ca/directory/jxplorer/">
<attribute name="Specification-Title" value="JXplorer LDAP browser"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Implementation-Title" value="JXplorer http://jxplorer.org/"/>
<attribute name="Implementation-Version" value="${version} ${init.timestamp}"/>
<attribute name="Implementation-Vendor" value="JXplorer Open Source Project"/>
</section>
</manifest>
</jar>
</target>
<target name="jar_jxworkbench" depends="build" description="Compiles and jars jxworkbench.jar">
<jar jarfile="${jars}/jxworkbench.jar">
<fileset dir="${classes}"
includes="com/pegacat/jxworkbench/**/*.class"
excludes="com/**/*Test.class
com/**/*TestSuite.class"/>
<manifest>
<attribute name="Created-By" value="${user.name}"/>
<attribute name="Build-Version" value="${version}"/>
<section name="com/pegacat/jxworkbench/">
<attribute name="Specification-Title" value="JXplorer extension"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Implementation-Title" value="JXWorkBench http://jxworkbench.com/"/>
<attribute name="Implementation-Version" value="${version} ${init.timestamp}"/>
<attribute name="Implementation-Vendor" value="Pegacat Pty Ltd"/>
</section>
</manifest>
</jar>
</target>
<target name="jar_testprovider" depends="build" description="Compiles and jars testprovider.jar">
<jar jarfile="${jars}/testprovider.jar">
<fileset dir="${classes}"
includes="com/pegacat/testprovider/**/*.class"
excludes="com/**/*Test.class
com/**/*TestSuite.class"/>
<manifest>
<attribute name="Created-By" value="${user.name}"/>
<attribute name="Build-Version" value="${version}"/>
<attribute name="Main-Class" value="com.ca.directory.jxplorer.JXplorer"/>
<section name="com/ca/directory/jxplorer/">
<attribute name="Specification-Title" value="JXplorer LDAP Test Provider"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Implementation-Title" value="JXplorer http://jxplorer.org/"/>
<attribute name="Implementation-Version" value="${version} ${init.timestamp}"/>
<attribute name="Implementation-Vendor" value="JXplorer Open Source Project"/>
</section>
</manifest>
</jar>
</target>
<target name="dist_testprovider" depends="jar_testprovider" description="Creates JNDI test provider package">
<delete dir="${testprovider}"/>
<mkdir dir="${testprovider}"/>
<mkdir dir="${testprovider}/jars"/>
<mkdir dir="${testprovider}/src"/>
<mkdir dir="${testprovider}/src/com"/>
<mkdir dir="${testprovider}/src/com/pegacat"/>
<mkdir dir="${testprovider}/src/com/pegacat/testprovider"/>
<copy todir="${testprovider}/jars">
<fileset dir="${jars}" includes="testprovider.jar"/>
</copy>
<copy todir="${testprovider}" overwrite="true">
<fileset dir="." includes="TESTPROVIDER.TXT"/>
</copy>
<copy todir="${testprovider}/src/com/pegacat/testprovider" overwrite="true">
<fileset dir="src/com/pegacat/testprovider"/>
</copy>
</target>
<target name="copy_to_local_git" depends="dist"
description="copy 'dist' directory to local git repository, prior to pulling new version">
<copy todir="${git}">
<fileset dir="${dist}" />
</copy>
<copy file="${git}/jxplorer/README.md" tofile="${git}/README.md"></copy>
</target>
<target name="dist"
description="Build complete JXplorer distribution package"
depends="jar">
<delete dir="${dist}"/>
<mkdir dir="${dist}"/>
<mkdir dir="${dist}/jxplorer"/>
<mkdir dir="${dist}/jxplorer/classes"/>
<mkdir dir="${dist}/jxplorer/jars"/>
<copy todir="${dist}/jxplorer/jars">
<fileset dir="${jars}" includes="*.jar"/>
<fileset dir="." includes="jxplorer.jar"/>
</copy>
<copy file="README.TXT" tofile="README.${version_number}.TXT"></copy>
<copy file="README.TXT" tofile="README.md"></copy>
<copy todir="${dist}/jxplorer" overwrite="true">
<fileset dir="." includes="README.${version_number}.TXT,README.TXT, README.md, log4j.xml,licence.txt,jxplorer.sh,jxplorer.ico,jxplorer.bat,example.ldif,csvconfig.txt.default,build.xml"/>
</copy>
<!-- copy todir="${dist}/jxplorer/themes" overwrite="true">
<fileset dir="themes"/>
</copy -->
<copy todir="${dist}/jxplorer/security.default" overwrite="true">
<fileset dir="security.default"/>
</copy>
<copy todir="${dist}/jxplorer/plugins" overwrite="true">
<fileset dir="plugins"/>
</copy>
<copy todir="${dist}/jxplorer/language" overwrite="true">
<fileset dir="language"/>
</copy>
<copy todir="${dist}/jxplorer/images" overwrite="true">
<fileset dir="images"/>
</copy>
<copy todir="${dist}/jxplorer/templates" overwrite="true">
<fileset dir="templates"/>
</copy>
<copy todir="${dist}/jxplorer/icons" overwrite="true">
<fileset dir="icons"/>
</copy>
<copy todir="${dist}/jxplorer/htmldocs" overwrite="true">
<fileset dir="htmldocs"/>
</copy>
<copy todir="${dist}/jxplorer/src" overwrite="true">
<fileset dir="src" excludes="com/pegacat/jxworkbench/**/*.java"/>
</copy>
<copy todir="${dist}/jxplorer/JXplorer LDAP Browser.app" overwrite="true">
<fileset dir="JXplorer LDAP Browser.app"/>
</copy>
<fixcrlf srcdir="${dist}"
eol="unix"
eof="remove"
includes="**/*.sh"
/>
<fixcrlf srcdir="${dist}"
eol="dos"
eof="add"
includes="**/*.bat"
/>
<chmod dir="${dist}" perm="755"
includes="**/*.sh"/>
<chmod file="${dist}/jxplorer/JXplorer LDAP Browser.app/Contents/PkgInfo" perm="755"/>
<chmod file="${dist}/jxplorer/JXplorer LDAP Browser.app/Contents/MacOS/JXplorer LDAP Browser" perm="755"/>
</target>
<target name="dist_jxworkbench"
description="Build complete JXplorer distribution package"
depends="jar, jar_jxworkbench">
<delete dir="${dist_jxworkbench}"/>
<mkdir dir="${dist_jxworkbench}"/>
<mkdir dir="${dist_jxworkbench}/jxplorer"/>
<mkdir dir="${dist_jxworkbench}/jxplorer/classes"/>
<mkdir dir="${dist_jxworkbench}/jxplorer/jars"/>
<mkdir dir="${dist_jxworkbench}/jxplorer/jasper"/>
<mkdir dir="${dist_jxworkbench}/jxplorer/jasper/lib"/>
<mkdir dir="${dist_jxworkbench}/jxplorer/jasper/reports"/>
<copy todir="${dist_jxworkbench}/jxplorer/jars">
<fileset dir="${jars}" includes="*.jar"/>
<fileset dir="." includes="jxplorer.jar"/>
</copy>
<copy todir="${dist_jxworkbench}/jxplorer/jasper/lib">
<fileset dir="${jasper_jars}" includes="*.*"/>
</copy>
<copy todir="${dist_jxworkbench}/jxplorer/jasper/reports">
<fileset dir="${jasper_reports}" includes="*.jrxml"/>
</copy>
<copy todir="${dist_jxworkbench}/jxplorer" overwrite="true">
<fileset dir="." includes="README.${version_number}.TXT,log4j.xml,jxworkbench_licence.txt,licence.txt,jxplorer.sh,jxplorer.ico,jxplorer.bat,example.ldif,csvconfig.txt.default,build.xml,jasperreports.properties"/>
</copy>
<!-- copy todir="${dist_jxworkbench}/jxplorer/themes" overwrite="true">
<fileset dir="themes"/>
</copy -->
<copy todir="${dist_jxworkbench}/jxplorer/security.default" overwrite="true">
<fileset dir="security.default"/>
</copy>
<copy todir="${dist_jxworkbench}/jxplorer/plugins" overwrite="true">
<fileset dir="plugins"/>
</copy>
<copy todir="${dist_jxworkbench}/jxplorer/language" overwrite="true">
<fileset dir="language"/>
</copy>
<copy todir="${dist_jxworkbench}/jxplorer/images" overwrite="true">
<fileset dir="images"/>
</copy>
<copy todir="${dist_jxworkbench}/jxplorer/templates" overwrite="true">
<fileset dir="templates"/>
</copy>
<copy todir="${dist_jxworkbench}/jxplorer/icons" overwrite="true">
<fileset dir="icons"/>
</copy>
<copy todir="${dist_jxworkbench}/jxplorer/htmldocs" overwrite="true">
<fileset dir="htmldocs"/>
</copy>
<copy todir="${dist_jxworkbench}/jxplorer/src" overwrite="true">
<fileset dir="src" excludes="com/pegacat/jxworkbench/**/*.java"/>
</copy>
<copy todir="${dist_jxworkbench}/jxplorer/JXplorer LDAP Browser.app" overwrite="true">
<fileset dir="JXplorer LDAP Browser.app"/>
</copy>
<fixcrlf srcdir="${dist_jxworkbench}"
eol="unix"
eof="remove"
includes="**/*.sh"
/>
<fixcrlf srcdir="${dist_jxworkbench}"
eol="dos"
eof="add"
includes="**/*.bat"
/>
<chmod dir="${dist_jxworkbench}" perm="755"
includes="**/*.sh"/>
<chmod file="${dist_jxworkbench}/jxplorer/JXplorer LDAP Browser.app/Contents/PkgInfo" perm="755"/>
<chmod file="${dist_jxworkbench}/jxplorer/JXplorer LDAP Browser.app/Contents/MacOS/JXplorer LDAP Browser" perm="755"/>
</target>
<!-- NOTE: The properties for building the installers are specific to the
build machine. To get a build to work on you machine, you must:
* Install the BitRock Installerbuilder (http://installbuilder.bitrock.com/index.html?_kk=BitRock&_kt=d6fe5960-81be-43da-89de-f6e7fd7aaebe&gclid=CLjIqqOTuqcCFUMUKgodP3r3Ag)
* Edit the build.properties file to add values for the installer
properties
-->
<target name="build_installers" description="build install packages" depends="dist">
<delete dir="${installer_output_dir}"/>
<mkdir dir="${installer_output_dir}"/>
<exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_project_file}"/>
<arg value="windows"/>
</exec>
<exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_project_file}"/>
<arg value="linux"/>
</exec>
<exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_project_file}"/>
<arg value="freebsd"/>
</exec>
<exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_project_file}"/>
<arg value="solaris-intel"/>
</exec>
<exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_project_file}"/>
<arg value="solaris-sparc"/>
</exec>
<exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_project_file}"/>
<arg value="aix"/>
</exec>
<exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_project_file}"/>
<arg value="hpux"/>
</exec>
<!--exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_project_file}"/>
<arg value="osx"/>
</exec-->
<!--zip destfile="${installer_output_dir}/jxplorer-${version_number}-osx-installer.zip" basedir="${installer_output_dir}/jxplorer-${version_number}-osx-installer.app"/-->
<!--delete dir="${installer_output_dir}/jxplorer-${version_number}-osx-installer.app"/-->
<move todir="${release}">
<fileset dir="${installer_output_dir}"/>
</move>
</target>
<!-- for some reason the OSX build seems to only really work when run on a mac - so I'm making it a separate target.
Notes: need to replace installer "installbuilder.icns" file with jx.icns file to give installer package correct icon.
Notes: having a lot of problems maintaining 'execute' permissions on files within the app package...
...may need to manually check, fix and zip by hand...
XXX - giving up for time being, using 'build_[xx]_small_OSX' instead.
-->
<target name="build_installer_mac" description="build install packages for OSX" depends="dist">
<property name="installer_dir" value="/Applications/BitRock\ InstallBuilder\ Enterprise\ 7.2.4/bin/"/>
<!--property name="installer_project_file" value="/Users/chrisbetts/projects/jxplorer/jxplorer.xml"/-->
<!--property name="builder_output" location="/Users/chrisbetts/projects/jxplorer/installers"/-->
<property name="builder" location="/Applications/BitRock InstallBuilder Enterprise 7.2.4/bin/Builder.app/Contents/MacOS/installbuilder.sh"/>
<!--delete dir="${builder_output}"/-->
<delete file="*osx-installer*"/>
<mkdir dir="${installer_output_dir}"/>
<exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_project_file}"/>
<arg value="osx"/>
</exec>
<copy todir="${dist}/jxplorer" overwrite="true">
<fileset dir="." includes="README.${version_number}.TXT,log4j.xml,licence.txt,jxplorer.sh,jxplorer.ico,jxplorer.bat,example.ldif"/>
</copy>
<copy todir="${installer_output_dir}/jxplorer-${version_number}-osx-installer.app/Contents/Resources" overwrite="true">
<fileset dir="." includes="installbuilder.icns"/>
</copy>
<zip destfile="${installer_output_dir}/jxplorer-${version_number}-osx-installer.zip" basedir="${installer_output_dir}/jxplorer-${version_number}-osx-installer.app"/>
<!--delete dir="${builder_output}/jxplorer-${version_number}-osx-installer.app"/-->
<move todir="${release}">
<fileset dir="${installer_output_dir}"/>
</move>
</target>
<target name="build_help" description="jar up the help files in the help directory">
<delete file="${jars}/help.jar"/>
<jar jarfile="${jars}/help.jar">
<fileset dir="${help}"/>
<manifest>
<attribute name="Created-By" value="${user.name}"/>
<attribute name="Build-Version" value="${version}"/>
<section name="com/ca/directory/jxplorer/">
<attribute name="Specification-Title" value="JXplorer LDAP browser"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Implementation-Title" value="JXplorer http://jxplorer.org/"/>
<attribute name="Implementation-Version" value="${version} ${init.timestamp}"/>
<attribute name="Implementation-Vendor" value="JXplorer Open Source Project"/>
</section>
</manifest>
</jar>
</target>
<!-- The bitrock installer is fairly heavy for the mac; this builds a minimal install package for OSX based on
the work by Bob Allison (many thanks Bob!)
-->
<target name="build_small_OSX" description="build install packages for OSX" depends="dist">
<!--property name="builder_output" location="/Users/chrisbetts/projects/jxplorer/installers"/-->
<delete dir="${installer_output_dir}/OSX"/>
<mkdir dir="${installer_output_dir}/OSX/jxplorer-${version_number}.app/Contents"/>
<echo file="README_OSX.TXT">
Unfortunately we've been having trouble maintaining file permissions on OSX.
If jxplorer fails to start, check that the file:
jxplorer-${version_number}.app/Contents/MacOS/jxplorer
has executable permissions (e.g. go to the directory and >chmod 755 jxplorer).
</echo>
<move file="README_OSX.TXT" todir="${installer_output_dir}/OSX/"/>
<copy todir="${installer_output_dir}/OSX/jxplorer-${version_number}.app/Contents" overwrite="true">
<fileset dir="Contents"/>
</copy>
<copy todir="${installer_output_dir}/OSX/jxplorer-${version_number}.app/Contents/Resources" overwrite="true">
<fileset dir="${dist}/jxplorer"/>
</copy>
<chmod file="${installer_output_dir}/OSX/jxplorer-${version_number}.app/Contents/MacOS/jxplorer" perm="755"/>
<zip destfile="${installer_output_dir}/jxplorer-${version_number}-osx.zip">
<zipfileset dir="${installer_output_dir}/OSX" excludes="/jxplorer-${version_number}.app/Contents/MacOS/jxplorer, /jxplorer-${version_number}.app/Contents/Resources/jxplorer.sh"/>
<zipfileset dir="${installer_output_dir}/OSX/jxplorer-${version_number}.app/Contents/MacOS" includes="jxplorer" filemode="755" fullpath="jxplorer-${version_number}.app/Contents/MacOS/jxplorer"/>
<!--zipfileset dir="${installer_output_dir}/OSX/jxplorer-${version_number}.app/Contents/Resources" includes="jxplorer.sh" filemode="755" fullpath="jxplorer.app/Contents/Resources/jxplorer.sh"/-->
</zip>
<copy todir="${release}">
<fileset file="${installer_output_dir}/jxplorer-${version_number}-osx.zip"/>
</copy>
</target>
<target name="release_jx"
description="Create src and deploy all release zips/tar.bz2 files"
depends="clean, test, dist, javadoc, build_installers, build_small_OSX, copy_to_local_git">
<mkdir dir="${release}"/>
<mkdir dir="temp/jxplorer/src"/>
<copy todir="temp/jxplorer/src">
<fileset dir="${src}" excludes="com/pegacat/jxworkbench/**/*.java"/>
</copy>
<mkdir dir="${tempdoc_dir}/jxplorer/docs"/>
<move todir="${tempdoc_dir}/jxplorer/docs">
<fileset dir="${docs}"/>
</move>
<zip destfile="${release}/jxplorer-${version_number}-src.zip" basedir="temp"/>
<zip destfile="${release}/jxplorer-${version_number}-project.zip" basedir="${dist}"/>
<zip destfile="${release}/jxplorer-${version_number}-javadoc.zip" basedir="${tempdoc_dir}"/>
<tar tarfile="${release}/jxplorer-${version_number}-src.tar.bz2" basedir="temp" compression="bzip2"/>
<tar tarfile="${release}/jxplorer-${version_number}-project .tar.bz2" basedir="${dist}" compression="bzip2"/>
<tar tarfile="${release}/jxplorer-${version_number}-javadoc.tar.bz2" basedir="${tempdoc_dir}" compression="bzip2"/>
<zip destfile="${release}/jxplorer-${version_number}-testprovider.zip" basedir="${testprovider}"/>
<delete dir="temp"/>
<move todir="${docs}">
<fileset dir="${tempdoc_dir}/jxplorer/docs"/>
</move>
<delete dir="${tempdoc_dir}"/>
<delete dir="${dist}"/>
</target>
<!-- NOTE: The properties for building the installers are specific to the
build machine. To get a build to work on you machine, you must:
* Install the BitRock Installerbuilder (http://installbuilder.bitrock.com/index.html?_kk=BitRock&_kt=d6fe5960-81be-43da-89de-f6e7fd7aaebe&gclid=CLjIqqOTuqcCFUMUKgodP3r3Ag)
* Edit the build.properties file to add values for the installer
properties
-->
<target name="build_jxw_installers" description="build install packages" depends="dist_jxworkbench, build_jxw_small_OSX">
<mkdir dir="${installer_jxw_output_dir}"/>
<exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_jxw_project_file}"/>
<arg value="windows"/>
</exec>
<exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_jxw_project_file}"/>
<arg value="linux"/>
</exec>
<exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_jxw_project_file}"/>
<arg value="freebsd"/>
</exec>
<exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_jxw_project_file}"/>
<arg value="solaris-intel"/>
</exec>
<exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_jxw_project_file}"/>
<arg value="solaris-sparc"/>
</exec>
<exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_jxw_project_file}"/>
<arg value="aix"/>
</exec>
<exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_jxw_project_file}"/>
<arg value="hpux"/>
</exec>
<move todir="${release}">
<fileset dir="${installer_output_dir}">
</fileset>
<mapper type="glob" from="jxplorer-*" to="jxworkbench-*"/>
</move>
<!--exec executable="${builder}">
<arg value="build"/>
<arg value="${installer_project_file}"/>
<arg value="osx"/>
</exec-->
<!--zip destfile="${installer_output_dir}/jxplorer-${version_number}-osx-installer.zip" basedir="${installer_output_dir}/jxplorer-${version_number}-osx-installer.app"/-->
<!--delete dir="${installer_output_dir}/jxplorer-${version_number}-osx-installer.app"/-->
<!--move todir="${release_jxw}">
<fileset dir="${installer_jxw_output_dir}"/>
</move-->
</target>
<target name="release_jxw"
description="Create src and deploy all release JXW zips/tar.bz2 files"
depends="clean, test, javadoc, dist_jxworkbench, build_jxw_installers, build_jxw_small_OSX">
<mkdir dir="${release_jxw}"/>
<mkdir dir="temp/jxplorer/src"/>
<copy todir="temp/jxplorer/src">
<fileset dir="${src}" excludes="com/pegacat/jxworkbench/**/*.java"/>
</copy>
<mkdir dir="${tempdoc_dir}/jxplorer/docs"/>
<move todir="${tempdoc_dir}/jxplorer/docs">
<fileset dir="${docs}"/>
</move>
<!-- not currently distributing jxworkbench code and project details...
<zip destfile="${release_jxw}/jxworkbench-${version_number}-src.zip" basedir="temp"/>
<zip destfile="${release_jxw}/jxworkbench-${version_number}-project.zip" basedir="${dist_jxworkbench}"/>
<zip destfile="${release_jxw}/jxworkbench-${version_number}-javadoc.zip" basedir="${tempdoc_dir}"/>
<tar tarfile="${release_jxw}/jxworkbench-${version_number}-src.tar.bz2" basedir="temp" compression="bzip2"/>
<tar tarfile="${release_jxw}/jxworkbench-${version_number}-project .tar.bz2" basedir="${dist_jxworkbench}" compression="bzip2"/>
<tar tarfile="${release_jxw}/jxworkbench-${version_number}-javadoc.tar.bz2" basedir="${tempdoc_dir}" compression="bzip2"/>
<zip destfile="${release_jxw}/jxworkbench-${version_number}-testprovider.zip" basedir="${testprovider}"/>
-->
<zip destfile="${release}/jxworkbench-${version_number}-project.zip" basedir="${dist_jxworkbench}"/>
<zip destfile="${release_jxw}/jxworkbench-${version_number}-sample-reports.zip" basedir="${dist_jxworkbench}/jxplorer/jasper/reports"/>
<tar destfile="${release_jxw}/jxworkbench-${version_number}-sample-reports.zip" basedir="${dist_jxworkbench}/jxplorer/jasper/reports" compression="bzip2"/>
<move todir="${release}">
<fileset dir="${release_jxw}">
</fileset>
</move>
<delete dir="temp"/>
<move todir="${docs}">
<fileset dir="${tempdoc_dir}/jxplorer/docs"/>
</move>
<delete dir="${tempdoc_dir}"/>
<delete dir="${installer_jxw_output_dir}"/>
<delete dir="${dist_jxworkbench}"/>
</target>
<target name="release_all"
description="create both JXplorer and JXWorkbench releases"
depends="release_jx, release_jxw">
</target>
<target name="build_jxw_small_OSX" description="build install packages for OSX" depends="dist_jxworkbench">
<delete dir="${installer_jxw_output_dir}/OSX"/>
<mkdir dir="${installer_jxw_output_dir}/OSX/jxworkbench-${version_number}.app/Contents"/>
<echo file="README_OSX.TXT">
Unfortunately we've been having trouble maintaining file permissions on OSX.
If jxworkbench fails to start, check that the file:
jxworkbench-${version_number}.app/Contents/MacOS/jxplorer
has executable permissions (e.g. go to the directory and >chmod 755 jxplorer).
</echo>
<move file="README_OSX.TXT" todir="${installer_jxw_output_dir}/OSX/"/>
<copy todir="${installer_jxw_output_dir}/OSX/jxworkbench-${version_number}.app/Contents" overwrite="true">
<fileset dir="Contents"/>
</copy>
<copy todir="${installer_jxw_output_dir}/OSX/jxworkbench-${version_number}.app/Contents/Resources" overwrite="true">
<fileset dir="${dist_jxworkbench}/jxplorer"/>
</copy>
<chmod file="${installer_jxw_output_dir}/OSX/jxworkbench-${version_number}.app/Contents/MacOS/jxplorer" perm="755"/>
<zip destfile="${installer_jxw_output_dir}/jxworkbench-${version_number}-osx.zip">
<zipfileset dir="${installer_jxw_output_dir}/OSX" excludes="/jxworkbench-${version_number}.app/Contents/MacOS/jxplorer, /jxworkbench-${version_number}.app/Contents/Resources/jxplorer.sh, "/>
<zipfileset dir="${installer_jxw_output_dir}/OSX/jxworkbench-${version_number}.app/Contents/MacOS" includes="jxplorer" filemode="755" fullpath="jxworkbench-${version_number}.app/Contents/MacOS/jxplorer"/>
<zipfileset dir="${installer_jxw_output_dir}/OSX/jxworkbench-${version_number}.app/Contents/Resources" includes="jxplorer.sh" filemode="755" fullpath="jxworkbench-${version_number}.app/Contents/Resources/jxplorer.sh"/>
</zip>
<copy todir="${release_jxw}">
<fileset file="${installer_jxw_output_dir}/jxworkbench-${version_number}-osx.zip"/>
</copy>
</target>
<!-- ================================================================== -->
<!-- JUnit test targets -->
<!-- -->
<!-- Reminder: to get these to work you require optional.jar and -->
<!-- junit.jar in the %ANT_HOME%/lib directory -->
<!-- ================================================================== -->
<target name="compile_tests" depends="build">
<mkdir dir="${report}"/>
<javac destdir="${classes}" includeAntRuntime="false"
classpathref="lib" debug="${compile.debug}">
<src path="${src}"/>
</javac>
</target>
<target name="test" depends="compile_tests"
description="Run JUnit tests (requires junit.jar in %ANT%/lib !!!)">
<junit printsummary="yes" haltonerror="off" haltonfailure="on">
<classpath>
<pathelement location="${classes}"/>
<!-- pathelement path="${jars}" / -->
<fileset dir="${jars}" includes="*.jar"/> <!-- &*(%&*())(* required to avoid obscure errors with log4j...) -->
</classpath>
<formatter type="plain"/>
<batchtest fork="yes" todir="${report}">
<fileset dir="${classes}">
<include name="**/*TestSuite.class"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="javadoc" description="generate javadoc source documentation (produces MANY warnings :-) )">
<mkdir dir="${apidocs}"/>
<javadoc access="private"
destdir="${apidocs}"
author="true"
version="true"
classpathref="lib"
use="true"
additionalparam="-breakiterator"
windowtitle="JXplorer Source Documentation">
<packageset dir="src" defaultexcludes="yes">
<include name="com/**"/>
<exclude name="com/pegacat/jxworkbench/**"/>
</packageset>
<doctitle><![CDATA[<h1>JXplorer Ldap Browser</h1>]]></doctitle>
<bottom><![CDATA[<i>This is Open Source Code under the CA Open Source Licence ( == Apache Licence)</i>]]></bottom>
<link href="http://download.oracle.com/javase/1.5.0/docs/api/"/>
</javadoc>
</target>
</project>