source: build.xml @ 2550b2c

Last change on this file since 2550b2c was 841bb755, checked in by zzz <zzz@…>, 2 years ago

Build: Add target to show revs since last release

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