forked from MyRobotLab/myrobotlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
852 lines (733 loc) · 38.6 KB
/
build.xml
File metadata and controls
852 lines (733 loc) · 38.6 KB
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
<!--
Dependencies: git
proxy
-Dhttp.proxyHost=webproxy -Dhttp.proxyPort=80 -Dhttps.proxyHost=webproxy -Dhttps.proxyPort=80
curl -i https://api.github.com/repos/MyRobotLab/myrobotlab/releases -H "Accept:application/vnd.github.manifold-preview+json"
curl -i -x http://webproxy:80 https://api.github.com/repos/MyRobotLab/myrobotlab/releases -H "Accept:application/vnd.github.manifold-preview+json"
The goal is always to make the build more simple :)
master's branch's build version is to be generated on a tag - will be 1.1.0
develop's build version is generated from the travis build number - would be nice to reset Travis' build number on release - but we can't do this
develop's build version is 1.0.(build version)
Currently the only dependencies come with the git clone are in the build directory.
Build Type - Goals
min - local build - min distribution
test - junit and Incubator
TODO - generate junit reports
http://stackoverflow.com/questions/12445582/generating-junit-reports-from-the-command-line
TODO
Push notification from repository
curl http://yourserver/jenkins/git/notifyCommit?url=<URL of the Git repository>[&branches=branch1[,branch2]*][&sha1=<commit ID>]
TODO test on multiple platforms Linux etc
TODO build native code with virtual vms - put in CI system
TODO - list use cases - all need tags - v1.0.bn - testing - (incremental fast build)
use cases - (local only - no connectivity | post bleeding edge jar | post release.zip)
connectivity - dependencies (none all local | myrobotlab.org/buildnumber.php | github | proxy)
build types - [clean | simple | incremental]
uploads - push release - [ none | release myrobotlab.tag.jar | myrobotlab.tag.zip | both? | (local only)]
build location - [local | jenkins | travis]
tests [multi platform]
TODO - dependencies
build - java 1.7
dist - git token environment variable
Jenkins Notes -
Jenkins->Manage Jenkins->Manage Plugins->Advanced tab to set proxy - git client
The git client will not follow global .gitconfig directives
Jenkins->Node->(master)->configure - configure ANT_HOME JAVA_HOME and PATH
tasks
FIXME - incremental build (no temp)
FIXME - need proxy support
FIXME - git hub release SHOULD NOT be created before compilation/distribution
init
compile
dist
clean
test
report
mail
javadoc
definitions
${version} = if master branch then ${version} = travis tag e.g. 1.1.39
if develop branch then ${version} = 1.0. + travis build number
publishBleedingEdge
publishRelease
JSON Urls
https://api.github.com/repos/MyRobotLab/myrobotlab
https://api.github.com/repos/MyRobotLab/myrobotlab/releases
https://api.github.com/repos/MyRobotLab/myrobotlab/contents/
https://api.github.com/repos/MyRobotLab/myrobotlab/git/trees/:sha
repo
https://api.github.com/repos/MyRobotLab/repo
https://api.github.com/repos/MyRobotLab/repo/contents/:org/:module/:version
https://api.github.com/repos/MyRobotLab/repo/contents/com.google.gson/gson
References:
-Dhttps.proxyHost=webproxy -Dhttps.proxyPort=80 -Dhttp.proxyHost=webproxy -Dhttp.proxyPort=80
-->
<!-- The MyRobotLab ant build.xml -->
<project name="myrobotlab" default="report" basedir="." xmlns:jacoco="antlib:org.jacoco.ant">
<description>http://myrobotlab.org myrobotlab build file</description>
<!-- First thing is load the local properties -->
<property file="local.properties" />
<!-- load default build properties -->
<property file="build.properties" />
<!-- backfill with the environment variables -->
<property environment="env" />
<!-- set the tag, if not already set in a local properties file -->
<echo message="TRAVIS_TAG=${env.TRAVIS_TAG}" />
<echo message="TRAVIS_BUILD_NUMBER=${env.TRAVIS_BUILD_NUMBER}" />
<property name="developVersion" value="1.0.${env.TRAVIS_BUILD_NUMBER}" />
<property name="masterVersion" value="${env.TRAVIS_TAG}" />
<property name="version" value="${developVersion}" />
<echo message="version=${version}" />
<!-- set global properties for this build -->
<!-- the all powerful branch property if copied to master - will need to be updated -->
<property name="branch" value="develop"/>
<property name="fs" location="${file.separator}" />
<!-- the source code for release -->
<property name="src" location="src" />
<!-- unit test source code -->
<property name="test" location="test" />
<!-- directory for the build to go into -->
<property name="build" location="build" />
<!-- location for the unit test reports to go into -->
<property name="report" location="dist/current/${branch}/report" />
<!-- location for the jacoco reports -->
<property name="result.jacoco.file" location="${build}/jacoco.exec" />
<property name="result.report.dir" location="${report}/jacoco" />
<!-- directory for the distrbituion to go into -->
<property name="dist" location="dist/current/${branch}" />
<available file="${build}/classes/resource/license" property="license.present" />
<property name="repo" location="../repo" />
<tstamp />
<!-- TODO: is this right? eek.. move contrib somewhere -->
<!-- Include the ant contrib task defs -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="build-lib/ant-contrib-0.6.jar" />
</classpath>
</taskdef>
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
<classpath path="build-lib/jacocoant.jar"/>
</taskdef>
<!-- FIXME - fixme with ivy -->
<path id="compile.classpath">
<pathelement location="bin" />
<pathelement location="${repo}/org.wikidata.wdtk/0.5.0/wdtk-client-0.5.0.jar"/>
<pathelement location="${repo}/com.mxgraph.jgraph/1.6.1.2/jgraphx.jar"/>
<pathelement location="${repo}/com.sun.java3d/1.5.1/j3dcore.jar"/>
<pathelement location="${repo}/com.sun.java3d/1.5.1/j3dutils.jar"/>
<pathelement location="${repo}/com.sun.java3d/1.5.1/vecmath.jar"/>
<pathelement location="${repo}/com.sun.speech.freetts/1.2/freetts.jar"/>
<pathelement location="${repo}/edu.cmu.sphinx/4-1.0beta6/batch.jar"/>
<pathelement location="${repo}/edu.cmu.sphinx/4-1.0beta6/jsapi-1.0-base.jar"/>
<pathelement location="${repo}/edu.cmu.sphinx/4-1.0beta6/sphinx4.jar"/>
<pathelement location="${repo}/edu.cmu.sphinx/4-1.0beta6/tags.jar"/>
<pathelement location="${repo}/edu.cmu.sphinx/4-1.0beta6/TIDIGITS_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar"/>
<pathelement location="${repo}/edu.cmu.sphinx/4-1.0beta6/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar"/>
<pathelement location="${repo}/edu.cmu.sphinx/4-1.0beta6/WSJ_8gau_13dCep_8kHz_31mel_200Hz_3500Hz.jar"/>
<pathelement location="${repo}/gnu.io.rxtx/2.1-7r2/RXTXcomm.jar"/>
<pathelement location="${repo}/javaFlacEncoder.FLAC_FileEncoder/0.1/javaFlacEncoder-0.1.jar"/>
<pathelement location="${repo}/javax.speech.recognition/1.0/jsapi.jar"/>
<pathelement location="${repo}/javax.vecmath/1.5.1/vecmath.jar"/>
<pathelement location="${repo}/javazoom.jl.player/1.0.1/jl1.0.1.jar"/>
<pathelement location="${repo}/net.sourceforge.simbad/1.4/simbad-1.4.jar"/>
<pathelement location="${repo}/org.apache.ivy/2.4.0-rc1/ivy-2.4.0-rc1.jar"/>
<pathelement location="${repo}/org.jfugue.music/4.0.3/jfugue-4.0.3.jar"/>
<pathelement location="${repo}/org.op.chess/1.0.0/ChessBoard.jar"/>
<pathelement location="${repo}/org.python.core/2.5.2/jython.jar"/>
<pathelement location="${repo}/org.tritonus.share.sampled.floatsamplebuffer/0.3.6/tritonus_share-0.3.6.jar"/>
<pathelement location="${repo}/simbad.gui/1.4/simbad-1.4.jar"/>
<pathelement location="${repo}/wiiuse.wiimote/0.12b/wiiusej.jar"/>
<pathelement location="${repo}/com.sun.mail/1.4.5/dsn.jar"/>
<pathelement location="${repo}/com.sun.mail/1.4.5/imap.jar"/>
<pathelement location="${repo}/com.sun.mail/1.4.5/mail.jar"/>
<pathelement location="${repo}/com.sun.mail/1.4.5/mailapi.jar"/>
<pathelement location="${repo}/com.sun.mail/1.4.5/pop3.jar"/>
<pathelement location="${repo}/com.sun.mail/1.4.5/smtp.jar"/>
<pathelement location="${repo}/org.fife.rsyntaxtextarea/2.0.4.1/rsyntaxtextarea.jar"/>
<pathelement location="${repo}/org.fife.autocomplete/2.0.4/autocomplete.jar"/>
<pathelement location="${repo}/com.googlecode.jssc/2.8.0/jssc-2.8.0.jar"/>
<pathelement location="${repo}/com.googlecode.chatterbot/1.2.1/chatter-bot-api.jar"/>
<pathelement location="${repo}/com.pi4j.pi4j/0.0.5/pi4j-core.jar"/>
<pathelement location="${repo}/com.pi4j.pi4j/0.0.5/pi4j-gpio-extension.jar"/>
<pathelement location="${repo}/it.sauronsoftware.cron4j/2.2.5/cron4j-2.2.5.jar"/>
<pathelement location="${repo}/org.drjava.java/20120818/asm-3.1.jar"/>
<pathelement location="${repo}/org.drjava.java/20120818/dynamicjava-base.jar"/>
<pathelement location="${repo}/org.drjava.java/20120818/plt.jar"/>
<pathelement location="${repo}/net.sourceforge.tess4j/1.1/tess4j.jar"/>
<pathelement location="${repo}/org.apache.commons.httpclient/4.2.5/commons-codec-1.6.jar"/>
<pathelement location="${repo}/org.apache.commons.httpclient/4.2.5/commons-logging-1.1.1.jar"/>
<pathelement location="${repo}/org.apache.commons.httpclient/4.2.5/fluent-hc-4.2.5.jar"/>
<pathelement location="${repo}/org.apache.commons.httpclient/4.2.5/httpclient-4.2.5.jar"/>
<pathelement location="${repo}/org.apache.commons.httpclient/4.2.5/httpclient-cache-4.2.5.jar"/>
<pathelement location="${repo}/org.apache.commons.httpclient/4.2.5/httpcore-4.2.4.jar"/>
<pathelement location="${repo}/org.apache.commons.httpclient/4.2.5/httpmime-4.2.5.jar"/>
<pathelement location="${repo}/com.wolfram.alpha/1.1/WolframAlpha-1.1.jar"/>
<pathelement location="${repo}/com.strobel.decompiler/0.3.2/procyon-decompiler-0.3.2.jar"/>
<pathelement location="${repo}/edu.northwestern.topcodes/1.0/topcodes.jar"/>
<pathelement location="${repo}/org.jivesoftware.smack/3.3.0/smack.jar"/>
<pathelement location="${repo}/org.twitter4j.twitter/3.0.5/twitter4j-async-3.0.5.jar"/>
<pathelement location="${repo}/org.twitter4j.twitter/3.0.5/twitter4j-core-3.0.5.jar"/>
<pathelement location="${repo}/org.twitter4j.twitter/3.0.5/twitter4j-examples-3.0.5.jar"/>
<pathelement location="${repo}/org.twitter4j.twitter/3.0.5/twitter4j-media-support-3.0.5.jar"/>
<pathelement location="${repo}/org.twitter4j.twitter/3.0.5/twitter4j-stream-3.0.5.jar"/>
<pathelement location="${repo}/com.googlecode.simpleopenni/1.96/SimpleOpenNI.jar"/>
<pathelement location="${repo}/com.github.recognito/0.1.0/recognito-0.1.0-SNAPSHOT.jar"/>
<pathelement location="${repo}/org.alicebot.ab/0.0.6.26/Ab.jar"/>
<pathelement location="${repo}/com.leapmotion/2.1.3/LeapJava.jar"/>
<pathelement location="${repo}/se.comhem.chess/1.1.2/cuckoo112.jar"/>
<pathelement location="${repo}/javazoom.spi/1.9.5/mp3spi1.9.5.jar"/>
<pathelement location="${repo}/org.junit/4.11/hamcrest-core-1.3.jar"/>
<pathelement location="${repo}/org.apache.solr/4.10.2/noggit-0.5.jar"/>
<pathelement location="${repo}/org.apache.solr/4.10.2/solr-solrj-4.10.2.jar"/>
<pathelement location="${repo}/org.apache.solr/4.10.2/commons-io-2.3.jar"/>
<pathelement location="${repo}/org.eclipse.paho/1.0/org.eclipse.paho.client.mqttv3_1.0.0.jar"/>
<pathelement location="${repo}/org.junit/4.11/junit-4.11.jar"/>
<pathelement location="${repo}/com.google.gson/2.2.4/gson-2.2.4.jar"/>
<pathelement location="${repo}/net.java.games.jinput/20120914/jinput.jar"/>
<pathelement location="${repo}/io.netty/3.10.0/netty-3.10.0.Final.jar"/>
<pathelement location="${repo}/org.atmosphere.nettosphere/2.3.0/geronimo-servlet_3.0_spec-1.0.jar"/>
<pathelement location="${repo}/org.atmosphere.nettosphere/2.3.0/nettosphere-assembly-2.3.0.jar"/>
<pathelement location="${repo}/org.atmosphere.nettosphere/2.3.0/wasync-2.1.3-20150917-all.jar"/>
<pathelement location="${repo}/org.bytedeco.ffmpeg/2.6.1/ffmpeg-2.6.1-1.0-20150502.231737-1-windows-x86_64.jar"/>
<pathelement location="${repo}/org.bytedeco.ffmpeg/2.6.1/ffmpeg-2.6.1-0.11.jar"/>
<pathelement location="${repo}/org.eclipse.jetty/7.6.13/jetty-server-7.6.13.v20130916.jar"/>
<pathelement location="${repo}/org.eclipse.jetty/7.6.13/jetty-servlet-7.6.13.v20130916.jar"/>
<pathelement location="${repo}/org.eclipse.jetty/7.6.13/jetty-util-7.6.13.v20130916.jar"/>
<pathelement location="${repo}/marytts/5.1.2/marytts-runtime-5.1.2.jar"/>
<pathelement location="${repo}/marytts/5.1.2/marytts-common-5.1.2.jar"/>
<pathelement location="${repo}/marytts/5.1.2/marytts-signalproc-5.1.2.jar"/>
<pathelement location="${repo}/marytts/5.1.2/emotionml-checker-java-1.1.jar"/>
<pathelement location="${repo}/marytts/5.1.2/jtok-core-1.9.1.jar"/>
<pathelement location="${repo}/marytts/5.1.2/commons-colleciton-3.2.1.jar"/>
<pathelement location="${repo}/marytts/5.1.2/commons-lang-2.6.jar"/>
<pathelement location="${repo}/marytts/5.1.2/hsqldb-2.0.0.jar"/>
<pathelement location="${repo}/marytts/5.1.2/log4j-1.2.16.jar"/>
<pathelement location="${repo}/marytts/5.1.2/freetts-de-1.0.jar"/>
<pathelement location="${repo}/marytts/5.1.2/freetts-en_us-1.0.jar"/>
<pathelement location="${repo}/marytts/5.1.2/icu4j-54.1.1.jar"/>
<pathelement location="${repo}/marytts/5.1.2/voice-cmu-slt-hsmm-5.1.2.jar"/>
<pathelement location="${repo}/marytts/5.1.2/marytts-lang-en-5.1.2.jar"/>
<pathelement location="${repo}/marytts/5.1.2/marytts-lang-de-5.1.2.jar"/>
<pathelement location="${repo}/marytts/5.1.2/marytts-lang-fr-5.1.2.jar"/>
<pathelement location="${repo}/marytts/5.1.2/marytts-lang-it-5.1.2.jar"/>
<pathelement location="${repo}/marytts/5.1.2/marytts-lang-ru-5.1.2.jar"/>
<pathelement location="${repo}/marytts/5.1.2/marytts-lang-sv-5.1.2.jar"/>
<pathelement location="${repo}/marytts/5.1.2/marytts-lang-te-5.1.2.jar"/>
<pathelement location="${repo}/marytts/5.1.2/marytts-lang-tr-5.1.2.jar"/>
<pathelement location="${repo}/org.slf4j.logback/1.1.3/logback-classic-1.1.3.jar"/>
<pathelement location="${repo}/org.slf4j.logback/1.1.3/logback-core-1.1.3.jar"/>
<pathelement location="${repo}/org.slf4j.logback/1.1.3/slf4j-api-1.7.12.jar"/>
<pathelement location="${repo}/org.bytedeco.javacv/1.1/javacpp.jar"/>
<pathelement location="${repo}/org.bytedeco.javacv/1.1/javacv.jar"/>
<pathelement location="${repo}/org.bytedeco.javacv/1.1/opencv.jar"/>
<pathelement location="${repo}/org.bytedeco.javacv/1.1/opencv-windows-x86_64.jar"/>
<pathelement location="${repo}/org.bytedeco.javacv/1.1/opencv-macosx-x86_64.jar"/>
<pathelement location="${repo}/com.thalmic.myo/0.9.0/myo-java-0.9.1-SNAPSHOT.jar"/>
<!-- oculus stuff for display. TODO: clean and re-order these -->
<pathelement location="${repo}/org.saintandreas.jovr/0.7/jovr-0.7.0.0.jar"/>
<pathelement location="${repo}/org.saintandreas.jovr/0.7/jna-4.2.0.jar"/>
<pathelement location="${repo}/org.saintandreas.jovr/0.7/lwjgl-2.9.3.jar"/>
<pathelement location="${repo}/org.saintandreas.jovr/0.7/lwjgl_util-2.9.3.jar"/>
<pathelement location="${repo}/org.saintandreas.jovr/0.7/oria-resources-1.0.4.jar"/>
<pathelement location="${repo}/org.saintandreas.jovr/0.7/xres-1.0.3.jar"/>
<pathelement location="${repo}/org.saintandreas.jovr/0.7/slick-util.jar"/>
<pathelement location="${repo}/org.saintandreas.jovr/0.7/glamour-lwjgl-1.0.8.jar"/>
<pathelement location="${repo}/org.saintandreas.jovr/0.7/math-1.0.4.jar"/>
<pathelement location="${repo}/org.saintandreas.jovr/0.7/guava-17.0.jar"/>
<pathelement location="${repo}/org.saintandreas.jovr/0.7/jscience-4.3.1.jar"/>
<!-- end oculus stuff.. TODO: clean it up! -->
<pathelement location="${repo}/net.sourceforge.boofcv/0.19/BoofCV-WebcamCapture-0.19.jar"/>
<pathelement location="${repo}/net.sourceforge.boofcv/0.19/BoofCV-xuggler-0.19.jar"/>
<pathelement location="${repo}/net.sourceforge.boofcv/0.19/core-0.28.jar"/>
<pathelement location="${repo}/pl.sarxos.webcam/0.3.10/webcam-capture-0.3.10.jar"/>
<pathelement location="${repo}/pl.sarxos.webcam/0.3.10/bridj-0.6.2.jar"/>
<pathelement location="${repo}/com.xuggle.xuggler/5.4/xuggle-xuggler-arch-x86_64-w64-mingw32.jar"/>
<pathelement location="${repo}/com.xuggle.xuggler/5.4/xuggle-xuggler-noarch-5.4.jar"/>
<pathelement location="${repo}/com.coobird.thumbnail/0.4.2/thumbnailator-0.4.2-all.jar"/>
<!--feed4j stuff -->
<pathelement location="${repo}/feed4j/1.0/feed4j.jar"/>
<pathelement location="${repo}/feed4j/1.0/dom4j-1.6.1.jar"/>
<pathelement location="${repo}/feed4j/1.0/nekohtml.jar"/>
<pathelement location="${repo}/feed4j/1.0/xercesImpl.jar"/>
<pathelement location="${repo}/feed4j/1.0/xml-apis.jar"/>
<!-- for the document processing pipeline.. it'd be nice to refactor this out. -->
<pathelement location="${repo}/com.thoughtworks.xstream/1.4.7/xstream-1.4.7.jar"/>
<pathelement location="${repo}/org.apache.tika/1.11/tika-core-1.11.jar"/>
<pathelement location="${repo}/net.sf.opencsv/2.3/opencsv-2.3.jar"/>
<pathelement location="${repo}/org.jsoup/1.8.3/jsoup-1.8.3.jar"/>
<!-- for OpenNLP stage in pipeline -->
<pathelement location="${repo}/opennlp/1.6/opennlp-tools-1.6.0.jar"/>
<pathelement location="${repo}/com.azure.translator/0.6.2/microsoft-translator-java-api-0.6.2-jar-with-dependencies.jar"/>
<pathelement location="build-lib/tools.jar"/>
</path>
<!-- additional jars required to compile unit tests -->
<path id="test.classpath">
<!--
<pathelement location="${repo}/org.apache.log4j/1.2.14/log4j-1.2.14.jar" />
<pathelement location="${repo}/org.junit/4.11/junit-4.11.jar" />
-->
<pathelement location="${repo}/org.slf4j.logback/1.1.3/logback-classic-1.1.3.jar"/>
<pathelement location="${repo}/org.slf4j.logback/1.1.3/logback-core-1.1.3.jar"/>
<pathelement location="${repo}/org.slf4j.logback/1.1.3/slf4j-api-1.7.12.jar"/>
<pathelement location="${repo}/org.junit/4.11/hamcrest-core-1.3.jar" />
<!-- TODO: why is the normal compile classpath omitted? -->
<pathelement location="${repo}/org.apache.solr/4.10.2/solr-solrj-4.10.2.jar" />
<!-- remove <path refid="compile.classpath" /> -->
<!-- remove <pathelement location="${build}/classes" /> -->
</path>
<condition property="foo.path" value="C:\Foo\Dir">
<os family="windows" />
</condition>
<condition property="foo.path" value="/home/foo/dir">
<os family="unix" />
</condition>
<fail unless="foo.path">No foo.path set for this OS!</fail>
<target name="help">
<echo message="" />
<echo message="-----------------------------" />
<echo message="My RobotLab Build System Help" />
<echo message="-----------------------------" />
<echo message="" />
<java fork="false" classname="org.apache.tools.ant.Main" taskname="-">
<arg value="-projecthelp"/>
<arg value="-f"/>
<arg value="${ant.file}"/>
</java>
</target>
<!-- ================ init begin ================= -->
<target name="init" depends="clean,repoClone" description="initialize things for the build">
<echo message="compiling with ${ant.java.version}" />
<!-- good for debugging -->
<!-- echoproperties / -->
<property name="XMLConstants.FEATURE_SECURE_PROCESSING" value="false" />
<!-- mail task properties -->
<property name="mail.host" value="smtp.gmail.com" />
<property name="mail.port" value="464" />
<property name="mail.subjectalert" value="Test build" />
<property name="mail.ssl" value="yes" />
<property name="mail.username" value="" />
<!-- get from local properties file -->
<property name="mail.password" value="" />
<!-- get from local properties file -->
<property name="mail.from" value="build@myrobotlab.org" />
<property name="mail.tolist" value="" />
<!-- nice for debugging -->
<!-- echoproperties / -->
<!-- TODO - get repo's comment -->
<echo message="date time ${DSTAMP}.${TSTAMP}" />
<property name="build.number" value="${env.BUILD_NUMBER}" />
<!-- git log -1 - -pretty=%B -->
<!-- FIXME - OOPS forgot about mrl pull ! only have repo !!! -->
<exec executable="git" dir="./" outputproperty="gitcomment">
<arg value="log" />
<arg value="-1" />
<arg value="--pretty=%B" />
</exec>
<!-- TODO you need to filter out brackets []{} -->
<propertyregex property="comment" input="${gitcomment}" regexp="\r|\n" replace=" " global="true" />
<echo message="Last commit comment [${comment}]" />
<!-- property name="comment" value="${DSTAMP}.${TSTAMP}" /-->
<!-- http://larrycai.wordpress.com/2013/02/22/publish-the-artifacts-inside-travis-ci-to-github/ -->
<property name="github.token" value="${env.GITHUB_TOKEN}" />
<!-- echo message="github.token ${env.GITHUB_TOKEN}" / -->
<!-- after_success:
- git commit -a -m "Committed by Travis-CI build number: $TRAVIS_JOB_ID"
-->
<!-- TODO set all subsequent directories or resources with appended tag -->
<!-- TODO branch on the tag in release -->
<property name="temp" location="${dist}/temp/${version}" />
<!-- Create the build directory structure used by compile -->
<!-- create all necessary directories -->
<mkdir dir="${dist}" />
<mkdir dir="${dist}/archive" />
<mkdir dir="${dist}/report" />
<!-- the build directory -->
<mkdir dir="${build}" />
<mkdir dir="${build}/classes" />
<mkdir dir="${build}/lib" />
<mkdir dir="${build}/test" />
<mkdir dir="${build}/report" />
</target>
<!-- ================ init end ================= -->
<!-- FIXME !!!- use ivy correctly ! -->
<!-- FIXME !!!- manage proxy for ivy -->
<!-- =============== repo begin =============== -->
<!-- repo added if not already cloned - does update to head -->
<target name="repoCheck" description="Check the repo if network is available, and pull if so">
<available file="${repo}" property="repo.present" />
<!-- http://stackoverflow.com/questions/18097555/execute-ant-task-if-two-conditions-are-met -->
<condition property="git.pull">
<and>
<available file="${repo}" />
<istrue value="${network.available}" />
</and>
</condition>
<condition property="git.clone">
<and>
<not>
<available file="${repo}" />
</not>
</and>
</condition>
</target>
<target name="repoExists" depends="repoCheck" if="git.pull">
<echo message="git pull ${repo}" />
<echo message="${git.pull}" />
<exec executable="git" dir="${repo}">
<!-- <arg value="fetch"/> -->
<arg value="pull" />
</exec>
</target>
<target name="repoDoesNotExists" depends="repoCheck" if="git.clone">
<echo message="git clone --branch=${branch} https://github.com/MyRobotLab/repo.git ${repo}" />
<exec executable="git">
<arg value="clone" />
<arg value="https://github.com/MyRobotLab/repo.git" />
<arg value="${repo}" />
</exec>
</target>
<!-- TODO: Consider moving this ... and get rid of it , but it will require dep management -->
<target name="repoClone">
<echo message="git clone --depth=1 --branch=${branch} https://github.com/MyRobotLab/repo.git ${repo}" />
<exec executable="git">
<arg value="clone" />
<arg value="--depth=1" />
<arg value="--branch=${branch}" />
<arg value="https://github.com/MyRobotLab/repo.git" />
<arg value="${repo}" />
</exec>
</target>
<!-- =============== repo end =============== -->
<!-- TODO - work on removing these 3rd party dependencies -->
<target name="unzip" description="unzip various jar files to be included into the myrobotlab.jar">
<echo>unzipping dependencies</echo>
<echo message="${license.present}" />
<!-- SYNCH WITH AGENT TO DEBUG!!!! -->
<unzip src="${repo}/com.google.gson/2.2.4/gson-2.2.4.jar" dest="${build}/classes" />
<unzip src="${repo}/org.apache.ivy/2.4.0-rc1/ivy-2.4.0-rc1.jar" dest="${build}/classes" />
<unzip src="${repo}/org.fife.rsyntaxtextarea/2.0.4.1/rsyntaxtextarea.jar" dest="${build}/classes" />
<unzip src="${repo}/org.fife.autocomplete/2.0.4/autocomplete.jar" dest="${build}/classes" />
<unzip src="${repo}/com.mxgraph.jgraph/1.6.1.2/jgraphx.jar" dest="${build}/classes" />
<!-- <unzip src="${repo}/org.apache.log4j/1.2.14/log4j-1.2.14.jar" dest="${build}/classes" /> -->
<unzip src="${repo}/org.atmosphere.nettosphere/2.3.0/nettosphere-assembly-2.3.0.jar" dest="${build}/classes" />
<unzip src="${repo}/org.atmosphere.nettosphere/2.3.0/geronimo-servlet_3.0_spec-1.0.jar" dest="${build}/classes" />
<unzip src="${repo}/org.slf4j.logback/1.1.3/logback-classic-1.1.3.jar" dest="${build}/classes" />
<unzip src="${repo}/org.slf4j.logback/1.1.3/logback-core-1.1.3.jar" dest="${build}/classes" />
<unzip src="${repo}/org.slf4j.logback/1.1.3/slf4j-api-1.7.12.jar" dest="${build}/classes" />
<!-- for client -->
</target>
<!-- Compile target, compile all myrobotlab src files -->
<target name="compile" depends="init,unzip" description="compile the source ">
<echo>compile start</echo>
<!-- compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}/classes" debug="true" includeantruntime="false">
<!-- exclude name="org/myrobotlab/service/ExcludeBrokenFile.java" / -->
<exclude name="org/myrobotlab/opencv/OpenCVFilterMotionTemplate.java"/>
<classpath refid="compile.classpath" />
</javac>
<echo>compile end</echo>
</target>
<!-- create myrobotlab.jar -->
<target name="jar" depends="compile" description="create the myrobotlab.jar file">
<!-- FIXME - use Ivy to get the files there ! filebase or url resolver -->
<!-- copy resource.root -->
<copy todir="${build}/classes/resource">
<fileset dir="${src}/resource" />
</copy>
<echo file="${build}/classes/resource/version.txt">${version}</echo>
<echo file="${build}/classes/resource/branch.txt">${branch}</echo>
<!-- copy the latest serviceData.xml into package -->
<!-- TODO deprecate the xml -->
<!-- copy file="${repo}/serviceData.xml" todir="${build}/classes/resource/framework" / -->
<!-- copy file="${repo}/serviceData.json" todir="${build}/classes/resource/framework" / -->
<java classname="org.myrobotlab.framework.repo.ServiceData">
<!-- arg value="-h"/ -->
<classpath refid="compile.classpath">
<!-- pathelement location="dist/test.jar"/ -->
<!--
<pathelement refid="compile.classpath"/>
<pathelement path="${build}/classes"/>
-->
</classpath>
</java>
<jar jarfile="${build}/lib/myrobotlab.jar" basedir="${build}/classes">
<!-- excludes="org/myrobotlab/boot/" -->
<manifest>
<attribute name="Main-Class" value="org.myrobotlab.service.Agent" />
<attribute name="Built-By" value="${user.name}" />
<!-- section name="myrobotlab" -->
<section name="compile">
<attribute name="Specification-Title" value="myrobotlab" />
<attribute name="Specification-Version" value="${version}" />
<attribute name="Specification-Vendor" value="myrobotlab" />
<attribute name="Implementation-Title" value="myrobotlab" />
<attribute name="Implementation-Version" value="${version}" />
<attribute name="Implementation-Vendor" value="myrobotlab.org" />
</section>
</manifest>
</jar>
</target>
<!-- create myrobotlab-client.jar -->
<target name="myrobotlab-client" depends="compile" description="create the myrobotlab-client.jar file">
<echo file="${build}/classes/resource/version.txt">${version}</echo>
<jar jarfile="${build}/lib/myrobotlab-client.jar">
<fileset dir="${build}/classes"
includes="org/myrobotlab/client/**/*.class"
/>
<fileset dir="${build}/classes"
includes="org/myrobotlab/framework/**/*.class"
/>
<fileset dir="${build}/classes"
includes="org/myrobotlab/service/interfaces/**/*.class"
/>
<fileset dir="${build}/classes"
includes="ch/qos/**/*.class"
/>
<fileset dir="${build}/classes"
includes="org/slf4j/**/*.class"
/>
<fileset dir="${build}/classes"
includes="org/myrobotlab/logging/**/*.class"
/>
<!-- excludes="**/UnitTest*.class"/> -->
<manifest>
<attribute name="Main-Class" value="org.myrobotlab.client.Client" />
<attribute name="Built-By" value="${user.name}" />
<!-- section name="myrobotlab" -->
<section name="compile">
<attribute name="Specification-Title" value="myrobotlab" />
<attribute name="Specification-Version" value="${version}" />
<attribute name="Specification-Vendor" value="myrobotlab" />
<attribute name="Implementation-Title" value="myrobotlab" />
<attribute name="Implementation-Version" value="${version}" />
<attribute name="Implementation-Vendor" value="myrobotlab.org" />
</section>
</manifest>
</jar>
</target>
<!-- compile the unit tests prior to running them. -->
<target name="compiletests" depends="compile" description="compile the test source ">
<echo>compile tests start</echo>
<javac srcdir="test" destdir="build/test" debug="true" includeantruntime="false">
<classpath>
<path refid="test.classpath" />
<path refid="compile.classpath" />
<pathelement location="${build}/classes" />
</classpath>
</javac>
<echo>compile tests end</echo>
</target>
<!-- FYI - HTTP STATUS 422 - MEANS YOU ALREADY HAVE THAT RELEASE MADE !!! -->
<target name="createGitHubRelease" depends="init">
<echo message="token = ${github.token}" />
<echo message="{"tag_name": "${tag}","target_commitish": "master","name": "${version}","body": "${comment}","draft": false,"prerelease": false}" />
<http method="POST" url="https://api.github.com/repos/MyRobotLab/myrobotlab/releases" expected="201" printresponseheaders="true" printrequestheaders="true" printresponse="true" entityProperty="release.response">
<headers>
<header name="Authorization" value="token ${github.token}" />
</headers>
<entity value="{"tag_name": "${version}","target_commitish": "master","name": "${version}","body": "${comment}","draft": false,"prerelease": false}">
</entity>
</http>
<echo message="${release.response}" />
</target>
<target name="getAssetsURL" depends="createGitHubRelease">
<propertyregex property="upload_url" input="${release.response}" regexp="(?<=upload_url":")(.*)(?=\{\?name\})" select="\1" />
<echo message="${upload_url}" />
</target>
<!-- release to github -->
<target name="release" depends="compile, getAssetsURL">
<echo message="creating version" />
<http method="POST" url="${upload_url}" printresponseheaders="false" printrequestheaders="false" printresponse="false" expected="201">
<!-- http method="POST" url="http://localhost:7979/repos/MyRobotLab/myrobotlab/releases" -->
<headers>
<header name="Authorization" value="token ${github.token}" />
<header name="Accept" value="application/vnd.github.manifold-preview" />
<header name="Content-Type" value="application/java-archive" />
</headers>
<query>
<parameter name="name" value="myrobotlab.jar" />
</query>
<entity file="${dist}/myrobotlab.jar" binary="true" />
</http>
</target>
<!-- TODO: make this depend on test , gotta figure out why travis ci is failing on this now. -->
<target name="dist" depends="test" description="generate the distribution">
<!-- copy file="${build}/lib/myrobotlab.jar" tofile="${dist}/archive/myrobotlab.${version}.jar" / -->
<!-- backwards compat .. TODO: review this.. -->
<mkdir dir="${dist}" />
<copy file="${build}/lib/myrobotlab.jar" tofile="${dist}/myrobotlab.jar" />
<copy file="${build}/classes/resource/version.txt" tofile="${dist}/version.txt"/>
<!-- for convienence of debugging spawn -->
<copy file="${build}/lib/myrobotlab.jar" tofile="myrobotlab.jar" />
</target>
<target name="clean" description="clean up">
<!-- Delete the ${build} and ${temp} directory trees-->
<delete dir="${build}" />
<delete dir="${temp}" />
<delete dir="${dist}" />
<delete file="myrobotlab.jar" />
</target>
<target name="cleanRepo" description="clean up">
<!-- Delete the ${build} and ${temp} directory trees -->
<delete dir="${build}" />
<delete dir="${temp}" />
</target>
<target name="report" description="generate the junit and jacoco reports on the build." depends="test">
<!-- junit reports -->
<junitreport todir="${report}">
<fileset dir="${build}/report" includes="TEST-*.xml" />
<report todir="${report}" format="noframes">
</report>
</junitreport>
<!-- jacoco report stuff -->
<echo message="JACOCO RESULTS FILE ${result.jacoco.file}" />
<jacoco:report>
<!-- This task needs the collected execution data and ... -->
<executiondata>
<file file="${result.jacoco.file}" />
</executiondata>
<!-- the class files and optional source files ... -->
<structure name="JaCoCo MyRobotLab Report">
<classfiles>
<fileset dir="${build}/classes/org/myrobotlab" />
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="${src}" />
</sourcefiles>
</structure>
<!-- to produce reports in different formats. -->
<html destdir="${result.report.dir}" />
<csv destfile="${result.report.dir}/report.csv" />
<xml destfile="${result.report.dir}/report.xml" />
</jacoco:report>
<!-- helper task to facilitate moving the jacoco report to s3 because
hidden directories aren't copied with the local_dir task in travis s3 task -->
<!-- replace and rename the .resources directory to resources -->
<replace dir="${result.report.dir}" value="resources">
<include name="**/*.html"/>
<replacetoken>.resources</replacetoken>
</replace>
<move todir="${result.report.dir}/resources">
<fileset dir="${result.report.dir}/.resources"/>
</move>
<!-- we only care about code coverage from org.myrobotlab ... not sure how to easily make sure
the report only contains that stuff.. so time to delete everything we don't care about.. -->
<delete>
<fileset dir="${result.report.dir}">
<!-- delete everything from the resources , index.html and the stuff from org.myrobotlab -->
<patternset id="mrlonly">
<exclude name="**/resources/**"/>
<exclude name="**/index.html"/>
<exclude name="**/org.myrobotlab*/**"/>
</patternset>
</fileset>
</delete>
</target>
<target name="mail" depends="report">
<mail mailhost="${mail.host}" mailport="${mail.port}" subject="${mail.subjectalert}" ssl="${mail.ssl}" user="${mail.username}" password="${mail.password}" tolist="${mail.tolist}">
<from address="${mail.from}" />
<!-- <to address="${mail.to}"/> -->
<message>The nightly build has completed</message>
<attachments>
<fileset dir="${report}">
<include name="**/*.html" />
</fileset>
</attachments>
</mail>
</target>
<target name="javadoc" depends="compile" description="Create the javadocs from the source code" >
<javadoc access="public" packagenames="org.myrobotlab.*" author="true" destdir="javadoc" doctitle="myrobotlab" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.7" sourcepath="src" splitindex="true" use="true" version="true">
<arg value="-notimestamp" />
<classpath refid="compile.classpath" />
</javadoc>
</target>
<!-- TODO - upload/publish javadoc -->
<target name="test" depends="compiletests, jar" description="Run the unit tests">
<!-- junit options description="Main Integration/Unit Tests"
showoutput="true"
printsummary="true"
printsummary="withOutAndErr"
outputtoformatters="true" -->
<jacoco:coverage destfile="${result.jacoco.file}">
<junit printsummary="on" fork="true" haltonfailure="on">
<!--
<jvmarg value="-Djava.library.path=${dist}/libraries/native"/>
<env key="LD_LIBRARY_PATH" path="${dist}/libraries/native"/>
-->
<!--
FIXME - OS NEEDS TO BE TAKEN OUT OF PATH !!!!!
So we can do this
<jvmarg value="-Djava.library.path=libraries/native"/>
and not this !!!
<jvmarg value="-Djava.library.path=libraries/native/x86.64.windows"/>
so we don't have to exclude SerialTest !
-->
<sysproperty key="java.awt.headless" value="true" />
<!-- any junit tests would fail running on jenkins with gui components -->
<classpath>
<!-- <pathelement location="${dist}/myrobotlab.jar" /> FIXME - it needs to be this -->
<pathelement location="${build}/classes" />
<pathelement location="${build}/test" />
<path refid="test.classpath" />
<path refid="compile.classpath" />
<!-- remove <path refid="compile.classpath" /> -->
<!-- remove <pathelement location="${build}/classes" /> -->
</classpath>
<formatter type="xml" />
<batchtest fork="true" todir="${build}/report" >
<fileset dir="${test}">
<include name="**/*Test.java" />
<exclude name="**/JFugueTest.java" />
</fileset>
</batchtest>
</junit>
</jacoco:coverage>
</target>
<target name="quickTest" > <!-- not correct depends="compiletests" -->
<junit printsummary="on" fork="true" haltonfailure="no">
<classpath>
<pathelement location="${bin}" />
<path refid="test.classpath" />
<path refid="compile.classpath" />
</classpath>
<formatter type="xml" />
<batchtest fork="true" todir="${build}/report" >
<fileset dir="${test}">
<include name="**/*Test.java" />
<exclude name="**/JFugueTest.java" />
</fileset>
</batchtest>
</junit>
</target>
<!-- Incubator -->
<!-- In order to simulate a working deployment
the repo should be clean
dist/libraries/jar should only contain the minimal amount of jars
the load from the repo needs to occur BEFORE the test !!! - this means 2 execs are need
first one to clean and then deploy the Service's dependencies
second one to preform the test
* clean repo - (includes serviceData.xml | .myrobotlab)
* clean libraries/* - with the exception of Bootstrap jars (copy over after full delete)
* request repo pull of dependencies for the service in question
-->
<target name="exec" depends="dist">
<!-- depends="dist"-->
<java classname="org.myrobotlab.service.Incubator" fork="true" failonerror="true">
<!-- it should be jar="${dist}/myrobotlab.jar" in all its complexity -->
<!-- <arg value="-h" /> -->
<jvmarg value="-Djava.library.path=${build}${fs}libraries${fs}native" />
<!-- <jvmarg value="-cp ${dist}/myrobotlab.jar;${dist}/libraries/jar/*;"/> -->
<env key="LD_LIBRARY_PATH" path="${build}${fs}libraries${fs}native" />
<classpath>
<fileset dir="${dist}/libraries/jar">
<include name="**/*.jar" />
</fileset>
<pathelement location="${dist}/myrobotlab.jar" />
<!-- FIXME - the jar should be executed - problem with 205 INFO terminating - good luck new bootstrap :) -->
<path refid="test.classpath" />
<!-- remove <path refid="compile.classpath" /> -->
<!-- remove <pathelement location="${build}/classes" /> -->
</classpath>
</java>
</target>
</project>