source: build.xml @ e2f048b

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

Debian:
Add dependency on libjetty8-java and libservlet3.0-java packages
Remove those binaries in debian builds
Prep for dependency on libservlet2.5-java package
Prep for dependency on libtomcat6-java package
Prep for dependency on libtomcat7-java package
Prep for dependency on libjakarta-taglibs-standard-java package
Prep for dependency on libjstl1.1-java package
Add build properties for building with packages
Rework of apps/jetty/build.xml for building with packages
Redefine debian/ as the files for the jessie build
Make debian-alt directories for ubuntu builds
Move debian/changelog to debian-alt/trusty/changelog
Move debian-alt/jessie/changelog to debian/changelog
Add apps/jetty/jettylib/jsp-api.jar to classpath for jsp builds

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