forked from MOEAFramework/MOEAFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
651 lines (529 loc) · 23.8 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
<?xml version="1.0"?>
<!--
Copyright 2009-2018 David Hadka
This file is part of the MOEA Framework.
The MOEA Framework is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
The MOEA Framework is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the MOEA Framework. If not, see <http://www.gnu.org/licenses/>.
Use of these build scripts requires Apache Ant to be installed. See
<http://ant.apache.org/> for instructions on installing Apache Ant.
-->
<project name="MOEA Framework" basedir=".">
<!-- Loads properties from properties file and environment -->
<property file="META-INF/build.properties" />
<property environment="env" />
<!-- Path to Java JDK source code (optional for inheriting javadoc comments) -->
<property name="jdk.source" value="../OpenJDK${java.major}/jdk/src/share/classes" />
<!-- URL to Java API -->
<property name="jdk.api" value="http://download.oracle.com/javase/${java.major}/docs/api/" />
<!-- The working folder for these Ant build targets -->
<property name="build" value="build" />
<!-- The folder where compiled files ready for distribution are saved -->
<property name="dist" value="dist" />
<!-- The folder where generated javadoc files are saved -->
<property name="javadoc" value="javadoc" />
<!-- The folder where maven artifacts are saved -->
<property name="maven" value="maven" />
<!-- The base/root folder for organizing distributions -->
<property name="base" value="${build}/${shortname}-${version}" />
<!-- Classpath of third-party libraries used by the MOEA Framework -->
<path id="classpath">
<fileset dir="lib" includes="*.jar" />
</path>
<!-- List of files required in every distribution -->
<path id="requiredfiles">
<fileset file="README" />
<fileset file="LICENSE" />
<fileset file="NEWS" />
<fileset file="HELP" />
</path>
<!-- Generates the Javadoc webpages -->
<target name="build-javadoc">
<delete dir="${javadoc}" />
<mkdir dir="${javadoc}" />
<javadoc sourcepath="src;${jdk.source}"
destdir="${javadoc}" notree="true"
packagenames="org.moeaframework.*"
maxmemory="256m" noindex="true" nohelp="true"
overview="src/overview.html"
windowtitle="${name} ${version} API">
<header><![CDATA[${javadoc.title}]]></header>
<doctitle><![CDATA[${javadoc.title}]]></doctitle>
<footer><![CDATA[${javadoc.title}]]></footer>
<bottom><![CDATA[${javadoc.bottom}]]></bottom>
<classpath>
<path refid="classpath" />
</classpath>
<link href="${jdk.api}" />
</javadoc>
</target>
<!-- Builds the MOEA Framework JAR file -->
<target name="build-binary">
<tstamp />
<delete dir="${build}" />
<mkdir dir="${build}" />
<javac destdir="${build}" srcdir="src" debug="${java.debug}"
excludes="**/package-info.java"
includeantruntime="false"
encoding="UTF-8">
<classpath refid="classpath" />
</javac>
<copy todir="${build}/META-INF">
<fileset dir="META-INF" excludes="ZHANG-LICENSE" />
<path refid="requiredfiles" />
</copy>
<replace file="${build}/META-INF/README">
<replacefilter token="%VERSION%" value="${version}" />
<replacefilter token="%DATE%" value="${TODAY}" />
</replace>
<exec executable="git" outputproperty="impl.version"
errorproperty="impl.error" failifexecutionfails="false">
<arg value="rev-parse" />
<arg value="--short" />
<arg value="HEAD" />
</exec>
<property name="impl.version" value="Undefined" />
<manifest file="${build}/META-INF/MANIFEST.MF">
<section name="org/moeaframework/">
<attribute name="Specification-Title" value="MOEA Framework" />
<attribute name="Specification-Version" value="${version}" />
<attribute name="Specification-Vendor" value="http://www.moeaframework.org" />
<attribute name="Implementation-Title" value="org.moeaframework" />
<attribute name="Implementation-Version" value="${impl.version}" />
<attribute name="Implementation-Vendor" value="http://www.moeaframework.org" />
</section>
</manifest>
<copy todir="${build}">
<fileset excludes="**/*.java,overview.html" dir="src" />
</copy>
<jar basedir="${build}" manifest="${build}/META-INF/MANIFEST.MF"
jarfile="${dist}/${shortname}-${version}.jar" />
</target>
<!-- Packages the MOEA Framework JAR file along with javadocs and required files -->
<target name="package-binary"
depends="package-guide, build-binary, build-javadoc"
description="Creates the binary distribution file">
<delete dir="${build}" />
<mkdir dir="${base}" />
<mkdir dir="${base}/lib" />
<mkdir dir="${base}/pf" />
<mkdir dir="${base}/licenses" />
<mkdir dir="${base}/examples" />
<copy todir="${base}">
<path refid="requiredfiles" />
<fileset file="global.properties" />
<fileset file="auxiliary/windows/launch-diagnostic-tool.bat" />
</copy>
<replace file="${base}/README">
<replacefilter token="%VERSION%" value="${version}" />
<replacefilter token="%DATE%" value="${TODAY}" />
</replace>
<copy todir="${base}/licenses">
<fileset dir="META-INF" includes="*-LICENSE"
excludes="ZHANG-LICENSE" />
</copy>
<copy todir="${base}/lib">
<fileset file="${dist}/${shortname}-${version}.jar" />
<fileset dir="lib" excludes="junit-*.jar,checkstyle-*.jar" />
</copy>
<copy todir="${base}/pf">
<fileset dir="pf" excludes="referenceHypervolume" />
</copy>
<copy todir="${base}/javadoc">
<fileset dir="${javadoc}" />
</copy>
<copy todir="${base}/examples">
<fileset dir="examples" excludes="*.exe,*.o,*.a" />
</copy>
<copy tofile="${base}/QuickStart.pdf">
<fileset file="${dist}/${shortname}-${version}-QuickStart.pdf" />
</copy>
<tar destfile="${dist}/${shortname}-${version}.tar.gz"
basedir="${build}" compression="gzip" longfile="gnu" />
</target>
<!-- Packages the MOEA Framework source code, libraries and required files -->
<target name="package-source"
depends="package-guide"
description="Creates the source code distribution file">
<delete dir="${build}" />
<mkdir dir="${base}" />
<copy todir="${base}">
<fileset dir=".">
<include name="auxiliary/**" />
<include name="examples/**" />
<exclude name="examples/*.exe" />
<exclude name="examples/*.o" />
<exclude name="examples/*.a" />
<include name="lib/**" />
<exclude name="lib/junit-*.jar" />
<include name="guide/**" />
<include name="META-INF/**" />
<include name="pf/**" />
<include name="src/**" />
<include name="test/**" />
<exclude name="test/org/moeaframework/problem/*.exe" />
<exclude name="test/org/moeaframework/problem/*.o" />
<exclude name="test/org/moeaframework/problem/*.a" />
<include name="website/**" />
<include name="global.properties" />
<include name="build.xml" />
<include name="test.xml" />
<include name="TODO" />
</fileset>
<path refid="requiredfiles" />
</copy>
<copy todir="${base}">
<fileset dir="auxiliary/eclipse" includes=".*" />
</copy>
<replace file="${base}/.project">
<replacefilter token="%VERSION%" value="${version}" />
</replace>
<copy tofile="${base}/QuickStart.pdf">
<fileset file="${dist}/${shortname}-${version}-QuickStart.pdf" />
</copy>
<tar destfile="${dist}/${shortname}-${version}-Source.tar.gz"
basedir="${build}" compression="gzip" longfile="gnu" />
</target>
<!-- Builds the http://www.moeaframework.org website -->
<target name="package-website" depends="build-javadoc"
description="Creates the website">
<delete dir="${build}" />
<mkdir dir="${build}" />
<tstamp>
<format pattern="MMM dd, yyyy" property="today" />
<format pattern="yyyy-MM-dd" property="lastmod" />
</tstamp>
<copy todir="${build}">
<fileset dir="website" excludes="*.partial,xslt/**" />
</copy>
<copy todir="${build}/javadoc">
<fileset dir="${javadoc}" />
</copy>
<loadfile property="website.tracker" srcFile="website/tracker.partial" />
<xslt basedir="website/xslt" destdir="${build}"
style="website/xslt/stylesheet.xsl"
includes="*.xml" filenameparameter="filename">
<param name="version" expression="${version}" />
<param name="today" expression="${today}" />
<param name="tracker" expression="${website.tracker}" />
</xslt>
<replace dir="${build}" includes="**/*.html">
<replacefilter token="%VERSION%" value="${version}" />
<replacefilter value="${website.tracker}">
<replacetoken><![CDATA[<!-- %TRACKER% -->]]></replacetoken>
</replacefilter>
</replace>
<replace file="${build}/sitemap.xml">
<replacefilter token="%LASTMOD%" value="${lastmod}" />
</replace>
<copy todir="${build}">
<fileset dir="examples" includes="*.java" excludes="Examples.java" />
</copy>
<copy todir="${build}">
<fileset file="examples/dtlz2.c" />
</copy>
</target>
<!-- To generate the key store (valid for 10 years), run:
keytool -genkeypair -alias moeaframework -validity 3653
Signing the JAR is necessary for enabling all permissions, which is
needed for save/load functionality. -->
<!--
<target name="package-jnlp"
depends="package-executable"
description="Creates the JNLP Web Start distribution">
<delete dir="${build}" />
<mkdir dir="${base}" />
<copy todir="${base}">
<fileset dir="auxiliary/jnlp" />
</copy>
<replace dir="${base}" includes="DiagnosticTool.jnlp">
<replacefilter token="%VERSION%" value="${version}" />
<replacefilter token="%DATE%" value="${TODAY}" />
</replace>
<copy todir="${base}">
<fileset file="${dist}/${shortname}-${version}-Executable.jar" />
</copy>
<signjar alias="moeaframework" storepass="secret">
<path>
<fileset dir="${base}" includes="*.jar" />
</path>
</signjar>
</target>
-->
<!-- Packages the all-in-one executable distribution -->
<!--
<target name="package-executable" depends="build-binary" description="Creates the executable JAR file">
<delete dir="${build}" />
<mkdir dir="${build}" />
<unjar dest="${build}" src="lib/commons-cli-1.2.jar" />
<move file="${build}/META-INF/NOTICE.txt" tofile="${build}/META-INF/COMMONS-CLI-NOTICE.txt" />
<unjar dest="${build}" src="lib/commons-codec-1.8.jar" />
<move file="${build}/META-INF/NOTICE.txt" tofile="${build}/META-INF/COMMONS-CODEC-NOTICE.txt" />
<unjar dest="${build}" src="lib/commons-lang3-3.1.jar" />
<move file="${build}/META-INF/NOTICE.txt" tofile="${build}/META-INF/COMMONS-LANG3-NOTICE.txt" />
<unjar dest="${build}" src="lib/commons-math3-3.1.1.jar" />
<move file="${build}/META-INF/NOTICE.txt" tofile="${build}/META-INF/COMMONS-MATH3-NOTICE.txt" />
<unjar dest="${build}" src="lib/jcommon-1.0.20.jar" />
<unjar dest="${build}" src="lib/jfreechart-1.0.15.jar" />
<unjar dest="${build}" src="lib/JMetal-4.3.jar" />
<delete dir="${build}/META-INF/maven" />
<delete file="${build}/META-INF/LICENSE.txt" />
<delete file="${build}/META-INF/MANIFEST.mf" />
<delete dir="${build}/templates" />
<unjar dest="${build}" src="${dist}/${shortname}-${version}.jar" />
<copy todir="${build}/pf">
<fileset dir="pf" />
</copy>
<manifest mode="update" file="${build}/META-INF/MANIFEST.mf">
<attribute name="Main-Class" value="org.moeaframework.analysis.diagnostics.LaunchDiagnosticTool" />
<attribute name="Class-Path" value="." />
</manifest>
<jar destfile="${dist}/${shortname}-${version}-Executable.jar"
basedir="${build}" manifest="${build}/META-INF/MANIFEST.mf" />
</target>
-->
<!-- Packages the demo distribution -->
<target name="package-demo" depends="build-binary" description="Creates the executable JAR file">
<delete dir="${build}" />
<mkdir dir="${build}" />
<unjar dest="${build}" src="lib/commons-cli-1.2.jar" />
<move file="${build}/META-INF/NOTICE.txt" tofile="${build}/META-INF/COMMONS-CLI-NOTICE.txt" />
<unjar dest="${build}" src="lib/commons-codec-1.8.jar" />
<move file="${build}/META-INF/NOTICE.txt" tofile="${build}/META-INF/COMMONS-CODEC-NOTICE.txt" />
<unjar dest="${build}" src="lib/commons-lang3-3.1.jar" />
<move file="${build}/META-INF/NOTICE.txt" tofile="${build}/META-INF/COMMONS-LANG3-NOTICE.txt" />
<unjar dest="${build}" src="lib/commons-math3-3.4.1.jar" />
<move file="${build}/META-INF/NOTICE.txt" tofile="${build}/META-INF/COMMONS-MATH3-NOTICE.txt" />
<unjar dest="${build}" src="lib/rsyntaxtextarea.jar" />
<unjar dest="${build}" src="lib/jcommon-1.0.20.jar" />
<unjar dest="${build}" src="lib/jfreechart-1.0.15.jar" />
<unjar dest="${build}" src="lib/JMetal-4.3.jar" />
<delete dir="${build}/META-INF/maven" />
<delete file="${build}/META-INF/LICENSE.txt" />
<delete file="${build}/META-INF/MANIFEST.mf" />
<delete dir="${build}/templates" />
<unjar dest="${build}" src="${dist}/${shortname}-${version}.jar" />
<javac destdir="${build}" srcdir="examples" debug="${java.debug}"
excludes="**/package-info.java"
includeantruntime="false"
encoding="UTF-8">
<classpath refid="classpath" />
</javac>
<copy todir="${build}">
<fileset excludes="**/*.java,overview.html,*.exe,*.o,*.a" dir="examples" />
</copy>
<!-- copy the examples source code so it can be seen in the demo GUI -->
<copy todir="${build}/examples">
<fileset dir="examples" excludes="*.exe,*.o,*.a" />
</copy>
<copy todir="${build}/pf">
<fileset dir="pf" />
</copy>
<manifest mode="update" file="${build}/META-INF/MANIFEST.mf">
<attribute name="Main-Class" value="Examples" />
<attribute name="Class-Path" value="." />
</manifest>
<jar destfile="${dist}/${shortname}-${version}-Demo.jar"
basedir="${build}" manifest="${build}/META-INF/MANIFEST.mf" />
</target>
<!-- Downloads and extracts all PISA selectors for Windows -->
<target name="download-pisa-windows"
description="Downloads all PISA selectors for Windows">
<delete dir="${build}" />
<mkdir dir="${build}" />
<!-- download PISA binaries -->
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/spam/spam_win.zip" dest="${build}/spam_win.zip" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/shv/shv_win.zip" dest="${build}/shv_win.zip" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/sibea/sibea_binary.zip" dest="${build}/sibea_win.zip" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/hype/hype_win.zip" dest="${build}/hype_win.zip" />
<get src="http://www.tik.ee.ethz.ch/pisa/lotz_semo/semo_win.zip" dest="${build}/semo_win.zip" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/semo2/semo2_win.zip" dest="${build}/semo2_win.zip" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/femo/femo_win.zip" dest="${build}/femo_win.zip" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/spea2/spea2_win.zip" dest="${build}/spea2_win.zip" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/nsga2/nsga2_win.zip" dest="${build}/nsga2_win.zip" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/ecea/ecea_win.zip" dest="${build}/ecea_win.zip" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/ibea/ibea_win.zip" dest="${build}/ibea_win.zip" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/msops/msops_win.zip" dest="${build}/msops_win.zip" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/epsmoea/epsmoea_win.tar.gz" dest="${build}/epsmoea_win.tar.gz" />
<!-- extract PISA binaries -->
<unzip src="${build}/spam_win.zip" dest="${build}" />
<unzip src="${build}/shv_win.zip" dest="${build}/shv_win/" />
<unzip src="${build}/sibea_win.zip" dest="${build}/sibea_win/" />
<unzip src="${build}/hype_win.zip" dest="${build}/hype_win/" />
<unzip src="${build}/semo_win.zip" dest="${build}" />
<unzip src="${build}/semo2_win.zip" dest="${build}" />
<unzip src="${build}/femo_win.zip" dest="${build}" />
<unzip src="${build}/spea2_win.zip" dest="${build}" />
<unzip src="${build}/nsga2_win.zip" dest="${build}" />
<unzip src="${build}/ecea_win.zip" dest="${build}" />
<unzip src="${build}/ibea_win.zip" dest="${build}" />
<unzip src="${build}/msops_win.zip" dest="${build}" />
<untar src="${build}/epsmoea_win.tar.gz" compression="gzip" dest="${build}" />
<!-- delete compressed files -->
<delete>
<fileset includes="*.zip,*.tar.gz" dir="${build}" />
</delete>
<!-- move PISA binaries to pisa folder -->
<delete dir="pisa" />
<mkdir dir="pisa" />
<move todir="pisa">
<fileset includes="**/*" dir="${build}" />
</move>
</target>
<!-- Downloads and extracts all PISA selectors for Linux -->
<target name="download-pisa-linux"
description="Downloads all PISA selectors for Linux">
<delete dir="${build}" />
<mkdir dir="${build}" />
<!-- download PISA binaries -->
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/spam/spam_linux_32.tar.gz" dest="${build}" />
<!--<get src="http://www.tik.ee.ethz.ch/pisa/selectors/shv/shv_linux32.rar" dest="${build}" />-->
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/sibea/sibea_binary.zip" dest="${build}" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/hype/hype_linux_32.tar.gz" dest="${build}" />
<get src="http://www.tik.ee.ethz.ch/pisa/lotz_semo/semo_linux.tar.gz" dest="${build}" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/semo2/semo2_linux.tar.gz" dest="${build}" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/femo/femo_linux.tar.gz" dest="${build}" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/spea2/spea2_linux.tar.gz" dest="${build}" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/nsga2/nsga2_linux.tar.gz" dest="${build}" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/ecea/ecea_linux.tar.gz" dest="${build}" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/ibea/ibea_linux.tar.gz" dest="${build}" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/msops/msops_linux.tar.gz" dest="${build}" />
<get src="http://www.tik.ee.ethz.ch/pisa/selectors/epsmoea/epsmoea_linux.tar.gz" dest="${build}" />
<!-- extract PISA binaries -->
<untar src="${build}/spam_linux_32.tar.gz" compression="gzip" dest="${build}/spam_linux" />
<unzip src="${build}/sibea_binary.zip" dest="${build}/sibea_linux" />
<untar src="${build}/hype_linux_32.tar.gz" compression="gzip" dest="${build}/hype_linux" />
<untar src="${build}/semo_linux.tar.gz" compression="gzip" dest="${build}" />
<untar src="${build}/semo2_linux.tar.gz" compression="gzip" dest="${build}" />
<untar src="${build}/femo_linux.tar.gz" compression="gzip" dest="${build}" />
<untar src="${build}/spea2_linux.tar.gz" compression="gzip" dest="${build}" />
<untar src="${build}/nsga2_linux.tar.gz" compression="gzip" dest="${build}" />
<untar src="${build}/ecea_linux.tar.gz" compression="gzip" dest="${build}" />
<untar src="${build}/ibea_linux.tar.gz" compression="gzip" dest="${build}" />
<untar src="${build}/msops_linux.tar.gz" compression="gzip" dest="${build}" />
<untar src="${build}/epsmoea_linux.tar.gz" compression="gzip" dest="${build}" />
<echo message="Note: SHV must be manually extracted" />
<!--
<exec executable="unrar" failifexecutionfails="false">
<arg value="${build}/shv_linux32.rar" />
<arg value="${build}/shv_linux" />
</exec>
-->
<chmod perm="+x">
<fileset dir="${build}" includes="**/*.sh" />
<fileset file="${build}/spam_linux/spam" />
<fileset file="${build}/hype_linux/hype" />
<fileset file="${build}/semo_linux/semo" />
<fileset file="${build}/semo2_linux/semo2" />
<fileset file="${build}/femo_linux/femo" />
<fileset file="${build}/spea2_linux/spea2" />
<fileset file="${build}/nsga2_linux/nsga2" />
<fileset file="${build}/ecea_linux/ecea" />
<fileset file="${build}/ibea_linux/ibea" />
<fileset file="${build}/msops_linux/msops" />
<fileset file="${build}/epsmoea_linux/epsmoea" />
<!--<fileset file="${build}/shv_linux/shv" />-->
</chmod>
<!-- delete compressed files -->
<delete>
<fileset includes="*.zip,*.tar.gz" dir="${build}" />
</delete>
<!-- move PISA binaries to pisa folder -->
<delete dir="pisa" />
<mkdir dir="pisa" />
<move todir="pisa">
<fileset includes="**/*" dir="${build}" />
</move>
</target>
<!-- Builds the quick start guide, converting from LaTeX to a PDF -->
<target name="package-guide" description="Builds the quick start guide">
<tstamp />
<delete dir="${build}" />
<mkdir dir="${build}" />
<copy todir="${build}">
<fileset dir="guide" />
</copy>
<replace dir="${build}">
<replacefilter token="%VERSION%" value="${version}" />
<replacefilter token="%DATE%" value="${TODAY}" />
</replace>
<exec executable="pdflatex" dir="${build}" failonerror="true">
<arg value="guide" />
</exec>
<exec executable="makeindex" dir="${build}" failonerror="true">
<arg value="guide" />
</exec>
<exec executable="pdflatex" dir="${build}" failonerror="true">
<arg value="guide" />
</exec>
<move file="${build}/guide.pdf"
tofile="${dist}/${shortname}-${version}-QuickStart.pdf" />
</target>
<!-- GPG Instructions:
gpg -gen-key
gpg -keyserver keyserver.ubuntu.com -send-keys keyid
After Uploading to Sonatype OSS, test by adding to pom.xml:
<repositories>
<repository>
<id>oss.sonatype.org</id>
<name>OSS Sonatype Staging</name>
<url>https://oss.sonatype.org/content/groups/staging</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.moeaframework</groupId>
<artifactId>moeaframework</artifactId>
<version>${version}</version>
</dependency>
</dependencies>
-->
<target name="package-maven" description="Creates an artifact bundle for upload to Sonatype OSS">
<delete dir="${maven}" />
<mkdir dir="${maven}" />
<property name="artifact" value="moeaframework" />
<copy file="auxiliary/maven/moeaframework.pom"
tofile="${maven}/${artifact}-${version}.pom" />
<replace file="${maven}/${artifact}-${version}.pom">
<replacefilter token="%VERSION%" value="${version}" />
</replace>
<antcall target="build-binary" />
<unjar src="lib/JMetal-4.3.jar" dest="${build}" />
<copy todir="${build}/pf">
<fileset dir="pf" />
</copy>
<jar destfile="${maven}/${artifact}-${version}.jar"
basedir="${build}" />
<antcall target="package-source" />
<jar destfile="${maven}/${artifact}-${version}-sources.jar"
basedir="${build}" />
<antcall target="build-javadoc" />
<jar destfile="${maven}/${artifact}-${version}-javadoc.jar"
basedir="${javadoc}" />
<exec executable="gpg" failonerror="true">
<arg value="-ab" />
<arg value="${maven}/${artifact}-${version}.pom" />
</exec>
<exec executable="gpg" failonerror="true">
<arg value="-ab" />
<arg value="${maven}/${artifact}-${version}.jar" />
</exec>
<exec executable="gpg" failonerror="true">
<arg value="-ab" />
<arg value="${maven}/${artifact}-${version}-sources.jar" />
</exec>
<exec executable="gpg" failonerror="true">
<arg value="-ab" />
<arg value="${maven}/${artifact}-${version}-javadoc.jar" />
</exec>
<jar destfile="${maven}/${artifact}-${version}-bundle.jar"
basedir="${maven}" />
</target>
</project>