source: build.xml @ 9b17b52

Last change on this file since 9b17b52 was 9b17b52, checked in by zzz <zzz@…>, 22 months ago

Debian: Add dependency for famfamfam-flag-png (ticket #2270)

  • Property mode set to 100644
File size: 144.9 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<project basedir="." default="all" name="i2p"
3    xmlns:artifact="antlib:org.apache.maven.artifact.ant">
4
5    <!-- Include property files so that values can be easily overridden.
6         Users should create an override.properties file to make changes.
7     -->
8    <property file="override.properties"/>
9    <property file="build.properties"/>
10
11    <!-- You probably don't want to change anything from here down -->
12    <target name="help" depends="all" />
13    <target name="all" >
14        <echo message="Useful targets: " />
15        <echo message="  pkg:       distclean then package everything up (updater, installer)" />
16        <echo message="  dist:      pkg and javadoc" />
17        <echo message="  dist200:   pkg, updater200, and javadoc" />
18        <echo message="  installer: build the GUI installer" />
19        <echo message="  installer-freebsd: build the GUI installer (FreeBSD only)" />
20        <echo message="  installer-linux: build the GUI installer (Linux only)" />
21        <echo message="  installer-osx: build the GUI installer (OSX only)" />
22        <echo message="  installer-windows: build the GUI installer (Windows only)" />
23        <echo message="  installer-nowindows: build the GUI installer (all but Windows)" />
24        <echo message="  osxLauncher: build the Mac OS X router/GUI launcher (OSX only)" />
25        <echo message="  bbLauncher: build the Browser Bundle router launcher" />
26        <echo message="  tarball:   tar the full install into i2p.tar.bz2 (extracts to build a new clean install)" />
27        <echo message="  updater:   Package the built files in i2pupdate.zip (extracts safely over existing installs)" />
28        <echo message="  updater200: Updater compressed with pack200 (creates i2pupdate200.zip, 60% smaller)" />
29        <echo message="  signed-updater200: Signed updater compressed with pack200 (creates i2pupdate.su3, 60% smaller)" />
30        <echo message="  updaterWithJavadoc: updater including the javadocs, for display in the console" />
31        <echo message="  updater200WithJavadoc: updater including the javadocs, for display in the console (creates i2pupdate200.zip)" />
32        <echo message="  signed-updater200WithJavadoc: Signed updater including the javadocs, for display in the console (creates i2pupdate.su3)" />
33        <echo message="  updaterWithJavadocAndJetty: updater including the javadocs, for display in the console, and Jetty " />
34        <echo message="  updater200WithJavadocAndJetty: updater including the javadocs, for display in the console, and Jetty (creates i2pupdate200.zip)" />
35        <echo message="  signed-updater200WithJavadocAndJetty: Signed updater including the javadocs, for display in the console, and Jetty (creates i2pupdate.su3)" />
36        <echo message="  updaterWithJetty: Updater including Jetty" />
37        <echo message="  updater200WithJetty: Updater including Jetty" />
38        <echo message="  signed-updater200withJetty: Signed updater including Jetty" />
39        <echo message="  updaterWithJettyFixes: updater including local jetty patches" />
40        <echo message="  updaterWithGeoIP: updater including GeoIP Files" />
41        <echo message="  updaterWithJettyFixesAndGeoIP" />
42        <echo message="  updaterWithJettyFixesAndJbigi" />
43        <echo message="  updaterWithJbigi" />
44        <echo message="  updater200WithJbigi" />
45        <echo message="  updaterSmall:   updater with the essentials only - no SAM, i2psnark, SusiMail, SusiDNS, or history.txt" />
46        <echo message="  updaterRouter:  updater with the i2p.jar and router.jar only" />
47        <echo message="  distclean: clean up all derived files" />
48        <!-- <echo message="  syndie:    generate a standalone syndie install" /> -->
49        <echo message="  desktopgui: generate a standalone desktopgui install" />
50        <echo message="  i2psnark:  generate a standalone i2psnark install" />
51        <echo message="  justBOB:  generate a standalone BOB-one.jar" />
52        <echo message="  javadoc:   generate javadoc for the entire project into ./build/javadoc and ./javadoc.zip" />
53        <echo message="  javadoc-test: Javadocs for unit test classes (build/javadoc-test)" />
54        <echo message="  slackpkg:  generate Slackware package in ./Slackware/i2p" />
55        <echo message="  debianhowto: instructions on building Debian packages" />
56        <echo message="  debian: generate Debian packages in ../" />
57        <echo message="          run &quot;ant debianhowto&quot; for instructions" />
58        <echo message="  debian-clean: rollback debian specific patches and run the &quot;distclean&quot; target (done automatically at the end of the &quot;debian&quot; target)" />
59        <!-- <echo message="  debianrepo: build a Debian repository (reprepro required)" /> -->
60        <echo message="  poupdate: update the .po files for translators" />
61        <echo message="  pkg-portable-win32:  build a minimum portable version for win32" />
62        <echo message="  bench: build the benchmarks" />
63   </target>
64    <target name="debianhowto">
65            <echo message="To build debian packages, you must make sure that you have" />
66            <echo message="the necessary build-dependencies installed." />
67            <echo message="The packages required to build can be found in the file "/>
68            <echo message="&quot;debian/control&quot; in the &quot;Build-Depends&quot; field."/>
69            <echo message="In addition to those packages, be sure to install &quot;fakeroot&quot;,"/>
70            <echo message="&quot;quilt&quot; and &quot;build-essential&quot;!" />
71            <echo message="" />
72            <echo message="The following command will install the build dependencies for you:" />
73            <echo message=" " />
74            <echo message="sudo apt-get install debhelper ant debconf default-jdk gettext libgmp-dev po-debconf fakeroot \" />
75            <echo message="  build-essential quilt dh-apparmor dh-systemd libservice-wrapper-java \"  />
76            <echo message="  devscripts libjetty9-java libtomcat8-java libtaglibs-standard-jstlel-java libgetopt-java"  />
77            <echo message=" " />
78            <echo message="The following command will install the additional runtime dependencies:" />
79            <echo message="sudo apt-get install libecj-java geoip-database" />
80            <echo message=" " />
81            <echo message="Once the dependencies are installed, run &quot;ant debian&quot;"/>
82            <echo message="to patch the source and build the packages." />
83    </target>
84
85    <property name="gpg" value="gpg" />
86
87    <macrodef name="gpgsign">
88        <attribute name="file" />
89        <sequential>
90            <delete file="@{file}.sig" quiet="true" />
91            <exec executable="${gpg}" failonerror="true">
92                <arg value="-u" />
93                <arg value="${release.gpg.keyid}" />
94                <arg value="-b" />
95                <arg value="@{file}" />
96            </exec>
97            <chmod type="file" perm="444">
98                <fileset dir="${basedir}">
99                    <include name="@{file} @{file}.sig" />
100                </fileset>
101            </chmod>
102        </sequential>
103    </macrodef>
104
105    <macrodef name="gpgsignasc">
106        <attribute name="file" />
107        <sequential>
108            <delete file="@{file}.asc" quiet="true" />
109            <exec executable="${gpg}" failonerror="true">
110                <arg value="-u" />
111                <arg value="${release.gpg.keyid}" />
112                <arg value="-ab" />
113                <arg value="@{file}" />
114            </exec>
115            <chmod type="file" perm="444">
116                <fileset dir="${basedir}">
117                    <include name="@{file} @{file}.asc" />
118                </fileset>
119            </chmod>
120        </sequential>
121    </macrodef>
122
123    <macrodef name="mktorrent">
124        <attribute name="file" />
125        <sequential>
126            <delete file="@{file}.torrent" quiet="true"/>
127            <java classname="org.klomp.snark.Storage" fork="true" failonerror="true">
128                <classpath>
129                    <pathelement location="build/i2p.jar" />
130                    <pathelement location="build/i2psnark.jar" />
131                </classpath>
132                <arg value="-a" />
133                <arg value="http://tracker2.postman.i2p/announce.php" />
134                <arg value="-c" />
135                <arg value="${build.built-by}" />
136                <arg value="@{file}" />
137            </java>
138        </sequential>
139    </macrodef>
140
141    <macrodef name="sha256sum">
142        <attribute name="file" />
143        <sequential>
144            <!--
145                 Note: "local" only works with ant 1.8+. This limitation shouldn't be
146                 a big deal since this macro is only called by the release
147                 target.
148             -->
149            <local name="file-sum"/>
150            <checksum format="MD5SUM" file="@{file}" property="file-sum" algorithm="sha-256"/>
151            <echo message="${file-sum}  @{file}" />
152        </sequential>
153    </macrodef>
154
155    <macrodef name="sudsign">
156        <attribute name="infile" />
157        <attribute name="outfile" />
158        <sequential>
159            <input message="Enter sud/su2 private signing key file:" addproperty="release.privkey" />
160            <fail message="You must enter an existing file path." >
161                <condition>
162                    <or>
163                        <equals arg1="${release.privkey}" arg2=""/>
164                        <not>
165                            <length file="${release.privkey}" when="greater" length="0" />
166                        </not>
167                    </or>
168                </condition>
169            </fail>
170            <echo message="Key file is ${release.privkey}" />
171            <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
172                <classpath>
173                    <pathelement location="build/i2p.jar" />
174                </classpath>
175                <arg value="sign" />
176                <arg value="@{infile}" />
177                <arg value="@{outfile}" />
178                <arg value="${release.privkey}" />
179                <arg value="${release.number}" />
180            </java>
181            <echo message="Verify version and VALID signature:" />
182            <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
183                <classpath>
184                    <pathelement location="build/i2p.jar" />
185                </classpath>
186                <arg value="verifysig" />
187                <arg value="@{outfile}" />
188            </java>
189            <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
190                <classpath>
191                    <pathelement location="build/i2p.jar" />
192                </classpath>
193                <arg value="verifyversion" />
194                <arg value="@{outfile}" />
195            </java>
196            <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
197                <classpath>
198                    <pathelement location="build/i2p.jar" />
199                </classpath>
200                <arg value="showversion" />
201                <arg value="@{outfile}" />
202            </java>
203        </sequential>
204    </macrodef>
205
206    <macrodef name="su3sign">
207        <attribute name="infile" />
208        <attribute name="outfile" />
209        <attribute name="sigtype" />
210        <attribute name="su3.ver" />
211        <sequential>
212        <input message="Enter su3 private signing key store:" addproperty="release.privkey.su3" />
213        <fail message="You must enter an existing file path." >
214            <condition>
215                <or>
216                    <equals arg1="${release.privkey.su3}" arg2=""/>
217                    <not>
218                        <length file="${release.privkey.su3}" when="greater" length="0" />
219                    </not>
220                </or>
221            </condition>
222        </fail>
223        <input message="Enter su3 key name (you@mail.i2p):" addproperty="release.signer.su3" />
224        <fail message="You must enter a name." >
225            <condition>
226                <equals arg1="${release.signer.su3}" arg2=""/>
227            </condition>
228        </fail>
229        <input message="Enter su3 key password for ${release.signer.su3}:" addproperty="release.password.su3" />
230        <fail message="You must enter a password." >
231            <condition>
232                <equals arg1="${release.password.su3}" arg2=""/>
233            </condition>
234        </fail>
235            <java classname="net.i2p.crypto.SU3File" inputstring="${release.password.su3}" fork="true" failonerror="true">
236                <classpath>
237                    <pathelement location="build/i2p.jar" />
238                </classpath>
239                <arg value="sign" />
240                <arg value="-c" />
241                <arg value="@{sigtype}" />
242                <arg value="-t" />
243                <arg value="RSA_SHA512_4096" />
244                <arg value="@{infile}" />
245                <arg value="@{outfile}" />
246                <arg value="${release.privkey.su3}" />
247                <arg value="@{su3.ver}" />
248                <arg value="${release.signer.su3}" />
249            </java>
250            <echo message="Verify version and VALID signature:" />
251            <java classname="net.i2p.crypto.SU3File" fork="true" failonerror="true">
252                <classpath>
253                    <pathelement location="build/i2p.jar" />
254                </classpath>
255                <!-- set base dir so it can find the pubkey cert -->
256                <jvmarg value="-Di2p.dir.base=installer/resources" />
257                <arg value="verifysig" />
258                <arg value="@{outfile}" />
259            </java>
260            <java classname="net.i2p.crypto.SU3File" fork="true" failonerror="true">
261                <classpath>
262                    <pathelement location="build/i2p.jar" />
263                </classpath>
264                <!-- set base dir so it can find the pubkey cert -->
265                <jvmarg value="-Di2p.dir.base=installer/resources" />
266                <arg value="showversion" />
267                <arg value="@{outfile}" />
268            </java>
269        </sequential>
270    </macrodef>
271
272    <target name="dist" depends="pkg, javadoc" />
273    <target name="dist200" depends="pkg200, javadoc" />
274    <target name="build" depends="build2">
275        <!-- so we don't build standalone for the updater -->
276        <!-- This builds apps/i2psnark/java/i2psnark-standalone.zip,
277          -   which we don't distribute anywhere...
278        <ant dir="apps/i2psnark/java/" target="standalone" />
279        -->
280    </target>
281    <target name="build2" depends="builddep, jar, buildWEB" />
282    <target name="buildSmall" depends="builddepSmall, jarSmall, buildWEB" />
283    <target name="buildclean" depends="distclean, build" />
284
285    <target name="builddep" depends="builddepSmall, buildBOB, buildSAM, buildSusiMail, buildSusiDNS, buildI2PSnark" />
286
287    <target name="builddepSmall" depends="buildrouter, buildSystray, buildDesktopGui, buildRouterConsole, buildStreaming, buildI2PTunnel, buildAddressbook" />
288
289    <!-- start of buildX, one for each sub-build.xml.
290         Do not put ant tasks in the sub-build.xmls anymore,
291         so the build will go faster.
292      -->
293
294    <target name="-setepoch">
295        <script language="javascript">
296            <![CDATA[
297              property = project.setProperty("epoch",Math.floor((new Date()).getTime()/1000));
298            ]]>
299        </script>
300    </target>
301
302    <target name="bbLauncher" depends="build">
303        <sequential>
304            <exec executable="./sbt" dir="launchers" failonerror="true">
305                <arg value="browserbundle:clean" />
306            </exec>
307            <exec executable="./sbt" dir="launchers" failonerror="true">
308                <arg value="browserbundle:assembly" />
309            </exec>
310        </sequential>
311    </target>
312
313    <target name="osxLauncher" depends="build,preppkg-osx">
314        <sequential>
315            <exec executable="./sbt" dir="launchers" failonerror="true">
316                <arg value="macosx:cleanAllTask" />
317            </exec>
318            <exec executable="./sbt" dir="launchers" failonerror="true">
319                <arg value="macosx:buildAppBundleTask" />
320            </exec>
321        </sequential>
322    </target>
323
324    <target name="buildBOB" depends="buildStreaming" >
325        <ant dir="apps/BOB/" target="jar" />
326        <copy file="apps/BOB/dist/BOB.jar" todir="build/" />
327    </target>
328
329    <target name="buildSAM" depends="buildStreaming" >
330        <ant dir="apps/sam/java/" target="jar" />
331        <copy file="apps/sam/java/build/sam.jar" todir="build/" />
332    </target>
333
334    <target name="buildSusiMail" depends="buildCore, buildJetty" >
335        <ant dir="apps/susimail/" target="war" />
336        <copy file="apps/susimail/susimail.war" todir="build/" />
337    </target>
338
339    <!-- jar (not war) for testing only -->
340    <target name="buildSusiMailJar" depends="buildCore, buildJetty" >
341        <ant dir="apps/susimail/" target="jar" />
342        <copy file="apps/susimail/susimail.jar" todir="build/" />
343    </target>
344
345    <target name="buildSusiDNS" depends="buildCore, buildJetty, buildImagegen, buildAddressbook" >
346        <ant dir="apps/susidns/src" target="all" />
347        <copy file="apps/susidns/src/susidns.war" todir="build/" />
348    </target>
349
350    <target name="buildImagegen" depends="buildCore, buildJetty" >
351        <ant dir="apps/imagegen" target="build" />
352        <copy file="apps/imagegen/imagegen/build/imagegen.war" todir="build/" />
353    </target>
354
355    <target name="buildI2PSnark" depends="buildStreaming, buildJetty, buildSystray" >
356        <ant dir="apps/i2psnark/java/" target="war" />
357        <copy file="apps/i2psnark/i2psnark.war" todir="build/" />
358        <copy file="apps/i2psnark/java/build/i2psnark.jar" todir="build/" />
359    </target>
360
361    <!-- jar (not war) for Android -->
362    <target name="buildAddressbookJar" depends="buildCore" >
363        <ant dir="apps/addressbook/" target="jar" />
364        <copy file="apps/addressbook/dist/addressbook.jar" todir="build/" />
365    </target>
366
367    <target name="buildAddressbook" depends="buildCore" >
368        <ant dir="apps/addressbook/" target="all" />
369        <copy file="apps/addressbook/dist/addressbook.jar" todir="build/" />
370        <!-- war is empty, only for updates -->
371        <copy file="apps/addressbook/dist/addressbook.war" todir="build/" />
372    </target>
373
374    <!-- Both jars and no war, for Android -->
375    <target name="buildI2PTunnelJars" depends="buildStreaming" >
376        <ant dir="apps/i2ptunnel/java/" target="uiJar" />
377        <copy file="apps/i2ptunnel/java/build/i2ptunnel.jar" todir="build/" />
378        <copy file="apps/i2ptunnel/java/build/i2ptunnel-ui.jar" todir="build/" />
379    </target>
380
381    <target name="buildI2PTunnel" depends="buildStreaming, buildJetty, buildImagegen" >
382        <ant dir="apps/i2ptunnel/java/" target="build" />
383        <copy file="apps/i2ptunnel/java/build/i2ptunnel.jar" todir="build/" />
384        <copy file="apps/i2ptunnel/java/build/i2ptunnel.war" todir="build/" />
385    </target>
386
387    <target name="buildDesktopGui" depends="buildCore, buildrouter" >
388<!--
389        <ant dir="apps/desktopgui" target="clean" />
390-->
391        <ant dir="apps/desktopgui" target="jar" />
392        <copy file="apps/desktopgui/dist/desktopgui.jar" todir="build/" />
393    </target>
394
395    <target name="buildRouterConsole" depends="buildrouter, buildSystray, buildDesktopGui, buildJetty, buildJrobin" >
396        <ant dir="apps/routerconsole/java/" target="jar" />
397    </target>
398
399    <!-- newsxml.jar only (subset of routerconsole, no war) for Android -->
400    <target name="buildNewsXMLJar" depends="buildRouter" >
401        <ant dir="apps/routerconsole/java/" target="newsxmljar" />
402    </target>
403
404    <target name="buildJetty" depends="buildCore" >
405        <ant dir="apps/jetty" target="build" />
406        <copy todir="build/" >
407            <fileset dir="apps/jetty/jettylib" excludes="ant.jar" />
408        </copy>
409    </target>
410
411    <target name="buildSystray" depends="buildCore" >
412        <ant dir="apps/systray/java/" target="jar" />
413        <copy file="apps/systray/java/build/systray.jar" todir="build/" />
414    </target>
415
416    <target name="buildStreaming" depends="buildMinistreaming" >
417        <ant dir="apps/streaming/java/" target="jar" />
418        <copy file="apps/streaming/java/build/streaming.jar" todir="build/" />
419    </target>
420
421    <target name="buildMinistreaming" depends="buildCore" >
422        <ant dir="apps/ministreaming/java/" target="jar" />
423        <copy file="apps/ministreaming/java/build/mstreaming.jar" todir="build/" />
424    </target>
425
426    <target name="buildRouter" depends="buildrouter" />
427    <target name="buildrouter" depends="buildCore" >
428        <ant dir="router/java/" target="jar" />
429        <copy file="router/java/build/router.jar" todir="build/" />
430    </target>
431
432    <target name="buildCore" depends="buildProperties" >
433        <ant dir="core/java/" target="jar" />
434        <copy file="core/java/build/i2p.jar" todir="build/" />
435    </target>
436
437    <target name="buildJrobin" depends="buildCore" >
438        <ant dir="apps/jrobin/java/" target="jar" />
439        <copy file="apps/jrobin/java/build/jrobin.jar" todir="build/" />
440    </target>
441
442    <target name="buildProperties" depends="getMtnRev, getReleaseNumber, getBuildNumber" >
443        <!-- default if not set above -->
444        <property name="workspace.version" value="unknown" />
445        <tstamp>
446            <format property="build.timestamp" pattern="yyyy-MM-dd HH:mm:ss z" timezone="UTC" locale="en" />
447        </tstamp>
448        <property name="full.version" value="${release.number}-${i2p.build.number}${build.extra}" />
449        <echo message="Building version ${full.version} (mtn rev ${workspace.version})" />
450    </target>
451
452    <target name="buildWEB" depends="buildRouterConsole" >
453        <copy file="apps/routerconsole/java/build/routerconsole.jar" todir="build/" />
454        <copy file="apps/routerconsole/java/build/routerconsole.war" todir="build/" />
455    </target>
456
457    <target name="buildTools" depends="buildrouter" >
458        <ant dir="installer/tools/java" target="jar" />
459        <copy file="installer/tools/java/build/tools.jar" todir="build/" />
460    </target>
461
462    <!-- end of sub-build.xml targets -->
463
464    <!-- monotone targets -->
465
466    <target name="checkForMtn" >
467        <available property="mtn.available" file="_MTN" type="dir" />
468    </target>
469
470    <target name="failIfNoMtn" depends="checkForMtn">
471        <fail message="This target cannot be used without Monotone! Use &quot;fakeroot debian/rules get-orig-source&quot; instead.">
472            <condition>
473                <not>
474                    <isset property="mtn.available" />
475                </not>
476            </condition>
477        </fail>
478    </target>
479
480    <target name="getMtnRev" depends="checkForMtn" if="mtn.available" >
481        <exec executable="mtn" outputproperty="workspace.version" errorproperty="mtn.error1" failifexecutionfails="false" >
482            <arg value="automate" />
483            <arg value="get_base_revision_id" />
484        </exec>
485    </target>
486
487    <target name="trimMtnRev" depends="getMtnRev">
488        <script language="javascript">
489            <![CDATA[
490            var MtnRev = project.getProperty("workspace.version");
491            if (MtnRev != 'unknown' && MtnRev != null) {
492                echo = project.createTask("echo");
493                var MtnShortHash = MtnRev.substring(0,8);
494                project.setProperty("MtnShortHash", MtnShortHash);
495                echo.setMessage("Trimmed hash: " + MtnShortHash);
496                echo.perform();
497            } else {
498                project.setProperty("MtnShortHash", 'unknown');
499            }
500            ]]>
501        </script>
502    </target>
503
504    <target name="checkIfBumped">
505        <exec executable="mtn" outputproperty="bumped" errorproperty="mtn.error2" failifexecutionfails="false" >
506            <arg value="ls" />
507            <arg value="ch" />
508            <arg value="router/java/src/net/i2p/router/RouterVersion.java" />
509        </exec>
510        <condition property="bumped.already">
511            <not>
512                <equals arg1="${bumped}" arg2=""/>
513            </not>
514        </condition>
515    </target>
516
517    <target name="bump" depends="bumpBuild" />
518    <target name="bumpBuild" depends="checkIfBumped, getBuildNumber" unless="bumped.already">
519        <script language="javascript">
520            <![CDATA[
521            var newBuildNumber = (Number(project.getProperty("i2p.build.number")) + 1);
522            if (newBuildNumber != 'unknown' && newBuildNumber != null) {
523                echo = project.createTask("echo");
524                project.setProperty("new.i2p.build.number", newBuildNumber);
525                echo.setMessage("Build number is now: " + newBuildNumber + project.getProperty("build.extra"));
526                echo.perform();
527            }
528            ]]>
529        </script>
530        <replaceregexp byline="true" file="router/java/src/net/i2p/router/RouterVersion.java"
531            match='(^\s+public\s+final\s+static\s+long\s+BUILD\s+=\s+)[0-9]+;' replace='\1${new.i2p.build.number};'/>
532    </target>
533
534    <target name="revisions" depends="getReleaseNumber, getBuildNumber">
535        <!-- mtn log __brief __no-graph __to t:i2p-0.9.xx | cut -d ' ' -f 2 | sort | uniq -c | sort -rn -->
536        <exec executable="mtn" outputproperty="getrevisions1" errorproperty="reverror1" failifexecutionfails="true" >
537            <arg value="log" />
538            <arg value="--brief" />
539            <arg value="--no-graph" />
540            <arg value="--to" />
541            <arg value="t:i2p-${release.number}" />
542        </exec>
543        <exec executable="cut" inputstring="${getrevisions1}" outputproperty="getrevisions2" failifexecutionfails="true" >
544            <arg value="-d" />
545            <arg value=" " />
546            <arg value="-f" />
547            <arg value="2" />
548        </exec>
549        <exec executable="sort" inputstring="${getrevisions2}" outputproperty="getrevisions3" failifexecutionfails="true" >
550        </exec>
551        <exec executable="uniq" inputstring="${getrevisions3}" outputproperty="getrevisions4" failifexecutionfails="true" >
552            <arg value="-c" />
553        </exec>
554        <exec executable="sort" inputstring="${getrevisions4}" outputproperty="getrevisions5" failifexecutionfails="true" >
555            <arg value="-rn" />
556        </exec>
557        <echo message="Revisions since ${release.number}:" />
558        <echo message="${getrevisions5}" />
559    </target>
560
561    <!-- end monotone targets -->
562
563    <!-- launch4j targets -->
564
565    <condition property="noExe">
566        <not>
567            <!-- We only have launch4j binaries for the following systems -->
568            <and>
569                <or>
570                    <os arch="x86" />
571                    <os arch="i386" />
572                    <os arch="i586" />
573                    <os arch="i686" />
574                    <os arch="amd64" />
575                    <os arch="x86_64" />
576                </or>
577                <or>
578                    <os name="Linux" />
579                    <os family="windows" />
580                </or>
581            </and>
582        </not>
583    </condition>
584
585    <!-- this makes an empty build/launchi2p.jar and the build/i2p.exe for the no-wrapper windows startup, if possible -->
586    <target name="buildexe" depends="buildProperties, launch4j" unless="noExe">
587        <echo message="See the file &quot;build.properties&quot; if this step fails." />
588        <jar destfile="./build/launchi2p.jar">
589            <manifest>
590                <attribute name="Main-Class" value="net.i2p.router.RouterLaunch" />
591                <attribute name="Class-Path" value="lib/i2p.jar lib/router.jar lib/jbigi.jar lib/BOB.jar lib/sam.jar lib/mstreaming.jar lib/streaming.jar lib/routerconsole.jar lib/i2ptunnel.jar lib/org.mortbay.jetty.jar lib/javax.servlet.jar lib/jasper-runtime.jar lib/commons-el.jar lib/wrapper.jar lib/systray.jar lib/desktopgui.jar lib/i2psnark.jar lib/jrobin.jar lib/jstl.jar lib/standard.jar lib/jetty-continuation.jar lib/jetty-deploy.jar lib/jetty-http.jar lib/jetty-i2p.jar lib/jetty-io.jar lib/jetty-rewrite-handler.jar lib/jetty-security.jar lib/jetty-servlet.jar lib/jetty-servlets.jar lib/jetty-start.jar lib/jetty-util.jar lib/jetty-webapp.jar lib/jetty-xml.jar" />
592                <attribute name="Built-By" value="${build.built-by}" />
593                <attribute name="Build-Date" value="${build.timestamp}" />
594                <attribute name="Base-Revision" value="${workspace.version}" />
595            </manifest>
596        </jar>
597        <!-- now the standalone launcher exe -->
598        <launch4j configFile="./installer/i2pstandalone.xml" />
599        <!-- thazzit -->
600    </target>
601
602    <target name="launch4j">
603        <taskdef name="launch4j"
604                 classname="net.sf.launch4j.ant.Launch4jTask"
605                 classpath="${basedir}/installer/lib/launch4j/launch4j.jar:${basedir}/installer/lib/launch4j/lib/xstream.jar" />
606     </target>
607
608    <!-- end launch4j targets -->
609
610     <!--
611          the files are now copied to the build directory
612          in the build* targets
613      -->
614     <target name="jar" depends="jarSmall" />
615     <target name="jarSmall" depends="builddepSmall" />
616
617    <!-- Custom target to collect the jars that I2P-Bote needs to compile, so it can compile from source. -->
618    <target name="jarBote" depends="buildRouter, buildStreaming, buildJetty" >
619        <copy file="apps/susidns/src/lib/jstl.jar" todir="build/" />
620        <copy file="apps/susidns/src/lib/standard.jar" todir="build/" />
621    </target>
622
623    <!-- jbigi targets -->
624
625    <target name="jbigi-list-changes" depends="checkForMtn" if="mtn.available">
626        <exec executable="mtn" outputproperty="workspace.changes.jbigi" errorproperty="mtn.error.jbigi" failifexecutionfails="false" >
627            <arg value="list" />
628            <arg value="changed" />
629            <arg value="installer/lib/jbigi" />
630        </exec>
631        <!-- \n in an attribute value generates an invalid manifest -->
632        <exec executable="tr" inputstring="${workspace.changes.jbigi}" outputproperty="workspace.changes.jbigi.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
633            <arg value="-s" />
634            <arg value="&quot;[:space:]&quot;" />
635            <arg value="," />
636        </exec>
637    </target>
638
639    <target name="jbigi" depends="buildProperties, jbigi-list-changes">
640        <!-- set if unset -->
641        <property name="workspace.changes.jbigi.tr" value="" />
642        <mkdir dir="./build" />
643        <jar destfile="build/jbigi.jar" whenmanifestonly="fail" >
644            <fileset dir="installer/lib/jbigi" includes="*.so *.dll *.jnilib" />
645            <manifest>
646                <attribute name="Built-By" value="${build.built-by}" />
647                <attribute name="Build-Date" value="${build.timestamp}" />
648                <attribute name="Base-Revision" value="${workspace.version}" />
649                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
650            </manifest>
651        </jar>
652    </target>
653
654    <target name="jbigi-nowindows" depends="buildProperties, jbigi-list-changes">
655        <!-- set if unset -->
656        <property name="workspace.changes.jbigi.tr" value="" />
657        <delete file="build/jbigi.jar" failonerror="false" quiet="true" />
658        <jar destfile="build/jbigi.jar" whenmanifestonly="fail" >
659            <fileset dir="installer/lib/jbigi" includes="*.so *.jnilib" />
660            <manifest>
661                <attribute name="Built-By" value="${build.built-by}" />
662                <attribute name="Build-Date" value="${build.timestamp}" />
663                <attribute name="Base-Revision" value="${workspace.version}" />
664                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
665            </manifest>
666        </jar>
667    </target>
668
669    <!-- Now system-specific jbigis in alphabetical order -->
670    <target name="jbigi-freebsd-only"  depends="buildProperties, jbigi-list-changes">
671        <!-- set if unset -->
672        <property name="workspace.changes.jbigi.tr" value="" />
673        <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
674            <fileset dir="installer/lib/jbigi" includes="*bsd*.so" />
675            <manifest>
676                <attribute name="Built-By" value="${build.built-by}" />
677                <attribute name="Build-Date" value="${build.timestamp}" />
678                <attribute name="Base-Revision" value="${workspace.version}" />
679                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
680            </manifest>
681        </jar>
682    </target>
683
684    <target name="jbigi-linux-only"  depends="buildProperties, jbigi-list-changes">
685        <!-- set if unset -->
686        <property name="workspace.changes.jbigi.tr" value="" />
687        <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
688            <fileset dir="installer/lib/jbigi" includes="*linux*.so" />
689            <manifest>
690                <attribute name="Built-By" value="${build.built-by}" />
691                <attribute name="Build-Date" value="${build.timestamp}" />
692                <attribute name="Base-Revision" value="${workspace.version}" />
693                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
694            </manifest>
695        </jar>
696    </target>
697
698    <target name="jbigi-linux-x86-only"  depends="buildProperties, jbigi-list-changes">
699        <!-- set if unset -->
700        <property name="workspace.changes.jbigi.tr" value="" />
701        <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
702            <fileset dir="installer/lib/jbigi" includes="*linux*.so" excludes="*linux-arm*.so,*linux-ppc*.so" />
703            <manifest>
704                <attribute name="Built-By" value="${build.built-by}" />
705                <attribute name="Build-Date" value="${build.timestamp}" />
706                <attribute name="Base-Revision" value="${workspace.version}" />
707                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
708            </manifest>
709        </jar>
710    </target>
711
712
713    <target name="jbigi-linux-nonx86-only"  depends="buildProperties, jbigi-list-changes">
714        <!-- set if unset -->
715        <property name="workspace.changes.jbigi.tr" value="" />
716        <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
717            <fileset dir="installer/lib/jbigi" includes="*linux-arm*.so,*linux-ppc*.so" />
718            <manifest>
719                <attribute name="Built-By" value="${build.built-by}" />
720                <attribute name="Build-Date" value="${build.timestamp}" />
721                <attribute name="Base-Revision" value="${workspace.version}" />
722                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
723            </manifest>
724        </jar>
725    </target>
726
727    <target name="jbigi-osx-only"  depends="buildProperties, jbigi-list-changes" >
728        <!-- set if unset -->
729        <property name="workspace.changes.jbigi.tr" value="" />
730        <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
731            <fileset dir="installer/lib/jbigi" includes="*.jnilib" />
732            <manifest>
733                <attribute name="Built-By" value="${build.built-by}" />
734                <attribute name="Build-Date" value="${build.timestamp}" />
735                <attribute name="Base-Revision" value="${workspace.version}" />
736                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
737            </manifest>
738        </jar>
739    </target>
740
741    <target name="jbigi-windows-only" depends="buildProperties, jbigi-list-changes" >
742        <!-- set if unset -->
743        <property name="workspace.changes.jbigi.tr" value="" />
744        <delete file="build/jbigi.jar" failonerror="false" quiet="true" />
745        <jar destfile="build/jbigi.jar" whenmanifestonly="fail" >
746            <fileset dir="installer/lib/jbigi" includes="*windows*.dll" />
747            <manifest>
748                <attribute name="Built-By" value="${build.built-by}" />
749                <attribute name="Build-Date" value="${build.timestamp}" />
750                <attribute name="Base-Revision" value="${workspace.version}" />
751                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
752            </manifest>
753        </jar>
754    </target>
755
756    <!-- end jbigi targets -->
757
758    <target name="poupdate-source" depends="set-lg2-en, poupdate" />
759
760    <target name="set-lg2-en" >
761        <property name="lg2" value="en" />
762    </target>
763
764    <!-- the apps need to compile the jsps to poupdate -->
765    <target name="poupdate" depends="buildRouter, buildStreaming, buildSystray, buildJetty, buildDesktopGui, buildJrobin" >
766        <echo message="Setting environment variable LG2 to a lang code (eg: de,zh,nl etc)" />
767        <echo message=" will restrict language update to the language you specified, leaving other language untact." />
768        <!-- set if unset -->
769        <property name="lg2" value="" />
770        <ant dir="apps/routerconsole/java/" >
771            <target name="poupdate" />
772            <target name="poupdate-news" />
773            <target name="poupdate-countries" />
774        </ant>
775        <ant dir="apps/i2psnark/java/" target="poupdate" />
776        <ant dir="apps/i2ptunnel/java/" >
777            <target name="poupdate" />
778            <target name="poupdate-proxy" />
779        </ant>
780        <ant dir="apps/susidns/src/" target="poupdate" />
781        <ant dir="apps/susimail/" target="poupdate" />
782        <ant dir="apps/desktopgui" target="poupdate" />
783        <ant dir="installer/resources/locale" target="poupdate" />
784        <ant dir="apps/ministreaming/java" target="poupdate" />
785    </target>
786
787    <condition property="no.bundle">
788        <isfalse value="${require.gettext}" />
789    </condition>
790
791    <target name="prep-script-translation" unless="no.bundle" >
792        <!-- script translation added in 0.8.13, enabled in 0.9.5. -->
793        <ant dir="installer/resources/locale" target="bundle" />
794        <copy todir="pkg-temp/locale/">
795            <fileset dir="installer/resources/locale/mo/" />
796        </copy>
797    </target>
798
799    <target name="javadoc" depends="getReleaseNumber, getBuildNumber" >
800        <ant dir="apps/jetty" target="ensureJettylib" />
801        <mkdir dir="./build" />
802        <mkdir dir="./build/javadoc" />
803        <javadoc access="package"
804            destdir="./build/javadoc"
805            packagenames="*"
806            use="true"
807            splitindex="true"
808            failonerror="true"
809            doctitle="I2P Javadocs for Release ${release.number} Build ${i2p.build.number}${build.extra}"
810            windowtitle="I2P Anonymous Network - Java Documentation - Version ${release.number}">
811            <group title="Core SDK (i2p.jar)" packages="net.i2p:net.i2p.*:net.i2p.client:net.i2p.client.*:net.i2p.internal:net.i2p.internal.*:freenet.support.CPUInformation:org.bouncycastle.oldcrypto:org.bouncycastle.oldcrypto.*:gnu.crypto.*:gnu.getopt:gnu.gettext:com.nettgryppa.security:org.apache.http.conn.ssl:org.apache.http.conn.util:org.apache.http.util:net.minidev.json:net.minidev.json.*" />
812            <group title="Streaming Library" packages="net.i2p.client.streaming:net.i2p.client.streaming.impl" />
813            <group title="Router" packages="net.i2p.router:net.i2p.router.*:net.i2p.data.i2np:net.i2p.data.router:org.cybergarage:org.cybergarage.*:org.freenetproject:org.xlattice.crypto.filters:com.maxmind.geoip:com.southernstorm.noise.*" />
814            <group title="Router Console" packages="net.i2p.router.web:net.i2p.router.web.*:net.i2p.router.update:net.i2p.router.news" />
815            <!-- apps and bridges starting here, alphabetical please -->
816            <group title="Addressbook Application" packages="net.i2p.addressbook:net.i2p.router.naming:net.metanotion:net.metanotion.*" />
817            <group title="BOB Bridge" packages="net.i2p.BOB" />
818            <group title="BOB Demos" packages="net.i2p.BOB.Demos.echo.echoclient:net.i2p.BOB.Demos.echo.echoserver" />
819            <group title="Desktopgui Application" packages="net.i2p.desktopgui:net.i2p.desktopgui.*" />
820            <group title="I2PSnark Application" packages="org.klomp.snark:org.klomp.snark.*" />
821            <group title="I2PTunnel Application" packages="net.i2p.i2ptunnel:net.i2p.i2ptunnel.*" />
822            <group title="Imagegen Application" packages="com.docuverse.identicon:com.google.zxing:com.google.zxing.*:net.i2p.imagegen" />
823            <group title="Installer Utilities" packages="net.i2p.installer" />
824            <group title="Jetty Utilities" packages="net.i2p.jetty:net.i2p.servlet:net.i2p.servlet.*" />
825            <group title="JRobin Library" packages="org.jrobin:org.jrobin.*:engine.misc" />
826            <group title="SAM Bridge" packages="net.i2p.sam" />
827            <group title="SAM Demos" packages="net.i2p.sam.client" />
828            <group title="SusiDNS Application" packages="i2p.susi.dns:net.i2p.addressbook.servlet" />
829            <group title="SusiMail Application" packages="i2p.susi.webmail:i2p.susi.webmail.*:i2p.susi.debug:i2p.susi.util" />
830            <group title="Systray Application" packages="net.i2p.apps.systray" />
831            <sourcepath>
832                <pathelement location="core/java/src" />
833                <pathelement location="router/java/src" />
834                <pathelement location="apps/ministreaming/java/src" />
835                <pathelement location="apps/streaming/java/src" />
836                <pathelement location="apps/i2ptunnel/java/src" />
837                <pathelement location="apps/systray/java/src" />
838                <pathelement location="apps/desktopgui/src" />
839                <pathelement location="apps/routerconsole/java/src" />
840                <pathelement location="apps/addressbook/java/src" />
841                <pathelement location="apps/i2psnark/java/src" />
842                <pathelement location="apps/sam/java/src" />
843                <pathelement location="apps/BOB/src" />
844                <pathelement location="apps/BOB/Demos/echo/echoclient/src" />
845                <pathelement location="apps/BOB/Demos/echo/echoserver/src" />
846                <pathelement location="apps/susidns/src/java/src" />
847                <pathelement location="apps/susimail/src/src" />
848                <pathelement location="apps/jetty/java/src" />
849                <pathelement location="apps/imagegen/imagegen/webapp/src/main/java" />
850                <pathelement location="apps/imagegen/identicon/core/src/main/java" />
851                <pathelement location="apps/imagegen/zxing/core/src/main/java" />
852                <pathelement location="apps/imagegen/zxing/javase/src/main/java" />
853                <pathelement location="apps/jrobin/java/src" />
854                <pathelement location="installer/java/src" />
855            </sourcepath>
856            <classpath>
857                <!-- warning, some entries are needed for Debian builds only -->
858                <pathelement location="apps/jetty/jettylib/org.mortbay.jetty.jar" />
859                <pathelement location="apps/jetty/jettylib/jasper-runtime.jar" />
860                <pathelement location="apps/jetty/jettylib/javax.servlet.jar" />
861                <pathelement location="apps/jetty/jettylib/jetty-http.jar" />
862                <pathelement location="apps/jetty/jettylib/jetty-security.jar" />
863                <pathelement location="apps/jetty/jettylib/jetty-servlet.jar" />
864                <pathelement location="apps/jetty/jettylib/jetty-servlets.jar" />
865                <pathelement location="apps/jetty/jettylib/jetty-start.jar" />
866                <pathelement location="apps/jetty/jettylib/jetty-util.jar" />
867                <pathelement location="apps/jetty/jettylib/jetty-webapp.jar" />
868                <pathelement location="apps/jetty/jettylib/jetty-xml.jar" />
869                <pathelement location="apps/jetty/jettylib/tomcat-api.jar" />
870                <pathelement location="apps/jrobin/jrobin-1.5.9.1.jar" />
871                <pathelement location="installer/lib/wrapper/all/wrapper.jar" />
872                <!-- following are only for debian builds -->
873                <pathelement location="core/java/build/libintl.jar" />
874                <pathelement location="core/java/build/gnu-getopt.jar" />
875            </classpath>
876            <!-- These variables are stored in build.properties.
877                  End-users can override by creating the file override.properties -->
878            <link offline="true" href="${javasedocs.url}" packagelistLoc="installer/resources/package-lists/java/" />
879            <link offline="true" href="${javaeedocs.url}" packagelistLoc="installer/resources/package-lists/javaee/" />
880            <link offline="true" href="${jettydocs.url}" packagelistLoc="installer/resources/package-lists/jetty/" />
881            <link offline="true" href="${wrapperdocs.url}" packagelistLoc="installer/resources/package-lists/wrapper/" />
882        </javadoc>
883        <echo message="Warning, javadoc embeds timestamps in the output, run with 'TZ=UTC ant javadoc' if you plan to distribute" />
884    </target>
885
886    <target name="javadoc-zip" depends="javadoc">
887        <zip destfile="javadoc.zip" basedir="build" level="9" includes="javadoc\**" />
888    </target>
889
890    <target name="javadoc-test" depends="buildRouter, javadoc" >
891        <mkdir dir="./build" />
892        <mkdir dir="./build/javadoc-test" />
893
894        <!-- set junit home to the old default unless overridden elsewhere -->
895        <property name="junit.home" value="${ant.home}/lib/" />
896        <javadoc access="package"
897            destdir="./build/javadoc-test"
898            packagenames="*"
899            use="true"
900            splitindex="true"
901            doctitle="I2P Unit Test Javadocs for Release ${release.number} Build ${i2p.build.number}${build.extra}"
902            windowtitle="I2P Anonymous Network - Java Documentation - Version ${release.number}">
903            <group title="Core SDK" packages="net.i2p:net.i2p.*:net.i2p.client:net.i2p.client.*:net.i2p.internal:net.i2p.internal.*:freenet.support.CPUInformation:org.bouncycastle.oldcrypto:org.bouncycastle.oldcrypto.*:gnu.crypto.*:gnu.gettext:org:com.nettgryppa.security:net.metanotion:net.metanotion.*" />
904            <group title="Router" packages="net.i2p.router:net.i2p.router.*:net.i2p.data.i2np:org.cybergarage.*:org.freenetproject:org.xlattice.crypto.filters" />
905            <sourcepath>
906                <pathelement location="core/java/test/junit" />
907                <pathelement location="router/java/test/junit" />
908                <pathelement location="core/java/test/scalatest" />
909            </sourcepath>
910            <classpath>
911                <pathelement location="build/i2p.jar" />
912                <pathelement location="build/router.jar" />
913                <pathelement location="${junit.home}/junit4.jar" />
914                <pathelement location="${hamcrest.home}/hamcrest-all.jar" />
915            </classpath>
916            <!--
917                 These variables are stored in build.properties.
918                 End-users can override by creating the file override.properties
919            -->
920            <link offline="true" href="${javasedocs.url}" packagelistLoc="installer/resources/package-lists/java/" />
921            <link offline="true" href="${junitdocs.url}" packagelistLoc="installer/resources/package-lists/junit/" />
922            <link offline="true" href="${i2pdocs.url}" packagelistLoc="build/javadoc/" />
923        </javadoc>
924        <echo message="Warning, javadoc embeds timestamps in the output, run with 'TZ=UTC ant javadoc' if you plan to distribute" />
925    </target>
926
927    <target name="getReleaseNumber">
928        <loadfile srcfile="core/java/src/net/i2p/CoreVersion.java" property="release.number">
929            <filterchain>
930                <linecontains>
931                    <contains value="public final static String VERSION"/>
932                </linecontains>
933                <tokenfilter>
934                    <replaceregex pattern='.*"([^"]+)";' replace="\1" flags="gi" />
935                </tokenfilter>
936                <striplinebreaks/>
937                <trim/>
938            </filterchain>
939        </loadfile>
940        <property name="release.number" value="unknown" />
941        <echo message="Release number is ${release.number}" />
942    </target>
943
944    <target name="getBuildNumber">
945        <loadfile srcfile="router/java/src/net/i2p/router/RouterVersion.java" property="i2p.build.number">
946            <filterchain>
947                <linecontains>
948                    <contains value="public final static long BUILD" />
949                </linecontains>
950                <tokenfilter>
951                    <replaceregex pattern=".*=\s+([0-9]+);" replace="\1" flags="gi" />
952                </tokenfilter>
953                <trim/>
954                <striplinebreaks/>
955            </filterchain>
956        </loadfile>
957        <loadfile srcfile="router/java/src/net/i2p/router/RouterVersion.java" property="build.extra">
958            <filterchain>
959                <linecontains>
960                    <contains value="public final static String EXTRA" />
961                </linecontains>
962                <tokenfilter>
963                    <replaceregex pattern='.*"(.*)";' replace="\1" flags="gi" />
964                </tokenfilter>
965                <trim/>
966                <striplinebreaks/>
967            </filterchain>
968        </loadfile>
969        <property name="i2p.build.number" value="??" />
970        <property name="build.extra" value="" />
971        <echo message="Build number is ${i2p.build.number}${build.extra}" />
972    </target>
973
974    <target name="verifyReleaseBuildNumbers" depends="getReleaseNumber, getBuildNumber" >
975        <echo message="SDK: ${java.vendor} ${java.version} (${java.runtime.name} ${java.runtime.version})" />
976        <fail message="Bad release number: ${release.number}" >
977            <condition>
978                <or>
979                    <equals arg1="${release.number}" arg2="unknown"/>
980                    <equals arg1="${release.number}" arg2=""/>
981                </or>
982            </condition>
983        </fail>
984        <fail message="Non-zero build number: ${i2p.build.number}" >
985            <condition>
986                <not>
987                    <equals arg1="${i2p.build.number}" arg2="0"/>
988                </not>
989            </condition>
990        </fail>
991        <fail message="Non-empty extra build: ${build.extra}" >
992            <condition>
993                <not>
994                    <equals arg1="${build.extra}" arg2=""/>
995                </not>
996            </condition>
997        </fail>
998    </target>
999
1000    <target name="-pre-sign">
1001            <!-- if you're distributing su3 files to others, at a minimum you should set these -->
1002            <fail message="javac.compilerargs must contain a -bootclasspath option in override.properties">
1003                <condition>
1004                    <not><contains string="${javac.compilerargs}" substring="-bootclasspath"/></not>
1005                </condition>
1006            </fail>
1007            <fail message="javac.compilerargs7 must contain a -bootclasspath option in override.properties">
1008                <condition>
1009                    <not><contains string="${javac.compilerargs7}" substring="-bootclasspath"/></not>
1010                </condition>
1011            </fail>
1012            <fail message="build.built-by must be set in override.properties">
1013                <condition>
1014                    <equals arg1="${build.built-by}" arg2="unknown"/>
1015                </condition>
1016            </fail>
1017            <fail message="require.gettext must be true">
1018                <condition>
1019                    <not><equals arg1="${require.gettext}" arg2="true"/></not>
1020                </condition>
1021            </fail>
1022    </target>
1023
1024    <target name="-pre-release" depends="-pre-sign, failIfNoMtn">
1025            <echo message="================================================================" />
1026            <echo message="Did you update these files?" />
1027            <exec executable="ls" failonerror="true">
1028                    <arg value="-l" />
1029                    <arg value="history.txt" />
1030                    <arg value="installer/install.xml" />
1031                    <arg value="core/java/src/net/i2p/CoreVersion.java" />
1032                    <arg value="router/java/src/net/i2p/router/RouterVersion.java" />
1033            </exec>
1034            <echo message="Everything is checked in, right? Let's be sure:" />
1035            <exec executable="mtn" failonerror="true">
1036                    <arg value="st" />
1037            </exec>
1038            <echo message="If there are any modified files above, stop now!" />
1039            <echo message="================================================================" />
1040            <sleep seconds="3"/>
1041    </target>
1042
1043    <target name="clean" depends="pkgclean" >
1044        <delete dir="./build" />
1045        <delete dir="./reports" />
1046        <delete file="installer/lib/izpack/patches.jar" failonerror="false" quiet="true" />
1047        <delete file="syndie-standalone.zip" failonerror="false" quiet="true" />
1048        <delete file="i2psnark-standalone.zip" failonerror="false" quiet="true" />
1049        <delete file="BOB-one.jar" failonerror="false" quiet="true" />
1050        <delete file="core/java/cobertura.ser"/>
1051        <delete file="javadoc.zip" />
1052        <delete file="i2p.fba" />
1053        <delete file="${sloccount.report.file}" />
1054        <delete file="mavencentral-i2p.jar" />
1055        <delete file="mavencentral-router.jar" />
1056        <delete file="mavencentral-mstreaming.jar" />
1057        <delete file="mavencentral-streaming.jar" />
1058        <delete file="mavencentral-servlet-i2p.jar" />
1059    </target>
1060
1061    <target name="distclean" depends="clean">
1062        <delete failonerror="false" quiet="true">
1063            <fileset dir="." includes="i2pinstall* *.deb i2p_*.bz2 i2pupdate* i2psource* *.sig *.torrent" />
1064        </delete>
1065        <ant dir="core/java/" target="distclean" />
1066        <ant dir="router/java/" target="distclean" />
1067        <ant dir="installer/java" target="distclean" />
1068        <ant dir="apps/ministreaming/java/" target="distclean" />
1069        <ant dir="apps/streaming/java/" target="distclean" />
1070        <ant dir="apps/i2ptunnel/java/" target="distclean" />
1071        <ant dir="apps/sam/java/" target="distclean" />
1072        <ant dir="apps/BOB" target="clean" />
1073        <ant dir="apps/desktopgui" target="clean" />
1074        <ant dir="apps/routerconsole/java/" target="distclean" />
1075        <ant dir="apps/addressbook/" target="distclean" />
1076        <ant dir="apps/susimail/" target="distclean" />
1077        <ant dir="apps/susidns/src/" target="distclean" />
1078        <ant dir="apps/systray/java/" target="distclean" />
1079        <ant dir="apps/i2psnark/java/" target="distclean" />
1080        <ant dir="apps/jetty/" target="distclean" />
1081        <ant dir="apps/imagegen/" target="distclean" />
1082        <ant dir="apps/jrobin/java" target="distclean" />
1083        <delete dir="core/c/jbigi/bin" />
1084        <delete dir="core/c/jbigi/lib" />
1085        <delete dir="core/c/jcpuid/lib" />
1086        <ant dir="installer/resources/locale" target="distclean" />
1087        <ant dir="installer/tools/java" target="distclean" />
1088        <!--
1089                NOTE! We need to turn off the default excludes for these
1090                patterns to work.
1091                These are the defaultexcludes in Ant as seen on
1092                http://ant.apache.org/manual/CoreTasks/defaultexcludes.html
1093                     **/*~
1094                     **/#*#
1095                     **/.#*
1096                     **/%*%
1097                     **/._*
1098                     **/CVS
1099                     **/CVS/**
1100                     **/.cvsignore
1101                     **/SCCS
1102                     **/SCCS/**
1103                     **/vssver.scc
1104                     **/.svn
1105                     **/.svn/**
1106                     **/.DS_Store
1107                The only recourse is to remove the offending ones.
1108                We do this here, as we only need one change, and then put it
1109                back after we are done with it.
1110        -->
1111        <defaultexcludes remove="**/*~"/>
1112
1113        <delete>
1114            <fileset dir="." includes="**/*.class **/*.java~ **/*.txt~ **/*.xml~ **/*.sh~ **/*.SlackBuild~" />
1115            <!--
1116                Less common, but they pollute my workspace here, so we
1117                might as well nuke these as well. Are there any others?
1118
1119                !!??? Why don't we just nuke "**/*~" ???!!
1120
1121                ++Sponge
1122            -->
1123        </delete>
1124        <!--
1125                Now we put the defaults back
1126        -->
1127        <defaultexcludes default="true"/>
1128    </target>
1129
1130    <target name="webappDistclean">
1131        <ant dir="apps/i2ptunnel/java/" target="distclean" />
1132        <ant dir="apps/routerconsole/java/" target="distclean" />
1133        <ant dir="apps/addressbook/" target="distclean" />
1134        <ant dir="apps/susimail/" target="distclean" />
1135        <ant dir="apps/susidns/src/" target="distclean" />
1136        <ant dir="apps/i2psnark/java/" target="distclean" />
1137        <ant dir="apps/imagegen/" target="distclean" />
1138    </target>
1139
1140    <target name="pkg" depends="distclean, updater, preppkg, installer" />
1141
1142    <target name="pkg200" depends="distclean, updater200, preppkg, installer" />
1143
1144    <target name="pkgclean" depends="deletepkg-temp">
1145        <delete>
1146            <fileset dir="." includes="i2p.tar.bz2 install.jar i2pupdate.zip i2pupdate200.zip" />
1147        </delete>
1148    </target>
1149
1150    <target name="preppkg" depends="preppkg-linux, preppkg-freebsd, preppkg-osx, preppkg-windows, jbigi">
1151        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
1152        <copy todir="pkg-temp/lib/wrapper/solaris/">
1153            <fileset dir="installer/lib/wrapper/solaris/" excludes="*.txt" />
1154        </copy>
1155     <!-- Force using the new wrapper.jar.
1156          The new jar with the old windows binaries will output a warning on windows.
1157          We do not generate release files from this target.
1158          See preppkg-windows-only target below.
1159      -->
1160        <copy overwrite="true" file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
1161    </target>
1162
1163    <target name="preppkg-nowindows" depends="preppkg-linux, preppkg-freebsd, preppkg-osx, jbigi-nowindows">
1164        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
1165        <copy todir="pkg-temp/lib/wrapper/solaris/">
1166            <fileset dir="installer/lib/wrapper/solaris/" excludes="*.txt" />
1167        </copy>
1168        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
1169    </target>
1170
1171    <target name="preppkgRepack" depends="preppkg-linux, preppkg-freebsd, preppkg-osx, preppkg-windows, jbigi">
1172        <ant target="repack200" />
1173        <!-- no use doing repack200 on jbigi.jar -->
1174        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
1175        <copy todir="pkg-temp/lib/wrapper/solaris/">
1176            <fileset dir="installer/lib/wrapper/solaris/" excludes="*.txt" />
1177        </copy>
1178    </target>
1179
1180    <target name="preppkg-freebsd" depends="preppkg-unix">
1181        <copy todir="pkg-temp/lib/wrapper/freebsd/">
1182            <fileset dir="installer/lib/wrapper/freebsd/" excludes="*.txt" />
1183        </copy>
1184        <copy todir="pkg-temp/lib/wrapper/freebsd64/">
1185            <fileset dir="installer/lib/wrapper/freebsd64" excludes="*.txt" />
1186        </copy>
1187    </target>
1188
1189    <target name="preppkg-freebsd-only" depends="preppkg-freebsd, jbigi-freebsd-only" >
1190        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
1191        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
1192    </target>
1193
1194    <!-- only what is needed for debian, etc. -->
1195    <target name="preppkg-linux-only" depends="preppkg-linux, jbigi-linux-only" >
1196        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
1197        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
1198    </target>
1199
1200    <!-- This is the target called by debian/rules -->
1201    <target name="preppkg-unix" depends="preppkg-base, prep-script-translation" >
1202        <copy file="installer/resources/runplain.sh" todir="pkg-temp/" />
1203        <copy file="installer/resources/eepget" todir="pkg-temp/" />
1204        <copy file="installer/resources/i2prouter" todir="pkg-temp/" />
1205        <copy file="installer/resources/osid" todir="pkg-temp/" />
1206        <copy file="installer/resources/postinstall.sh" todir="pkg-temp/" />
1207        <copy todir="pkg-temp/man/">
1208            <fileset dir="installer/resources/man/" />
1209        </copy>
1210    </target>
1211
1212    <target name="preppkg-linux" depends="preppkg-linux-x86,preppkg-linux-nonx86" />
1213
1214    <target name="preppkg-linux-x86" depends="preppkg-unix">
1215        <copy todir="pkg-temp/lib/wrapper/linux/">
1216            <fileset dir="installer/lib/wrapper/linux/" excludes="*.txt" />
1217        </copy>
1218        <copy todir="pkg-temp/lib/wrapper/linux64/">
1219            <fileset dir="installer/lib/wrapper/linux64/" excludes="*.txt" />
1220        </copy>
1221    </target>
1222
1223    <target name="preppkg-linux-nonx86" depends="preppkg-unix">
1224        <copy todir="pkg-temp/lib/wrapper/linux-ppc/">
1225            <fileset dir="installer/lib/wrapper/linux-ppc/" excludes="*.txt" />
1226        </copy>
1227        <copy todir="pkg-temp/lib/wrapper/linux-armv5/">
1228            <fileset dir="installer/lib/wrapper/linux-armv5/" excludes="*.txt" />
1229        </copy>
1230        <copy todir="pkg-temp/lib/wrapper/linux-armv6/">
1231            <fileset dir="installer/lib/wrapper/linux-armv6/" excludes="*.txt" />
1232        </copy>
1233    </target>
1234
1235    <target name="preppkg-osx" depends="preppkg-unix">
1236        <!--<copy file="installer/resources/I2P Router Console.webloc" todir="pkg-temp/" />-->
1237        <copy todir="pkg-temp/Start I2P Router.app">
1238            <fileset dir="installer/resources/Start I2P Router.app" />
1239        </copy>
1240        <copy todir="pkg-temp/lib/wrapper/macosx/">
1241            <fileset dir="installer/lib/wrapper/macosx/" excludes="*.txt" />
1242        </copy>
1243        <copy file="installer/resources/net.i2p.router.plist.template" todir="pkg-temp/" />
1244        <copy file="installer/resources/install_i2p_service_osx.command" todir="pkg-temp/" />
1245        <copy file="installer/resources/uninstall_i2p_service_osx.command" todir="pkg-temp/" />
1246    </target>
1247
1248    <target name="preppkg-osx-only" depends="preppkg-osx, jbigi-osx-only" >
1249        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
1250        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
1251    </target>
1252
1253    <target name="preppkg-windows" depends="preppkg-base, preplicenses-windows, buildUtilityJar, buildexe">
1254        <copy file="build/i2p.exe" todir="pkg-temp/" failonerror="false" />
1255        <copy file="installer/resources/eepget.bat" todir="pkg-temp/" />
1256        <copy file="installer/resources/i2prouter.bat" todir="pkg-temp/" />
1257        <copy file="installer/resources/fixperms.bat" todir="pkg-temp/" />
1258        <copy file="installer/resources/install_i2p_service_winnt.bat" todir="pkg-temp/" />
1259        <copy file="installer/resources/set_config_dir_for_nt_service.bat" todir="pkg-temp/" />
1260        <copy file="installer/resources/uninstall_i2p_service_winnt.bat" todir="pkg-temp/" />
1261        <copy file="build/utility.jar" todir="pkg-temp" />
1262        <copy todir="pkg-temp/lib/wrapper/win32/">
1263            <fileset dir="installer/lib/wrapper/win32/" excludes="*.txt" />
1264        </copy>
1265        <copy todir="pkg-temp/lib/wrapper/win64/">
1266            <fileset dir="installer/lib/wrapper/win64/" excludes="*.txt" />
1267        </copy>
1268    </target>
1269
1270    <target name="preppkg-windows-only" depends="preppkg-windows, jbigi-windows-only">
1271        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
1272     <!-- Win binaries are down-rev from the others, so use the old jar.
1273          This will not overwrite, so preppkg (for all OSes) will get the new jar with
1274          the old binaries, which will probably work but will output a warning.
1275          The windows-only installer will get the correct jar.
1276        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
1277      -->
1278        <copy overwrite="true" file="installer/lib/wrapper/win-all/wrapper.jar" todir="pkg-temp/lib" />
1279    </target>
1280
1281    <!-- see targets below for conditional copying -->
1282    <target name="preppkg-base" depends="build, preplicenses, prepConsoleDocs, prepthemeupdates, prepCertificates, prepRouterInfos, copyjetty, copytomcat-unlesspkg, copyjstl-unlesspkg, copystandard-unlesspkg, copyflags-unlesspkg, truncatehistory">
1283        <!-- if updater200 was run previously, it left *.pack files in pkg-temp -->
1284        <!-- Also remove deletelist.txt used for updater only -->
1285        <delete>
1286            <fileset dir="pkg-temp" includes="**/*.jar.pack **/*.war.pack deletelist.txt" />
1287        </delete>
1288        <copy file="build/i2p.jar" todir="pkg-temp/lib/" />
1289        <copy file="build/i2ptunnel.jar" todir="pkg-temp/lib/" />
1290        <copy file="build/mstreaming.jar" todir="pkg-temp/lib/" />
1291        <copy file="build/streaming.jar" todir="pkg-temp/lib/" />
1292        <copy file="build/router.jar" todir="pkg-temp/lib/" />
1293        <copy file="build/desktopgui.jar" todir="pkg-temp/lib/" />
1294        <copy file="build/routerconsole.jar" todir="pkg-temp/lib/" />
1295        <!-- Updated in 0.9.28; name without version so we can overwrite if we upgrade  -->
1296        <copy file="build/jrobin.jar" tofile="pkg-temp/lib/jrobin.jar" />
1297        <copy file="build/sam.jar" todir="pkg-temp/lib/" />
1298        <copy file="build/BOB.jar" todir="pkg-temp/lib/" />
1299        <copy file="build/systray.jar" todir="pkg-temp/lib" />
1300        <copy file="build/i2psnark.jar" todir="pkg-temp/lib/" />
1301        <copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
1302        <copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
1303        <copy file="build/addressbook.jar" todir="pkg-temp/lib/" />
1304        <copy file="build/susimail.war" todir="pkg-temp/webapps/" />
1305        <copy file="build/susidns.war" todir="pkg-temp/webapps/" />
1306        <copy file="build/imagegen.war" todir="pkg-temp/webapps/" />
1307        <copy file="build/i2psnark.war" todir="pkg-temp/webapps/" />
1308        <copy file="apps/i2psnark/i2psnark.config" todir="pkg-temp/" />
1309        <copy file="installer/resources/blocklist.txt" todir="pkg-temp/" />
1310        <copy file="installer/resources/clients.config" todir="pkg-temp/" />
1311        <copy file="installer/resources/i2ptunnel.config" todir="pkg-temp/" />
1312        <copy file="installer/resources/systray.config" todir="pkg-temp/" />
1313        <copy file="installer/resources/wrapper.config" todir="pkg-temp/" />
1314        <copy file="installer/resources/hosts.txt" todir="pkg-temp/" />
1315        <copy file="INSTALL-headless.txt" todir="pkg-temp/" />
1316        <mkdir dir="pkg-temp/scripts" />
1317        <copy file="apps/proxyscript/i2pProxy.pac" todir="pkg-temp/scripts/" />
1318        <copy file="apps/apparmor/home.i2p.i2prouter" todir="pkg-temp/scripts/" />
1319        <copy file="installer/resources/startconsole.html" todir="pkg-temp/docs/" />
1320        <copy file="installer/resources/start.ico" todir="pkg-temp/docs/" />
1321        <copy file="installer/resources/console.ico" todir="pkg-temp/docs/" />
1322        <copy file="installer/resources/uninstall.ico" todir="pkg-temp/docs/" />
1323        <!-- Eepsite stuff here -->
1324        <mkdir dir="pkg-temp/eepsite" />
1325        <copy todir="pkg-temp/eepsite/" >
1326            <fileset dir="installer/resources/eepsite/" excludes="**/.placeholder" />
1327        </copy>
1328        <copy file="installer/resources/themes/console/images/favicon.ico" tofile="pkg-temp/eepsite/docroot/favicon.ico" />
1329    </target>
1330
1331    <target name="copyflags-unlesspkg" unless="${with-famfamfam-flag-png}" >
1332        <copy todir="pkg-temp/eepsite/docroot/help/lib/" >
1333            <fileset dir="installer/resources/icons/flags/" includes="az.png cn.png de.png es.png fr.png ir.png it.png jp.png nl.png pl.png pt.png ru.png se.png us.png" />
1334        </copy>
1335        <copy todir="pkg-temp/docs/icons/flags" >
1336          <!-- base flags/ dir only. flags16x11/ and flags48x48/ dirs already copied by prepConsoleDocs target -->
1337          <fileset dir="installer/resources/icons/flags" />
1338        </copy>
1339    </target>
1340
1341    <target name="copyjetty" depends="copyjetty-unlesspkg" >
1342        <copy file="build/jetty-i2p.jar" todir="pkg-temp/lib" />
1343    </target>
1344
1345    <target name="copyjetty-unlesspkg" unless="${with-libjetty9-java}" >
1346        <copy todir="pkg-temp/lib" >
1347            <fileset dir="build" includes="javax.servlet.jar jetty*.jar org.mortbay.*.jar" excludes="jetty-i2p.jar" />
1348        </copy>
1349    </target>
1350
1351    <target name="settomcatprop" >
1352        <condition property="with-libtomcat-java" >
1353            <or>
1354                <istrue value="${with-libtomcat6-java}" />
1355                <istrue value="${with-libtomcat7-java}" />
1356                <istrue value="${with-libtomcat8-java}" />
1357            </or>
1358        </condition>
1359    </target>
1360
1361    <target name="copytomcat-unlesspkg" depends="settomcatprop" unless="${with-libtomcat-java}" >
1362        <copy todir="pkg-temp/lib" >
1363            <fileset dir="build" includes="commons*.jar jasper*.jar javax*.jar" />
1364        </copy>
1365    </target>
1366
1367    <!--
1368       jstl.jar
1369       glassfish-javaee.jar has ancient and conflicting classes, e.g. javax.mail,
1370       and libjstl1.1-java isn't sufficient,
1371       so we only skip it with libtaglibs-standard
1372    -->
1373    <target name="copyjstl-unlesspkg" unless="${with-libtaglibs-standard}" >
1374        <copy file="apps/susidns/src/lib/jstl.jar" todir="pkg-temp/lib/" />
1375    </target>
1376
1377    <!-- standard.jar -->
1378    <target name="copystandard-unlesspkg" depends="copystandard-unlesspkg1, copystandard-unlesspkg2" />
1379    <target name="copystandard-unlesspkg1" >
1380        <condition property="with-any-standard-pkg" >
1381            <or>
1382                <istrue value="${with-libtaglibs-standard}" />
1383                <istrue value="${with-glassfish-javaee}" />
1384                <istrue value="${libjakarta-taglibs-standard-java}" />
1385            </or>
1386
1387        </condition>
1388    </target>
1389    <target name="copystandard-unlesspkg2" unless="${with-any-standard-pkg}" >
1390        <copy file="apps/susidns/src/lib/standard.jar" todir="pkg-temp/lib/" />
1391    </target>
1392
1393    <!-- does NOT include launch4j licenses for Windows builds -->
1394    <target name="preplicenses" depends="preplicenses-unlesspkg" >
1395        <copy file="LICENSE.txt" todir="pkg-temp/" />
1396        <copy todir="pkg-temp/licenses/" >
1397          <fileset dir="licenses/" />
1398        </copy>
1399        <copy file="apps/imagegen/identicon/README.md" tofile="pkg-temp/licenses/LICENSE-Identicon.txt" />
1400        <copy file="apps/desktopgui/LICENSE" tofile="pkg-temp/licenses/LICENSE-DesktopGUI.txt" />
1401    </target>
1402
1403    <target name="preplicenses-unlesspkg" depends="settomcatprop" unless="${with-libtomcat-java}" >
1404        <copy file="apps/jetty/apache-tomcat-8.5.30/NOTICE" tofile="pkg-temp/licenses/NOTICE-Tomcat.txt" />
1405    </target>
1406
1407    <!-- DOES include launch4j licenses for Windows builds -->
1408    <target name="preplicenses-windows" depends="preplicenses">
1409        <!--
1410              The license in launch4j/ is a BSD license for launch4j
1411              The license in launch4j/head is a MIT license for the code that is actually wrapped around the jars
1412              So we include the MIT one in our binary package
1413         -->
1414        <copy file="installer/lib/launch4j/head/LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-Launch4j.txt" />
1415        <!--  Not sure if these are used or should be included -->
1416        <copy file="installer/lib/launch4j/lib/foxtrot.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-Foxtrot.txt" />
1417        <copy file="installer/lib/launch4j/lib/JGoodies.Forms.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-JGoodies-Forms.txt" />
1418        <copy file="installer/lib/launch4j/lib/JGoodies.Looks.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-JGoodies-Looks.txt" />
1419        <copy file="installer/lib/launch4j/lib/XStream.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-XStream.txt" />
1420    </target>
1421
1422    <target name="prepthemeupdates">
1423        <copy todir="pkg-temp/docs/themes/" >
1424            <fileset dir="installer/resources/themes/" />
1425        </copy>
1426    </target>
1427
1428    <!-- SSL Certs -->
1429    <target name="prepCertificates">
1430        <copy todir="pkg-temp/certificates/" >
1431          <fileset dir="installer/resources/certificates/" />
1432        </copy>
1433    </target>
1434
1435    <condition property="no.bundle.routerInfos">
1436        <isfalse value="${bundle.routerInfos}" />
1437    </condition>
1438
1439    <target name="prepRouterInfos" depends="buildrouter, buildTools" unless="no.bundle.routerInfos">
1440        <delete dir="pkg-temp/netDb" />
1441        <mkdir dir="pkg-temp/netDb" />
1442        <java classname="net.i2p.router.networkdb.kademlia.BundleRouterInfos" fork="true" failonerror="true">
1443            <classpath>
1444                <pathelement location="build/i2p.jar" />
1445                <pathelement location="core/java/build/gnu-getopt.jar" />
1446                <pathelement location="build/router.jar" />
1447                <pathelement location="build/tools.jar" />
1448            </classpath>
1449            <arg value="-i" />
1450            <arg value="${bundle.routerInfos.i2pConfigDir}" />
1451            <arg value="-o" />
1452            <arg value="pkg-temp/netDb" />
1453            <arg value="-c" />
1454            <arg value="${bundle.routerInfos.count}" />
1455        </java>
1456    </target>
1457
1458    <target name="-areRouterInfosEnabled">
1459        <fail message="Option requires &quot;bundle.routerInfos&quot; to be configured. Please read &quot;build.properties&quot; for more info." >
1460            <condition>
1461                <isfalse value="${bundle.routerInfos}" />
1462            </condition>
1463        </fail>
1464    </target>
1465
1466    <target name="i2pseeds" depends="-setepoch, -areRouterInfosEnabled, prepRouterInfos">
1467        <delete file="i2pseeds.zip" />
1468        <delete file="i2pseeds.su3" />
1469        <zip destfile="i2pseeds.zip" basedir="pkg-temp/netDb" whenempty="fail" />
1470        <su3sign infile="i2pseeds.zip" sigtype="RESEED" outfile="i2pseeds.su3" su3.ver="${epoch}" />
1471    </target>
1472
1473    <!-- this is no longer required, izpack 4.3.0 supports headless installs with java -jar i2pinstall.exe -console -->
1474    <!-- and this is no longer used by the SlackBuild -->
1475    <target name="tarball" depends="preppkg">
1476        <tar compression="bzip2" destfile="i2p.tar.bz2">
1477            <tarfileset dir="pkg-temp" includes="**/*" prefix="i2p" />
1478        </tar>
1479    </target>
1480
1481    <target name="deletepkg-temp">
1482        <delete dir="pkg-temp" />
1483        <delete dir="./pkg-mavencentral" />
1484    </target>
1485
1486    <!-- readme and proxy error page files, initialNews.xml files, GeoIP files, and flag icons -->
1487    <target name="prepConsoleDocs" depends="prepConsoleDocUpdates, prepgeoupdate" >
1488        <copy todir="pkg-temp/docs/initialNews/">
1489          <fileset dir="installer/resources/initialNews/" />
1490        </copy>
1491        <!-- ensure the proxy files have the correct line endings -->
1492        <fixcrlf srcdir="pkg-temp/docs" includes="*.ht" encoding="utf8" eol="crlf" />
1493    </target>
1494
1495    <!-- readme and proxy error page files -->
1496    <target name="prepConsoleDocUpdates">
1497        <copy todir="pkg-temp/docs/" >
1498          <fileset dir="installer/resources/readme/" includes="readme*.html" />
1499          <fileset dir="installer/resources/proxy/" includes="*.ht" />
1500          <!--
1501               As of 0.9.36:
1502               All new and changed flags must go in the flags16x11/ dir,
1503               which will be checked first by flags.jsp.
1504               The flags/ dir is the original set from famfamfam,
1505               which may be symlinked in package installs.
1506           -->
1507          <fileset dir="installer/resources/" includes="icons/flags16x11/*" />
1508          <!-- flags48x48 added in 0.9.32 -->
1509          <fileset dir="installer/resources/" includes="icons/flags48x48/*" />
1510        </copy>
1511    </target>
1512
1513    <target name="consoleDocs" depends="deletepkg-temp, prepConsoleDocs">
1514        <zip destfile="docs.zip" basedir="pkg-temp" whenempty="fail" />
1515    </target>
1516
1517    <target name="copyJavadoc" depends="javadoc">
1518        <copy todir="pkg-temp/docs/javadoc" >
1519          <fileset dir="build/javadoc/" />
1520        </copy>
1521    </target>
1522
1523    <target name="updater200" depends="prepupdate, preplicenses, pack200, zipit200" />
1524    <target name="updater200WithJetty" depends="prepjupdate, preplicenses, pack200, zipit200" />
1525    <target name="updater200WithJettyAndJbigi" depends="prepjupdate, prepjbigiupdate, preplicenses, pack200, zipit200" />
1526    <target name="updater200WithJettyAndGeoIP" depends="prepjupdate, prepgeoupdate, preplicenses, pack200, zipit200" />
1527    <target name="updater200WithJettyFixes" depends="prepjupdatefixes, preplicenses, pack200, zipit200" />
1528    <target name="updater200WithJettyFixesAndJbigi" depends="prepjupdatefixes, prepjbigiupdate, preplicenses, pack200, zipit200" />
1529    <target name="updater200WithJbigi" depends="prepupdate, prepjbigiupdate, preplicenses, pack200, zipit200" />
1530    <target name="updater" depends="prepupdate, preplicenses, zipit" />
1531    <target name="updaterRepack" depends="prepupdate, preplicenses, repack200, zipit" />
1532    <target name="updaterWithJavadoc" depends="prepupdate, preplicenses, copyJavadoc, zipit" />
1533    <target name="updater200WithJavadoc" depends="prepupdate, preplicenses, copyJavadoc, pack200, zipit200" />
1534    <target name="updaterWithJavadocAndJetty" depends="prepjupdate, preplicenses, copyJavadoc, zipit" />
1535    <target name="updater200WithJavadocAndJetty" depends="prepjupdate, preplicenses, copyJavadoc, pack200, zipit200" />
1536    <target name="updaterWithGeoIP" depends="prepupdate, prepgeoupdate, preplicenses, zipit" />
1537    <target name="updaterWithJetty" depends="prepjupdate, preplicenses, zipit" />
1538    <target name="updaterWithJettyRepack" depends="prepjupdate, preplicenses, repack200, zipit" />
1539    <target name="updaterWithJettyAndJbigiRepack" depends="prepjupdate, prepjbigiupdate, preplicenses, repack200, zipit" />
1540    <target name="updaterWithJettyAndGeoIPRepack" depends="prepjupdate, prepgeoupdate, preplicenses, repack200, zipit" />
1541    <target name="updaterWithJettyFixes" depends="prepjupdatefixes, preplicenses, zipit" />
1542    <target name="updaterWithJettyFixesAndJbigi" depends="prepjupdatefixes, prepjbigiupdate, preplicenses, zipit" />
1543    <target name="updaterWithJettyFixesAndGeoIP" depends="prepjupdatefixes, prepgeoupdate, preplicenses, zipit" />
1544    <target name="updaterWithJbigi" depends="prepupdate, prepjbigiupdate, preplicenses, zipit" />
1545    <target name="updaterSmall" depends="prepupdateSmall, zipit" />
1546    <target name="updaterRouter" depends="prepupdateRouter, zipit" />
1547
1548    <target name="-sign-update" depends="buildrouter">
1549        <su3sign infile="i2pupdate200.zip" sigtype="ROUTER" outfile="i2pupdate.su3" su3.ver="${full.version}" />
1550    </target>
1551
1552    <target name="signed-updater200" depends="-pre-sign, updater200, -sign-update" />
1553    <target name="signed-updater200WithJetty" depends="-pre-sign, updater200WithJetty, -sign-update" />
1554    <target name="signed-updater200WithJettyAndGeoIP" depends="-pre-sign, updater200WithJettyAndGeoIP, -sign-update" />
1555    <target name="signed-updater200WithJavadoc" depends="-pre-sign, updater200WithJavadoc, -sign-update" />
1556    <target name="signed-updater200WithJavadocAndJetty" depends="-pre-sign, updater200WithJavadocAndJetty, -sign-update" />
1557
1558    <target name="zipit" depends="getReleaseNumber">
1559        <!--
1560             As of release 0.8.8, the router will enforce a zipfile comment equal to the
1561             version number in the sud/su2 header, since the version in the header is NOT
1562             covered by the signature.
1563         -->
1564        <zip destfile="i2pupdate.zip" basedir="pkg-temp" whenempty="fail" comment="${release.number}" />
1565       <!-- just a test, makes almost no difference
1566        <tar destfile="i2pupdate.tgz" basedir="pkg-temp" compression="gzip" />
1567        <tar destfile="i2pupdate.tbz" basedir="pkg-temp" compression="bzip2" />
1568       -->
1569    </target>
1570
1571    <target name="zipit200" depends="getReleaseNumber" >
1572        <zip destfile="i2pupdate200.zip" basedir="pkg-temp" whenempty="fail" comment="${release.number}" />
1573    </target>
1574
1575    <target name="pack200">
1576        <!-- pack200 will only pack to a .pack file, and only from a .jar file, so we put another .jar on the end -->
1577        <!-- can't pack an empty jar or one without classes, it will fail to unpack on Java 5;
1578          -  see http://bugs.sun.com/view_bug.do?bug_id=6712743
1579          -->
1580        <!-- *nix here -->
1581        <exec executable="sh" osfamily="unix" failonerror="true">
1582            <arg value="-c" />
1583            <arg value="for i in pkg-temp/lib/*.jar pkg-temp/webapps/*war; do if [ $i = pkg-temp/lib/commons-logging.jar -o $i = pkg-temp/lib/jasper-compiler.jar -o $i = pkg-temp/lib/jbigi.jar -o $i = pkg-temp/lib/jetty-java5-threadpool.jar -o $i = pkg-temp/lib/jetty-sslengine.jar -o $i = pkg-temp/webapps/addressbook.war ]; then continue; fi; echo pack200 $i; mv $i $i.jar; pack200 -g $i.pack $i.jar; rm -f $i.jar; done" />
1584        </exec>
1585        <exec executable="sh" osfamily="mac" failonerror="true">
1586            <arg value="-c" />
1587            <arg value="for i in pkg-temp/lib/*.jar pkg-temp/webapps/*war; do if [ $i = pkg-temp/lib/commons-logging.jar -o $i = pkg-temp/lib/jasper-compiler.jar -o $i = pkg-temp/lib/jbigi.jar -o $i = pkg-temp/lib/jetty-java5-threadpool.jar -o $i = pkg-temp/lib/jetty-sslengine.jar -o $i = pkg-temp/webapps/addressbook.war ]; then continue; fi; echo pack200 $i; mv $i $i.jar; pack200 -g $i.pack $i.jar; rm -f $i.jar; done" />
1588        </exec>
1589        <!-- windoz here : i admit, i hate escaped symbols in xml, indeed = =! -->
1590        <exec executable="cmd" osfamily="windows" failonerror="true">
1591            <arg value="/c" />
1592            <!-- TODO implement fix above -->
1593            <arg value="for %i in (pkg-temp\webapps\*.war) do move %i %i.jar &amp;&amp; pack200 -g pkg-temp\webapps\%~ni.war.pack %i.jar &amp;&amp; del %i.jar" />
1594        </exec>
1595        <exec executable="cmd" osfamily="windows" failonerror="true">
1596                <arg value="/c" />
1597                <arg value="for %i in (pkg-temp\lib\*.jar) do pack200 -g %i.pack %i &amp;&amp; del %i" />
1598        </exec>
1599    </target>
1600
1601    <!-- saves about 1% on average (more on jars with multiple compiled po files since they have lots of common strings) -->
1602    <target name="repack200">
1603        <!-- pack200 will only repack a .jar file, so we put another .jar on the end -->
1604        <!-- *nix here -->
1605        <exec executable="sh" osfamily="unix" failonerror="true">
1606            <arg value="-c" />
1607            <arg value="for i in pkg-temp/lib/*.jar pkg-temp/webapps/*war; do echo pack200 -r $i; mv $i $i.jar; pack200 -r $i.jar; mv $i.jar $i; done" />
1608        </exec>
1609        <exec executable="sh" osfamily="mac" failonerror="true">
1610            <arg value="-c" />
1611            <arg value="for i in pkg-temp/lib/*.jar pkg-temp/webapps/*war; do echo pack200 -r $i; mv $i $i.jar; pack200 -r $i.jar; mv $i.jar $i; done" />
1612        </exec>
1613        <!-- windoz here : i admit, i hate escaped symbols in xml, indeed = =! -->
1614        <exec executable="cmd" osfamily="windows" failonerror="true">
1615            <arg value="/c" />
1616            <arg value="for %i in (pkg-temp\webapps\*.war) do move %i %i.jar &amp;&amp; pack200 -r %i.jar &amp;&amp; move %i.jar %i" />
1617        </exec>
1618        <exec executable="cmd" osfamily="windows" failonerror="true">
1619                <arg value="/c" />
1620                <arg value="for %i in (pkg-temp\lib\*.jar) do pack200 -r %i" />
1621        </exec>
1622    </target>
1623
1624    <target name="prepupdate" depends="build2, prepupdateSmall, prepConsoleDocUpdates, prepCertificates, prep-script-translation, truncatehistory">
1625        <copy file="build/BOB.jar" todir="pkg-temp/lib/" />
1626        <copy file="build/sam.jar" todir="pkg-temp/lib/" />
1627        <copy file="build/i2psnark.jar" todir="pkg-temp/lib" />
1628        <!-- include systray changes in 0.7.5 -->
1629        <copy file="build/systray.jar" todir="pkg-temp/lib/" />
1630       <!-- removed from updater in 0.9, added back in 0.9.26 -->
1631        <copy file="build/desktopgui.jar" todir="pkg-temp/lib/" />
1632        <copy file="build/susimail.war" todir="pkg-temp/webapps/" />
1633        <copy file="build/susidns.war" todir="pkg-temp/webapps/" />
1634        <copy file="build/imagegen.war" todir="pkg-temp/webapps/" />
1635        <!-- as of 0.7.12; last changed in 0.9; removed from update in 0.9.26 -->
1636      <!--
1637        <copy file="apps/susidns/src/lib/jstl.jar" todir="pkg-temp/lib/" />
1638        <copy file="apps/susidns/src/lib/standard.jar" todir="pkg-temp/lib/" />
1639       -->
1640        <copy file="build/i2psnark.war" todir="pkg-temp/webapps/" />
1641        <copy file="installer/resources/deletelist.txt" todir="pkg-temp/" />
1642        <copy file="installer/resources/blocklist.txt" todir="pkg-temp/" />
1643        <copy todir="pkg-temp/man/">
1644            <fileset dir="installer/resources/man/" />
1645        </copy>
1646    </target>
1647
1648    <target name="truncatehistory">
1649        <copy file="history.txt" todir="pkg-temp/" />
1650        <!-- the following overwrites history.txt on unix to shrink the update file -->
1651        <copy file="history.txt" tofile="pkg-temp/history.txt" overwrite="true">
1652            <filterchain>
1653                <headfilter lines="1500" />
1654            </filterchain>
1655        </copy>
1656        <concat append="true" destfile="pkg-temp/history.txt">&#10;&#10;----------------&#10;&#10;EARLIER HISTORY IS AVAILABLE IN THE SOURCE PACKAGE</concat>
1657    </target>
1658
1659    <target name="prepupdateSmall" depends="buildSmall, prepupdateRouter, prepjupdatefixes, prepthemeupdates">
1660        <copy file="build/i2ptunnel.jar" todir="pkg-temp/lib/" />
1661        <copy file="build/mstreaming.jar" todir="pkg-temp/lib/" />
1662        <copy file="build/streaming.jar" todir="pkg-temp/lib/" />
1663        <copy file="build/routerconsole.jar" todir="pkg-temp/lib/" />
1664        <!-- Updated in 0.9.28 -->
1665        <!-- name without version so we can overwrite if we upgrade  -->
1666        <copy file="build/jrobin.jar" tofile="pkg-temp/lib/jrobin.jar" />
1667        <copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
1668        <copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
1669        <copy file="build/addressbook.jar" todir="pkg-temp/lib/" />
1670        <copy file="build/addressbook.war" todir="pkg-temp/webapps/" />
1671        <!-- decapitalized the file in 0.7.8 -->
1672        <copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
1673        <!-- small enough to include for now -->
1674        <copy file="installer/resources/geoipv6.dat.gz" todir="pkg-temp/geoip/" />
1675        <copy file="installer/resources/continents.txt" todir="pkg-temp/geoip/" />
1676      <!--
1677        <copy file="installer/resources/public-suffix-list.txt" todir="pkg-temp/geoip/" />
1678       -->
1679    </target>
1680
1681    <target name="prepupdateRouter" depends="buildrouter, deletepkg-temp">
1682        <copy file="build/i2p.jar" todir="pkg-temp/lib/" />
1683        <copy file="build/router.jar" todir="pkg-temp/lib/" />
1684    </target>
1685
1686    <!-- jbigi.jar -->
1687    <target name="prepjbigiupdate" depends="jbigi">
1688        <copy file="build/jbigi.jar" todir="pkg-temp/lib/" />
1689    </target>
1690
1691    <!-- GeoIP files -->
1692    <target name="prepgeoupdate" depends="prepgeoupdate-unlesspkg" >
1693        <copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
1694        <copy file="installer/resources/continents.txt" todir="pkg-temp/geoip/" />
1695      <!--
1696        <copy file="installer/resources/public-suffix-list.txt" todir="pkg-temp/geoip/" />
1697       -->
1698    </target>
1699
1700    <!-- GeoIP files, set withGeoIPDatabase=true in override.properties to prevent -->
1701    <!-- As of 0.9.26, the files are not included in Debian/Ubuntu builds. -->
1702    <target name="prepgeoupdate-unlesspkg" unless="${with-geoip-database}" >
1703        <copy file="installer/resources/geoip.txt" todir="pkg-temp/geoip/" />
1704        <copy file="installer/resources/geoipv6.dat.gz" todir="pkg-temp/geoip/" />
1705    </target>
1706
1707    <!-- All jetty jars required for update.
1708         TODO do we need to bother updating jasper?
1709      -->
1710    <target name="prepjupdate" depends="prepupdate, buildWEB">
1711        <copy todir="pkg-temp/lib" >
1712            <fileset dir="build" includes="commons*.jar jasper*.jar javax*.jar jetty*.jar jsp*.jar org.mortbay.*.jar" />
1713        </copy>
1714        <!--  We have to package the new eepsite files for MigrateJetty.java, but we
1715              can't overwrite an existing eepsite dir in a non-split configuration.
1716          -->
1717        <copy todir="pkg-temp/eepsite-jetty9" >
1718            <fileset dir="installer/resources/eepsite" includes="*.xml contexts/* etc/*" />
1719        </copy>
1720    </target>
1721
1722    <target name="delete-j6-update">
1723        <delete dir="pkg-temp/eepsite-jetty9" />
1724    </target>
1725
1726    <!-- Jetty 6 I2P logging addons, not really fixes -->
1727    <target name="prepjupdatefixes" depends="buildWEB">
1728        <copy file="build/jetty-i2p.jar" todir="pkg-temp/lib/" />
1729    </target>
1730
1731    <target name="util-list-changes" depends="checkForMtn" if="mtn.available" >
1732        <exec executable="mtn" outputproperty="workspace.changes.util" errorproperty="mtn.error.util" failifexecutionfails="false" >
1733            <arg value="list" />
1734            <arg value="changed" />
1735            <arg value="core/java/src/net/i2p/util" />
1736        </exec>
1737        <!-- \n in an attribute value generates an invalid manifest -->
1738        <exec executable="tr" inputstring="${workspace.changes.util}" outputproperty="workspace.changes.util.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
1739            <arg value="-s" />
1740            <arg value="[:space:]" />
1741            <arg value="," />
1742        </exec>
1743    </target>
1744
1745    <target name="izpack-patches" >
1746            <taskdef name="izpack"
1747                     classpath="${basedir}/installer/lib/izpack/patches.jar:${basedir}/installer/lib/izpack/standalone-compiler.jar"
1748                     classname="com.izforge.izpack.ant.IzPackTask" />
1749        <jar destfile="${basedir}/installer/lib/izpack/patches.jar"
1750             basedir="${basedir}/installer/lib/izpack/patches" />
1751    </target>
1752
1753    <target name="buildUtilityJar" depends="buildCore">
1754        <ant dir="installer/java" target="build" />
1755    </target>
1756
1757    <target name="installer" depends="preppkg, buildProperties, util-list-changes, izpack-patches, buildUtilityJar" >
1758        <!--
1759          Force 1.5 pack200 output
1760          Doesnt work!
1761          http://jira.codehaus.org/browse/IZPACK-404
1762          http://forums.sun.com/thread.jspa?threadID=773439
1763          http://bfo.co.uk/blog/2010/05/13/combining_ant_jar_signatures_and_pack200.html
1764        <property name="com.sun.java.util.jar.pack.package.majver" value="150" />
1765        <property name="com.sun.java.util.jar.pack.package.minver" value="7" />
1766        -->
1767        <izpack input="${basedir}/installer/install.xml" output="${basedir}/install.jar" installerType="standard" basedir="${basedir}" />
1768
1769        <ant target="installerexe" />
1770    </target>
1771
1772    <!-- this makes i2pinstall.exe from install.jar -->
1773    <target name="installerexe" depends="launch4j" unless="noExe">
1774        <echo message="See the file &quot;build.properties&quot; if this step fails." />
1775        <!-- now the installer exe -->
1776        <launch4j configFile="./installer/i2pinstaller.xml" />
1777        <!-- thazzit -->
1778    </target>
1779
1780    <!-- Custom installers -->
1781    <target name="installer-nowindows" depends="clean, preppkg-nowindows, izpack-patches" >
1782        <fixcrlf srcdir="pkg-temp" includes="*.config **/*.xml **/*.properties **/*.txt scripts/*" encoding="utf8" eol="lf" />
1783        <izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${full.version}.jar" installerType="standard" basedir="${basedir}" />
1784    </target>
1785
1786
1787    <target name="installer-freebsd" depends="clean, preppkg-freebsd-only, izpack-patches" >
1788        <fixcrlf srcdir="pkg-temp" includes="*.config **/*.xml **/*.properties **/*.txt scripts/*" encoding="utf8" eol="lf" />
1789        <izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${full.version}_freebsd-only.jar" installerType="standard" basedir="${basedir}" />
1790    </target>
1791
1792    <target name="installer-linux" depends="clean, preppkg-linux-only, izpack-patches" >
1793        <fixcrlf srcdir="pkg-temp" includes="*.config **/*.xml **/*.properties **/*.txt scripts/*" encoding="utf8" eol="lf" />
1794        <izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${full.version}_linux-only.jar" installerType="standard" basedir="${basedir}" />
1795    </target>
1796
1797
1798    <target name="installer-osx" depends="clean, checkForIzpack2App, preppkg-osx-only, izpack-patches">
1799        <fixcrlf srcdir="pkg-temp" includes="*.config **/*.xml **/*.properties **/*.txt scripts/*" encoding="utf8" eol="lf" />
1800        <mkdir dir="pkg-temp/osx" />
1801        <izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${full.version}_osx-only.jar" installerType="standard" basedir="${basedir}" />
1802        <ant target="installer2app" />
1803        <delete dir="pkg-temp/osx" />
1804    </target>
1805
1806    <target name="checkForIzpack2App">
1807        <!-- we'll set the izpack2app binary name if it's not been set elsewhere yet -->
1808        <property name="izpack2app.binary" value="${user.home}/IzPack/utils/wrappers/izpack2app/izpack2app.py" />
1809        <available property="izpack2app.available" file="${izpack2app.binary}" />
1810    </target>
1811
1812    <target name="installer2app" if="izpack2app.available">
1813        <mkdir dir="pkg-temp/osx" />
1814        <exec executable="python" failonerror="true">
1815            <arg value="${izpack2app.binary}" />
1816            <arg value="${basedir}/i2pinstall_${full.version}_osx-only.jar" />
1817            <arg value="${basedir}/pkg-temp/osx/i2p-${full.version}_osx-install.app" />
1818        </exec>
1819
1820        <tar longfile="gnu" destfile="${basedir}/i2pinstall_${full.version}_osx.tar.bz2" compression="bzip2">
1821            <tarfileset dir="${basedir}/pkg-temp/osx/i2p-${full.version}_osx-install.app" prefix="/i2p-${full.version}_osx-install.app" filemode="644">
1822                <include name="**/**" />
1823                <exclude name="Contents/MacOS/*" />
1824            </tarfileset>
1825            <tarfileset dir="${basedir}/pkg-temp/osx/i2p-${full.version}_osx-install.app" prefix="/i2p-${full.version}_osx-install.app" filemode="755">
1826                <include name="Contents/MacOS/*" />
1827            </tarfileset>
1828        </tar>
1829    </target>
1830
1831    <!-- call between installer-xxx and installer-windows -->
1832    <target name="delete-nonwindows">
1833        <delete dir="pkg-temp/lib/wrapper/" />
1834        <delete dir="pkg-temp/locale/" />
1835        <delete dir="pkg-temp/man/" />
1836        <delete dir="pkg-temp/Start I2P Router.app/" />
1837        <delete dir="pkg-temp" includes="eepget i2prouter INSTALL-headless.txt osid postinstall.sh runplain.sh" />
1838    </target>
1839
1840    <target name="installer-windows" depends="clean, preppkg-windows-only, util-list-changes, izpack-patches, buildUtilityJar" >
1841        <fixcrlf srcdir="pkg-temp" includes="*.config *.bat *.cmd **/*.xml **/*.properties **/*.txt scripts/*" encoding="utf8" eol="crlf"/>
1842        <izpack input="${basedir}/installer/install.xml" output="${basedir}/install.jar" installerType="standard" basedir="${basedir}" />
1843        <ant target="installerexe" />
1844        <delete file="${basedir}/install.jar" />
1845        <move file="${basedir}/i2pinstall.exe" tofile="${basedir}/i2pinstall_${full.version}_windows.exe" />
1846    </target>
1847
1848    <!-- this is broken as installer-xxx targets may delete (or not delete) things in pkg-temp -->
1849    <target name="installer-all" depends="installer-freebsd, installer-linux, installer-osx, installer-windows, installer-nowindows, installer" >
1850    </target>
1851    <!-- end custom installers -->
1852
1853    <!-- unit tests -->
1854    <target name="buildTest">
1855        <ant dir="core/java/" target="jarTest" />
1856        <ant dir="router/java/" target="jarTest" />
1857        <copy file="core/java/build/i2ptest.jar" todir="build" />
1858        <copy file="router/java/build/routertest.jar" todir="build" />
1859        <!-- broken -->
1860      <!--
1861        <ant dir="apps/ministreaming/java/" target="junit.compileTest" />
1862        <ant dir="apps/streaming/java/" target="junit.compileTest" />
1863       -->
1864    </target>
1865    <target name="prepTest" depends="prepupdate, buildTest">
1866        <!-- overwrite i2p.jar and router.jar with the test versions -->
1867        <copy file="build/i2ptest.jar" tofile="pkg-temp/lib/i2p.jar" overwrite="true" />
1868        <copy file="build/routertest.jar" tofile="pkg-temp/lib/router.jar" overwrite="true" />
1869    </target>
1870    <target name="updateTest" depends="prepTest, zipit" />
1871    <target name="junit.test" depends="buildProperties, jbigi" >
1872        <ant dir="core/java/" target="junit.test" />
1873        <ant dir="router/java/" target="junit.test" />
1874        <ant dir="apps/ministreaming/java/" target="junit.test" />
1875        <ant dir="apps/streaming/java/" target="junit.test" />
1876    </target>
1877    <target name="scalatest.test" depends="buildProperties, jbigi" >
1878        <ant dir="core/java/" target="scalatest.test" />
1879        <!-- note there are no router scala tests yet -->
1880        <ant dir="router/java/" target="scalatest.test" />
1881    </target>
1882    <!-- both junit and scala -->
1883    <target name="test" depends="testCore, testRouter, testMinistreaming, testStreaming" />
1884    <target name="testCore" depends="buildProperties, jbigi" >
1885        <ant dir="core/java/" target="test" />
1886    </target>
1887    <target name="testRouter" depends="buildProperties, jbigi" >
1888        <ant dir="router/java/" target="test" />
1889    </target>
1890    <target name="testMinistreaming" depends="buildProperties, jbigi" >
1891        <ant dir="apps/ministreaming/java/" target="test" />
1892    </target>
1893    <target name="testStreaming" depends="buildProperties" >
1894        <ant dir="apps/streaming/java/" target="test" />
1895    </target>
1896    <target name="scalatest.report" depends="buildProperties" >
1897        <ant dir="core/java/" target="scalatest.report" />
1898        <ant dir="router/java/" target="scalatest.report" />
1899    </target>
1900    <target name="junit.report" depends="buildProperties" >
1901        <ant dir="core/java/" target="junit.report" />
1902        <ant dir="router/java/" target="junit.report" />
1903        <ant dir="apps/ministreaming/java/" target="junit.report" />
1904        <ant dir="apps/streaming/java/" target="junit.report" />
1905    </target>
1906    <target name="clover.report" depends="buildProperties" if="with.clover">
1907        <ant dir="core/java/" target="clover.report" />
1908        <ant dir="router/java/" target="clover.report" />
1909        <ant dir="apps/ministreaming/java" target="clover.report" />
1910        <ant dir="apps/streaming/java" target="clover.report" />
1911    </target>
1912    <target name="cobertura.report" depends="buildProperties" if="with.cobertura">
1913        <ant dir="core/java/" target="cobertura.report" />
1914        <ant dir="router/java/" target="cobertura.report" />
1915        <ant dir="apps/ministreaming/java" target="cobertura.report" />
1916        <ant dir="apps/streaming/java" target="cobertura.report" />
1917    </target>
1918    <target name="test.report" depends="junit.report, scalatest.report, clover.report, cobertura.report"/>
1919    <target name="fulltest" depends="buildProperties, jbigi" >
1920        <ant dir="core/java/" target="fulltest" />
1921        <ant dir="router/java/" target="fulltest" />
1922        <ant dir="apps/ministreaming/java" target="fulltest" />
1923        <ant dir="apps/streaming/java" target="fulltest" />
1924    </target>
1925    <target name="jenkins.cobertura.report" depends="cobertura.report">
1926        <!--
1927             The jenkins cobertura plugin couldn't find the source files.
1928         -->
1929        <replaceregexp byline="true" file="reports/core/cobertura/coverage.xml"
1930            match='filename="net' replace='filename="core/java/src/net'/>
1931        <replaceregexp byline="true" file="reports/core/cobertura/coverage.xml"
1932            match="&lt;source&gt;./src" replace='&lt;source&gt;./core/java/src'/>
1933
1934        <replaceregexp byline="true" file="reports/router/cobertura/coverage.xml"
1935            match='filename="net' replace='filename="router/java/src/net'/>
1936        <replaceregexp byline="true" file="reports/router/cobertura/coverage.xml"
1937            match="&lt;source&gt;./src" replace="&lt;source&gt;router/java/src"/>
1938
1939        <replaceregexp byline="true" file="reports/ministreaming/cobertura/coverage.xml"
1940            match='filename="net' replace='filename="apps/ministreaming/java/src/net'/>
1941        <replaceregexp byline="true" file="reports/ministreaming/cobertura/coverage.xml"
1942            match="&lt;source&gt;./src" replace="&lt;source&gt;apps/ministreaming/java/src"/>
1943
1944        <replaceregexp byline="true" file="reports/streaming/cobertura/coverage.xml"
1945            match='filename="net' replace='filename="apps/streaming/java/src/net'/>
1946        <replaceregexp byline="true" file="reports/streaming/cobertura/coverage.xml"
1947            match="&lt;source&gt;./src" replace="&lt;source&gt;apps/streaming/java/src"/>
1948    </target>
1949    <!-- end unit tests -->
1950
1951    <target name="testscripts" >
1952        <exec executable="tests/scripts/checkcerts.sh" failonerror="true" />
1953        <exec executable="tests/scripts/checkpo.sh" failonerror="true" />
1954        <exec executable="tests/scripts/checkutf8.sh" failonerror="true" />
1955        <exec executable="tests/scripts/checkxml.sh" failonerror="true" />
1956        <exec executable="tests/scripts/checkscripts.sh" failonerror="true" />
1957    </target>
1958
1959
1960    <target name="testscripts-net" >
1961        <exec executable="tests/scripts/checkremotecerts.sh" failonerror="true" />
1962    </target>
1963
1964    <target name="testscripts-all" depends="testscripts,testscripts-net" />
1965
1966    <target name="bench" depends="jbigi" >
1967        <ant dir="core/java/" target="bench.jar" />
1968    </target>
1969
1970    <!-- <target name="syndie" >
1971        <ant dir="apps/syndie/java/" target="standalone" />
1972        <copy file="apps/syndie/java/syndie-standalone.zip" todir="." />
1973    </target> -->
1974
1975    <!-- standalone i2psnark zip -->
1976    <target name="i2psnark" depends="buildStreaming, buildJetty, buildSystray" >
1977        <ant dir="apps/i2psnark/java" target="standalone" />
1978        <copy file="apps/i2psnark/java/i2psnark-standalone.zip" todir="." />
1979    </target>
1980
1981    <target name="slackpkg">
1982        <ant dir="Slackware/i2p/" target="slackpkg" />
1983    </target>
1984    <target name="justBOB" depends="builddepSmall, jbigi">
1985        <ant dir="apps/BOB/" target="onejar" />
1986        <copy file="apps/BOB/dist/BOB-one.jar" todir="." />
1987    </target>
1988
1989    <target name="sloccount.report">
1990        <property name="sloccount.report.file" value="sloccount.sc" />
1991        <echo message="Generating sloccount report (this will take awhile)" />
1992        <exec executable="sloccount" failonerror="true">
1993            <arg value="--details"/>
1994            <arg value="--wide"/>
1995            <arg value="${basedir}"/>
1996            <redirector output="${sloccount.report.file}">
1997                <outputfilterchain>
1998                    <linecontainsregexp negate="true">
1999                        <regexp pattern="(Warning: |lib/launch4j|_MTN|reports|pkg-temp|licenses|i2p\.fba|gmp-|WEB-INF)" />
2000                    </linecontainsregexp>
2001                    <linecontains negate="true">
2002                        <contains value="${sloccount.report.file}" />
2003                    </linecontains>
2004                </outputfilterchain>
2005            </redirector>
2006        </exec>
2007        <echo message="sloccount report saved to the file &quot;${sloccount.report.file}&quot;" />
2008    </target>
2009
2010    <target name="findbugs" depends="build2, buildUtilityJar">
2011        <echo message="Starting findbugs, this will take a while..." />
2012        <exec executable="nice" failonerror="true">
2013            <arg value="findbugs"/>
2014            <arg value="-textui"/>
2015            <arg value="-projectName"/>
2016            <arg value="i2p"/>
2017            <arg value="-sortByClass"/>
2018            <arg value="-xml"/>
2019            <arg value="-output"/>
2020            <arg value="i2p.fba"/>
2021            <arg value="-auxclasspath"/>
2022            <arg value="build/commons-el.jar:build/jasper-runtime.jar:build/javax.servlet.jar:build/org.mortbay.jetty.jar:apps/jrobin/jrobin-1.5.9.1.jar:installer/lib/wrapper/all/wrapper.jar:apps/susidns/src/lib/standard.jar:apps/susidns/src/lib/jstl.jar:apps/jrobin/jrobin-1.5.9.1.jar"/>
2023            <arg value="-sourcepath"/>
2024            <arg value="apps/BOB/src/:apps/addressbook/java/src/:apps/i2psnark/java/src/:apps/i2ptunnel/java/src/:apps/ministreaming/java/src/:apps/routerconsole/java/src/:apps/sam/java/src/:apps/streaming/java/src/:apps/susidns/src/java/src/:apps/susimail/src/src/:apps/systray/java/src/:core/java/src/:router/java/src/:installer/java/src"/>
2025            <!-- start of the files to be analyzed -->
2026            <arg value="build/BOB.jar"/>
2027            <arg value="build/addressbook.jar"/>
2028            <arg value="build/i2p.jar"/>
2029            <arg value="build/i2psnark.jar"/>
2030            <arg value="build/i2psnark.war"/>
2031            <arg value="build/i2ptunnel.jar"/>
2032            <arg value="build/i2ptunnel.war"/>
2033            <arg value="build/imagegen.war"/>
2034            <arg value="build/jetty-i2p.jar"/>
2035            <arg value="build/mstreaming.jar"/>
2036            <arg value="build/router.jar/"/>
2037            <arg value="build/desktopgui.jar"/>
2038            <arg value="build/routerconsole.jar"/>
2039            <arg value="build/routerconsole.war"/>
2040            <arg value="build/sam.jar"/>
2041            <arg value="build/streaming.jar"/>
2042            <arg value="build/susidns.war"/>
2043            <arg value="build/susimail.war"/>
2044            <arg value="build/systray.jar"/>
2045            <arg value="build/utility.jar"/>
2046        </exec>
2047        <echo message="Findbugs output stored in i2p.fba" />
2048        <echo message="Now run: findbugs i2p.fba" />
2049    </target>
2050
2051    <!-- this is the same dependency as pkg, but with updater200 in the middle,
2052         since preppkg puts too much stuff in pkg-temp -->
2053<!--
2054    <target name="release" depends="distclean, updaterWithJettyFixesAndJbigi , updater200WithJettyFixes, preppkg, installer, getReleaseNumber" >
2055    <target name="release" depends="verifyReleaseBuildNumbers, -pre-release, distclean, testscripts, updaterWithJettyAndJbigiRepack, updater200WithJettyAndJbigi, delete-j6-update, installer-nowindows, delete-nonwindows, installer-windows">
2056    <target name="release" depends="verifyReleaseBuildNumbers, -pre-release, distclean, testscripts, updaterWithJettyAndGeoIPRepack, updater200WithJettyAndGeoIP, delete-j6-update, installer-nowindows, delete-nonwindows, installer-windows">
2057-->
2058    <target name="release" depends="verifyReleaseBuildNumbers, -pre-release, distclean, testscripts, updaterWithJettyRepack, updater200WithJetty, delete-j6-update, installer-nowindows, delete-nonwindows, installer-windows">
2059        <echo message="New version number is ${release.number}" />
2060        <copy file="i2pupdate.zip" tofile="i2pupdate_${release.number}.zip" />
2061        <copy file="i2pinstall_${full.version}.jar" tofile="i2pinstall_${release.number}.jar" />
2062        <copy file="i2pinstall_${full.version}_windows.exe" tofile="i2pinstall_${release.number}_windows.exe" />
2063        <!-- remove these, we don't build them anymore -->
2064        <delete file="i2pupdate.sud" />
2065        <delete file="i2pupdate.su2" />
2066        <!-- make this a lot easier by putting release.privkey.su3=/path/to/su3keystore.ks in override.properties -->
2067
2068        <!-- now build and verify the packed su3 from the packed zip -->
2069        <su3sign infile="i2pupdate200.zip" sigtype="ROUTER" outfile="i2pupdate.su3" su3.ver="${release.number}" />
2070        <!-- this will use the monotonerc file in the current workspace -->
2071        <echo message="Checking out fresh copy into ../i2p-${release.number} for tarballing:" />
2072        <delete dir="../i2p-${release.number}" />
2073        <exec executable="mtn" failonerror="true">
2074            <arg value="co" />
2075            <!-- w: is the revision of the current workspace -->
2076            <arg value="-r" />
2077            <arg value="w:" />
2078            <arg value="../i2p-${release.number}/" />
2079        </exec>
2080        <exec executable="tar" failonerror="true">
2081            <arg value="cjf" />
2082            <arg value="i2psource_${release.number}.tar.bz2" />
2083            <arg value="-C" />
2084            <arg value=".." />
2085            <arg value="--exclude" />
2086            <arg value="i2p-${release.number}/_MTN*" />
2087            <arg value="i2p-${release.number}/" />
2088        </exec>
2089        <echo message="Sign the files:" />
2090        <input message="Enter GPG key ID (e.g. 0x12345678) for signing:" addproperty="release.gpg.keyid" />
2091        <fail message="You must enter a key ID." >
2092            <condition>
2093                <equals arg1="${release.gpg.keyid}" arg2=""/>
2094            </condition>
2095        </fail>
2096
2097        <!-- the gpgsign macro sets the permission of signed files and the sigs themselves to 444 -->
2098        <gpgsign file="i2pinstall_${release.number}_windows.exe" />
2099        <gpgsign file="i2pinstall_${release.number}.jar" />
2100        <gpgsign file="i2psource_${release.number}.tar.bz2" />
2101        <gpgsign file="i2pupdate_${release.number}.zip" />
2102
2103        <chmod perm="444" type="file">
2104            <fileset dir="${basedir}">
2105                <include name="i2pupdate.su3" />
2106            </fileset>
2107        </chmod>
2108        <echo message="File sizes:" />
2109        <exec executable="ls" failonerror="true">
2110            <arg value="-l" />
2111            <arg value="i2pinstall_${release.number}_windows.exe" />
2112            <arg value="i2pinstall_${release.number}.jar" />
2113            <arg value="i2psource_${release.number}.tar.bz2" />
2114            <arg value="i2pupdate_${release.number}.zip" />
2115            <arg value="i2pupdate.su3" />
2116            <arg value="i2pinstall_${release.number}_windows.exe.sig" />
2117            <arg value="i2pinstall_${release.number}.jar.sig" />
2118            <arg value="i2psource_${release.number}.tar.bz2.sig" />
2119            <arg value="i2pupdate_${release.number}.zip.sig" />
2120        </exec>
2121        <echo message="SHA256 sums:" />
2122        <sha256sum file="i2pinstall_${release.number}_windows.exe" />
2123        <sha256sum file="i2pinstall_${release.number}.jar" />
2124        <sha256sum file="i2psource_${release.number}.tar.bz2" />
2125        <sha256sum file="i2pupdate_${release.number}.zip" />
2126        <sha256sum file="i2pupdate.su3" />
2127        <!-- make torrent files -->
2128        <copy file="i2pupdate.su3" tofile="i2pupdate-${release.number}.su3" />
2129        <mktorrent file="i2pupdate-${release.number}.su3" />
2130        <echo message="Don't forget to mtn tag w: i2p-${release.number}" />
2131        <echo message="... and mtn cert t:i2p-${release.number} branch i2p.i2p.release" />
2132    </target>
2133
2134    <target name="mavenCentral.deps" depends="buildRouter, buildStreaming">
2135        <ant dir="core/java/">
2136            <target name="javadocJar" />
2137            <target name="sourcesJar" />
2138        </ant>
2139        <ant dir="router/java/">
2140            <target name="javadocJar" />
2141            <target name="sourcesJar" />
2142        </ant>
2143        <ant dir="apps/ministreaming/java/">
2144            <target name="javadocJar" />
2145            <target name="sourcesJar" />
2146        </ant>
2147        <ant dir="apps/streaming/java/">
2148            <target name="javadocJar" />
2149            <target name="sourcesJar" />
2150        </ant>
2151        <ant dir="apps/jetty/">
2152            <target name="servletJar" />
2153            <target name="servletJavadocJar" />
2154            <target name="servletSourcesJar" />
2155        </ant>
2156    </target>
2157
2158    <target name="mavenCentral" depends="verifyReleaseBuildNumbers, -pre-release, distclean, testscripts, mavenCentral.deps">
2159        <mkdir dir="./pkg-mavencentral" />
2160        <!-- Libraries -->
2161        <copy file="build/i2p.jar" tofile="pkg-mavencentral/i2p-${release.number}.jar" />
2162        <copy file="build/router.jar" tofile="pkg-mavencentral/router-${release.number}.jar" />
2163        <copy file="build/mstreaming.jar" tofile="pkg-mavencentral/mstreaming-${release.number}.jar" />
2164        <copy file="build/streaming.jar" tofile="pkg-mavencentral/streaming-${release.number}.jar" />
2165        <copy file="apps/jetty/build/servlet-i2p-${release.number}.jar" todir="pkg-mavencentral/" />
2166        <!-- JavaDocs -->
2167        <copy file="core/java/build/i2p-${release.number}-javadoc.jar" todir="pkg-mavencentral/" />
2168        <copy file="router/java/build/router-${release.number}-javadoc.jar" todir="pkg-mavencentral/" />
2169        <copy file="apps/ministreaming/java/build/mstreaming-${release.number}-javadoc.jar" todir="pkg-mavencentral/" />
2170        <copy file="apps/streaming/java/build/streaming-${release.number}-javadoc.jar" todir="pkg-mavencentral/" />
2171        <copy file="apps/jetty/build/servlet-i2p-${release.number}-javadoc.jar" todir="pkg-mavencentral/" />
2172        <!-- Sources -->
2173        <copy file="core/java/build/i2p-${release.number}-sources.jar" todir="pkg-mavencentral/" />
2174        <copy file="router/java/build/router-${release.number}-sources.jar" todir="pkg-mavencentral/" />
2175        <copy file="apps/ministreaming/java/build/mstreaming-${release.number}-sources.jar" todir="pkg-mavencentral/" />
2176        <copy file="apps/streaming/java/build/streaming-${release.number}-sources.jar" todir="pkg-mavencentral/" />
2177        <copy file="apps/jetty/build/servlet-i2p-${release.number}-sources.jar" todir="pkg-mavencentral/" />
2178        <!-- POMs -->
2179        <artifact:pom id="i2ppom" groupId="net.i2p" artifactId="i2p" version="${release.number}"
2180                name="I2P Core"
2181                description="The core I2P APIs"
2182                url="https://geti2p.net/">
2183            <license name="Public Domain" url="http://en.wikipedia.org/wiki/Public_domain" />
2184            <developer name="zzz" organization="I2P" organizationUrl="https://geti2p.net/" />
2185            <developer name="str4d" email="str4d@i2pmail.org" organization="I2P" organizationUrl="https://geti2p.net/"/>
2186            <scm connection="scm:git:git@github.com:i2p/i2p.i2p.git"
2187                 developerConnection="scm:git:git@github.com:i2p/i2p.i2p.git"
2188                 url="git@github.com:i2p/i2p.i2p.git" />
2189        </artifact:pom>
2190        <artifact:pom id="routerpom" groupId="net.i2p" artifactId="router" version="${release.number}"
2191                name="I2P Router"
2192                description="The I2P router"
2193                url="https://geti2p.net/">
2194            <license name="Public Domain" url="http://en.wikipedia.org/wiki/Public_domain" />
2195            <developer name="zzz" organization="I2P" organizationUrl="https://geti2p.net/" />
2196            <developer name="str4d" email="str4d@i2pmail.org" organization="I2P" organizationUrl="https://geti2p.net/"/>
2197            <scm connection="scm:git:git@github.com:i2p/i2p.i2p.git"
2198                 developerConnection="scm:git:git@github.com:i2p/i2p.i2p.git"
2199                 url="git@github.com:i2p/i2p.i2p.git" />
2200            <dependency groupId="net.i2p" artifactId="i2p" version="${release.number}" />
2201        </artifact:pom>
2202        <artifact:pom id="mstreamingpom" groupId="net.i2p.client" artifactId="mstreaming" version="${release.number}"
2203                name="I2P Ministreaming"
2204                description="API, interfaces, and factory for a TCP-like set of sockets for communicating over I2P."
2205                url="https://geti2p.net/en/docs/api/streaming">
2206            <license name="Public Domain" url="http://en.wikipedia.org/wiki/Public_domain" />
2207            <developer name="zzz" organization="I2P" organizationUrl="https://geti2p.net/" />
2208            <developer name="str4d" email="str4d@i2pmail.org" organization="I2P" organizationUrl="https://geti2p.net/" />
2209            <scm connection="scm:git:git@github.com:i2p/i2p.i2p.git"
2210                 developerConnection="scm:git:git@github.com:i2p/i2p.i2p.git"
2211                 url="git@github.com:i2p/i2p.i2p.git" />
2212            <dependency groupId="net.i2p" artifactId="i2p" version="${release.number}" />
2213        </artifact:pom>
2214        <artifact:pom id="streamingpom" groupId="net.i2p.client" artifactId="streaming" version="${release.number}"
2215                name="I2P Streaming"
2216                description="Implementation of a TCP-like set of sockets for communicating over I2P."
2217                url="https://geti2p.net/en/docs/api/streaming">
2218            <license name="Public Domain" url="http://en.wikipedia.org/wiki/Public_domain" />
2219            <developer name="zzz" organization="I2P" organizationUrl="https://geti2p.net/" />
2220            <developer name="str4d" email="str4d@i2pmail.org" organization="I2P" organizationUrl="https://geti2p.net/" />
2221            <scm connection="scm:git:git@github.com:i2p/i2p.i2p.git"
2222                 developerConnection="scm:git:git@github.com:i2p/i2p.i2p.git"
2223                 url="git@github.com:i2p/i2p.i2p.git" />
2224            <dependency groupId="net.i2p" artifactId="i2p" version="${release.number}" />
2225            <dependency groupId="net.i2p.client" artifactId="mstreaming" version="${release.number}" />
2226        </artifact:pom>
2227        <artifact:pom id="servletpom" groupId="net.i2p" artifactId="servlet-i2p" version="${release.number}"
2228                name="I2P Servlet classes"
2229                description="Various servlet classes provided to plugins by Java I2P."
2230                url="https://geti2p.net/">
2231            <license name="Public Domain" url="http://en.wikipedia.org/wiki/Public_domain" />
2232            <developer name="zzz" organization="I2P" organizationUrl="https://geti2p.net/" />
2233            <developer name="str4d" email="str4d@i2pmail.org" organization="I2P" organizationUrl="https://geti2p.net/" />
2234            <scm connection="scm:git:git@github.com:i2p/i2p.i2p.git"
2235                 developerConnection="scm:git:git@github.com:i2p/i2p.i2p.git"
2236                 url="git@github.com:i2p/i2p.i2p.git" />
2237            <dependency groupId="net.i2p" artifactId="i2p" version="${release.number}" />
2238            <dependency groupId="org.apache.tomcat" artifactId="tomcat-servlet-api" version="8.0.33" />
2239        </artifact:pom>
2240        <artifact:writepom pomRefId="i2ppom" file="pkg-mavencentral/i2p-${release.number}.pom"/>
2241        <artifact:writepom pomRefId="routerpom" file="pkg-mavencentral/router-${release.number}.pom"/>
2242        <artifact:writepom pomRefId="mstreamingpom" file="pkg-mavencentral/mstreaming-${release.number}.pom" />
2243        <artifact:writepom pomRefId="streamingpom" file="pkg-mavencentral/streaming-${release.number}.pom" />
2244        <artifact:writepom pomRefId="servletpom" file="pkg-mavencentral/servlet-i2p-${release.number}.pom" />
2245        <!-- Signatures -->
2246        <echo message="Sign the files:" />
2247        <input message="Enter GPG key ID (e.g. 0x12345678) for signing:" addproperty="release.gpg.keyid" />
2248        <fail message="You must enter a key ID." >
2249            <condition>
2250                <equals arg1="${release.gpg.keyid}" arg2=""/>
2251            </condition>
2252        </fail>
2253        <!-- the gpgsign macro sets the permission of signed files and the sigs themselves to 444 -->
2254        <gpgsignasc file="pkg-mavencentral/i2p-${release.number}.jar" />
2255        <gpgsignasc file="pkg-mavencentral/i2p-${release.number}.pom" />
2256        <gpgsignasc file="pkg-mavencentral/i2p-${release.number}-javadoc.jar" />
2257        <gpgsignasc file="pkg-mavencentral/i2p-${release.number}-sources.jar" />
2258        <gpgsignasc file="pkg-mavencentral/router-${release.number}.jar" />
2259        <gpgsignasc file="pkg-mavencentral/router-${release.number}.pom" />
2260        <gpgsignasc file="pkg-mavencentral/router-${release.number}-javadoc.jar" />
2261        <gpgsignasc file="pkg-mavencentral/router-${release.number}-sources.jar" />
2262        <gpgsignasc file="pkg-mavencentral/mstreaming-${release.number}.jar" />
2263        <gpgsignasc file="pkg-mavencentral/mstreaming-${release.number}.pom" />
2264        <gpgsignasc file="pkg-mavencentral/mstreaming-${release.number}-javadoc.jar" />
2265        <gpgsignasc file="pkg-mavencentral/mstreaming-${release.number}-sources.jar" />
2266        <gpgsignasc file="pkg-mavencentral/streaming-${release.number}.jar" />
2267        <gpgsignasc file="pkg-mavencentral/streaming-${release.number}.pom" />
2268        <gpgsignasc file="pkg-mavencentral/streaming-${release.number}-javadoc.jar" />
2269        <gpgsignasc file="pkg-mavencentral/streaming-${release.number}-sources.jar" />
2270        <gpgsignasc file="pkg-mavencentral/servlet-i2p-${release.number}.jar" />
2271        <gpgsignasc file="pkg-mavencentral/servlet-i2p-${release.number}.pom" />
2272        <gpgsignasc file="pkg-mavencentral/servlet-i2p-${release.number}-javadoc.jar" />
2273        <gpgsignasc file="pkg-mavencentral/servlet-i2p-${release.number}-sources.jar" />
2274        <!-- Bundle -->
2275        <jar destfile="mavencentral-i2p.jar">
2276            <fileset dir="./pkg-mavencentral">
2277                <include name="i2p-*" />
2278            </fileset>
2279        </jar>
2280        <jar destfile="mavencentral-router.jar">
2281            <fileset dir="./pkg-mavencentral">
2282                <include name="router-*" />
2283            </fileset>
2284        </jar>
2285        <jar destfile="mavencentral-mstreaming.jar">
2286            <fileset dir="./pkg-mavencentral">
2287                <include name="mstreaming-*" />
2288            </fileset>
2289        </jar>
2290        <jar destfile="mavencentral-streaming.jar">
2291            <fileset dir="./pkg-mavencentral">
2292                <include name="streaming-*" />
2293            </fileset>
2294        </jar>
2295        <jar destfile="mavencentral-servlet-i2p.jar">
2296            <fileset dir="./pkg-mavencentral">
2297                <include name="servlet-i2p-*" />
2298            </fileset>
2299        </jar>
2300        <echo message="Now upload mavencentral-*.jar to Maven Central." />
2301    </target>
2302
2303    <target name="debian" depends="debian-clean, debchange, debian-binary" />
2304
2305    <target name="getExtendedVersion" depends="buildProperties, trimMtnRev">
2306        <property name="MtnShortHash" value="unknown" />
2307        <condition property="Extended.Version" value="${full.version}-${MtnShortHash}">
2308            <not>
2309                <or>
2310                    <equals arg1="${MtnShortHash}" arg2="" />
2311                    <equals arg1="${MtnShortHash}" arg2="unknown" />
2312                </or>
2313            </not>
2314        </condition>
2315        <!-- if not set above we'll set it here -->
2316        <property name="Extended.Version" value="${full.version}" />
2317    </target>
2318
2319    <target name="debchange" depends="getExtendedVersion" unless="noAutoDebchange">
2320        <echo message= "Debian version is ${Extended.Version}-1" />
2321        <exec executable="dch" failonerror="true">
2322            <arg value="-b" />
2323            <arg value="--check-dirname-level" />
2324            <arg value="0" />
2325            <arg value="-v" />
2326            <arg value="${Extended.Version}-1" />
2327            <arg value="Unofficial Debian package built using &quot;ant debian&quot;" />
2328        </exec>
2329    </target>
2330
2331    <target name="debian-binary" depends="getExtendedVersion">
2332        <exec executable="fakeroot" failonerror="true">
2333            <arg value="debian/rules" />
2334            <arg value="patch" />
2335            <arg value="binary" />
2336            <arg value="clean" />
2337        </exec>
2338        <delete dir=".pc" />
2339        <move todir=".">
2340            <fileset dir=".." includes="libjbigi*${release.number}*.deb i2p*${release.number}*.deb" />
2341        </move>
2342        <echo message="" />
2343        <echo message="====================" />
2344        <echo message="Packages have been built and moved to ${basedir}" />
2345        <echo message="====================" />
2346    </target>
2347
2348    <target name="debian-clean" depends="getExtendedVersion" >
2349        <exec executable="fakeroot" failonerror="true">
2350            <arg value="debian/rules" />
2351            <arg value="clean" />
2352        </exec>
2353        <delete dir="./.pc" />
2354    </target>
2355
2356    <!-- stretch+, zesty+ -->
2357    <target name="debian-tarball" depends="getExtendedVersion, failIfNoMtn">
2358        <!-- this will use the monotonerc file in the current workspace -->
2359        <property name="debian.tarball.name" value="i2p_${Extended.Version}.orig.tar.bz2" />
2360        <echo message="Checking out fresh copy into ../i2p-${Extended.Version} for tarballing:" />
2361        <delete dir="../i2p-${Extended.Version}" />
2362        <exec executable="mtn" failonerror="true">
2363            <arg value="co" />
2364            <!-- w: is the revision of the current workspace -->
2365            <arg value="-r" />
2366            <arg value="w:" />
2367            <arg value="../i2p-${Extended.Version}" />
2368        </exec>
2369        <delete includeemptydirs="true" quiet="false" failonerror="false">
2370            <fileset dir="../i2p-${Extended.Version}/debian-alt/" />
2371            <fileset dir="../i2p-${Extended.Version}/installer/" includes="*.xml" />
2372            <fileset dir="../i2p-${Extended.Version}/installer/c/" />
2373            <fileset dir="../i2p-${Extended.Version}/installer/doc/" />
2374            <fileset dir="../i2p-${Extended.Version}/installer/lib/" />
2375            <fileset dir="../i2p-${Extended.Version}/installer/resources" includes="checklist.md deletelist.txt install_* geoipv6-extras.csv makegeoip* po4a.config uninstall_* *.bat net.i2p.router.plist.template" />
2376            <fileset dir="../i2p-${Extended.Version}/installer/resources/Start I2P Router.app/" />
2377            <fileset dir="../i2p-${Extended.Version}/installer/resources/portable/" />
2378            <fileset dir="../i2p-${Extended.Version}/installer/resources/small/" />
2379            <fileset dir="../i2p-${Extended.Version}/Slackware" />
2380            <fileset dir="../i2p-${Extended.Version}/_MTN" />
2381            <fileset dir="../i2p-${Extended.Version}/.idea" />
2382            <fileset dir="../i2p-${Extended.Version}/.tx" />
2383            <file name="../i2p-${Extended.Version}/.mtn-ignore" />
2384            <fileset dir="../i2p-${Extended.Version}/" includes="Docker*" />
2385            <file name="../i2p-${Extended.Version}/Makefile.gcj" />
2386            <fileset dir="../i2p-${Extended.Version}/docs" />
2387            <fileset dir="../i2p-${Extended.Version}/launchers" />
2388            <file name="../i2p-${Extended.Version}/.travis.yml" />
2389            <file name="../i2p-${Extended.Version}/.gitignore" />
2390            <!-- gradle files -->
2391            <fileset dir="../i2p-${Extended.Version}/" includes="**/build.gradle" />
2392            <fileset dir="../i2p-${Extended.Version}/gradle" />
2393            <file name="../i2p-${Extended.Version}/gradlew" />
2394            <file name="../i2p-${Extended.Version}/gradlew.bat" />
2395            <file name="../i2p-${Extended.Version}/gradle.properties" />
2396            <file name="../i2p-${Extended.Version}/settings.gradle" />
2397            <!-- gettext-base -->
2398            <fileset dir="../i2p-${Extended.Version}/core/java/src/gnu/gettext" />
2399            <!-- libgetopt-java -->
2400            <fileset dir="../i2p-${Extended.Version}/core/java/src/gnu/getopt" />
2401            <!-- libhttpclient-java and libhttpcore-java -->
2402          <!--
2403            <fileset dir="../i2p-${Extended.Version}/core/java/src/org/apache/http" />
2404           -->
2405            <!-- geoip-database -->
2406            <file name="../i2p-${Extended.Version}/installer/resources/geoip.txt" />
2407            <file name="../i2p-${Extended.Version}/installer/resources/geoipv6.dat.gz" />
2408            <!-- libjetty9-java -->
2409            <fileset dir="../i2p-${Extended.Version}/apps/jetty/jetty-distribution-9.2.24.v20180105" />
2410            <!-- libtomcat8-java -->
2411            <fileset dir="../i2p-${Extended.Version}/apps/jetty/apache-tomcat-8.5.30" />
2412            <!-- libjstl1.1-java or glassfish-javaee or libtaglibs-standard -->
2413            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/jstl.jar" />
2414            <!-- libjakarta-taglibs-standard-java or glassfish-javaee or libtaglibs-standard -->
2415            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/standard.jar" />
2416            <fileset dir="../i2p-${Extended.Version}/installer/resources/icons/flags" />
2417            <!-- anything added above, add in debian-release-tarball also -->
2418        </delete>
2419        <tar longfile="gnu" destfile="../${debian.tarball.name}" compression="bzip2">
2420            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${Extended.Version}">
2421                <include name="**/**" />
2422                <exclude name="debian/**"/>
2423                <exclude name="**/*.sh"/>
2424                <!-- anything added above, add in debian-release-tarball also -->
2425            </tarfileset>
2426            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${Extended.Version}" filemode="755">
2427                <exclude name="debian/**" />
2428                <include name="**/*.sh" />
2429            </tarfileset>
2430        </tar>
2431    </target>
2432
2433    <!-- same as debian-release-tarball but with bundled jetty
2434      -  We add a 'p' to the release name and tarball since the source package is different;
2435      -  Launchpad does not allow different source packages with the same name.
2436      -->
2437    <target name="precise-release-tarball" depends="getExtendedVersion, failIfNoMtn">
2438        <property name="debian.tarball.name" value="i2p_${release.number}p.orig.tar.bz2" />
2439        <echo message="Checking out fresh copy into ../i2p-${Extended.Version} for tarballing:" />
2440        <delete dir="../i2p-${Extended.Version}" />
2441        <exec executable="mtn" failonerror="true">
2442            <arg value="co" />
2443            <!-- w: is the revision of the current workspace -->
2444            <arg value="-r" />
2445            <arg value="w:" />
2446            <arg value="-b" />
2447            <arg value="i2p.i2p" />
2448            <arg value="../i2p-${Extended.Version}" />
2449        </exec>
2450        <delete includeemptydirs="true" quiet="false" failonerror="false">
2451            <fileset dir="../i2p-${Extended.Version}/debian-alt/" />
2452            <fileset dir="../i2p-${Extended.Version}/installer/" includes="*.xml" />
2453            <fileset dir="../i2p-${Extended.Version}/installer/c/" />
2454            <fileset dir="../i2p-${Extended.Version}/installer/doc/" />
2455            <fileset dir="../i2p-${Extended.Version}/installer/lib/" />
2456            <fileset dir="../i2p-${Extended.Version}/installer/resources" includes="checklist.md deletelist.txt install_* geoipv6-extras.csv makegeoip* po4a.config uninstall_* *.bat net.i2p.router.plist.template" />
2457            <fileset dir="../i2p-${Extended.Version}/installer/resources/Start I2P Router.app/" />
2458            <fileset dir="../i2p-${Extended.Version}/installer/resources/portable/" />
2459            <fileset dir="../i2p-${Extended.Version}/installer/resources/small/" />
2460            <fileset dir="../i2p-${Extended.Version}/Slackware" />
2461            <fileset dir="../i2p-${Extended.Version}/_MTN" />
2462            <fileset dir="../i2p-${Extended.Version}/.idea" />
2463            <fileset dir="../i2p-${Extended.Version}/.tx" />
2464            <file name="../i2p-${Extended.Version}/.mtn-ignore" />
2465            <fileset dir="../i2p-${Extended.Version}/" includes="Docker*" />
2466            <file name="../i2p-${Extended.Version}/Makefile.gcj" />
2467            <fileset dir="../i2p-${Extended.Version}/docs" />
2468            <fileset dir="../i2p-${Extended.Version}/launchers" />
2469            <file name="../i2p-${Extended.Version}/.travis.yml" />
2470            <file name="../i2p-${Extended.Version}/.gitignore" />
2471            <!-- gradle files -->
2472            <fileset dir="../i2p-${Extended.Version}/" includes="**/build.gradle" />
2473            <fileset dir="../i2p-${Extended.Version}/gradle" />
2474            <file name="../i2p-${Extended.Version}/gradlew" />
2475            <file name="../i2p-${Extended.Version}/gradlew.bat" />
2476            <file name="../i2p-${Extended.Version}/gradle.properties" />
2477            <file name="../i2p-${Extended.Version}/settings.gradle" />
2478            <!-- gettext-base -->
2479            <fileset dir="../i2p-${Extended.Version}/core/java/src/gnu/gettext" />
2480            <!-- libgetopt-java -->
2481            <fileset dir="../i2p-${Extended.Version}/core/java/src/gnu/getopt" />
2482            <!-- libhttpclient-java and libhttpcore-java -->
2483          <!--
2484            <fileset dir="../i2p-${Extended.Version}/core/java/src/org/apache/http" />
2485           -->
2486            <!-- geoip-database -->
2487            <file name="../i2p-${Extended.Version}/installer/resources/geoip.txt" />
2488            <file name="../i2p-${Extended.Version}/installer/resources/geoipv6.dat.gz" />
2489            <!-- libjetty9-java -->
2490          <!--
2491            <fileset dir="../i2p-${Extended.Version}/apps/jetty/jetty-distribution-9.2.24.v20180105" />
2492            <fileset dir="../i2p-${Extended.Version}/apps/jetty/apache-tomcat-8.5.30" />
2493           -->
2494            <!-- libjstl1.1-java or glassfish-javaee -->
2495          <!--
2496            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/jstl.jar" />
2497           -->
2498            <!-- libjakarta-taglibs-standard-java or glassfish-javaee -->
2499            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/standard.jar" />
2500            <!-- famfamfam-flag-png is in trusty but not precise, so leave them in the source package for both -->
2501            <!-- anything added above, add in debian-release-tarball also -->
2502        </delete>
2503        <tar longfile="gnu" destfile="../${debian.tarball.name}" compression="bzip2">
2504            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${Extended.Version}">
2505                <include name="**/**" />
2506                <exclude name="debian/**"/>
2507                <exclude name="**/*.sh"/>
2508                <!-- anything added above, add in debian-release-tarball also -->
2509            </tarfileset>
2510            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${Extended.Version}" filemode="755">
2511                <exclude name="debian/**" />
2512                <include name="**/*.sh" />
2513            </tarfileset>
2514        </tar>
2515    </target>
2516
2517    <!-- xenial/yakkety only -->
2518    <!-- same as debian-release-tarball but with bundled jstl.jar
2519         (there's no libtaglibs-standard-* packages)
2520      -  We add a 'x' to the release name and tarball since the source package is different;
2521      -  Launchpad does not allow different source packages with the same name.
2522      -->
2523    <target name="xenial-release-tarball" depends="getExtendedVersion, failIfNoMtn">
2524        <property name="debian.tarball.name" value="i2p_${release.number}x.orig.tar.bz2" />
2525        <echo message="Checking out fresh copy into ../i2p-${Extended.Version} for tarballing:" />
2526        <delete dir="../i2p-${Extended.Version}" />
2527        <exec executable="mtn" failonerror="true">
2528            <arg value="co" />
2529            <!-- w: is the revision of the current workspace -->
2530            <arg value="-r" />
2531            <arg value="w:" />
2532            <arg value="-b" />
2533            <arg value="i2p.i2p" />
2534            <arg value="../i2p-${Extended.Version}" />
2535        </exec>
2536        <delete includeemptydirs="true" quiet="false" failonerror="false">
2537            <fileset dir="../i2p-${Extended.Version}/debian-alt/" />
2538            <fileset dir="../i2p-${Extended.Version}/installer/" includes="*.xml" />
2539            <fileset dir="../i2p-${Extended.Version}/installer/c/" />
2540            <fileset dir="../i2p-${Extended.Version}/installer/doc/" />
2541            <fileset dir="../i2p-${Extended.Version}/installer/lib/" />
2542            <fileset dir="../i2p-${Extended.Version}/installer/resources" includes="checklist.md deletelist.txt install_* geoipv6-extras.csv makegeoip* po4a.config uninstall_* *.bat net.i2p.router.plist.template" />
2543            <fileset dir="../i2p-${Extended.Version}/installer/resources/Start I2P Router.app/" />
2544            <fileset dir="../i2p-${Extended.Version}/installer/resources/portable/" />
2545            <fileset dir="../i2p-${Extended.Version}/installer/resources/small/" />
2546            <fileset dir="../i2p-${Extended.Version}/Slackware" />
2547            <fileset dir="../i2p-${Extended.Version}/_MTN" />
2548            <fileset dir="../i2p-${Extended.Version}/.idea" />
2549            <fileset dir="../i2p-${Extended.Version}/.tx" />
2550            <file name="../i2p-${Extended.Version}/.mtn-ignore" />
2551            <fileset dir="../i2p-${Extended.Version}/" includes="Docker*" />
2552            <file name="../i2p-${Extended.Version}/Makefile.gcj" />
2553            <fileset dir="../i2p-${Extended.Version}/docs" />
2554            <fileset dir="../i2p-${Extended.Version}/launchers" />
2555            <file name="../i2p-${Extended.Version}/.travis.yml" />
2556            <file name="../i2p-${Extended.Version}/.gitignore" />
2557            <!-- gradle files -->
2558            <fileset dir="../i2p-${Extended.Version}/" includes="**/build.gradle" />
2559            <fileset dir="../i2p-${Extended.Version}/gradle" />
2560            <file name="../i2p-${Extended.Version}/gradlew" />
2561            <file name="../i2p-${Extended.Version}/gradlew.bat" />
2562            <file name="../i2p-${Extended.Version}/gradle.properties" />
2563            <file name="../i2p-${Extended.Version}/settings.gradle" />
2564            <fileset dir="../i2p-${Extended.Version}/core/java/src/gnu/gettext" />
2565            <fileset dir="../i2p-${Extended.Version}/core/java/src/gnu/getopt" />
2566          <!--
2567            <fileset dir="../i2p-${Extended.Version}/core/java/src/org/apache/http" />
2568           -->
2569            <file name="../i2p-${Extended.Version}/installer/resources/geoip.txt" />
2570            <file name="../i2p-${Extended.Version}/installer/resources/geoipv6.dat.gz" />
2571            <fileset dir="../i2p-${Extended.Version}/apps/jetty/jetty-distribution-9.2.24.v20180105" />
2572            <fileset dir="../i2p-${Extended.Version}/apps/jetty/apache-tomcat-8.5.30" />
2573          <!--
2574            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/jstl.jar" />
2575           -->
2576            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/standard.jar" />
2577            <fileset dir="../i2p-${Extended.Version}/installer/resources/icons/flags" />
2578            <!-- anything added above, add in debian-tarball also -->
2579        </delete>
2580        <tar longfile="gnu" destfile="../${debian.tarball.name}" compression="bzip2">
2581            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${release.number}">
2582                <include name="**/**" />
2583                <exclude name="debian/**"/>
2584                <exclude name="**/*.sh"/>
2585                <!-- anything added above, add in debian-tarball also -->
2586            </tarfileset>
2587            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${release.number}" filemode="755">
2588                <exclude name="debian/**" />
2589                <include name="**/*.sh" />
2590            </tarfileset>
2591        </tar>
2592    </target>
2593
2594    <!-- stretch+, zesty+ -->
2595    <!-- same as debian-tarball but with a release tar.bz2 file name and tar prefix -->
2596    <target name="debian-release-tarball" depends="getExtendedVersion, failIfNoMtn">
2597        <property name="debian.tarball.name" value="i2p_${release.number}.orig.tar.bz2" />
2598        <echo message="Checking out fresh copy into ../i2p-${Extended.Version} for tarballing:" />
2599        <delete dir="../i2p-${Extended.Version}" />
2600        <exec executable="mtn" failonerror="true">
2601            <arg value="co" />
2602            <!-- w: is the revision of the current workspace -->
2603            <arg value="-r" />
2604            <arg value="w:" />
2605            <arg value="-b" />
2606            <arg value="i2p.i2p" />
2607            <arg value="../i2p-${Extended.Version}" />
2608        </exec>
2609        <delete includeemptydirs="true" quiet="false" failonerror="false">
2610            <fileset dir="../i2p-${Extended.Version}/debian-alt/" />
2611            <fileset dir="../i2p-${Extended.Version}/installer/" includes="*.xml" />
2612            <fileset dir="../i2p-${Extended.Version}/installer/c/" />
2613            <fileset dir="../i2p-${Extended.Version}/installer/doc/" />
2614            <fileset dir="../i2p-${Extended.Version}/installer/lib/" />
2615            <fileset dir="../i2p-${Extended.Version}/installer/resources" includes="checklist.md deletelist.txt install_* geoipv6-extras.csv makegeoip* po4a.config uninstall_* *.bat net.i2p.router.plist.template" />
2616            <fileset dir="../i2p-${Extended.Version}/installer/resources/Start I2P Router.app/" />
2617            <fileset dir="../i2p-${Extended.Version}/installer/resources/portable/" />
2618            <fileset dir="../i2p-${Extended.Version}/installer/resources/small/" />
2619            <fileset dir="../i2p-${Extended.Version}/Slackware" />
2620            <fileset dir="../i2p-${Extended.Version}/_MTN" />
2621            <fileset dir="../i2p-${Extended.Version}/.idea" />
2622            <fileset dir="../i2p-${Extended.Version}/.tx" />
2623            <file name="../i2p-${Extended.Version}/.mtn-ignore" />
2624            <fileset dir="../i2p-${Extended.Version}/" includes="Docker*" />
2625            <file name="../i2p-${Extended.Version}/Makefile.gcj" />
2626            <fileset dir="../i2p-${Extended.Version}/docs" />
2627            <fileset dir="../i2p-${Extended.Version}/launchers" />
2628            <file name="../i2p-${Extended.Version}/.travis.yml" />
2629            <file name="../i2p-${Extended.Version}/.gitignore" />
2630            <!-- gradle files -->
2631            <fileset dir="../i2p-${Extended.Version}/" includes="**/build.gradle" />
2632            <fileset dir="../i2p-${Extended.Version}/gradle" />
2633            <file name="../i2p-${Extended.Version}/gradlew" />
2634            <file name="../i2p-${Extended.Version}/gradlew.bat" />
2635            <file name="../i2p-${Extended.Version}/gradle.properties" />
2636            <file name="../i2p-${Extended.Version}/settings.gradle" />
2637            <fileset dir="../i2p-${Extended.Version}/core/java/src/gnu/gettext" />
2638            <fileset dir="../i2p-${Extended.Version}/core/java/src/gnu/getopt" />
2639          <!--
2640            <fileset dir="../i2p-${Extended.Version}/core/java/src/org/apache/http" />
2641           -->
2642            <file name="../i2p-${Extended.Version}/installer/resources/geoip.txt" />
2643            <file name="../i2p-${Extended.Version}/installer/resources/geoipv6.dat.gz" />
2644            <fileset dir="../i2p-${Extended.Version}/apps/jetty/jetty-distribution-9.2.24.v20180105" />
2645            <fileset dir="../i2p-${Extended.Version}/apps/jetty/apache-tomcat-8.5.30" />
2646            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/jstl.jar" />
2647            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/standard.jar" />
2648            <fileset dir="../i2p-${Extended.Version}/installer/resources/icons/flags" />
2649            <!-- anything added above, add in debian-tarball also -->
2650        </delete>
2651        <tar longfile="gnu" destfile="../${debian.tarball.name}" compression="bzip2">
2652            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${release.number}">
2653                <include name="**/**" />
2654                <exclude name="debian/**"/>
2655                <exclude name="**/*.sh"/>
2656                <!-- anything added above, add in debian-tarball also -->
2657            </tarfileset>
2658            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${release.number}" filemode="755">
2659                <exclude name="debian/**" />
2660                <include name="**/*.sh" />
2661            </tarfileset>
2662        </tar>
2663    </target>
2664
2665    <target name="debian-patch" depends="getExtendedVersion" >
2666        <exec executable="quilt" failonerror="true">
2667            <arg value="-a" />
2668            <arg value="push" />
2669        </exec>
2670        <echo message="====================" />
2671    </target>
2672    <target name="debian-unpatch" depends="buildProperties">
2673        <exec executable="quilt" failonerror="false">
2674            <arg value="-a" />
2675            <arg value="pop" />
2676        </exec>
2677    </target>
2678
2679    <target name="debianrepo" depends="debian">
2680        <exec dir="debian" executable="./makerepo.sh" failonerror="true"/>
2681    </target>
2682
2683<!-- the following are appened to help build barebone portable version,
2684     none of the above is modified for this purpose -->
2685        <target name = "pkg-portable-clean">
2686                <delete dir="build/" />
2687                <delete dir="pkg-temp/" />
2688                <delete>
2689                        <fileset dir="." includes="portable-**.zip**" />
2690                </delete>
2691        </target>
2692<!-- build a portable archive -->
2693
2694<!-- *0* Since we simply pack all files in folder "build/" into our archieve,
2695                we need to make sure its small, with NO redundent jars or wars.
2696                thus cleaning is required before each build-->
2697        <target name="buildSmallOnly" depends="pkg-portable-clean,buildSmall"/>
2698
2699<!-- *1* preparing the jars by OS dependent de-bloating -->
2700        <target name="preppkg-portable-win32-jbigi" depends="buildSmallOnly, jbigi-windows-only" />
2701
2702        <target name="preppkg-portable-linux-jbigi"  depends="buildSmallOnly, jbigi-linux-only" />
2703
2704<!-- *2* os independent procedure  -->
2705        <target name="preppkg-portable-basic" >
2706                <mkdir dir="pkg-temp" />
2707                        <!-- non OS dependent configurations only, dont add *nux/win stuff here -->
2708                        <copy todir="pkg-temp">
2709                                <fileset dir="installer/resources/portable/configs/" />
2710                        </copy>
2711                        <copy file="installer/resources/blocklist.txt" todir="pkg-temp/" />
2712                        <copy file="installer/resources/hosts.txt" todir="pkg-temp/" />
2713                        <copy file="installer/resources/readme.license.txt" todir="pkg-temp/" />
2714                <mkdir dir="pkg-temp/addressbook" />
2715                        <copy file="apps/addressbook/subscriptions.txt" todir="pkg-temp/addressbook/" />
2716                        <copy file="apps/addressbook/myhosts.txt"  todir="pkg-temp/addressbook/" />
2717                        <!-- config.txt is in installer/resources/portable -->
2718                <mkdir dir="pkg-temp/docs" />
2719                        <copy file="installer/resources/initialNews/initialNews.xml" tofile="pkg-temp/docs/news.xml" overwrite="true" />
2720                        <copy file="installer/resources/readme/readme.html" tofile="pkg-temp/docs/readme.html" />
2721                        <copy file="installer/resources/startconsole.html" todir="pkg-temp/docs/" />
2722                        <copy file="installer/resources/start.ico" todir="pkg-temp/docs/" />
2723                        <copy file="installer/resources/console.ico" todir="pkg-temp/docs/" />
2724                        <!-- HTTP Header files, english only,
2725                                if you need a different lang do it in a seperate target -->
2726                        <copy todir="pkg-temp/docs/" >
2727                                <fileset dir="installer/resources/proxy/"  includes="**-header.ht" />
2728                        </copy>
2729                        <!-- Theme light only -->
2730                        <copy todir="pkg-temp/docs/themes/console/light/" overwrite="true" >
2731                                <fileset dir="installer/resources/themes/console/light/" includes="**.css" />
2732                        </copy>
2733                        <copy file="installer/resources/themes/console/light/console_big.css" todir="portable/docs/themes/console/light/" />
2734                        <copy todir="pkg-temp/docs/themes/console/images/" >
2735                                <fileset dir="installer/resources/themes/console/images/" />
2736                        </copy>
2737                        <!-- FLAGs for language icon (not for ip)-->
2738                        <copy todir="pkg-temp/docs/icons" >
2739                                <fileset dir="installer/resources/icons" />
2740                        </copy>
2741                <mkdir dir="pkg-temp/webapps" />
2742                        <copy todir="pkg-temp/webapps/">
2743                                <fileset dir="build/" includes="**.war" />
2744                        </copy>
2745                <mkdir dir="pkg-temp/lib" />
2746                        <copy todir ="pkg-temp/lib/" >
2747                                <fileset dir="build/" includes="**.jar" />
2748                        </copy>
2749                        <!-- 3rd party jars from apps/  -->
2750                                <!-- jrobin - without jobin , you lost graph and get a lot error entry in logs -->
2751                        <copy file="build/jrobin.jar" tofile="pkg-temp/lib/jrobin.jar" />
2752        </target>
2753<!-- *3* os dependent procedure/commands -->
2754        <target name = "preppkg-portable-win32" depends="preppkg-portable-win32-jbigi,preppkg-portable-basic">
2755                        <!--wrapper - dont even think about it. i2p cosumes appreantly more mem without it on win32-->
2756                <copy file="installer/lib/wrapper/win32/wrapper.dll" todir="pkg-temp/lib" />
2757                <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
2758                <copy file="installer/lib/wrapper/win32/I2Psvc.exe" tofile="pkg-temp/i2psvc.ex_" />
2759                        <!--  copy the unpack/start batchfiles -->
2760                <copy todir="pkg-temp">
2761                        <fileset dir="installer/resources/portable/win32/" />
2762                </copy>
2763        </target>
2764<!-- *4* command for windows package -->
2765        <target name = "pkg-portable-win32"     depends="preppkg-portable-win32, pack200" >
2766                <!-- i need the portable\ folder in .zip so basedir is set to . -->
2767                <move file="pkg-temp" tofile="portable"/>
2768                <zip destfile="portable-win32.zip" basedir="." level="9" includes="portable\**" />
2769                <checksum file="portable-win32.zip" forceOverwrite="yes"/>
2770                <move file="portable" tofile="pkg-temp"/>
2771        </target>
2772</project>
Note: See TracBrowser for help on using the repository browser.