source: build.xml @ 9c2994c

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

build.xml: Dup and typo (ticket #2198)

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