source: build.xml @ d600a2d

Last change on this file since d600a2d was d600a2d, checked in by zzz <zzz@…>, 2 years ago

Build: Remove references to now-empty commons-logging.jar

  • Property mode set to 100644
File size: 142.5 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="launcher" failonerror="true">
305                <arg value="browserbundle:clean" />
306            </exec>
307            <exec executable="sbt" dir="launcher" failonerror="true">
308                <arg value="browserbundle:assembly" />
309            </exec>
310        </sequential>
311    </target>
312
313    <target name="osxLauncher" depends="build">
314        <sequential>
315            <exec executable="sbt" dir="launcher" failonerror="true">
316                <arg value="macosx:clean" />
317            </exec>
318            <exec executable="sbt" dir="launcher" failonerror="true">
319                <arg value="macosx:assembly" />
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" />
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                <pathelement location="apps/jetty/jettylib/org.mortbay.jetty.jar" />
858                <pathelement location="apps/jetty/jettylib/jasper-runtime.jar" />
859                <pathelement location="apps/jetty/jettylib/javax.servlet.jar" />
860                <pathelement location="apps/jetty/jettylib/jetty-http.jar" />
861                <pathelement location="apps/jetty/jettylib/jetty-security.jar" />
862                <pathelement location="apps/jetty/jettylib/jetty-servlet.jar" />
863                <pathelement location="apps/jetty/jettylib/jetty-start.jar" />
864                <pathelement location="apps/jetty/jettylib/jetty-util.jar" />
865                <pathelement location="apps/jetty/jettylib/jetty-webapp.jar" />
866                <pathelement location="apps/jetty/jettylib/jetty-xml.jar" />
867                <pathelement location="apps/jrobin/jrobin-1.5.9.1.jar" />
868                <pathelement location="installer/lib/wrapper/all/wrapper.jar" />
869                <!-- following are only for debian builds -->
870                <pathelement location="core/java/build/libintl.jar" />
871                <pathelement location="core/java/build/gnu-getopt.jar" />
872            </classpath>
873            <!-- These variables are stored in build.properties.
874                  End-users can override by creating the file override.properties -->
875            <link offline="true" href="${javasedocs.url}" packagelistLoc="installer/resources/package-lists/java/" />
876            <link offline="true" href="${javaeedocs.url}" packagelistLoc="installer/resources/package-lists/javaee/" />
877            <link offline="true" href="${jettydocs.url}" packagelistLoc="installer/resources/package-lists/jetty/" />
878            <link offline="true" href="${wrapperdocs.url}" packagelistLoc="installer/resources/package-lists/wrapper/" />
879        </javadoc>
880        <echo message="Warning, javadoc embeds timestamps in the output, run with 'TZ=UTC ant javadoc' if you plan to distribute" />
881    </target>
882
883    <target name="javadoc-zip" depends="javadoc">
884        <zip destfile="javadoc.zip" basedir="build" level="9" includes="javadoc\**" />
885    </target>
886
887    <target name="javadoc-test" depends="buildRouter, javadoc" >
888        <mkdir dir="./build" />
889        <mkdir dir="./build/javadoc-test" />
890
891        <!-- set junit home to the old default unless overridden elsewhere -->
892        <property name="junit.home" value="${ant.home}/lib/" />
893        <javadoc access="package"
894            destdir="./build/javadoc-test"
895            packagenames="*"
896            use="true"
897            splitindex="true"
898            doctitle="I2P Unit Test Javadocs for Release ${release.number} Build ${i2p.build.number}${build.extra}"
899            windowtitle="I2P Anonymous Network - Java Documentation - Version ${release.number}">
900            <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.*" />
901            <group title="Router" packages="net.i2p.router:net.i2p.router.*:net.i2p.data.i2np:org.cybergarage.*:org.freenetproject:org.xlattice.crypto.filters" />
902            <sourcepath>
903                <pathelement location="core/java/test/junit" />
904                <pathelement location="router/java/test/junit" />
905                <pathelement location="core/java/test/scalatest" />
906            </sourcepath>
907            <classpath>
908                <pathelement location="build/i2p.jar" />
909                <pathelement location="build/router.jar" />
910                <pathelement location="${junit.home}/junit4.jar" />
911                <pathelement location="${hamcrest.home}/hamcrest-all.jar" />
912            </classpath>
913            <!--
914                 These variables are stored in build.properties.
915                 End-users can override by creating the file override.properties
916            -->
917            <link offline="true" href="${javasedocs.url}" packagelistLoc="installer/resources/package-lists/java/" />
918            <link offline="true" href="${junitdocs.url}" packagelistLoc="installer/resources/package-lists/junit/" />
919            <link offline="true" href="${i2pdocs.url}" packagelistLoc="build/javadoc/" />
920        </javadoc>
921        <echo message="Warning, javadoc embeds timestamps in the output, run with 'TZ=UTC ant javadoc' if you plan to distribute" />
922    </target>
923
924    <target name="getReleaseNumber">
925        <loadfile srcfile="core/java/src/net/i2p/CoreVersion.java" property="release.number">
926            <filterchain>
927                <linecontains>
928                    <contains value="public final static String VERSION"/>
929                </linecontains>
930                <tokenfilter>
931                    <replaceregex pattern='.*"([^"]+)";' replace="\1" flags="gi" />
932                </tokenfilter>
933                <striplinebreaks/>
934                <trim/>
935            </filterchain>
936        </loadfile>
937        <property name="release.number" value="unknown" />
938        <echo message="Release number is ${release.number}" />
939    </target>
940
941    <target name="getBuildNumber">
942        <loadfile srcfile="router/java/src/net/i2p/router/RouterVersion.java" property="i2p.build.number">
943            <filterchain>
944                <linecontains>
945                    <contains value="public final static long BUILD" />
946                </linecontains>
947                <tokenfilter>
948                    <replaceregex pattern=".*=\s+([0-9]+);" replace="\1" flags="gi" />
949                </tokenfilter>
950                <trim/>
951                <striplinebreaks/>
952            </filterchain>
953        </loadfile>
954        <loadfile srcfile="router/java/src/net/i2p/router/RouterVersion.java" property="build.extra">
955            <filterchain>
956                <linecontains>
957                    <contains value="public final static String EXTRA" />
958                </linecontains>
959                <tokenfilter>
960                    <replaceregex pattern='.*"(.*)";' replace="\1" flags="gi" />
961                </tokenfilter>
962                <trim/>
963                <striplinebreaks/>
964            </filterchain>
965        </loadfile>
966        <property name="i2p.build.number" value="??" />
967        <property name="build.extra" value="" />
968        <echo message="Build number is ${i2p.build.number}${build.extra}" />
969    </target>
970
971    <target name="verifyReleaseBuildNumbers" depends="getReleaseNumber, getBuildNumber" >
972        <echo message="SDK: ${java.vendor} ${java.version} (${java.runtime.name} ${java.runtime.version})" />
973        <fail message="Bad release number: ${release.number}" >
974            <condition>
975                <or>
976                    <equals arg1="${release.number}" arg2="unknown"/>
977                    <equals arg1="${release.number}" arg2=""/>
978                </or>
979            </condition>
980        </fail>
981        <fail message="Non-zero build number: ${i2p.build.number}" >
982            <condition>
983                <not>
984                    <equals arg1="${i2p.build.number}" arg2="0"/>
985                </not>
986            </condition>
987        </fail>
988        <fail message="Non-empty extra build: ${build.extra}" >
989            <condition>
990                <not>
991                    <equals arg1="${build.extra}" arg2=""/>
992                </not>
993            </condition>
994        </fail>
995    </target>
996
997    <target name="-pre-sign">
998            <!-- if you're distributing su3 files to others, at a minimum you should set these -->
999            <fail message="javac.compilerargs must contain a -bootclasspath option in override.properties">
1000                <condition>
1001                    <not><contains string="${javac.compilerargs}" substring="-bootclasspath"/></not>
1002                </condition>
1003            </fail>
1004            <fail message="javac.compilerargs7 must contain a -bootclasspath option in override.properties">
1005                <condition>
1006                    <not><contains string="${javac.compilerargs7}" substring="-bootclasspath"/></not>
1007                </condition>
1008            </fail>
1009            <fail message="build.built-by must be set in override.properties">
1010                <condition>
1011                    <equals arg1="${build.built-by}" arg2="unknown"/>
1012                </condition>
1013            </fail>
1014            <fail message="require.gettext must be true">
1015                <condition>
1016                    <not><equals arg1="${require.gettext}" arg2="true"/></not>
1017                </condition>
1018            </fail>
1019    </target>
1020
1021    <target name="-pre-release" depends="-pre-sign, failIfNoMtn">
1022            <echo message="================================================================" />
1023            <echo message="Did you update these files?" />
1024            <exec executable="ls" failonerror="true">
1025                    <arg value="-l" />
1026                    <arg value="history.txt" />
1027                    <arg value="installer/install.xml" />
1028                    <arg value="core/java/src/net/i2p/CoreVersion.java" />
1029                    <arg value="router/java/src/net/i2p/router/RouterVersion.java" />
1030            </exec>
1031            <echo message="Everything is checked in, right? Let's be sure:" />
1032            <exec executable="mtn" failonerror="true">
1033                    <arg value="st" />
1034            </exec>
1035            <echo message="If there are any modified files above, stop now!" />
1036            <echo message="================================================================" />
1037            <sleep seconds="3"/>
1038    </target>
1039
1040    <target name="clean" depends="pkgclean" >
1041        <delete dir="./build" />
1042        <delete dir="./reports" />
1043        <delete file="installer/lib/izpack/patches.jar" failonerror="false" quiet="true" />
1044        <delete file="syndie-standalone.zip" failonerror="false" quiet="true" />
1045        <delete file="i2psnark-standalone.zip" failonerror="false" quiet="true" />
1046        <delete file="BOB-one.jar" failonerror="false" quiet="true" />
1047        <delete file="core/java/cobertura.ser"/>
1048        <delete file="javadoc.zip" />
1049        <delete file="i2p.fba" />
1050        <delete file="${sloccount.report.file}" />
1051        <delete file="mavencentral-i2p.jar" />
1052        <delete file="mavencentral-router.jar" />
1053        <delete file="mavencentral-mstreaming.jar" />
1054        <delete file="mavencentral-streaming.jar" />
1055        <delete file="mavencentral-servlet-i2p.jar" />
1056    </target>
1057
1058    <target name="distclean" depends="clean">
1059        <delete failonerror="false" quiet="true">
1060            <fileset dir="." includes="i2pinstall* *.deb i2p_*.bz2 i2pupdate* i2psource* *.sig *.torrent" />
1061        </delete>
1062        <ant dir="core/java/" target="distclean" />
1063        <ant dir="router/java/" target="distclean" />
1064        <ant dir="installer/java" target="distclean" />
1065        <ant dir="apps/ministreaming/java/" target="distclean" />
1066        <ant dir="apps/streaming/java/" target="distclean" />
1067        <ant dir="apps/i2ptunnel/java/" target="distclean" />
1068        <ant dir="apps/sam/java/" target="distclean" />
1069        <ant dir="apps/BOB" target="clean" />
1070        <ant dir="apps/desktopgui" target="clean" />
1071        <ant dir="apps/routerconsole/java/" target="distclean" />
1072        <ant dir="apps/addressbook/" target="distclean" />
1073        <ant dir="apps/susimail/" target="distclean" />
1074        <ant dir="apps/susidns/src/" target="distclean" />
1075        <ant dir="apps/systray/java/" target="distclean" />
1076        <ant dir="apps/i2psnark/java/" target="distclean" />
1077        <ant dir="apps/jetty/" target="distclean" />
1078        <ant dir="apps/imagegen/" target="distclean" />
1079        <ant dir="apps/jrobin/java" target="distclean" />
1080        <delete dir="core/c/jbigi/bin" />
1081        <delete dir="core/c/jbigi/lib" />
1082        <delete dir="core/c/jcpuid/lib" />
1083        <ant dir="installer/resources/locale" target="distclean" />
1084        <ant dir="installer/tools/java" target="distclean" />
1085        <!--
1086                NOTE! We need to turn off the default excludes for these
1087                patterns to work.
1088                These are the defaultexcludes in Ant as seen on
1089                http://ant.apache.org/manual/CoreTasks/defaultexcludes.html
1090                     **/*~
1091                     **/#*#
1092                     **/.#*
1093                     **/%*%
1094                     **/._*
1095                     **/CVS
1096                     **/CVS/**
1097                     **/.cvsignore
1098                     **/SCCS
1099                     **/SCCS/**
1100                     **/vssver.scc
1101                     **/.svn
1102                     **/.svn/**
1103                     **/.DS_Store
1104                The only recourse is to remove the offending ones.
1105                We do this here, as we only need one change, and then put it
1106                back after we are done with it.
1107        -->
1108        <defaultexcludes remove="**/*~"/>
1109
1110        <delete>
1111            <fileset dir="." includes="**/*.class **/*.java~ **/*.txt~ **/*.xml~ **/*.sh~ **/*.SlackBuild~" />
1112            <!--
1113                Less common, but they pollute my workspace here, so we
1114                might as well nuke these as well. Are there any others?
1115               
1116                !!??? Why don't we just nuke "**/*~" ???!!
1117
1118                ++Sponge
1119            -->
1120        </delete>
1121        <!--
1122                Now we put the defaults back
1123        -->
1124        <defaultexcludes default="true"/>
1125    </target>
1126
1127    <target name="webappDistclean">
1128        <ant dir="apps/i2ptunnel/java/" target="distclean" />
1129        <ant dir="apps/routerconsole/java/" target="distclean" />
1130        <ant dir="apps/addressbook/" target="distclean" />
1131        <ant dir="apps/susimail/" target="distclean" />
1132        <ant dir="apps/susidns/src/" target="distclean" />
1133        <ant dir="apps/i2psnark/java/" target="distclean" />
1134        <ant dir="apps/imagegen/" target="distclean" />
1135    </target>
1136
1137    <target name="pkg" depends="distclean, updater, preppkg, installer" />
1138
1139    <target name="pkg200" depends="distclean, updater200, preppkg, installer" />
1140
1141    <target name="pkgclean" depends="deletepkg-temp">
1142        <delete>
1143            <fileset dir="." includes="i2p.tar.bz2 install.jar i2pupdate.zip i2pupdate200.zip" />
1144        </delete>
1145    </target>
1146
1147    <target name="preppkg" depends="preppkg-linux, preppkg-freebsd, preppkg-osx, preppkg-windows, jbigi">
1148        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
1149        <copy todir="pkg-temp/lib/wrapper/solaris/">
1150            <fileset dir="installer/lib/wrapper/solaris/" excludes="*.txt" />
1151        </copy>
1152     <!-- Force using the new wrapper.jar.
1153          The new jar with the old windows binaries will output a warning on windows.
1154          We do not generate release files from this target.
1155          See preppkg-windows-only target below.
1156      -->
1157        <copy overwrite="true" file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
1158    </target>
1159
1160    <target name="preppkg-nowindows" depends="preppkg-linux, preppkg-freebsd, preppkg-osx, jbigi-nowindows">
1161        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
1162        <copy todir="pkg-temp/lib/wrapper/solaris/">
1163            <fileset dir="installer/lib/wrapper/solaris/" excludes="*.txt" />
1164        </copy>
1165        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
1166    </target>
1167
1168    <target name="preppkgRepack" depends="preppkg-linux, preppkg-freebsd, preppkg-osx, preppkg-windows, jbigi">
1169        <ant target="repack200" />
1170        <!-- no use doing repack200 on jbigi.jar -->
1171        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
1172        <copy todir="pkg-temp/lib/wrapper/solaris/">
1173            <fileset dir="installer/lib/wrapper/solaris/" excludes="*.txt" />
1174        </copy>
1175    </target>
1176
1177    <target name="preppkg-freebsd" depends="preppkg-unix">
1178        <copy todir="pkg-temp/lib/wrapper/freebsd/">
1179            <fileset dir="installer/lib/wrapper/freebsd/" excludes="*.txt" />
1180        </copy>
1181        <copy todir="pkg-temp/lib/wrapper/freebsd64/">
1182            <fileset dir="installer/lib/wrapper/freebsd64" excludes="*.txt" />
1183        </copy>
1184    </target>
1185
1186    <target name="preppkg-freebsd-only" depends="preppkg-freebsd, jbigi-freebsd-only" >
1187        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
1188        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
1189    </target>
1190
1191    <!-- only what is needed for debian, etc. -->
1192    <target name="preppkg-linux-only" depends="preppkg-linux, jbigi-linux-only" >
1193        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
1194        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
1195    </target>
1196
1197    <!-- This is the target called by debian/rules -->
1198    <target name="preppkg-unix" depends="preppkg-base, prep-script-translation" >
1199        <copy file="installer/resources/runplain.sh" todir="pkg-temp/" />
1200        <copy file="installer/resources/eepget" todir="pkg-temp/" />
1201        <copy file="installer/resources/i2prouter" todir="pkg-temp/" />
1202        <copy file="installer/resources/osid" todir="pkg-temp/" />
1203        <copy file="installer/resources/postinstall.sh" todir="pkg-temp/" />
1204        <copy todir="pkg-temp/man/">
1205            <fileset dir="installer/resources/man/" />
1206        </copy>
1207    </target>
1208
1209    <target name="preppkg-linux" depends="preppkg-linux-x86,preppkg-linux-nonx86" />
1210
1211    <target name="preppkg-linux-x86" depends="preppkg-unix">
1212        <copy todir="pkg-temp/lib/wrapper/linux/">
1213            <fileset dir="installer/lib/wrapper/linux/" excludes="*.txt" />
1214        </copy>
1215        <copy todir="pkg-temp/lib/wrapper/linux64/">
1216            <fileset dir="installer/lib/wrapper/linux64/" excludes="*.txt" />
1217        </copy>
1218    </target>
1219
1220    <target name="preppkg-linux-nonx86" depends="preppkg-unix">
1221        <copy todir="pkg-temp/lib/wrapper/linux-ppc/">
1222            <fileset dir="installer/lib/wrapper/linux-ppc/" excludes="*.txt" />
1223        </copy>
1224        <copy todir="pkg-temp/lib/wrapper/linux-armv5/">
1225            <fileset dir="installer/lib/wrapper/linux-armv5/" excludes="*.txt" />
1226        </copy>
1227        <copy todir="pkg-temp/lib/wrapper/linux-armv6/">
1228            <fileset dir="installer/lib/wrapper/linux-armv6/" excludes="*.txt" />
1229        </copy>
1230    </target>
1231
1232    <target name="preppkg-osx" depends="preppkg-unix">
1233        <!--<copy file="installer/resources/I2P Router Console.webloc" todir="pkg-temp/" />-->
1234        <copy todir="pkg-temp/Start I2P Router.app">
1235            <fileset dir="installer/resources/Start I2P Router.app" />
1236        </copy>
1237        <copy todir="pkg-temp/lib/wrapper/macosx/">
1238            <fileset dir="installer/lib/wrapper/macosx/" excludes="*.txt" />
1239        </copy>
1240        <copy file="installer/resources/net.i2p.router.plist.template" todir="pkg-temp/" />
1241        <copy file="installer/resources/install_i2p_service_osx.command" todir="pkg-temp/" />
1242        <copy file="installer/resources/uninstall_i2p_service_osx.command" todir="pkg-temp/" />
1243    </target>
1244
1245    <target name="preppkg-osx-only" depends="preppkg-osx, jbigi-osx-only" >
1246        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
1247        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
1248    </target>
1249
1250    <target name="preppkg-windows" depends="preppkg-base, preplicenses-windows, buildUtilityJar, buildexe">
1251        <copy file="build/i2p.exe" todir="pkg-temp/" failonerror="false" />
1252        <copy file="installer/resources/eepget.bat" todir="pkg-temp/" />
1253        <copy file="installer/resources/i2prouter.bat" todir="pkg-temp/" />
1254        <copy file="installer/resources/fixperms.bat" todir="pkg-temp/" />
1255        <copy file="installer/resources/install_i2p_service_winnt.bat" todir="pkg-temp/" />
1256        <copy file="installer/resources/set_config_dir_for_nt_service.bat" todir="pkg-temp/" />
1257        <copy file="installer/resources/uninstall_i2p_service_winnt.bat" todir="pkg-temp/" />
1258        <copy file="build/utility.jar" todir="pkg-temp" />
1259        <copy todir="pkg-temp/lib/wrapper/win32/">
1260            <fileset dir="installer/lib/wrapper/win32/" excludes="*.txt" />
1261        </copy>
1262        <copy todir="pkg-temp/lib/wrapper/win64/">
1263            <fileset dir="installer/lib/wrapper/win64/" excludes="*.txt" />
1264        </copy>
1265    </target>
1266
1267    <target name="preppkg-windows-only" depends="preppkg-windows, jbigi-windows-only">
1268        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
1269     <!-- Win binaries are down-rev from the others, so use the old jar.
1270          This will not overwrite, so preppkg (for all OSes) will get the new jar with
1271          the old binaries, which will probably work but will output a warning.
1272          The windows-only installer will get the correct jar.
1273        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
1274      -->
1275        <copy overwrite="true" file="installer/lib/wrapper/win-all/wrapper.jar" todir="pkg-temp/lib" />
1276    </target>
1277
1278    <!-- see targets below for conditional copying -->
1279    <target name="preppkg-base" depends="build, preplicenses, prepConsoleDocs, prepthemeupdates, prepCertificates, prepRouterInfos, copyjetty, copytomcat-unlesspkg, copyjstl-unlesspkg, copystandard-unlesspkg, truncatehistory">
1280        <!-- if updater200 was run previously, it left *.pack files in pkg-temp -->
1281        <!-- Also remove deletelist.txt used for updater only -->
1282        <delete>
1283            <fileset dir="pkg-temp" includes="**/*.jar.pack **/*.war.pack deletelist.txt" />
1284        </delete>
1285        <copy file="build/i2p.jar" todir="pkg-temp/lib/" />
1286        <copy file="build/i2ptunnel.jar" todir="pkg-temp/lib/" />
1287        <copy file="build/mstreaming.jar" todir="pkg-temp/lib/" />
1288        <copy file="build/streaming.jar" todir="pkg-temp/lib/" />
1289        <copy file="build/router.jar" todir="pkg-temp/lib/" />
1290        <copy file="build/desktopgui.jar" todir="pkg-temp/lib/" />
1291        <copy file="build/routerconsole.jar" todir="pkg-temp/lib/" />
1292        <!-- Updated in 0.9.28; name without version so we can overwrite if we upgrade  -->
1293        <copy file="build/jrobin.jar" tofile="pkg-temp/lib/jrobin.jar" />
1294        <copy file="build/sam.jar" todir="pkg-temp/lib/" />
1295        <copy file="build/BOB.jar" todir="pkg-temp/lib/" />
1296        <copy file="build/systray.jar" todir="pkg-temp/lib" />
1297        <copy file="build/i2psnark.jar" todir="pkg-temp/lib/" />
1298        <copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
1299        <copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
1300        <copy file="build/addressbook.jar" todir="pkg-temp/lib/" />
1301        <copy file="build/susimail.war" todir="pkg-temp/webapps/" />
1302        <copy file="build/susidns.war" todir="pkg-temp/webapps/" />
1303        <copy file="build/imagegen.war" todir="pkg-temp/webapps/" />
1304        <copy file="build/i2psnark.war" todir="pkg-temp/webapps/" />
1305        <copy file="apps/i2psnark/i2psnark.config" todir="pkg-temp/" />
1306        <copy file="installer/resources/blocklist.txt" todir="pkg-temp/" />
1307        <copy file="installer/resources/clients.config" todir="pkg-temp/" />
1308        <copy file="installer/resources/i2ptunnel.config" todir="pkg-temp/" />
1309        <copy file="installer/resources/systray.config" todir="pkg-temp/" />
1310        <copy file="installer/resources/wrapper.config" todir="pkg-temp/" />
1311        <copy file="installer/resources/hosts.txt" todir="pkg-temp/" />
1312        <copy file="INSTALL-headless.txt" todir="pkg-temp/" />
1313        <mkdir dir="pkg-temp/scripts" />
1314        <copy file="apps/proxyscript/i2pProxy.pac" todir="pkg-temp/scripts/" />
1315        <copy file="apps/apparmor/home.i2p.i2prouter" todir="pkg-temp/scripts/" />
1316        <copy file="installer/resources/startconsole.html" todir="pkg-temp/docs/" />
1317        <copy file="installer/resources/start.ico" todir="pkg-temp/docs/" />
1318        <copy file="installer/resources/console.ico" todir="pkg-temp/docs/" />
1319        <copy file="installer/resources/uninstall.ico" todir="pkg-temp/docs/" />
1320        <!-- Eepsite stuff here -->
1321        <mkdir dir="pkg-temp/eepsite" />
1322        <copy todir="pkg-temp/eepsite/" >
1323            <fileset dir="installer/resources/eepsite/" excludes="**/.placeholder" />
1324        </copy>
1325        <copy todir="pkg-temp/eepsite/docroot/help/lib/" >
1326            <fileset dir="installer/resources/icons/flags/" includes="cn.png de.png es.png fr.png ir.png it.png jp.png nl.png ru.png se.png us.png" />
1327        </copy>
1328        <copy file="installer/resources/themes/console/images/favicon.ico" tofile="pkg-temp/eepsite/docroot/favicon.ico" />
1329        <copy todir="pkg-temp/docs/icons/flags" >
1330          <fileset dir="installer/resources/icons/flags" />
1331        </copy>
1332        <copy todir="pkg-temp/docs/icons/flags48x48" >
1333          <fileset dir="installer/resources/icons/flags48x48" />
1334        </copy>
1335    </target>
1336
1337    <target name="copyjetty" depends="copyjetty-unlesspkg" >
1338        <copy file="build/jetty-i2p.jar" todir="pkg-temp/lib" />
1339    </target>
1340
1341    <target name="copyjetty-unlesspkg" unless="${with-libjetty9-java}" >
1342        <copy todir="pkg-temp/lib" >
1343            <fileset dir="build" includes="javax.servlet.jar jetty*.jar org.mortbay.*.jar" excludes="jetty-i2p.jar" />
1344        </copy>
1345    </target>
1346
1347    <target name="settomcatprop" >
1348        <condition property="with-libtomcat-java" >
1349            <or>
1350                <istrue value="${with-libtomcat6-java}" />
1351                <istrue value="${with-libtomcat7-java}" />
1352                <istrue value="${with-libtomcat8-java}" />
1353            </or>
1354        </condition>
1355    </target>
1356
1357    <target name="copytomcat-unlesspkg" depends="settomcatprop" unless="${with-libtomcat-java}" >
1358        <copy todir="pkg-temp/lib" >
1359            <fileset dir="build" includes="commons*.jar jasper*.jar javax*.jar" />
1360        </copy>
1361    </target>
1362
1363    <!--
1364       jstl.jar
1365       glassfish-javaee.jar has ancient and conflicting classes, e.g. javax.mail,
1366       and libjstl1.1-java isn't sufficient,
1367       so we only skip it with libtaglibs-standard
1368    -->
1369    <target name="copyjstl-unlesspkg" unless="${with-libtaglibs-standard}" >
1370        <copy file="apps/susidns/src/lib/jstl.jar" todir="pkg-temp/lib/" />
1371    </target>
1372
1373    <!-- standard.jar -->
1374    <target name="copystandard-unlesspkg" depends="copystandard-unlesspkg1, copystandard-unlesspkg2" />
1375    <target name="copystandard-unlesspkg1" >
1376        <condition property="with-any-standard-pkg" >
1377            <or>
1378                <istrue value="${with-libtaglibs-standard}" />
1379                <istrue value="${with-glassfish-javaee}" />
1380                <istrue value="${libjakarta-taglibs-standard-java}" />
1381            </or>
1382
1383        </condition>
1384    </target>
1385    <target name="copystandard-unlesspkg2" unless="${with-any-standard-pkg}" >
1386        <copy file="apps/susidns/src/lib/standard.jar" todir="pkg-temp/lib/" />
1387    </target>
1388
1389    <!-- does NOT include launch4j licenses for Windows builds -->
1390    <target name="preplicenses" depends="preplicenses-unlesspkg" >
1391        <copy file="LICENSE.txt" todir="pkg-temp/" />
1392        <copy todir="pkg-temp/licenses/" >
1393          <fileset dir="licenses/" />
1394        </copy>
1395        <copy file="apps/imagegen/identicon/README.md" tofile="pkg-temp/licenses/LICENSE-Identicon.txt" />
1396        <copy file="apps/desktopgui/LICENSE" tofile="pkg-temp/licenses/LICENSE-DesktopGUI.txt" />
1397    </target>
1398
1399    <target name="preplicenses-unlesspkg" depends="settomcatprop" unless="${with-libtomcat-java}" >
1400        <copy file="apps/jetty/apache-tomcat-8.5.30/NOTICE" tofile="pkg-temp/licenses/NOTICE-Tomcat.txt" />
1401    </target>
1402
1403    <!-- DOES include launch4j licenses for Windows builds -->
1404    <target name="preplicenses-windows" depends="preplicenses">
1405        <!--
1406              The license in launch4j/ is a BSD license for launch4j
1407              The license in launch4j/head is a MIT license for the code that is actually wrapped around the jars
1408              So we include the MIT one in our binary package
1409         -->
1410        <copy file="installer/lib/launch4j/head/LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-Launch4j.txt" />
1411        <!--  Not sure if these are used or should be included -->
1412        <copy file="installer/lib/launch4j/lib/foxtrot.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-Foxtrot.txt" />
1413        <copy file="installer/lib/launch4j/lib/JGoodies.Forms.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-JGoodies-Forms.txt" />
1414        <copy file="installer/lib/launch4j/lib/JGoodies.Looks.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-JGoodies-Looks.txt" />
1415        <copy file="installer/lib/launch4j/lib/XStream.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-XStream.txt" />
1416    </target>
1417
1418    <target name="prepthemeupdates">
1419        <copy todir="pkg-temp/docs/themes/" >
1420            <fileset dir="installer/resources/themes/" />
1421        </copy>
1422    </target>
1423
1424    <!-- SSL Certs -->
1425    <target name="prepCertificates">
1426        <copy todir="pkg-temp/certificates/" >
1427          <fileset dir="installer/resources/certificates/" />
1428        </copy>
1429    </target>
1430
1431    <condition property="no.bundle.routerInfos">
1432        <isfalse value="${bundle.routerInfos}" />
1433    </condition>
1434
1435    <target name="prepRouterInfos" depends="buildrouter, buildTools" unless="no.bundle.routerInfos">
1436        <delete dir="pkg-temp/netDb" />
1437        <mkdir dir="pkg-temp/netDb" />
1438        <java classname="net.i2p.router.networkdb.kademlia.BundleRouterInfos" fork="true" failonerror="true">
1439            <classpath>
1440                <pathelement location="build/i2p.jar" />
1441                <pathelement location="core/java/build/gnu-getopt.jar" />
1442                <pathelement location="build/router.jar" />
1443                <pathelement location="build/tools.jar" />
1444            </classpath>
1445            <arg value="-i" />
1446            <arg value="${bundle.routerInfos.i2pConfigDir}" />
1447            <arg value="-o" />
1448            <arg value="pkg-temp/netDb" />
1449            <arg value="-c" />
1450            <arg value="${bundle.routerInfos.count}" />
1451        </java>
1452    </target>
1453
1454    <target name="-areRouterInfosEnabled">
1455        <fail message="Option requires &quot;bundle.routerInfos&quot; to be configured. Please read &quot;build.properties&quot; for more info." >
1456            <condition>
1457                <isfalse value="${bundle.routerInfos}" />
1458            </condition>
1459        </fail>
1460    </target>
1461
1462    <target name="i2pseeds" depends="-setepoch, -areRouterInfosEnabled, prepRouterInfos">
1463        <delete file="i2pseeds.zip" />
1464        <delete file="i2pseeds.su3" />
1465        <zip destfile="i2pseeds.zip" basedir="pkg-temp/netDb" whenempty="fail" />
1466        <su3sign infile="i2pseeds.zip" sigtype="RESEED" outfile="i2pseeds.su3" su3.ver="${epoch}" />
1467    </target>
1468
1469    <!-- this is no longer required, izpack 4.3.0 supports headless installs with java -jar i2pinstall.exe -console -->
1470    <!-- and this is no longer used by the SlackBuild -->
1471    <target name="tarball" depends="preppkg">
1472        <tar compression="bzip2" destfile="i2p.tar.bz2">
1473            <tarfileset dir="pkg-temp" includes="**/*" prefix="i2p" />
1474        </tar>
1475    </target>
1476
1477    <target name="deletepkg-temp">
1478        <delete dir="pkg-temp" />
1479        <delete dir="./pkg-mavencentral" />
1480    </target>
1481
1482    <!-- readme and proxy error page files, initialNews.xml files, GeoIP files, and flag icons -->
1483    <target name="prepConsoleDocs" depends="prepConsoleDocUpdates, prepgeoupdate" >
1484        <copy todir="pkg-temp/docs/initialNews/">
1485          <fileset dir="installer/resources/initialNews/" />
1486        </copy>
1487        <!-- ensure the proxy files have the correct line endings -->
1488        <fixcrlf srcdir="pkg-temp/docs" includes="*.ht" encoding="utf8" eol="crlf" />
1489    </target>
1490
1491    <!-- readme and proxy error page files -->
1492    <target name="prepConsoleDocUpdates">
1493        <copy todir="pkg-temp/docs/" >
1494          <fileset dir="installer/resources/readme/" includes="readme*.html" />
1495          <fileset dir="installer/resources/proxy/" includes="*.ht" />
1496          <!-- lang_ar.png added in 0.8.4; a1,a2,je, and eu.png added in 0.8.9; gg.png added in 0.8.10;
1497               im.png added in 0.8.12; cw.png added in 0.9.5; ap,bl,bq,ss,sx added in 0.9.21;
1498               lang_gl added in 0.9.28; a0.png added in 0.9.31 -->
1499          <fileset dir="installer/resources/" includes="icons/flags/lang_ar.png icons/flags/gg.png icons/flags/je.png icons/flags/eu.png icons/flags/im.png icons/flags/a1.png icons/flags/a2.png icons/flags/cw.png icons/flags/ap.png icons/flags/bl.png icons/flags/bq.png icons/flags/ss.png icons/flags/sx.png icons/flags/lang_gl.png icons/flags/a0.png" />
1500          <!-- flags48x48 added in 0.9.32 -->
1501          <fileset dir="installer/resources/" includes="icons/flags48x48/*" />
1502        </copy>
1503    </target>
1504
1505    <target name="consoleDocs" depends="deletepkg-temp, prepConsoleDocs">
1506        <zip destfile="docs.zip" basedir="pkg-temp" whenempty="fail" />
1507    </target>
1508
1509    <target name="copyJavadoc" depends="javadoc">
1510        <copy todir="pkg-temp/docs/javadoc" >
1511          <fileset dir="build/javadoc/" />
1512        </copy>
1513    </target>
1514
1515    <target name="updater200" depends="prepupdate, preplicenses, pack200, zipit200" />
1516    <target name="updater200WithJetty" depends="prepjupdate, preplicenses, pack200, zipit200" />
1517    <target name="updater200WithJettyAndJbigi" depends="prepjupdate, prepjbigiupdate, preplicenses, pack200, zipit200" />
1518    <target name="updater200WithJettyAndGeoIP" depends="prepjupdate, prepgeoupdate, preplicenses, pack200, zipit200" />
1519    <target name="updater200WithJettyFixes" depends="prepjupdatefixes, preplicenses, pack200, zipit200" />
1520    <target name="updater200WithJettyFixesAndJbigi" depends="prepjupdatefixes, prepjbigiupdate, preplicenses, pack200, zipit200" />
1521    <target name="updater200WithJbigi" depends="prepupdate, prepjbigiupdate, preplicenses, pack200, zipit200" />
1522    <target name="updater" depends="prepupdate, preplicenses, zipit" />
1523    <target name="updaterRepack" depends="prepupdate, preplicenses, repack200, zipit" />
1524    <target name="updaterWithJavadoc" depends="prepupdate, preplicenses, copyJavadoc, zipit" />
1525    <target name="updater200WithJavadoc" depends="prepupdate, preplicenses, copyJavadoc, pack200, zipit200" />
1526    <target name="updaterWithJavadocAndJetty" depends="prepjupdate, preplicenses, copyJavadoc, zipit" />
1527    <target name="updater200WithJavadocAndJetty" depends="prepjupdate, preplicenses, copyJavadoc, pack200, zipit200" />
1528    <target name="updaterWithGeoIP" depends="prepupdate, prepgeoupdate, preplicenses, zipit" />
1529    <target name="updaterWithJetty" depends="prepjupdate, preplicenses, zipit" />
1530    <target name="updaterWithJettyRepack" depends="prepjupdate, preplicenses, repack200, zipit" />
1531    <target name="updaterWithJettyAndJbigiRepack" depends="prepjupdate, prepjbigiupdate, preplicenses, repack200, zipit" />
1532    <target name="updaterWithJettyAndGeoIPRepack" depends="prepjupdate, prepgeoupdate, preplicenses, repack200, zipit" />
1533    <target name="updaterWithJettyFixes" depends="prepjupdatefixes, preplicenses, zipit" />
1534    <target name="updaterWithJettyFixesAndJbigi" depends="prepjupdatefixes, prepjbigiupdate, preplicenses, zipit" />
1535    <target name="updaterWithJettyFixesAndGeoIP" depends="prepjupdatefixes, prepgeoupdate, preplicenses, zipit" />
1536    <target name="updaterWithJbigi" depends="prepupdate, prepjbigiupdate, preplicenses, zipit" />
1537    <target name="updaterSmall" depends="prepupdateSmall, zipit" />
1538    <target name="updaterRouter" depends="prepupdateRouter, zipit" />
1539
1540    <target name="-sign-update" depends="buildrouter">
1541        <su3sign infile="i2pupdate200.zip" sigtype="ROUTER" outfile="i2pupdate.su3" su3.ver="${full.version}" />
1542    </target>
1543
1544    <target name="signed-updater200" depends="-pre-sign, updater200, -sign-update" />
1545    <target name="signed-updater200WithJetty" depends="-pre-sign, updater200WithJetty, -sign-update" />
1546    <target name="signed-updater200WithJettyAndGeoIP" depends="-pre-sign, updater200WithJettyAndGeoIP, -sign-update" />
1547    <target name="signed-updater200WithJavadoc" depends="-pre-sign, updater200WithJavadoc, -sign-update" />
1548    <target name="signed-updater200WithJavadocAndJetty" depends="-pre-sign, updater200WithJavadocAndJetty, -sign-update" />
1549
1550    <target name="zipit" depends="getReleaseNumber">
1551        <!--
1552             As of release 0.8.8, the router will enforce a zipfile comment equal to the
1553             version number in the sud/su2 header, since the version in the header is NOT
1554             covered by the signature.
1555         -->
1556        <zip destfile="i2pupdate.zip" basedir="pkg-temp" whenempty="fail" comment="${release.number}" />
1557       <!-- just a test, makes almost no difference
1558        <tar destfile="i2pupdate.tgz" basedir="pkg-temp" compression="gzip" />
1559        <tar destfile="i2pupdate.tbz" basedir="pkg-temp" compression="bzip2" />
1560       -->
1561    </target>
1562
1563    <target name="zipit200" depends="getReleaseNumber" >
1564        <zip destfile="i2pupdate200.zip" basedir="pkg-temp" whenempty="fail" comment="${release.number}" />
1565    </target>
1566
1567    <target name="pack200">
1568        <!-- pack200 will only pack to a .pack file, and only from a .jar file, so we put another .jar on the end -->
1569        <!-- can't pack an empty jar or one without classes, it will fail to unpack on Java 5;
1570          -  see http://bugs.sun.com/view_bug.do?bug_id=6712743
1571          -->
1572        <!-- *nix here -->
1573        <exec executable="sh" osfamily="unix" failonerror="true">
1574            <arg value="-c" />
1575            <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" />
1576        </exec>
1577        <exec executable="sh" osfamily="mac" failonerror="true">
1578            <arg value="-c" />
1579            <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" />
1580        </exec>
1581        <!-- windoz here : i admit, i hate escaped symbols in xml, indeed = =! -->
1582        <exec executable="cmd" osfamily="windows" failonerror="true">
1583            <arg value="/c" />
1584            <!-- TODO implement fix above -->
1585            <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" />
1586        </exec>
1587        <exec executable="cmd" osfamily="windows" failonerror="true">
1588                <arg value="/c" />
1589                <arg value="for %i in (pkg-temp\lib\*.jar) do pack200 -g %i.pack %i &amp;&amp; del %i" />
1590        </exec>
1591    </target>
1592
1593    <!-- saves about 1% on average (more on jars with multiple compiled po files since they have lots of common strings) -->
1594    <target name="repack200">
1595        <!-- pack200 will only repack a .jar file, so we put another .jar on the end -->
1596        <!-- *nix here -->
1597        <exec executable="sh" osfamily="unix" failonerror="true">
1598            <arg value="-c" />
1599            <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" />
1600        </exec>
1601        <exec executable="sh" osfamily="mac" failonerror="true">
1602            <arg value="-c" />
1603            <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" />
1604        </exec>
1605        <!-- windoz here : i admit, i hate escaped symbols in xml, indeed = =! -->
1606        <exec executable="cmd" osfamily="windows" failonerror="true">
1607            <arg value="/c" />
1608            <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" />
1609        </exec>
1610        <exec executable="cmd" osfamily="windows" failonerror="true">
1611                <arg value="/c" />
1612                <arg value="for %i in (pkg-temp\lib\*.jar) do pack200 -r %i" />
1613        </exec>
1614    </target>
1615
1616    <target name="prepupdate" depends="build2, prepupdateSmall, prepConsoleDocUpdates, prepCertificates, prep-script-translation, truncatehistory">
1617        <copy file="build/BOB.jar" todir="pkg-temp/lib/" />
1618        <copy file="build/sam.jar" todir="pkg-temp/lib/" />
1619        <copy file="build/i2psnark.jar" todir="pkg-temp/lib" />
1620        <!-- include systray changes in 0.7.5 -->
1621        <copy file="build/systray.jar" todir="pkg-temp/lib/" />
1622       <!-- removed from updater in 0.9, added back in 0.9.26 -->
1623        <copy file="build/desktopgui.jar" todir="pkg-temp/lib/" />
1624        <copy file="build/susimail.war" todir="pkg-temp/webapps/" />
1625        <copy file="build/susidns.war" todir="pkg-temp/webapps/" />
1626        <copy file="build/imagegen.war" todir="pkg-temp/webapps/" />
1627        <!-- as of 0.7.12; last changed in 0.9; removed from update in 0.9.26 -->
1628      <!--
1629        <copy file="apps/susidns/src/lib/jstl.jar" todir="pkg-temp/lib/" />
1630        <copy file="apps/susidns/src/lib/standard.jar" todir="pkg-temp/lib/" />
1631       -->
1632        <copy file="build/i2psnark.war" todir="pkg-temp/webapps/" />
1633        <copy file="installer/resources/deletelist.txt" todir="pkg-temp/" />
1634        <copy file="installer/resources/blocklist.txt" todir="pkg-temp/" />
1635        <copy todir="pkg-temp/man/">
1636            <fileset dir="installer/resources/man/" />
1637        </copy>
1638    </target>
1639
1640    <target name="truncatehistory">
1641        <copy file="history.txt" todir="pkg-temp/" />
1642        <!-- the following overwrites history.txt on unix to shrink the update file -->
1643        <copy file="history.txt" tofile="pkg-temp/history.txt" overwrite="true">
1644            <filterchain>
1645                <headfilter lines="1500" />
1646            </filterchain>
1647        </copy>
1648        <concat append="true" destfile="pkg-temp/history.txt">&#10;&#10;----------------&#10;&#10;EARLIER HISTORY IS AVAILABLE IN THE SOURCE PACKAGE</concat>
1649    </target>
1650
1651    <target name="prepupdateSmall" depends="buildSmall, prepupdateRouter, prepjupdatefixes, prepthemeupdates">
1652        <copy file="build/i2ptunnel.jar" todir="pkg-temp/lib/" />
1653        <copy file="build/mstreaming.jar" todir="pkg-temp/lib/" />
1654        <copy file="build/streaming.jar" todir="pkg-temp/lib/" />
1655        <copy file="build/routerconsole.jar" todir="pkg-temp/lib/" />
1656        <!-- Updated in 0.9.28 -->
1657        <!-- name without version so we can overwrite if we upgrade  -->
1658        <copy file="build/jrobin.jar" tofile="pkg-temp/lib/jrobin.jar" />
1659        <copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
1660        <copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
1661        <copy file="build/addressbook.jar" todir="pkg-temp/lib/" />
1662        <copy file="build/addressbook.war" todir="pkg-temp/webapps/" />
1663        <!-- decapitalized the file in 0.7.8 -->
1664        <copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
1665        <!-- small enough to include for now -->
1666        <copy file="installer/resources/geoipv6.dat.gz" todir="pkg-temp/geoip/" />
1667        <copy file="installer/resources/continents.txt" todir="pkg-temp/geoip/" />
1668      <!--
1669        <copy file="installer/resources/public-suffix-list.txt" todir="pkg-temp/geoip/" />
1670       -->
1671    </target>
1672
1673    <target name="prepupdateRouter" depends="buildrouter, deletepkg-temp">
1674        <copy file="build/i2p.jar" todir="pkg-temp/lib/" />
1675        <copy file="build/router.jar" todir="pkg-temp/lib/" />
1676    </target>
1677
1678    <!-- jbigi.jar -->
1679    <target name="prepjbigiupdate" depends="jbigi">
1680        <copy file="build/jbigi.jar" todir="pkg-temp/lib/" />
1681    </target>
1682
1683    <!-- GeoIP files -->
1684    <target name="prepgeoupdate" depends="prepgeoupdate-unlesspkg" >
1685        <copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
1686        <copy file="installer/resources/continents.txt" todir="pkg-temp/geoip/" />
1687      <!--
1688        <copy file="installer/resources/public-suffix-list.txt" todir="pkg-temp/geoip/" />
1689       -->
1690    </target>
1691
1692    <!-- GeoIP files, set withGeoIPDatabase=true in override.properties to prevent -->
1693    <!-- As of 0.9.26, the files are not included in Debian/Ubuntu builds. -->
1694    <target name="prepgeoupdate-unlesspkg" unless="${with-geoip-database}" >
1695        <copy file="installer/resources/geoip.txt" todir="pkg-temp/geoip/" />
1696        <copy file="installer/resources/geoipv6.dat.gz" todir="pkg-temp/geoip/" />
1697    </target>
1698
1699    <!-- All jetty jars required for update.
1700         TODO do we need to bother updating jasper?
1701      -->
1702    <target name="prepjupdate" depends="prepupdate, buildWEB">
1703        <copy todir="pkg-temp/lib" >
1704            <fileset dir="build" includes="commons*.jar jasper*.jar javax*.jar jetty*.jar jsp*.jar org.mortbay.*.jar" />
1705        </copy>
1706        <!--  We have to package the new eepsite files for MigrateJetty.java, but we
1707              can't overwrite an existing eepsite dir in a non-split configuration.
1708          -->
1709        <copy todir="pkg-temp/eepsite-jetty9" >
1710            <fileset dir="installer/resources/eepsite" includes="*.xml contexts/* etc/*" />
1711        </copy>
1712    </target>
1713
1714    <target name="delete-j6-update">
1715        <delete dir="pkg-temp/eepsite-jetty9" />
1716    </target>
1717
1718    <!-- Jetty 6 I2P logging addons, not really fixes -->
1719    <target name="prepjupdatefixes" depends="buildWEB">
1720        <copy file="build/jetty-i2p.jar" todir="pkg-temp/lib/" />
1721    </target>
1722
1723    <target name="util-list-changes" depends="checkForMtn" if="mtn.available" >
1724        <exec executable="mtn" outputproperty="workspace.changes.util" errorproperty="mtn.error.util" failifexecutionfails="false" >
1725            <arg value="list" />
1726            <arg value="changed" />
1727            <arg value="core/java/src/net/i2p/util" />
1728        </exec>
1729        <!-- \n in an attribute value generates an invalid manifest -->
1730        <exec executable="tr" inputstring="${workspace.changes.util}" outputproperty="workspace.changes.util.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
1731            <arg value="-s" />
1732            <arg value="[:space:]" />
1733            <arg value="," />
1734        </exec>
1735    </target>
1736
1737    <target name="izpack-patches" >
1738            <taskdef name="izpack"
1739                     classpath="${basedir}/installer/lib/izpack/patches.jar:${basedir}/installer/lib/izpack/standalone-compiler.jar"
1740                     classname="com.izforge.izpack.ant.IzPackTask" />
1741        <jar destfile="${basedir}/installer/lib/izpack/patches.jar"
1742             basedir="${basedir}/installer/lib/izpack/patches" />
1743    </target>
1744
1745    <target name="buildUtilityJar" depends="buildCore">
1746        <ant dir="installer/java" target="build" />
1747    </target>
1748
1749    <target name="installer" depends="preppkg, buildProperties, util-list-changes, izpack-patches, buildUtilityJar" >
1750        <!--
1751          Force 1.5 pack200 output
1752          Doesnt work!
1753          http://jira.codehaus.org/browse/IZPACK-404
1754          http://forums.sun.com/thread.jspa?threadID=773439
1755          http://bfo.co.uk/blog/2010/05/13/combining_ant_jar_signatures_and_pack200.html
1756        <property name="com.sun.java.util.jar.pack.package.majver" value="150" />
1757        <property name="com.sun.java.util.jar.pack.package.minver" value="7" />
1758        -->
1759        <izpack input="${basedir}/installer/install.xml" output="${basedir}/install.jar" installerType="standard" basedir="${basedir}" />
1760
1761        <ant target="installerexe" />
1762    </target>
1763
1764    <!-- this makes i2pinstall.exe from install.jar -->
1765    <target name="installerexe" depends="launch4j" unless="noExe">
1766        <echo message="See the file &quot;build.properties&quot; if this step fails." />
1767        <!-- now the installer exe -->
1768        <launch4j configFile="./installer/i2pinstaller.xml" />
1769        <!-- thazzit -->
1770    </target>
1771
1772    <!-- Custom installers -->
1773    <target name="installer-nowindows" depends="clean, preppkg-nowindows, izpack-patches" >
1774        <fixcrlf srcdir="pkg-temp" includes="*.config **/*.xml **/*.properties **/*.txt scripts/*" encoding="utf8" eol="lf" />
1775        <izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${full.version}.jar" installerType="standard" basedir="${basedir}" />
1776    </target>
1777
1778
1779    <target name="installer-freebsd" depends="clean, preppkg-freebsd-only, izpack-patches" >
1780        <fixcrlf srcdir="pkg-temp" includes="*.config **/*.xml **/*.properties **/*.txt scripts/*" encoding="utf8" eol="lf" />
1781        <izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${full.version}_freebsd-only.jar" installerType="standard" basedir="${basedir}" />
1782    </target>
1783
1784    <target name="installer-linux" depends="clean, preppkg-linux-only, izpack-patches" >
1785        <fixcrlf srcdir="pkg-temp" includes="*.config **/*.xml **/*.properties **/*.txt scripts/*" encoding="utf8" eol="lf" />
1786        <izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${full.version}_linux-only.jar" installerType="standard" basedir="${basedir}" />
1787    </target>
1788
1789
1790    <target name="installer-osx" depends="clean, checkForIzpack2App, preppkg-osx-only, izpack-patches">
1791        <fixcrlf srcdir="pkg-temp" includes="*.config **/*.xml **/*.properties **/*.txt scripts/*" encoding="utf8" eol="lf" />
1792        <mkdir dir="pkg-temp/osx" />
1793        <izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${full.version}_osx-only.jar" installerType="standard" basedir="${basedir}" />
1794        <ant target="installer2app" />
1795        <delete dir="pkg-temp/osx" />
1796    </target>
1797
1798    <target name="checkForIzpack2App">
1799        <!-- we'll set the izpack2app binary name if it's not been set elsewhere yet -->
1800        <property name="izpack2app.binary" value="${user.home}/IzPack/utils/wrappers/izpack2app/izpack2app.py" />
1801        <available property="izpack2app.available" file="${izpack2app.binary}" />
1802    </target>
1803
1804    <target name="installer2app" if="izpack2app.available">
1805        <mkdir dir="pkg-temp/osx" />
1806        <exec executable="python" failonerror="true">
1807            <arg value="${izpack2app.binary}" />
1808            <arg value="${basedir}/i2pinstall_${full.version}_osx-only.jar" />
1809            <arg value="${basedir}/pkg-temp/osx/i2p-${full.version}_osx-install.app" />
1810        </exec>
1811
1812        <tar longfile="gnu" destfile="${basedir}/i2pinstall_${full.version}_osx.tar.bz2" compression="bzip2">
1813            <tarfileset dir="${basedir}/pkg-temp/osx/i2p-${full.version}_osx-install.app" prefix="/i2p-${full.version}_osx-install.app" filemode="644">
1814                <include name="**/**" />
1815                <exclude name="Contents/MacOS/*" />
1816            </tarfileset>
1817            <tarfileset dir="${basedir}/pkg-temp/osx/i2p-${full.version}_osx-install.app" prefix="/i2p-${full.version}_osx-install.app" filemode="755">
1818                <include name="Contents/MacOS/*" />
1819            </tarfileset>
1820        </tar>
1821    </target>
1822
1823    <!-- call between installer-xxx and installer-windows -->
1824    <target name="delete-nonwindows">
1825        <delete dir="pkg-temp/lib/wrapper/" />
1826        <delete dir="pkg-temp/locale/" />
1827        <delete dir="pkg-temp/man/" />
1828        <delete dir="pkg-temp/Start I2P Router.app/" />
1829        <delete dir="pkg-temp" includes="eepget i2prouter INSTALL-headless.txt osid postinstall.sh runplain.sh" />
1830    </target>
1831
1832    <target name="installer-windows" depends="clean, preppkg-windows-only, util-list-changes, izpack-patches, buildUtilityJar" >
1833        <fixcrlf srcdir="pkg-temp" includes="*.config *.bat *.cmd **/*.xml **/*.properties **/*.txt scripts/*" encoding="utf8" eol="crlf"/>
1834        <izpack input="${basedir}/installer/install.xml" output="${basedir}/install.jar" installerType="standard" basedir="${basedir}" />
1835        <ant target="installerexe" />
1836        <delete file="${basedir}/install.jar" />
1837        <move file="${basedir}/i2pinstall.exe" tofile="${basedir}/i2pinstall_${full.version}_windows.exe" />
1838    </target>
1839
1840    <!-- this is broken as installer-xxx targets may delete (or not delete) things in pkg-temp -->
1841    <target name="installer-all" depends="installer-freebsd, installer-linux, installer-osx, installer-windows, installer-nowindows, installer" >
1842    </target>
1843    <!-- end custom installers -->
1844
1845    <!-- unit tests -->
1846    <target name="buildTest">
1847        <ant dir="core/java/" target="jarTest" />
1848        <ant dir="router/java/" target="jarTest" />
1849        <copy file="core/java/build/i2ptest.jar" todir="build" />
1850        <copy file="router/java/build/routertest.jar" todir="build" />
1851        <!-- broken -->
1852      <!--
1853        <ant dir="apps/ministreaming/java/" target="junit.compileTest" />
1854        <ant dir="apps/streaming/java/" target="junit.compileTest" />
1855       -->
1856    </target>
1857    <target name="prepTest" depends="prepupdate, buildTest">
1858        <!-- overwrite i2p.jar and router.jar with the test versions -->
1859        <copy file="build/i2ptest.jar" tofile="pkg-temp/lib/i2p.jar" overwrite="true" />
1860        <copy file="build/routertest.jar" tofile="pkg-temp/lib/router.jar" overwrite="true" />
1861    </target>
1862    <target name="updateTest" depends="prepTest, zipit" />
1863    <target name="junit.test" depends="buildProperties, jbigi" >
1864        <ant dir="core/java/" target="junit.test" />
1865        <ant dir="router/java/" target="junit.test" />
1866        <ant dir="apps/ministreaming/java/" target="junit.test" />
1867        <ant dir="apps/streaming/java/" target="junit.test" />
1868    </target>
1869    <target name="scalatest.test" depends="buildProperties, jbigi" >
1870        <ant dir="core/java/" target="scalatest.test" />
1871        <!-- note there are no router scala tests yet -->
1872        <ant dir="router/java/" target="scalatest.test" />
1873    </target>
1874    <!-- both junit and scala -->
1875    <target name="test" depends="testCore, testRouter, testMinistreaming, testStreaming" />
1876    <target name="testCore" depends="buildProperties, jbigi" >
1877        <ant dir="core/java/" target="test" />
1878    </target>
1879    <target name="testRouter" depends="buildProperties, jbigi" >
1880        <ant dir="router/java/" target="test" />
1881    </target>
1882    <target name="testMinistreaming" depends="buildProperties, jbigi" >
1883        <ant dir="apps/ministreaming/java/" target="test" />
1884    </target>
1885    <target name="testStreaming" depends="buildProperties" >
1886        <ant dir="apps/streaming/java/" target="test" />
1887    </target>
1888    <target name="scalatest.report" depends="buildProperties" >
1889        <ant dir="core/java/" target="scalatest.report" />
1890        <ant dir="router/java/" target="scalatest.report" />
1891    </target>
1892    <target name="junit.report" depends="buildProperties" >
1893        <ant dir="core/java/" target="junit.report" />
1894        <ant dir="router/java/" target="junit.report" />
1895        <ant dir="apps/ministreaming/java/" target="junit.report" />
1896        <ant dir="apps/streaming/java/" target="junit.report" />
1897    </target>
1898    <target name="clover.report" depends="buildProperties" if="with.clover">
1899        <ant dir="core/java/" target="clover.report" />
1900        <ant dir="router/java/" target="clover.report" />
1901        <ant dir="apps/ministreaming/java" target="clover.report" />
1902        <ant dir="apps/streaming/java" target="clover.report" />
1903    </target>
1904    <target name="cobertura.report" depends="buildProperties" if="with.cobertura">
1905        <ant dir="core/java/" target="cobertura.report" />
1906        <ant dir="router/java/" target="cobertura.report" />
1907        <ant dir="apps/ministreaming/java" target="cobertura.report" />
1908        <ant dir="apps/streaming/java" target="cobertura.report" />
1909    </target>
1910    <target name="test.report" depends="junit.report, scalatest.report, clover.report, cobertura.report"/>
1911    <target name="fulltest" depends="buildProperties, jbigi" >
1912        <ant dir="core/java/" target="fulltest" />
1913        <ant dir="router/java/" target="fulltest" />
1914        <ant dir="apps/ministreaming/java" target="fulltest" />
1915        <ant dir="apps/streaming/java" target="fulltest" />
1916    </target>
1917    <target name="jenkins.cobertura.report" depends="cobertura.report">
1918        <!--
1919             The jenkins cobertura plugin couldn't find the source files.
1920         -->
1921        <replaceregexp byline="true" file="reports/core/cobertura/coverage.xml"
1922            match='filename="net' replace='filename="core/java/src/net'/>
1923        <replaceregexp byline="true" file="reports/core/cobertura/coverage.xml"
1924            match="&lt;source&gt;./src" replace='&lt;source&gt;./core/java/src'/>
1925
1926        <replaceregexp byline="true" file="reports/router/cobertura/coverage.xml"
1927            match='filename="net' replace='filename="router/java/src/net'/>
1928        <replaceregexp byline="true" file="reports/router/cobertura/coverage.xml"
1929            match="&lt;source&gt;./src" replace="&lt;source&gt;router/java/src"/>
1930
1931        <replaceregexp byline="true" file="reports/ministreaming/cobertura/coverage.xml"
1932            match='filename="net' replace='filename="apps/ministreaming/java/src/net'/>
1933        <replaceregexp byline="true" file="reports/ministreaming/cobertura/coverage.xml"
1934            match="&lt;source&gt;./src" replace="&lt;source&gt;apps/ministreaming/java/src"/>
1935
1936        <replaceregexp byline="true" file="reports/streaming/cobertura/coverage.xml"
1937            match='filename="net' replace='filename="apps/streaming/java/src/net'/>
1938        <replaceregexp byline="true" file="reports/streaming/cobertura/coverage.xml"
1939            match="&lt;source&gt;./src" replace="&lt;source&gt;apps/streaming/java/src"/>
1940    </target>
1941    <!-- end unit tests -->
1942
1943    <target name="testscripts" >
1944        <exec executable="tests/scripts/checkcerts.sh" failonerror="true" />
1945        <exec executable="tests/scripts/checkpo.sh" failonerror="true" />
1946        <exec executable="tests/scripts/checkutf8.sh" failonerror="true" />
1947        <exec executable="tests/scripts/checkxml.sh" failonerror="true" />
1948        <exec executable="tests/scripts/checkscripts.sh" failonerror="true" />
1949    </target>
1950
1951
1952    <target name="testscripts-net" >
1953        <exec executable="tests/scripts/checkremotecerts.sh" failonerror="true" />
1954    </target>
1955
1956    <target name="testscripts-all" depends="testscripts,testscripts-net" />
1957
1958    <target name="bench" depends="jbigi" >
1959        <ant dir="core/java/" target="bench.jar" />
1960    </target>
1961
1962    <!-- <target name="syndie" >
1963        <ant dir="apps/syndie/java/" target="standalone" />
1964        <copy file="apps/syndie/java/syndie-standalone.zip" todir="." />
1965    </target> -->
1966
1967    <!-- standalone i2psnark zip -->
1968    <target name="i2psnark" depends="buildStreaming, buildJetty, buildSystray" >
1969        <ant dir="apps/i2psnark/java" target="standalone" />
1970        <copy file="apps/i2psnark/java/i2psnark-standalone.zip" todir="." />
1971    </target>
1972
1973    <target name="slackpkg">
1974        <ant dir="Slackware/i2p/" target="slackpkg" />
1975    </target>
1976    <target name="justBOB" depends="builddepSmall, jbigi">
1977        <ant dir="apps/BOB/" target="onejar" />
1978        <copy file="apps/BOB/dist/BOB-one.jar" todir="." />
1979    </target>
1980
1981    <target name="sloccount.report">
1982        <property name="sloccount.report.file" value="sloccount.sc" />
1983        <echo message="Generating sloccount report (this will take awhile)" />
1984        <exec executable="sloccount" failonerror="true">
1985            <arg value="--details"/>
1986            <arg value="--wide"/>
1987            <arg value="${basedir}"/>
1988            <redirector output="${sloccount.report.file}">
1989                <outputfilterchain>
1990                    <linecontainsregexp negate="true">
1991                        <regexp pattern="(Warning: |lib/launch4j|_MTN|reports|pkg-temp|licenses|i2p\.fba|gmp-|WEB-INF)" />
1992                    </linecontainsregexp>
1993                    <linecontains negate="true">
1994                        <contains value="${sloccount.report.file}" />
1995                    </linecontains>
1996                </outputfilterchain>
1997            </redirector>
1998        </exec>
1999        <echo message="sloccount report saved to the file &quot;${sloccount.report.file}&quot;" />
2000    </target>
2001
2002    <target name="findbugs" depends="build2, buildUtilityJar">
2003        <echo message="Starting findbugs, this will take a while..." />
2004        <exec executable="nice" failonerror="true">
2005            <arg value="findbugs"/>
2006            <arg value="-textui"/>
2007            <arg value="-projectName"/>
2008            <arg value="i2p"/>
2009            <arg value="-sortByClass"/>
2010            <arg value="-xml"/>
2011            <arg value="-output"/>
2012            <arg value="i2p.fba"/>
2013            <arg value="-auxclasspath"/>
2014            <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"/>
2015            <arg value="-sourcepath"/>
2016            <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"/>
2017            <!-- start of the files to be analyzed -->
2018            <arg value="build/BOB.jar"/>
2019            <arg value="build/addressbook.jar"/>
2020            <arg value="build/i2p.jar"/>
2021            <arg value="build/i2psnark.jar"/>
2022            <arg value="build/i2psnark.war"/>
2023            <arg value="build/i2ptunnel.jar"/>
2024            <arg value="build/i2ptunnel.war"/>
2025            <arg value="build/imagegen.war"/>
2026            <arg value="build/jetty-i2p.jar"/>
2027            <arg value="build/mstreaming.jar"/>
2028            <arg value="build/router.jar/"/>
2029            <arg value="build/desktopgui.jar"/>
2030            <arg value="build/routerconsole.jar"/>
2031            <arg value="build/routerconsole.war"/>
2032            <arg value="build/sam.jar"/>
2033            <arg value="build/streaming.jar"/>
2034            <arg value="build/susidns.war"/>
2035            <arg value="build/susimail.war"/>
2036            <arg value="build/systray.jar"/>
2037            <arg value="build/utility.jar"/>
2038        </exec>
2039        <echo message="Findbugs output stored in i2p.fba" />
2040        <echo message="Now run: findbugs i2p.fba" />
2041    </target>
2042
2043    <!-- this is the same dependency as pkg, but with updater200 in the middle,
2044         since preppkg puts too much stuff in pkg-temp -->
2045<!--
2046    <target name="release" depends="distclean, updaterWithJettyFixesAndJbigi , updater200WithJettyFixes, preppkg, installer, getReleaseNumber" >
2047    <target name="release" depends="verifyReleaseBuildNumbers, -pre-release, distclean, testscripts, updaterWithJettyAndJbigiRepack, updater200WithJettyAndJbigi, delete-j6-update, installer-nowindows, delete-nonwindows, installer-windows">
2048    <target name="release" depends="verifyReleaseBuildNumbers, -pre-release, distclean, testscripts, updaterWithJettyAndGeoIPRepack, updater200WithJettyAndGeoIP, delete-j6-update, installer-nowindows, delete-nonwindows, installer-windows">
2049-->
2050    <target name="release" depends="verifyReleaseBuildNumbers, -pre-release, distclean, testscripts, updaterWithJettyRepack, updater200WithJetty, delete-j6-update, installer-nowindows, delete-nonwindows, installer-windows">
2051        <echo message="New version number is ${release.number}" />
2052        <copy file="i2pupdate.zip" tofile="i2pupdate_${release.number}.zip" />
2053        <copy file="i2pinstall_${full.version}.jar" tofile="i2pinstall_${release.number}.jar" />
2054        <copy file="i2pinstall_${full.version}_windows.exe" tofile="i2pinstall_${release.number}_windows.exe" />
2055        <!-- remove these, we don't build them anymore -->
2056        <delete file="i2pupdate.sud" />
2057        <delete file="i2pupdate.su2" />
2058        <!-- make this a lot easier by putting release.privkey.su3=/path/to/su3keystore.ks in override.properties -->
2059
2060        <!-- now build and verify the packed su3 from the packed zip -->
2061        <su3sign infile="i2pupdate200.zip" sigtype="ROUTER" outfile="i2pupdate.su3" su3.ver="${release.number}" />
2062        <!-- this will use the monotonerc file in the current workspace -->
2063        <echo message="Checking out fresh copy into ../i2p-${release.number} for tarballing:" />
2064        <delete dir="../i2p-${release.number}" />
2065        <exec executable="mtn" failonerror="true">
2066            <arg value="co" />
2067            <!-- w: is the revision of the current workspace -->
2068            <arg value="-r" />
2069            <arg value="w:" />
2070            <arg value="../i2p-${release.number}/" />
2071        </exec>
2072        <exec executable="tar" failonerror="true">
2073            <arg value="cjf" />
2074            <arg value="i2psource_${release.number}.tar.bz2" />
2075            <arg value="-C" />
2076            <arg value=".." />
2077            <arg value="--exclude" />
2078            <arg value="i2p-${release.number}/_MTN*" />
2079            <arg value="i2p-${release.number}/" />
2080        </exec>
2081        <echo message="Sign the files:" />
2082        <input message="Enter GPG key ID (e.g. 0x12345678) for signing:" addproperty="release.gpg.keyid" />
2083        <fail message="You must enter a key ID." >
2084            <condition>
2085                <equals arg1="${release.gpg.keyid}" arg2=""/>
2086            </condition>
2087        </fail>
2088
2089        <!-- the gpgsign macro sets the permission of signed files and the sigs themselves to 444 -->
2090        <gpgsign file="i2pinstall_${release.number}_windows.exe" />
2091        <gpgsign file="i2pinstall_${release.number}.jar" />
2092        <gpgsign file="i2psource_${release.number}.tar.bz2" />
2093        <gpgsign file="i2pupdate_${release.number}.zip" />
2094
2095        <chmod perm="444" type="file">
2096            <fileset dir="${basedir}">
2097                <include name="i2pupdate.su3" />
2098            </fileset>
2099        </chmod>
2100        <echo message="File sizes:" />
2101        <exec executable="ls" failonerror="true">
2102            <arg value="-l" />
2103            <arg value="i2pinstall_${release.number}_windows.exe" />
2104            <arg value="i2pinstall_${release.number}.jar" />
2105            <arg value="i2psource_${release.number}.tar.bz2" />
2106            <arg value="i2pupdate_${release.number}.zip" />
2107            <arg value="i2pupdate.su3" />
2108            <arg value="i2pinstall_${release.number}_windows.exe.sig" />
2109            <arg value="i2pinstall_${release.number}.jar.sig" />
2110            <arg value="i2psource_${release.number}.tar.bz2.sig" />
2111            <arg value="i2pupdate_${release.number}.zip.sig" />
2112        </exec>
2113        <echo message="SHA256 sums:" />
2114        <sha256sum file="i2pinstall_${release.number}_windows.exe" />
2115        <sha256sum file="i2pinstall_${release.number}.jar" />
2116        <sha256sum file="i2psource_${release.number}.tar.bz2" />
2117        <sha256sum file="i2pupdate_${release.number}.zip" />
2118        <sha256sum file="i2pupdate.su3" />
2119        <!-- make torrent files -->
2120        <copy file="i2pupdate.su3" tofile="i2pupdate-${release.number}.su3" />
2121        <mktorrent file="i2pupdate-${release.number}.su3" />
2122        <echo message="Don't forget to mtn tag w: i2p-${release.number}" />
2123        <echo message="... and mtn cert t:i2p-${release.number} branch i2p.i2p.release" />
2124    </target>
2125
2126    <target name="mavenCentral.deps" depends="buildRouter, buildStreaming">
2127        <ant dir="core/java/">
2128            <target name="javadocJar" />
2129            <target name="sourcesJar" />
2130        </ant>
2131        <ant dir="router/java/">
2132            <target name="javadocJar" />
2133            <target name="sourcesJar" />
2134        </ant>
2135        <ant dir="apps/ministreaming/java/">
2136            <target name="javadocJar" />
2137            <target name="sourcesJar" />
2138        </ant>
2139        <ant dir="apps/streaming/java/">
2140            <target name="javadocJar" />
2141            <target name="sourcesJar" />
2142        </ant>
2143        <ant dir="apps/jetty/">
2144            <target name="servletJar" />
2145            <target name="servletJavadocJar" />
2146            <target name="servletSourcesJar" />
2147        </ant>
2148    </target>
2149
2150    <target name="mavenCentral" depends="verifyReleaseBuildNumbers, -pre-release, distclean, testscripts, mavenCentral.deps">
2151        <mkdir dir="./pkg-mavencentral" />
2152        <!-- Libraries -->
2153        <copy file="build/i2p.jar" tofile="pkg-mavencentral/i2p-${release.number}.jar" />
2154        <copy file="build/router.jar" tofile="pkg-mavencentral/router-${release.number}.jar" />
2155        <copy file="build/mstreaming.jar" tofile="pkg-mavencentral/mstreaming-${release.number}.jar" />
2156        <copy file="build/streaming.jar" tofile="pkg-mavencentral/streaming-${release.number}.jar" />
2157        <copy file="apps/jetty/build/servlet-i2p-${release.number}.jar" todir="pkg-mavencentral/" />
2158        <!-- JavaDocs -->
2159        <copy file="core/java/build/i2p-${release.number}-javadoc.jar" todir="pkg-mavencentral/" />
2160        <copy file="router/java/build/router-${release.number}-javadoc.jar" todir="pkg-mavencentral/" />
2161        <copy file="apps/ministreaming/java/build/mstreaming-${release.number}-javadoc.jar" todir="pkg-mavencentral/" />
2162        <copy file="apps/streaming/java/build/streaming-${release.number}-javadoc.jar" todir="pkg-mavencentral/" />
2163        <copy file="apps/jetty/build/servlet-i2p-${release.number}-javadoc.jar" todir="pkg-mavencentral/" />
2164        <!-- Sources -->
2165        <copy file="core/java/build/i2p-${release.number}-sources.jar" todir="pkg-mavencentral/" />
2166        <copy file="router/java/build/router-${release.number}-sources.jar" todir="pkg-mavencentral/" />
2167        <copy file="apps/ministreaming/java/build/mstreaming-${release.number}-sources.jar" todir="pkg-mavencentral/" />
2168        <copy file="apps/streaming/java/build/streaming-${release.number}-sources.jar" todir="pkg-mavencentral/" />
2169        <copy file="apps/jetty/build/servlet-i2p-${release.number}-sources.jar" todir="pkg-mavencentral/" />
2170        <!-- POMs -->
2171        <artifact:pom id="i2ppom" groupId="net.i2p" artifactId="i2p" version="${release.number}"
2172                name="I2P Core"
2173                description="The core I2P APIs"
2174                url="https://geti2p.net/">
2175            <license name="Public Domain" url="http://en.wikipedia.org/wiki/Public_domain" />
2176            <developer name="zzz" organization="I2P" organizationUrl="https://geti2p.net/" />
2177            <developer name="str4d" email="str4d@i2pmail.org" organization="I2P" organizationUrl="https://geti2p.net/"/>
2178            <scm connection="scm:git:git@github.com:i2p/i2p.i2p.git"
2179                 developerConnection="scm:git:git@github.com:i2p/i2p.i2p.git"
2180                 url="git@github.com:i2p/i2p.i2p.git" />
2181        </artifact:pom>
2182        <artifact:pom id="routerpom" groupId="net.i2p" artifactId="router" version="${release.number}"
2183                name="I2P Router"
2184                description="The I2P router"
2185                url="https://geti2p.net/">
2186            <license name="Public Domain" url="http://en.wikipedia.org/wiki/Public_domain" />
2187            <developer name="zzz" organization="I2P" organizationUrl="https://geti2p.net/" />
2188            <developer name="str4d" email="str4d@i2pmail.org" organization="I2P" organizationUrl="https://geti2p.net/"/>
2189            <scm connection="scm:git:git@github.com:i2p/i2p.i2p.git"
2190                 developerConnection="scm:git:git@github.com:i2p/i2p.i2p.git"
2191                 url="git@github.com:i2p/i2p.i2p.git" />
2192            <dependency groupId="net.i2p" artifactId="i2p" version="${release.number}" />
2193        </artifact:pom>
2194        <artifact:pom id="mstreamingpom" groupId="net.i2p.client" artifactId="mstreaming" version="${release.number}"
2195                name="I2P Ministreaming"
2196                description="API, interfaces, and factory for a TCP-like set of sockets for communicating over I2P."
2197                url="https://geti2p.net/en/docs/api/streaming">
2198            <license name="Public Domain" url="http://en.wikipedia.org/wiki/Public_domain" />
2199            <developer name="zzz" organization="I2P" organizationUrl="https://geti2p.net/" />
2200            <developer name="str4d" email="str4d@i2pmail.org" organization="I2P" organizationUrl="https://geti2p.net/" />
2201            <scm connection="scm:git:git@github.com:i2p/i2p.i2p.git"
2202                 developerConnection="scm:git:git@github.com:i2p/i2p.i2p.git"
2203                 url="git@github.com:i2p/i2p.i2p.git" />
2204            <dependency groupId="net.i2p" artifactId="i2p" version="${release.number}" />
2205        </artifact:pom>
2206        <artifact:pom id="streamingpom" groupId="net.i2p.client" artifactId="streaming" version="${release.number}"
2207                name="I2P Streaming"
2208                description="Implementation of a TCP-like set of sockets for communicating over I2P."
2209                url="https://geti2p.net/en/docs/api/streaming">
2210            <license name="Public Domain" url="http://en.wikipedia.org/wiki/Public_domain" />
2211            <developer name="zzz" organization="I2P" organizationUrl="https://geti2p.net/" />
2212            <developer name="str4d" email="str4d@i2pmail.org" organization="I2P" organizationUrl="https://geti2p.net/" />
2213            <scm connection="scm:git:git@github.com:i2p/i2p.i2p.git"
2214                 developerConnection="scm:git:git@github.com:i2p/i2p.i2p.git"
2215                 url="git@github.com:i2p/i2p.i2p.git" />
2216            <dependency groupId="net.i2p" artifactId="i2p" version="${release.number}" />
2217            <dependency groupId="net.i2p.client" artifactId="mstreaming" version="${release.number}" />
2218        </artifact:pom>
2219        <artifact:pom id="servletpom" groupId="net.i2p" artifactId="servlet-i2p" version="${release.number}"
2220                name="I2P Servlet classes"
2221                description="Various servlet classes provided to plugins by Java I2P."
2222                url="https://geti2p.net/">
2223            <license name="Public Domain" url="http://en.wikipedia.org/wiki/Public_domain" />
2224            <developer name="zzz" organization="I2P" organizationUrl="https://geti2p.net/" />
2225            <developer name="str4d" email="str4d@i2pmail.org" organization="I2P" organizationUrl="https://geti2p.net/" />
2226            <scm connection="scm:git:git@github.com:i2p/i2p.i2p.git"
2227                 developerConnection="scm:git:git@github.com:i2p/i2p.i2p.git"
2228                 url="git@github.com:i2p/i2p.i2p.git" />
2229            <dependency groupId="net.i2p" artifactId="i2p" version="${release.number}" />
2230            <dependency groupId="org.apache.tomcat" artifactId="tomcat-servlet-api" version="8.0.33" />
2231        </artifact:pom>
2232        <artifact:writepom pomRefId="i2ppom" file="pkg-mavencentral/i2p-${release.number}.pom"/>
2233        <artifact:writepom pomRefId="routerpom" file="pkg-mavencentral/router-${release.number}.pom"/>
2234        <artifact:writepom pomRefId="mstreamingpom" file="pkg-mavencentral/mstreaming-${release.number}.pom" />
2235        <artifact:writepom pomRefId="streamingpom" file="pkg-mavencentral/streaming-${release.number}.pom" />
2236        <artifact:writepom pomRefId="servletpom" file="pkg-mavencentral/servlet-i2p-${release.number}.pom" />
2237        <!-- Signatures -->
2238        <echo message="Sign the files:" />
2239        <input message="Enter GPG key ID (e.g. 0x12345678) for signing:" addproperty="release.gpg.keyid" />
2240        <fail message="You must enter a key ID." >
2241            <condition>
2242                <equals arg1="${release.gpg.keyid}" arg2=""/>
2243            </condition>
2244        </fail>
2245        <!-- the gpgsign macro sets the permission of signed files and the sigs themselves to 444 -->
2246        <gpgsignasc file="pkg-mavencentral/i2p-${release.number}.jar" />
2247        <gpgsignasc file="pkg-mavencentral/i2p-${release.number}.pom" />
2248        <gpgsignasc file="pkg-mavencentral/i2p-${release.number}-javadoc.jar" />
2249        <gpgsignasc file="pkg-mavencentral/i2p-${release.number}-sources.jar" />
2250        <gpgsignasc file="pkg-mavencentral/router-${release.number}.jar" />
2251        <gpgsignasc file="pkg-mavencentral/router-${release.number}.pom" />
2252        <gpgsignasc file="pkg-mavencentral/router-${release.number}-javadoc.jar" />
2253        <gpgsignasc file="pkg-mavencentral/router-${release.number}-sources.jar" />
2254        <gpgsignasc file="pkg-mavencentral/mstreaming-${release.number}.jar" />
2255        <gpgsignasc file="pkg-mavencentral/mstreaming-${release.number}.pom" />
2256        <gpgsignasc file="pkg-mavencentral/mstreaming-${release.number}-javadoc.jar" />
2257        <gpgsignasc file="pkg-mavencentral/mstreaming-${release.number}-sources.jar" />
2258        <gpgsignasc file="pkg-mavencentral/streaming-${release.number}.jar" />
2259        <gpgsignasc file="pkg-mavencentral/streaming-${release.number}.pom" />
2260        <gpgsignasc file="pkg-mavencentral/streaming-${release.number}-javadoc.jar" />
2261        <gpgsignasc file="pkg-mavencentral/streaming-${release.number}-sources.jar" />
2262        <gpgsignasc file="pkg-mavencentral/servlet-i2p-${release.number}.jar" />
2263        <gpgsignasc file="pkg-mavencentral/servlet-i2p-${release.number}.pom" />
2264        <gpgsignasc file="pkg-mavencentral/servlet-i2p-${release.number}-javadoc.jar" />
2265        <gpgsignasc file="pkg-mavencentral/servlet-i2p-${release.number}-sources.jar" />
2266        <!-- Bundle -->
2267        <jar destfile="mavencentral-i2p.jar">
2268            <fileset dir="./pkg-mavencentral">
2269                <include name="i2p-*" />
2270            </fileset>
2271        </jar>
2272        <jar destfile="mavencentral-router.jar">
2273            <fileset dir="./pkg-mavencentral">
2274                <include name="router-*" />
2275            </fileset>
2276        </jar>
2277        <jar destfile="mavencentral-mstreaming.jar">
2278            <fileset dir="./pkg-mavencentral">
2279                <include name="mstreaming-*" />
2280            </fileset>
2281        </jar>
2282        <jar destfile="mavencentral-streaming.jar">
2283            <fileset dir="./pkg-mavencentral">
2284                <include name="streaming-*" />
2285            </fileset>
2286        </jar>
2287        <jar destfile="mavencentral-servlet-i2p.jar">
2288            <fileset dir="./pkg-mavencentral">
2289                <include name="servlet-i2p-*" />
2290            </fileset>
2291        </jar>
2292        <echo message="Now upload mavencentral-*.jar to Maven Central." />
2293    </target>
2294
2295    <target name="debian" depends="debian-clean, debchange, debian-binary" />
2296
2297    <target name="getExtendedVersion" depends="buildProperties, trimMtnRev">
2298        <property name="MtnShortHash" value="unknown" />
2299        <condition property="Extended.Version" value="${full.version}-${MtnShortHash}">
2300            <not>
2301                <or>
2302                    <equals arg1="${MtnShortHash}" arg2="" />
2303                    <equals arg1="${MtnShortHash}" arg2="unknown" />
2304                </or>
2305            </not>
2306        </condition>
2307        <!-- if not set above we'll set it here -->
2308        <property name="Extended.Version" value="${full.version}" />
2309    </target>
2310
2311    <target name="debchange" depends="getExtendedVersion" unless="noAutoDebchange">
2312        <echo message= "Debian version is ${Extended.Version}-1" />
2313        <exec executable="dch" failonerror="true">
2314            <arg value="-b" />
2315            <arg value="--check-dirname-level" />
2316            <arg value="0" />
2317            <arg value="-v" />
2318            <arg value="${Extended.Version}-1" />
2319            <arg value="Unofficial Debian package built using &quot;ant debian&quot;" />
2320        </exec>
2321    </target>
2322
2323    <target name="debian-binary" depends="getExtendedVersion">
2324        <exec executable="fakeroot" failonerror="true">
2325            <arg value="debian/rules" />
2326            <arg value="patch" />
2327            <arg value="binary" />
2328            <arg value="clean" />
2329        </exec>
2330        <delete dir=".pc" />
2331        <move todir=".">
2332            <fileset dir=".." includes="libjbigi*${release.number}*.deb i2p*${release.number}*.deb" />
2333        </move>
2334        <echo message="" />
2335        <echo message="====================" />
2336        <echo message="Packages have been built and moved to ${basedir}" />
2337        <echo message="====================" />
2338    </target>
2339
2340    <target name="debian-clean" depends="getExtendedVersion" >
2341        <exec executable="fakeroot" failonerror="true">
2342            <arg value="debian/rules" />
2343            <arg value="clean" />
2344        </exec>
2345        <delete dir="./.pc" />
2346    </target>
2347
2348    <!-- stretch+, zesty+ -->
2349    <target name="debian-tarball" depends="getExtendedVersion, failIfNoMtn">
2350        <!-- this will use the monotonerc file in the current workspace -->
2351        <property name="debian.tarball.name" value="i2p_${Extended.Version}.orig.tar.bz2" />
2352        <echo message="Checking out fresh copy into ../i2p-${Extended.Version} for tarballing:" />
2353        <delete dir="../i2p-${Extended.Version}" />
2354        <exec executable="mtn" failonerror="true">
2355            <arg value="co" />
2356            <!-- w: is the revision of the current workspace -->
2357            <arg value="-r" />
2358            <arg value="w:" />
2359            <arg value="../i2p-${Extended.Version}" />
2360        </exec>
2361        <delete includeemptydirs="true" quiet="false" failonerror="false">
2362            <fileset dir="../i2p-${Extended.Version}/debian-alt/" />
2363            <fileset dir="../i2p-${Extended.Version}/installer/lib/" />
2364            <fileset dir="../i2p-${Extended.Version}/Slackware" />
2365            <fileset dir="../i2p-${Extended.Version}/_MTN" />
2366            <fileset dir="../i2p-${Extended.Version}/.idea" />
2367            <fileset dir="../i2p-${Extended.Version}/.tx" />
2368            <file name="../i2p-${Extended.Version}/.mtn-ignore" />
2369            <fileset dir="../i2p-${Extended.Version}/" includes="Docker*" />
2370            <file name="../i2p-${Extended.Version}/Makefile.gcj" />
2371            <!-- gradle files -->
2372            <fileset dir="../i2p-${Extended.Version}/" includes="**/build.gradle" />
2373            <fileset dir="../i2p-${Extended.Version}/gradle" />
2374            <file name="../i2p-${Extended.Version}/gradlew.bat" />
2375            <file name="../i2p-${Extended.Version}/gradle.properties" />
2376            <file name="../i2p-${Extended.Version}/settings.gradle" />
2377            <!-- gettext-base -->
2378            <fileset dir="../i2p-${Extended.Version}/core/java/src/gnu/gettext" />
2379            <!-- libgetopt-java -->
2380            <fileset dir="../i2p-${Extended.Version}/core/java/src/gnu/getopt" />
2381            <!-- libhttpclient-java and libhttpcore-java -->
2382          <!--
2383            <fileset dir="../i2p-${Extended.Version}/core/java/src/org/apache/http" />
2384           -->
2385            <!-- geoip-database -->
2386            <file name="../i2p-${Extended.Version}/installer/resources/geoip.txt" />
2387            <file name="../i2p-${Extended.Version}/installer/resources/geoipv6.dat.gz" />
2388            <!-- libjetty9-java -->
2389            <fileset dir="../i2p-${Extended.Version}/apps/jetty/jetty-distribution-9.2.24.v20180105" />
2390            <!-- libtomcat8-java -->
2391            <fileset dir="../i2p-${Extended.Version}/apps/jetty/apache-tomcat-8.5.30" />
2392            <!-- libjstl1.1-java or glassfish-javaee or libtaglibs-standard -->
2393            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/jstl.jar" />
2394            <!-- libjakarta-taglibs-standard-java or glassfish-javaee or libtaglibs-standard -->
2395            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/standard.jar" />
2396            <!-- anything added above, add in debian-release-tarball also -->
2397        </delete>
2398        <tar longfile="gnu" destfile="../${debian.tarball.name}" compression="bzip2">
2399            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${Extended.Version}">
2400                <include name="**/**" />
2401                <exclude name="debian/**"/>
2402                <exclude name="debian-alt/**"/>
2403                <exclude name="**/*.sh"/>
2404                <exclude name="installer/resources/geoip.txt"/>
2405                <exclude name="installer/resources/geoipv6.dat.gz"/>
2406                <exclude name="apps/jetty/jetty-distribution-*/**"/>
2407                <exclude name="apps/jetty/apache-tomcat-*/**"/>
2408                <exclude name="apps/susidns/src/lib/jstl.jar" />
2409                <exclude name="apps/susidns/src/lib/standard.jar" />
2410                <!-- anything added above, add in debian-release-tarball also -->
2411            </tarfileset>
2412            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${Extended.Version}" filemode="755">
2413                <exclude name="debian/**" />
2414                <include name="**/*.sh" />
2415            </tarfileset>
2416        </tar>
2417    </target>
2418
2419    <!-- same as debian-release-tarball but with bundled jetty
2420      -  We add a 'p' to the release name and tarball since the source package is different;
2421      -  Launchpad does not allow different source packages with the same name.
2422      -->
2423    <target name="precise-release-tarball" depends="getExtendedVersion, failIfNoMtn">
2424        <property name="debian.tarball.name" value="i2p_${release.number}p.orig.tar.bz2" />
2425        <echo message="Checking out fresh copy into ../i2p-${Extended.Version} for tarballing:" />
2426        <delete dir="../i2p-${Extended.Version}" />
2427        <exec executable="mtn" failonerror="true">
2428            <arg value="co" />
2429            <!-- w: is the revision of the current workspace -->
2430            <arg value="-r" />
2431            <arg value="w:" />
2432            <arg value="-b" />
2433            <arg value="i2p.i2p" />
2434            <arg value="../i2p-${Extended.Version}" />
2435        </exec>
2436        <delete includeemptydirs="true" quiet="false" failonerror="false">
2437            <fileset dir="../i2p-${Extended.Version}/debian-alt/" />
2438            <fileset dir="../i2p-${Extended.Version}/installer/lib/" />
2439            <fileset dir="../i2p-${Extended.Version}/Slackware" />
2440            <fileset dir="../i2p-${Extended.Version}/_MTN" />
2441            <fileset dir="../i2p-${Extended.Version}/.idea" />
2442            <fileset dir="../i2p-${Extended.Version}/.tx" />
2443            <file name="../i2p-${Extended.Version}/.mtn-ignore" />
2444            <fileset dir="../i2p-${Extended.Version}/" includes="Docker*" />
2445            <file name="../i2p-${Extended.Version}/Makefile.gcj" />
2446            <!-- gradle files -->
2447            <fileset dir="../i2p-${Extended.Version}/" includes="**/build.gradle" />
2448            <fileset dir="../i2p-${Extended.Version}/gradle" />
2449            <file name="../i2p-${Extended.Version}/gradlew" />
2450            <file name="../i2p-${Extended.Version}/gradlew.bat" />
2451            <file name="../i2p-${Extended.Version}/gradle.properties" />
2452            <file name="../i2p-${Extended.Version}/settings.gradle" />
2453            <!-- gettext-base -->
2454            <fileset dir="../i2p-${Extended.Version}/core/java/src/gnu/gettext" />
2455            <!-- libgetopt-java -->
2456            <fileset dir="../i2p-${Extended.Version}/core/java/src/gnu/getopt" />
2457            <!-- libhttpclient-java and libhttpcore-java -->
2458          <!--
2459            <fileset dir="../i2p-${Extended.Version}/core/java/src/org/apache/http" />
2460           -->
2461            <!-- geoip-database -->
2462            <file name="../i2p-${Extended.Version}/installer/resources/geoip.txt" />
2463            <file name="../i2p-${Extended.Version}/installer/resources/geoipv6.dat.gz" />
2464            <!-- libjetty9-java -->
2465          <!--
2466            <fileset dir="../i2p-${Extended.Version}/apps/jetty/jetty-distribution-9.2.24.v20180105" />
2467            <fileset dir="../i2p-${Extended.Version}/apps/jetty/apache-tomcat-8.5.30" />
2468           -->
2469            <!-- libjstl1.1-java or glassfish-javaee -->
2470          <!--
2471            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/jstl.jar" />
2472           -->
2473            <!-- libjakarta-taglibs-standard-java or glassfish-javaee -->
2474            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/standard.jar" />
2475            <!-- anything added above, add in debian-release-tarball also -->
2476        </delete>
2477        <tar longfile="gnu" destfile="../${debian.tarball.name}" compression="bzip2">
2478            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${Extended.Version}">
2479                <include name="**/**" />
2480                <exclude name="debian/**"/>
2481                <exclude name="debian-alt/**"/>
2482                <exclude name="**/*.sh"/>
2483                <exclude name="installer/resources/geoip.txt"/>
2484                <exclude name="installer/resources/geoipv6.dat.gz"/>
2485          <!--
2486                <exclude name="apps/jetty/jetty-distribution-*/**"/>
2487                <exclude name="apps/jetty/apache-tomcat-*/**"/>
2488           -->
2489          <!--
2490                <exclude name="apps/susidns/src/lib/jstl.jar" />
2491           -->
2492                <exclude name="apps/susidns/src/lib/standard.jar" />
2493                <!-- anything added above, add in debian-release-tarball also -->
2494            </tarfileset>
2495            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${Extended.Version}" filemode="755">
2496                <exclude name="debian/**" />
2497                <include name="**/*.sh" />
2498            </tarfileset>
2499        </tar>
2500    </target>
2501
2502    <!-- xenial/yakkety only -->
2503    <!-- same as debian-release-tarball but with bundled jstl.jar
2504         (there's no libtaglibs-standard-* packages)
2505      -  We add a 'x' to the release name and tarball since the source package is different;
2506      -  Launchpad does not allow different source packages with the same name.
2507      -->
2508    <target name="xenial-release-tarball" depends="getExtendedVersion, failIfNoMtn">
2509        <property name="debian.tarball.name" value="i2p_${release.number}x.orig.tar.bz2" />
2510        <echo message="Checking out fresh copy into ../i2p-${Extended.Version} for tarballing:" />
2511        <delete dir="../i2p-${Extended.Version}" />
2512        <exec executable="mtn" failonerror="true">
2513            <arg value="co" />
2514            <!-- w: is the revision of the current workspace -->
2515            <arg value="-r" />
2516            <arg value="w:" />
2517            <arg value="-b" />
2518            <arg value="i2p.i2p" />
2519            <arg value="../i2p-${Extended.Version}" />
2520        </exec>
2521        <delete includeemptydirs="true" quiet="false" failonerror="false">
2522            <fileset dir="../i2p-${Extended.Version}/debian-alt/" />
2523            <fileset dir="../i2p-${Extended.Version}/installer/lib/" />
2524            <fileset dir="../i2p-${Extended.Version}/Slackware" />
2525            <fileset dir="../i2p-${Extended.Version}/_MTN" />
2526            <fileset dir="../i2p-${Extended.Version}/.idea" />
2527            <fileset dir="../i2p-${Extended.Version}/.tx" />
2528            <file name="../i2p-${Extended.Version}/.mtn-ignore" />
2529            <fileset dir="../i2p-${Extended.Version}/" includes="Docker*" />
2530            <file name="../i2p-${Extended.Version}/Makefile.gcj" />
2531            <!-- gradle files -->
2532            <fileset dir="../i2p-${Extended.Version}/" includes="**/build.gradle" />
2533            <fileset dir="../i2p-${Extended.Version}/gradle" />
2534            <file name="../i2p-${Extended.Version}/gradlew" />
2535            <file name="../i2p-${Extended.Version}/gradlew.bat" />
2536            <file name="../i2p-${Extended.Version}/gradle.properties" />
2537            <file name="../i2p-${Extended.Version}/settings.gradle" />
2538            <fileset dir="../i2p-${Extended.Version}/core/java/src/gnu/gettext" />
2539            <fileset dir="../i2p-${Extended.Version}/core/java/src/gnu/getopt" />
2540          <!--
2541            <fileset dir="../i2p-${Extended.Version}/core/java/src/org/apache/http" />
2542           -->
2543            <file name="../i2p-${Extended.Version}/installer/resources/geoip.txt" />
2544            <file name="../i2p-${Extended.Version}/installer/resources/geoipv6.dat.gz" />
2545            <fileset dir="../i2p-${Extended.Version}/apps/jetty/jetty-distribution-9.2.24.v20180105" />
2546            <fileset dir="../i2p-${Extended.Version}/apps/jetty/apache-tomcat-8.5.30" />
2547          <!--
2548            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/jstl.jar" />
2549           -->
2550            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/standard.jar" />
2551            <!-- anything added above, add in debian-tarball also -->
2552        </delete>
2553        <tar longfile="gnu" destfile="../${debian.tarball.name}" compression="bzip2">
2554            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${release.number}">
2555                <include name="**/**" />
2556                <exclude name="debian/**"/>
2557                <exclude name="debian-alt/**"/>
2558                <exclude name="**/*.sh"/>
2559                <exclude name="installer/resources/geoip.txt"/>
2560                <exclude name="installer/resources/geoipv6.dat.gz"/>
2561                <exclude name="apps/jetty/jetty-distribution-*/**"/>
2562                <exclude name="apps/jetty/apache-tomcat-*/**"/>
2563              <!--
2564                <exclude name="apps/susidns/src/lib/jstl.jar" />
2565               -->
2566                <exclude name="apps/susidns/src/lib/standard.jar" />
2567                <!-- anything added above, add in debian-tarball also -->
2568            </tarfileset>
2569            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${release.number}" filemode="755">
2570                <exclude name="debian/**" />
2571                <include name="**/*.sh" />
2572            </tarfileset>
2573        </tar>
2574    </target>
2575
2576    <!-- stretch+, zesty+ -->
2577    <!-- same as debian-tarball but with a release tar.bz2 file name and tar prefix -->
2578    <target name="debian-release-tarball" depends="getExtendedVersion, failIfNoMtn">
2579        <property name="debian.tarball.name" value="i2p_${release.number}.orig.tar.bz2" />
2580        <echo message="Checking out fresh copy into ../i2p-${Extended.Version} for tarballing:" />
2581        <delete dir="../i2p-${Extended.Version}" />
2582        <exec executable="mtn" failonerror="true">
2583            <arg value="co" />
2584            <!-- w: is the revision of the current workspace -->
2585            <arg value="-r" />
2586            <arg value="w:" />
2587            <arg value="-b" />
2588            <arg value="i2p.i2p" />
2589            <arg value="../i2p-${Extended.Version}" />
2590        </exec>
2591        <delete includeemptydirs="true" quiet="false" failonerror="false">
2592            <fileset dir="../i2p-${Extended.Version}/debian-alt/" />
2593            <fileset dir="../i2p-${Extended.Version}/installer/lib/" />
2594            <fileset dir="../i2p-${Extended.Version}/Slackware" />
2595            <fileset dir="../i2p-${Extended.Version}/_MTN" />
2596            <fileset dir="../i2p-${Extended.Version}/.idea" />
2597            <fileset dir="../i2p-${Extended.Version}/.tx" />
2598            <file name="../i2p-${Extended.Version}/.mtn-ignore" />
2599            <fileset dir="../i2p-${Extended.Version}/" includes="Docker*" />
2600            <file name="../i2p-${Extended.Version}/Makefile.gcj" />
2601            <!-- gradle files -->
2602            <fileset dir="../i2p-${Extended.Version}/" includes="**/build.gradle" />
2603            <fileset dir="../i2p-${Extended.Version}/gradle" />
2604            <file name="../i2p-${Extended.Version}/gradlew" />
2605            <file name="../i2p-${Extended.Version}/gradlew.bat" />
2606            <file name="../i2p-${Extended.Version}/gradle.properties" />
2607            <file name="../i2p-${Extended.Version}/settings.gradle" />
2608            <fileset dir="../i2p-${Extended.Version}/core/java/src/gnu/gettext" />
2609            <fileset dir="../i2p-${Extended.Version}/core/java/src/gnu/getopt" />
2610          <!--
2611            <fileset dir="../i2p-${Extended.Version}/core/java/src/org/apache/http" />
2612           -->
2613            <file name="../i2p-${Extended.Version}/installer/resources/geoip.txt" />
2614            <file name="../i2p-${Extended.Version}/installer/resources/geoipv6.dat.gz" />
2615            <fileset dir="../i2p-${Extended.Version}/apps/jetty/jetty-distribution-9.2.24.v20180105" />
2616            <fileset dir="../i2p-${Extended.Version}/apps/jetty/apache-tomcat-8.5.30" />
2617            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/jstl.jar" />
2618            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/standard.jar" />
2619            <!-- anything added above, add in debian-tarball also -->
2620        </delete>
2621        <tar longfile="gnu" destfile="../${debian.tarball.name}" compression="bzip2">
2622            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${release.number}">
2623                <include name="**/**" />
2624                <exclude name="debian/**"/>
2625                <exclude name="debian-alt/**"/>
2626                <exclude name="**/*.sh"/>
2627                <exclude name="installer/resources/geoip.txt"/>
2628                <exclude name="installer/resources/geoipv6.dat.gz"/>
2629                <exclude name="apps/jetty/jetty-distribution-*/**"/>
2630                <exclude name="apps/jetty/apache-tomcat-*/**"/>
2631                <exclude name="apps/susidns/src/lib/jstl.jar" />
2632                <exclude name="apps/susidns/src/lib/standard.jar" />
2633                <!-- anything added above, add in debian-tarball also -->
2634            </tarfileset>
2635            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${release.number}" filemode="755">
2636                <exclude name="debian/**" />
2637                <include name="**/*.sh" />
2638            </tarfileset>
2639        </tar>
2640    </target>
2641
2642    <target name="debian-patch" depends="getExtendedVersion" >
2643        <exec executable="quilt" failonerror="true">
2644            <arg value="-a" />
2645            <arg value="push" />
2646        </exec>
2647        <echo message="====================" />
2648    </target>
2649    <target name="debian-unpatch" depends="buildProperties">
2650        <exec executable="quilt" failonerror="false">
2651            <arg value="-a" />
2652            <arg value="pop" />
2653        </exec>
2654    </target>
2655
2656    <target name="debianrepo" depends="debian">
2657        <exec dir="debian" executable="./makerepo.sh" failonerror="true"/>
2658    </target>
2659
2660<!-- the following are appened to help build barebone portable version,
2661     none of the above is modified for this purpose -->
2662        <target name = "pkg-portable-clean">
2663                <delete dir="build/" />
2664                <delete dir="pkg-temp/" />
2665                <delete>
2666                        <fileset dir="." includes="portable-**.zip**" />
2667                </delete>
2668        </target>
2669<!-- build a portable archive -->
2670
2671<!-- *0* Since we simply pack all files in folder "build/" into our archieve,
2672                we need to make sure its small, with NO redundent jars or wars.
2673                thus cleaning is required before each build-->
2674        <target name="buildSmallOnly" depends="pkg-portable-clean,buildSmall"/>
2675
2676<!-- *1* preparing the jars by OS dependent de-bloating -->
2677        <target name="preppkg-portable-win32-jbigi" depends="buildSmallOnly, jbigi-windows-only" />
2678
2679        <target name="preppkg-portable-linux-jbigi"  depends="buildSmallOnly, jbigi-linux-only" />
2680
2681<!-- *2* os independent procedure  -->
2682        <target name="preppkg-portable-basic" >
2683                <mkdir dir="pkg-temp" />
2684                        <!-- non OS dependent configurations only, dont add *nux/win stuff here -->
2685                        <copy todir="pkg-temp">
2686                                <fileset dir="installer/resources/portable/configs/" />
2687                        </copy>
2688                        <copy file="installer/resources/blocklist.txt" todir="pkg-temp/" />
2689                        <copy file="installer/resources/hosts.txt" todir="pkg-temp/" />
2690                        <copy file="installer/resources/readme.license.txt" todir="pkg-temp/" />
2691                <mkdir dir="pkg-temp/addressbook" />
2692                        <copy file="apps/addressbook/subscriptions.txt" todir="pkg-temp/addressbook/" />
2693                        <copy file="apps/addressbook/myhosts.txt"  todir="pkg-temp/addressbook/" />
2694                        <!-- config.txt is in installer/resources/portable -->
2695                <mkdir dir="pkg-temp/docs" />
2696                        <copy file="installer/resources/initialNews/initialNews.xml" tofile="pkg-temp/docs/news.xml" overwrite="true" />
2697                        <copy file="installer/resources/readme/readme.html" tofile="pkg-temp/docs/readme.html" />
2698                        <copy file="installer/resources/startconsole.html" todir="pkg-temp/docs/" />
2699                        <copy file="installer/resources/start.ico" todir="pkg-temp/docs/" />
2700                        <copy file="installer/resources/console.ico" todir="pkg-temp/docs/" />
2701                        <!-- HTTP Header files, english only,
2702                                if you need a different lang do it in a seperate target -->
2703                        <copy todir="pkg-temp/docs/" >
2704                                <fileset dir="installer/resources/proxy/"  includes="**-header.ht" />
2705                        </copy>
2706                        <!-- Theme light only -->
2707                        <copy todir="pkg-temp/docs/themes/console/light/" overwrite="true" >
2708                                <fileset dir="installer/resources/themes/console/light/" includes="**.css" />
2709                        </copy>
2710                        <copy file="installer/resources/themes/console/light/console_big.css" todir="portable/docs/themes/console/light/" />
2711                        <copy todir="pkg-temp/docs/themes/console/images/" >
2712                                <fileset dir="installer/resources/themes/console/images/" />
2713                        </copy>
2714                        <!-- FLAGs for language icon (not for ip)-->
2715                        <copy todir="pkg-temp/docs/icons/flags" >
2716                                <fileset dir="installer/resources/icons/flags/" includes="cn.png,de.png,fr.png,nl.png,ru.png,se.png,us.png" />
2717                        </copy>
2718                        <copy todir="pkg-temp/docs/icons/flags48x48" >
2719                                <fileset dir="installer/resources/icons/flags48x48" />
2720                        </copy>
2721                <mkdir dir="pkg-temp/webapps" />
2722                        <copy todir="pkg-temp/webapps/">
2723                                <fileset dir="build/" includes="**.war" />
2724                        </copy>
2725                <mkdir dir="pkg-temp/lib" />
2726                        <copy todir ="pkg-temp/lib/" >
2727                                <fileset dir="build/" includes="**.jar" />
2728                        </copy>
2729                        <!-- 3rd party jars from apps/  -->
2730                                <!-- jrobin - without jobin , you lost graph and get a lot error entry in logs -->
2731                        <copy file="build/jrobin.jar" tofile="pkg-temp/lib/jrobin.jar" />
2732        </target>
2733<!-- *3* os dependent procedure/commands -->
2734        <target name = "preppkg-portable-win32" depends="preppkg-portable-win32-jbigi,preppkg-portable-basic">
2735                        <!--wrapper - dont even think about it. i2p cosumes appreantly more mem without it on win32-->
2736                <copy file="installer/lib/wrapper/win32/wrapper.dll" todir="pkg-temp/lib" />
2737                <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
2738                <copy file="installer/lib/wrapper/win32/I2Psvc.exe" tofile="pkg-temp/i2psvc.ex_" />
2739                        <!--  copy the unpack/start batchfiles -->
2740                <copy todir="pkg-temp">
2741                        <fileset dir="installer/resources/portable/win32/" />
2742                </copy>
2743        </target>
2744<!-- *4* command for windows package -->
2745        <target name = "pkg-portable-win32"     depends="preppkg-portable-win32, pack200" >
2746                <!-- i need the portable\ folder in .zip so basedir is set to . -->
2747                <move file="pkg-temp" tofile="portable"/>
2748                <zip destfile="portable-win32.zip" basedir="." level="9" includes="portable\**" />
2749                <checksum file="portable-win32.zip" forceOverwrite="yes"/>
2750                <move file="portable" tofile="pkg-temp"/>
2751        </target>
2752</project>
Note: See TracBrowser for help on using the repository browser.