I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
build.xml 140 KiB
Newer Older
  • Learn to ignore specific revisions
  • jrandom's avatar
    jrandom committed
    <?xml version="1.0" encoding="ISO-8859-1"?>
    
    <project basedir="." default="all" name="i2p"
        xmlns:artifact="antlib:org.apache.maven.artifact.ant">
    
    kytv's avatar
    kytv committed
    
    
        <!-- Include property files so that values can be easily overridden.
             Users should create an override.properties file to make changes.
         -->
    
        <property file="override.properties"/>
        <property file="build.properties"/>
    
        <!-- You probably don't want to change anything from here down -->
    
    zzz's avatar
    zzz committed
        <target name="help" depends="all" />
    
        <target name="all" >
            <echo message="Useful targets: " />
    
            <echo message="  pkg:       distclean then package everything up (updater, installer)" />
    
    zzz's avatar
    zzz committed
            <echo message="  dist:      pkg and javadoc" />
    
            <echo message="  dist200:   pkg, updater200, and javadoc" />
    
    jrandom's avatar
    jrandom committed
            <echo message="  installer: build the GUI installer" />
    
            <echo message="  installer-freebsd: build the GUI installer (FreeBSD only)" />
            <echo message="  installer-linux: build the GUI installer (Linux only)" />
            <echo message="  installer-osx: build the GUI installer (OSX only)" />
            <echo message="  installer-windows: build the GUI installer (Windows only)" />
    
            <echo message="  installer-nowindows: build the GUI installer (all but Windows)" />
    
    jrandom's avatar
    jrandom committed
            <echo message="  tarball:   tar the full install into i2p.tar.bz2 (extracts to build a new clean install)" />
    
            <echo message="  updater:   Package the built files in i2pupdate.zip (extracts safely over existing installs)" />
            <echo message="  updater200: Updater compressed with pack200 (creates i2pupdate200.zip, 60% smaller)" />
    
    kytv's avatar
    kytv committed
            <echo message="  signed-updater200: Signed updater compressed with pack200 (creates i2pupdate.su3, 60% smaller)" />
    
    zzz's avatar
    zzz committed
            <echo message="  updaterWithJavadoc: updater including the javadocs, for display in the console" />
    
            <echo message="  updater200WithJavadoc: updater including the javadocs, for display in the console (creates i2pupdate200.zip)" />
    
    kytv's avatar
    kytv committed
            <echo message="  signed-updater200WithJavadoc: Signed updater including the javadocs, for display in the console (creates i2pupdate.su3)" />
    
            <echo message="  updaterWithJavadocAndJetty: updater including the javadocs, for display in the console, and Jetty " />
            <echo message="  updater200WithJavadocAndJetty: updater including the javadocs, for display in the console, and Jetty (creates i2pupdate200.zip)" />
    
    kytv's avatar
    kytv committed
            <echo message="  signed-updater200WithJavadocAndJetty: Signed updater including the javadocs, for display in the console, and Jetty (creates i2pupdate.su3)" />
    
            <echo message="  updaterWithJetty: Updater including Jetty" />
    
    zzz's avatar
    zzz committed
            <echo message="  updater200withJetty: Updater including Jetty" />
    
    kytv's avatar
    kytv committed
            <echo message="  updater200withJetty: Updater including Jetty" />
            <echo message="  signed-updater200withJetty: Signed updater including Jetty" />
    
            <echo message="  updaterWithJettyFixes: updater including local jetty patches" />
    
    zzz's avatar
    zzz committed
            <echo message="  updaterWithGeoIP: updater including GeoIP Files" />
    
            <echo message="  updaterWithJettyFixesAndGeoIP" />
    
    zzz's avatar
    zzz committed
            <echo message="  updaterWithJettyFixesAndJbigi" />
    
            <echo message="  updaterWithJbigi" />
            <echo message="  updater200WithJbigi" />
    
            <echo message="  updaterSmall:   updater with the essentials only - no SAM, i2psnark, SusiMail, SusiDNS, or history.txt" />
    
            <echo message="  updaterRouter:  updater with the i2p.jar and router.jar only" />
    
            <echo message="  distclean: clean up all derived files" />
    
            <!-- <echo message="  syndie:    generate a standalone syndie install" /> -->
    
            <echo message="  desktopgui: generate a standalone desktopgui install" />
    
    jrandom's avatar
    jrandom committed
            <echo message="  i2psnark:  generate a standalone i2psnark install" />
    
            <echo message="  justBOB:  generate a standalone BOB-one.jar" />
    
            <echo message="  javadoc:   generate javadoc for the entire project into ./build/javadoc and ./javadoc.zip" />
    
    zzz's avatar
    zzz committed
            <echo message="  javadoc-test: Javadocs for unit test classes (build/javadoc-test)" />
    
            <echo message="  slackpkg:  generate Slackware package in ./Slackware/i2p" />
    
    dream's avatar
    dream committed
            <echo message="  debianhowto: instructions on building Debian packages" />
    
            <echo message="  debian: generate Debian packages in ../" />
            <echo message="          run &quot;ant debianhowto&quot; for instructions" />
            <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)" />
            <!-- <echo message="  debianrepo: build a Debian repository (reprepro required)" /> -->
    
            <echo message="  poupdate: update the .po files for translators" />
    
            <echo message="  pkg-portable-win32:  build a minimum portable version for win32" />
    
    str4d's avatar
    str4d committed
            <echo message="  bench: build the benchmarks" />
    
       </target>
    
    dream's avatar
    dream committed
        <target name="debianhowto">
    
                <echo message="To build debian packages, you must make sure that you have" />
                <echo message="the necessary build-dependencies installed." />
                <echo message="The packages required to build can be found in the file "/>
                <echo message="&quot;debian/control&quot; in the &quot;Build-Depends&quot; field."/>
                <echo message="In addition to those packages, be sure to install &quot;fakeroot&quot;,"/>
                <echo message="&quot;quilt&quot; and &quot;build-essential&quot;!" />
                <echo message="" />
    
                <echo message="The following command will install the build dependencies for you:" />
    
                <echo message="sudo apt-get install debhelper ant debconf default-jdk gettext libgmp-dev po-debconf fakeroot \" />
    
    zzz's avatar
    zzz committed
                <echo message="  build-essential quilt dh-apparmor dh-systemd libservice-wrapper-java \"  />
                <echo message="  devscripts libjetty9-java libtomcat8-java glassfish-javaee libgetopt-java"  />
    
                <echo message=" " />
                <echo message="The following command will install the additional runtime dependencies:" />
                <echo message="sudo apt-get install libecj-java geoip-database" />
    
                <echo message=" " />
                <echo message="Once the dependencies are installed, run &quot;ant debian&quot;"/>
                <echo message="to patch the source and build the packages." />
    
        </target>
    
        <property name="gpg" value="gpg" />
    
    
        <macrodef name="gpgsign">
            <attribute name="file" />
            <sequential>
                <delete file="@{file}.sig" quiet="true" />
    
                <exec executable="${gpg}" failonerror="true">
                    <arg value="-u" />
    
                    <arg value="${release.gpg.keyid}" />
                    <arg value="-b" />
                    <arg value="@{file}" />
                </exec>
                <chmod type="file" perm="444">
                    <fileset dir="${basedir}">
                        <include name="@{file} @{file}.sig" />
                    </fileset>
                </chmod>
            </sequential>
        </macrodef>
    
    
        <macrodef name="gpgsignasc">
            <attribute name="file" />
            <sequential>
                <delete file="@{file}.asc" quiet="true" />
    
                <exec executable="${gpg}" failonerror="true">
                    <arg value="-u" />
    
                    <arg value="${release.gpg.keyid}" />
                    <arg value="-ab" />
                    <arg value="@{file}" />
                </exec>
                <chmod type="file" perm="444">
                    <fileset dir="${basedir}">
                        <include name="@{file} @{file}.asc" />
                    </fileset>
                </chmod>
            </sequential>
        </macrodef>
    
    
        <macrodef name="mktorrent">
            <attribute name="file" />
            <sequential>
                <delete file="@{file}.torrent" quiet="true"/>
                <java classname="org.klomp.snark.Storage" fork="true" failonerror="true">
                    <classpath>
                        <pathelement location="build/i2p.jar" />
                        <pathelement location="build/i2psnark.jar" />
                    </classpath>
    
    zzz's avatar
    zzz committed
                    <arg value="-a" />
    
                    <arg value="http://tracker2.postman.i2p/announce.php" />
    
    zzz's avatar
    zzz committed
                    <arg value="-c" />
                    <arg value="${build.built-by}" />
                    <arg value="@{file}" />
    
                </java>
            </sequential>
        </macrodef>
    
        <macrodef name="sha256sum">
            <attribute name="file" />
            <sequential>
                <!--
                     Note: "local" only works with ant 1.8+. This limitation shouldn't be
                     a big deal since this macro is only called by the release
                     target.
                 -->
                <local name="file-sum"/>
                <checksum format="MD5SUM" file="@{file}" property="file-sum" algorithm="sha-256"/>
                <echo message="${file-sum}  @{file}" />
            </sequential>
        </macrodef>
    
    
    kytv's avatar
    kytv committed
        <macrodef name="sudsign">
            <attribute name="infile" />
            <attribute name="outfile" />
            <sequential>
    
                <input message="Enter sud/su2 private signing key file:" addproperty="release.privkey" />
    
    kytv's avatar
    kytv committed
                <fail message="You must enter an existing file path." >
                    <condition>
                        <or>
                            <equals arg1="${release.privkey}" arg2=""/>
                            <not>
                                <length file="${release.privkey}" when="greater" length="0" />
                            </not>
                        </or>
                    </condition>
                </fail>
                <echo message="Key file is ${release.privkey}" />
                <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
                    <classpath>
                        <pathelement location="build/i2p.jar" />
                    </classpath>
                    <arg value="sign" />
                    <arg value="@{infile}" />
                    <arg value="@{outfile}" />
                    <arg value="${release.privkey}" />
                    <arg value="${release.number}" />
                </java>
                <echo message="Verify version and VALID signature:" />
                <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
                    <classpath>
                        <pathelement location="build/i2p.jar" />
                    </classpath>
                    <arg value="verifysig" />
                    <arg value="@{outfile}" />
                </java>
                <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
                    <classpath>
                        <pathelement location="build/i2p.jar" />
                    </classpath>
                    <arg value="verifyversion" />
                    <arg value="@{outfile}" />
                </java>
                <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
                    <classpath>
                        <pathelement location="build/i2p.jar" />
                    </classpath>
                    <arg value="showversion" />
                    <arg value="@{outfile}" />
                </java>
            </sequential>
        </macrodef>
    
        <macrodef name="su3sign">
            <attribute name="infile" />
            <attribute name="outfile" />
            <attribute name="sigtype" />
    
    kytv's avatar
    kytv committed
            <sequential>
            <input message="Enter su3 private signing key store:" addproperty="release.privkey.su3" />
            <fail message="You must enter an existing file path." >
                <condition>
                    <or>
                        <equals arg1="${release.privkey.su3}" arg2=""/>
                        <not>
                            <length file="${release.privkey.su3}" when="greater" length="0" />
                        </not>
                    </or>
                </condition>
            </fail>
    
            <input message="Enter su3 key name (you@mail.i2p):" addproperty="release.signer.su3" />
    
    kytv's avatar
    kytv committed
            <fail message="You must enter a name." >
                <condition>
                    <equals arg1="${release.signer.su3}" arg2=""/>
                </condition>
            </fail>
    
            <input message="Enter su3 key password for ${release.signer.su3}:" addproperty="release.password.su3" />
    
    kytv's avatar
    kytv committed
            <fail message="You must enter a password." >
                <condition>
                    <equals arg1="${release.password.su3}" arg2=""/>
                </condition>
            </fail>
                <java classname="net.i2p.crypto.SU3File" inputstring="${release.password.su3}" fork="true" failonerror="true">
                    <classpath>
                        <pathelement location="build/i2p.jar" />
                    </classpath>
                    <arg value="sign" />
                    <arg value="-c" />
                    <arg value="@{sigtype}" />
                    <arg value="-t" />
                    <arg value="RSA_SHA512_4096" />
                    <arg value="@{infile}" />
                    <arg value="@{outfile}" />
                    <arg value="${release.privkey.su3}" />
    
    kytv's avatar
    kytv committed
                    <arg value="${release.signer.su3}" />
                </java>
                <echo message="Verify version and VALID signature:" />
                <java classname="net.i2p.crypto.SU3File" fork="true" failonerror="true">
                    <classpath>
                        <pathelement location="build/i2p.jar" />
                    </classpath>
                    <!-- set base dir so it can find the pubkey cert -->
                    <jvmarg value="-Di2p.dir.base=installer/resources" />
                    <arg value="verifysig" />
                    <arg value="@{outfile}" />
                </java>
                <java classname="net.i2p.crypto.SU3File" fork="true" failonerror="true">
                    <classpath>
                        <pathelement location="build/i2p.jar" />
                    </classpath>
                    <!-- set base dir so it can find the pubkey cert -->
                    <jvmarg value="-Di2p.dir.base=installer/resources" />
                    <arg value="showversion" />
                    <arg value="@{outfile}" />
                </java>
            </sequential>
        </macrodef>
    
        <target name="dist" depends="pkg, javadoc" />
    
        <target name="dist200" depends="pkg200, javadoc" />
    
    zzz's avatar
    zzz committed
        <target name="build" depends="build2">
            <!-- so we don't build standalone for the updater -->
    
    zzz's avatar
    zzz committed
            <!-- This builds apps/i2psnark/java/i2psnark-standalone.zip,
              -   which we don't distribute anywhere...
    
    zzz's avatar
    zzz committed
            <ant dir="apps/i2psnark/java/" target="standalone" />
    
    zzz's avatar
    zzz committed
            -->
    
    zzz's avatar
    zzz committed
        </target>
        <target name="build2" depends="builddep, jar, buildWEB" />
    
        <target name="buildSmall" depends="builddepSmall, jarSmall, buildWEB" />
    
        <target name="buildclean" depends="distclean, build" />
    
    
        <target name="builddep" depends="builddepSmall, buildBOB, buildSAM, buildSusiMail, buildSusiDNS, buildI2PSnark" />
    
    
        <target name="builddepSmall" depends="buildrouter, buildSystray, buildDesktopGui, buildRouterConsole, buildStreaming, buildI2PTunnel, buildAddressbook" />
    
    
        <!-- start of buildX, one for each sub-build.xml.
             Do not put ant tasks in the sub-build.xmls anymore,
             so the build will go faster.
          -->
    
    
        <target name="-setepoch">
            <script language="javascript">
                <![CDATA[
                  property = project.setProperty("epoch",Math.floor((new Date()).getTime()/1000));
                ]]>
            </script>
        </target>
    
    
    zzz's avatar
    zzz committed
        <target name="buildBOB" depends="buildStreaming" >
    
            <copy file="apps/BOB/dist/BOB.jar" todir="build/" />
    
        </target>
    
        <target name="buildSAM" depends="buildStreaming" >
    
            <ant dir="apps/sam/java/" target="jar" />
    
            <copy file="apps/sam/java/build/sam.jar" todir="build/" />
    
        </target>
    
        <target name="buildSusiMail" depends="buildCore, buildJetty" >
    
            <ant dir="apps/susimail/" target="war" />
    
            <copy file="apps/susimail/susimail.war" todir="build/" />
    
        <!-- jar (not war) for testing only -->
        <target name="buildSusiMailJar" depends="buildCore, buildJetty" >
            <ant dir="apps/susimail/" target="jar" />
            <copy file="apps/susimail/susimail.jar" todir="build/" />
        </target>
    
    
        <target name="buildSusiDNS" depends="buildCore, buildJetty, buildImagegen, buildAddressbook" >
    
            <ant dir="apps/susidns/src" target="all" />
    
            <copy file="apps/susidns/src/susidns.war" todir="build/" />
    
        <target name="buildImagegen" depends="buildCore, buildJetty" >
    
            <ant dir="apps/imagegen" target="build" />
    
            <copy file="apps/imagegen/imagegen/build/imagegen.war" todir="build/" />
        </target>
    
    
    zzz's avatar
    zzz committed
        <target name="buildI2PSnark" depends="buildStreaming, buildJetty, buildSystray" >
    
    zzz's avatar
    zzz committed
            <ant dir="apps/i2psnark/java/" target="war" />
    
            <copy file="apps/i2psnark/i2psnark.war" todir="build/" />
            <copy file="apps/i2psnark/java/build/i2psnark.jar" todir="build/" />
    
        <!-- jar (not war) for Android -->
        <target name="buildAddressbookJar" depends="buildCore" >
            <ant dir="apps/addressbook/" target="jar" />
    
            <copy file="apps/addressbook/dist/addressbook.jar" todir="build/" />
    
        <target name="buildAddressbook" depends="buildCore" >
            <ant dir="apps/addressbook/" target="all" />
            <copy file="apps/addressbook/dist/addressbook.jar" todir="build/" />
            <!-- war is empty, only for updates -->
    
            <copy file="apps/addressbook/dist/addressbook.war" todir="build/" />
    
        <!-- Both jars and no war, for Android -->
        <target name="buildI2PTunnelJars" depends="buildStreaming" >
            <ant dir="apps/i2ptunnel/java/" target="uiJar" />
    
            <copy file="apps/i2ptunnel/java/build/i2ptunnel.jar" todir="build/" />
    
            <copy file="apps/i2ptunnel/java/build/i2ptunnel-ui.jar" todir="build/" />
    
    zzz's avatar
    zzz committed
        <target name="buildI2PTunnel" depends="buildStreaming, buildJetty, buildImagegen" >
    
            <ant dir="apps/i2ptunnel/java/" target="build" />
    
            <copy file="apps/i2ptunnel/java/build/i2ptunnel.jar" todir="build/" />
            <copy file="apps/i2ptunnel/java/build/i2ptunnel.war" todir="build/" />
    
        <target name="buildDesktopGui" depends="buildCore, buildrouter" >
    
    zzz's avatar
    zzz committed
    <!--
    
            <ant dir="apps/desktopgui" target="clean" />
    
    zzz's avatar
    zzz committed
    -->
    
            <ant dir="apps/desktopgui" target="jar" />
    
            <copy file="apps/desktopgui/dist/desktopgui.jar" todir="build/" />
    
        <target name="buildRouterConsole" depends="buildrouter, buildSystray, buildDesktopGui, buildJetty, buildJrobin" >
    
    zzz's avatar
    zzz committed
            <ant dir="apps/routerconsole/java/" target="jar" />
    
        <!-- newsxml.jar only (subset of routerconsole, no war) for Android -->
        <target name="buildNewsXMLJar" depends="buildRouter" >
            <ant dir="apps/routerconsole/java/" target="newsxmljar" />
        </target>
    
    
    zzz's avatar
    zzz committed
        <target name="buildJetty" depends="buildCore" >
    
            <ant dir="apps/jetty" target="build" />
    
            <copy todir="build/" >
                <fileset dir="apps/jetty/jettylib" excludes="ant.jar" />
            </copy>
    
        </target>
    
        <target name="buildSystray" depends="buildCore" >
            <ant dir="apps/systray/java/" target="jar" />
    
            <copy file="apps/systray/java/build/systray.jar" todir="build/" />
    
        </target>
    
        <target name="buildStreaming" depends="buildMinistreaming" >
    
    jrandom's avatar
    jrandom committed
            <ant dir="apps/streaming/java/" target="jar" />
    
            <copy file="apps/streaming/java/build/streaming.jar" todir="build/" />
    
        </target>
    
    
        <target name="buildMinistreaming" depends="buildCore" >
            <ant dir="apps/ministreaming/java/" target="jar" />
    
            <copy file="apps/ministreaming/java/build/mstreaming.jar" todir="build/" />
    
        </target>
    
        <target name="buildRouter" depends="buildrouter" />
        <target name="buildrouter" depends="buildCore" >
    
    jrandom's avatar
    jrandom committed
            <ant dir="router/java/" target="jar" />
            <copy file="router/java/build/router.jar" todir="build/" />
        </target>
    
    zzz's avatar
    zzz committed
        <target name="buildCore" depends="buildProperties" >
    
            <ant dir="core/java/" target="jar" />
            <copy file="core/java/build/i2p.jar" todir="build/" />
        </target>
    
    
        <target name="buildJrobin" depends="buildCore" >
    
            <ant dir="apps/jrobin/java/" target="jar" />
            <copy file="apps/jrobin/java/build/jrobin.jar" todir="build/" />
    
    zzz's avatar
    zzz committed
        </target>
    
    
        <target name="buildProperties" depends="getMtnRev, getReleaseNumber, getBuildNumber" >
            <!-- default if not set above -->
            <property name="workspace.version" value="unknown" />
            <tstamp>
                <format property="build.timestamp" pattern="yyyy-MM-dd HH:mm:ss z" timezone="UTC" locale="en" />
            </tstamp>
            <property name="full.version" value="${release.number}-${i2p.build.number}${build.extra}" />
            <echo message="Building version ${full.version} (mtn rev ${workspace.version})" />
        </target>
    
        <target name="buildWEB" depends="buildRouterConsole" >
            <copy file="apps/routerconsole/java/build/routerconsole.jar" todir="build/" />
            <copy file="apps/routerconsole/java/build/routerconsole.war" todir="build/" />
        </target>
    
    
        <target name="buildTools" depends="buildrouter" >
            <ant dir="installer/tools/java" target="jar" />
            <copy file="installer/tools/java/build/tools.jar" todir="build/" />
        </target>
    
    
        <!-- end of sub-build.xml targets -->
    
    
        <target name="checkForMtn" >
            <available property="mtn.available" file="_MTN" type="dir" />
        </target>
    
    
        <target name="failIfNoMtn" depends="checkForMtn">
            <fail message="This target cannot be used without Monotone! Use &quot;fakeroot debian/rules get-orig-source&quot; instead.">
                <condition>
                    <not>
                        <isset property="mtn.available" />
                    </not>
                </condition>
            </fail>
        </target>
    
    
        <target name="getMtnRev" depends="checkForMtn" if="mtn.available" >
    
    zzz's avatar
    zzz committed
            <exec executable="mtn" outputproperty="workspace.version" errorproperty="mtn.error1" failifexecutionfails="false" >
                <arg value="automate" />
                <arg value="get_base_revision_id" />
            </exec>
    
    kytv's avatar
    kytv committed
        <target name="trimMtnRev" depends="getMtnRev">
            <script language="javascript">
                <![CDATA[
                var MtnRev = project.getProperty("workspace.version");
                if (MtnRev != 'unknown' && MtnRev != null) {
                    echo = project.createTask("echo");
                    var MtnShortHash = MtnRev.substring(0,8);
                    project.setProperty("MtnShortHash", MtnShortHash);
                    echo.setMessage("Trimmed hash: " + MtnShortHash);
                    echo.perform();
                } else {
                    project.setProperty("MtnShortHash", 'unknown');
                }
                ]]>
            </script>
        </target>
    
    
    kytv's avatar
    kytv committed
        <target name="checkIfBumped">
            <exec executable="mtn" outputproperty="bumped" errorproperty="mtn.error2" failifexecutionfails="false" >
                <arg value="ls" />
                <arg value="ch" />
                <arg value="router/java/src/net/i2p/router/RouterVersion.java" />
            </exec>
            <condition property="bumped.already">
                <not>
                    <equals arg1="${bumped}" arg2=""/>
                </not>
            </condition>
        </target>
    
    
        <target name="bump" depends="bumpBuild" />
    
    kytv's avatar
    kytv committed
        <target name="bumpBuild" depends="checkIfBumped, getBuildNumber" unless="bumped.already">
            <script language="javascript">
                <![CDATA[
                var newBuildNumber = (Number(project.getProperty("i2p.build.number")) + 1);
                if (newBuildNumber != 'unknown' && newBuildNumber != null) {
                    echo = project.createTask("echo");
                    project.setProperty("new.i2p.build.number", newBuildNumber);
    
    zzz's avatar
    zzz committed
                    echo.setMessage("Build number is now: " + newBuildNumber + project.getProperty("build.extra"));
    
    kytv's avatar
    kytv committed
                    echo.perform();
                }
                ]]>
            </script>
            <replaceregexp byline="true" file="router/java/src/net/i2p/router/RouterVersion.java"
                match='(^\s+public\s+final\s+static\s+long\s+BUILD\s+=\s+)[0-9]+;' replace='\1${new.i2p.build.number};'/>
        </target>
    
    
        <!-- end monotone targets -->
    
        <!-- launch4j targets -->
    
    
        <condition property="noExe">
            <not>
                <!-- We only have launch4j binaries for the following systems -->
                <and>
                    <or>
                        <os arch="x86" />
                        <os arch="i386" />
                        <os arch="i586" />
                        <os arch="i686" />
                        <os arch="amd64" />
                        <os arch="x86_64" />
                    </or>
    
                    <or>
                        <os name="Linux" />
                        <os family="windows" />
                    </or>
    
                </and>
            </not>
        </condition>
    
        <!-- this makes an empty build/launchi2p.jar and the build/i2p.exe for the no-wrapper windows startup, if possible -->
        <target name="buildexe" depends="buildProperties, launch4j" unless="noExe">
    
    kytv's avatar
    kytv committed
            <echo message="See the file &quot;build.properties&quot; if this step fails." />
    
    jrandom's avatar
    jrandom committed
            <jar destfile="./build/launchi2p.jar">
                <manifest>
    
                    <attribute name="Main-Class" value="net.i2p.router.RouterLaunch" />
    
                    <attribute name="Class-Path" value="lib/i2p.jar lib/router.jar lib/jbigi.jar lib/BOB.jar lib/sam.jar lib/mstreaming.jar lib/streaming.jar lib/routerconsole.jar lib/i2ptunnel.jar lib/org.mortbay.jetty.jar lib/javax.servlet.jar lib/jasper-runtime.jar lib/commons-logging.jar lib/commons-el.jar lib/wrapper.jar lib/systray.jar lib/desktopgui.jar lib/i2psnark.jar lib/jrobin.jar lib/jstl.jar lib/standard.jar lib/jetty-continuation.jar lib/jetty-deploy.jar lib/jetty-http.jar lib/jetty-i2p.jar lib/jetty-io.jar lib/jetty-rewrite-handler.jar lib/jetty-security.jar lib/jetty-servlet.jar lib/jetty-servlets.jar lib/jetty-start.jar lib/jetty-util.jar lib/jetty-webapp.jar lib/jetty-xml.jar" />
    
                    <attribute name="Built-By" value="${build.built-by}" />
                    <attribute name="Build-Date" value="${build.timestamp}" />
                    <attribute name="Base-Revision" value="${workspace.version}" />
    
                </manifest>
    
    jrandom's avatar
    jrandom committed
            </jar>
    
            <!-- now the standalone launcher exe -->
    
    jrandom's avatar
    jrandom committed
            <launch4j configFile="./installer/i2pstandalone.xml" />
    
    jrandom's avatar
    jrandom committed
        </target>
    
        <target name="launch4j">
            <taskdef name="launch4j"
                     classname="net.sf.launch4j.ant.Launch4jTask"
                     classpath="${basedir}/installer/lib/launch4j/launch4j.jar:${basedir}/installer/lib/launch4j/lib/xstream.jar" />
         </target>
    
    
         <!--
              the files are now copied to the build directory
              in the build* targets
          -->
         <target name="jar" depends="jarSmall" />
    
         <target name="jarSmall" depends="builddepSmall" />
    
        <!-- Custom target to collect the jars that I2P-Bote needs to compile, so it can compile from source. -->
        <target name="jarBote" depends="buildRouter, buildStreaming, buildJetty" >
    
    zzz's avatar
    zzz committed
            <copy file="apps/susidns/src/lib/jstl.jar" todir="build/" />
            <copy file="apps/susidns/src/lib/standard.jar" todir="build/" />
    
        <target name="jbigi-list-changes" depends="checkForMtn" if="mtn.available">
    
            <exec executable="mtn" outputproperty="workspace.changes.jbigi" errorproperty="mtn.error.jbigi" failifexecutionfails="false" >
                <arg value="list" />
                <arg value="changed" />
                <arg value="installer/lib/jbigi" />
            </exec>
            <!-- \n in an attribute value generates an invalid manifest -->
            <exec executable="tr" inputstring="${workspace.changes.jbigi}" outputproperty="workspace.changes.jbigi.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
                <arg value="-s" />
    
                <arg value="&quot;[:space:]&quot;" />
    
                <arg value="," />
            </exec>
        </target>
    
    
        <target name="jbigi" depends="buildProperties, jbigi-list-changes">
    
            <!-- set if unset -->
            <property name="workspace.changes.jbigi.tr" value="" />
    
            <mkdir dir="./build" />
    
            <jar destfile="build/jbigi.jar" whenmanifestonly="fail" >
                <fileset dir="installer/lib/jbigi" includes="*.so *.dll *.jnilib" />
    
                <manifest>
    
                    <attribute name="Built-By" value="${build.built-by}" />
    
                    <attribute name="Build-Date" value="${build.timestamp}" />
                    <attribute name="Base-Revision" value="${workspace.version}" />
                    <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
                </manifest>
    
            </jar>
        </target>
    
        <target name="jbigi-nowindows" depends="buildProperties, jbigi-list-changes">
    
            <!-- set if unset -->
            <property name="workspace.changes.jbigi.tr" value="" />
    
            <delete file="build/jbigi.jar" failonerror="false" quiet="true" />
    
            <jar destfile="build/jbigi.jar" whenmanifestonly="fail" >
                <fileset dir="installer/lib/jbigi" includes="*.so *.jnilib" />
                <manifest>
    
                    <attribute name="Built-By" value="${build.built-by}" />
    
                    <attribute name="Build-Date" value="${build.timestamp}" />
                    <attribute name="Base-Revision" value="${workspace.version}" />
                    <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
                </manifest>
            </jar>
        </target>
    
    
        <!-- Now system-specific jbigis in alphabetical order -->
    
        <target name="jbigi-freebsd-only"  depends="buildProperties, jbigi-list-changes">
    
            <!-- set if unset -->
            <property name="workspace.changes.jbigi.tr" value="" />
    
            <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
    
                <fileset dir="installer/lib/jbigi" includes="*bsd*.so" />
    
                <manifest>
    
                    <attribute name="Built-By" value="${build.built-by}" />
    
                    <attribute name="Build-Date" value="${build.timestamp}" />
                    <attribute name="Base-Revision" value="${workspace.version}" />
                    <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
                </manifest>
    
            </jar>
        </target>
    
    
        <target name="jbigi-linux-only"  depends="buildProperties, jbigi-list-changes">
    
            <!-- set if unset -->
            <property name="workspace.changes.jbigi.tr" value="" />
    
            <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
                <fileset dir="installer/lib/jbigi" includes="*linux*.so" />
    
                <manifest>
    
                    <attribute name="Built-By" value="${build.built-by}" />
    
                    <attribute name="Build-Date" value="${build.timestamp}" />
                    <attribute name="Base-Revision" value="${workspace.version}" />
                    <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
                </manifest>
    
            </jar>
        </target>
    
    
        <target name="jbigi-linux-x86-only"  depends="buildProperties, jbigi-list-changes">
            <!-- set if unset -->
            <property name="workspace.changes.jbigi.tr" value="" />
            <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
                <fileset dir="installer/lib/jbigi" includes="*linux*.so" excludes="*linux-arm*.so,*linux-ppc*.so" />
                <manifest>
                    <attribute name="Built-By" value="${build.built-by}" />
                    <attribute name="Build-Date" value="${build.timestamp}" />
                    <attribute name="Base-Revision" value="${workspace.version}" />
                    <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
                </manifest>
            </jar>
        </target>
    
    
        <target name="jbigi-linux-nonx86-only"  depends="buildProperties, jbigi-list-changes">
    
            <!-- set if unset -->
            <property name="workspace.changes.jbigi.tr" value="" />
            <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
                <fileset dir="installer/lib/jbigi" includes="*linux-arm*.so,*linux-ppc*.so" />
                <manifest>
    
                    <attribute name="Built-By" value="${build.built-by}" />
    
                    <attribute name="Build-Date" value="${build.timestamp}" />
                    <attribute name="Base-Revision" value="${workspace.version}" />
                    <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
                </manifest>
            </jar>
        </target>
    
    
        <target name="jbigi-osx-only"  depends="buildProperties, jbigi-list-changes" >
            <!-- set if unset -->
            <property name="workspace.changes.jbigi.tr" value="" />
            <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
                <fileset dir="installer/lib/jbigi" includes="*.jnilib" />
                <manifest>
    
                    <attribute name="Built-By" value="${build.built-by}" />
    
                    <attribute name="Build-Date" value="${build.timestamp}" />
                    <attribute name="Base-Revision" value="${workspace.version}" />
                    <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
                </manifest>
            </jar>
        </target>
    
    
        <target name="jbigi-windows-only" depends="buildProperties, jbigi-list-changes" >
            <!-- set if unset -->
            <property name="workspace.changes.jbigi.tr" value="" />
    
            <delete file="build/jbigi.jar" failonerror="false" quiet="true" />
    
            <jar destfile="build/jbigi.jar" whenmanifestonly="fail" >
                <fileset dir="installer/lib/jbigi" includes="*windows*.dll" />
                <manifest>
    
                    <attribute name="Built-By" value="${build.built-by}" />
    
                    <attribute name="Build-Date" value="${build.timestamp}" />
                    <attribute name="Base-Revision" value="${workspace.version}" />
                    <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
                </manifest>
            </jar>
        </target>
    
        <!-- the apps need to compile the jsps to poupdate -->
    
    zzz's avatar
    zzz committed
        <target name="poupdate" depends="buildRouter, buildStreaming, buildSystray, buildJetty, buildDesktopGui, buildJrobin" >
    
    walking's avatar
    walking committed
            <echo message="Setting environment variable LG2 to a lang code (eg: de,zh,nl etc)" />
            <echo message=" will restrict language update to the language you specified, leaving other language untact." />
    
    zzz's avatar
    zzz committed
            <ant dir="apps/routerconsole/java/" >
                <target name="poupdate" />
                <target name="poupdate-news" />
    
                <target name="poupdate-countries" />
    
    zzz's avatar
    zzz committed
            </ant>
    
            <ant dir="apps/i2psnark/java/" target="poupdate" />
    
    zzz's avatar
    zzz committed
            <ant dir="apps/i2ptunnel/java/" >
                <target name="poupdate" />
                <target name="poupdate-proxy" />
            </ant>
    
    zzz's avatar
    zzz committed
            <ant dir="apps/susidns/src/" target="poupdate" />
    
            <ant dir="apps/susimail/" target="poupdate" />
    
            <ant dir="apps/desktopgui" target="poupdate" />
    
            <ant dir="installer/resources/locale" target="poupdate" />
    
    kytv's avatar
    kytv committed
            <ant dir="apps/ministreaming/java" target="poupdate" />
    
        <condition property="no.bundle">
            <isfalse value="${require.gettext}" />
        </condition>
    
        <target name="prep-script-translation" unless="no.bundle" >
    
            <!-- script translation added in 0.8.13, enabled in 0.9.5. -->
    
            <ant dir="installer/resources/locale" target="bundle" />
            <copy todir="pkg-temp/locale/">
                <fileset dir="installer/resources/locale/mo/" />
            </copy>
    
    zzz's avatar
    zzz committed
    
        <target name="javadoc" depends="getReleaseNumber, getBuildNumber" >
    
    zzz's avatar
    zzz committed
            <ant dir="apps/jetty" target="ensureJettylib" />
    
            <mkdir dir="./build" />
            <mkdir dir="./build/javadoc" />
    
    kytv's avatar
    kytv committed
            <javadoc access="package"
                destdir="./build/javadoc"
                packagenames="*"
                use="true"
                splitindex="true"
    
    zzz's avatar
    zzz committed
                failonerror="true"
    
                doctitle="I2P Javadocs for Release ${release.number} Build ${i2p.build.number}${build.extra}"
    
    zzz's avatar
    zzz committed
                windowtitle="I2P Anonymous Network - Java Documentation - Version ${release.number}">
    
                <group title="Core SDK (i2p.jar)" packages="net.i2p:net.i2p.*:net.i2p.client:net.i2p.client.*:net.i2p.internal:net.i2p.internal.*:freenet.support.CPUInformation:org.bouncycastle.oldcrypto:org.bouncycastle.oldcrypto.*:gnu.crypto.*:gnu.getopt:gnu.gettext:com.nettgryppa.security:org.apache.http.conn.ssl:org.apache.http.conn.util:org.apache.http.util" />
    
                <group title="Streaming Library" packages="net.i2p.client.streaming:net.i2p.client.streaming.impl" />
    
    zzz's avatar
    zzz committed
                <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" />
    
                <group title="Router Console" packages="net.i2p.router.web:net.i2p.router.web.*:net.i2p.router.update:net.i2p.router.news" />
    
                <!-- apps and bridges starting here, alphabetical please -->
    
                <group title="Addressbook Application" packages="net.i2p.addressbook:net.i2p.router.naming:net.metanotion:net.metanotion.*" />
    
                <group title="BOB Bridge" packages="net.i2p.BOB" />
    
    zzz's avatar
    zzz committed
                <group title="BOB Demos" packages="net.i2p.BOB.Demos.echo.echoclient:net.i2p.BOB.Demos.echo.echoserver" />
    
    zzz's avatar
    zzz committed
                <group title="Desktopgui Application" packages="net.i2p.desktopgui:net.i2p.desktopgui.*" />
    
    zzz's avatar
    zzz committed
                <group title="I2PSnark Application" packages="org.klomp.snark:org.klomp.snark.*" />
    
                <group title="I2PTunnel Application" packages="net.i2p.i2ptunnel:net.i2p.i2ptunnel.*" />
    
                <group title="Imagegen Application" packages="com.docuverse.identicon:com.google.zxing:com.google.zxing.*:net.i2p.imagegen" />
    
                <group title="Installer Utilities" packages="net.i2p.installer" />
    
                <group title="Jetty Utilities" packages="net.i2p.jetty:net.i2p.servlet:net.i2p.servlet.*" />
    
                <group title="JRobin Library" packages="org.jrobin:org.jrobin.*:engine.misc" />
    
                <group title="SAM Bridge" packages="net.i2p.sam" />
    
    zzz's avatar
    zzz committed
                <group title="SAM Demos" packages="net.i2p.sam.client" />
    
                <group title="SusiDNS Application" packages="i2p.susi.dns:net.i2p.addressbook.servlet" />
    
    zzz's avatar
    zzz committed
                <group title="SusiMail Application" packages="i2p.susi.webmail:i2p.susi.webmail.*:i2p.susi.debug:i2p.susi.util" />
    
                <group title="Systray Application" packages="net.i2p.apps.systray" />
    
    jrandom's avatar
    jrandom committed
                <sourcepath>
                    <pathelement location="core/java/src" />
                    <pathelement location="router/java/src" />
                    <pathelement location="apps/ministreaming/java/src" />
    
    jrandom's avatar
    jrandom committed
                    <pathelement location="apps/streaming/java/src" />
    
    jrandom's avatar
    jrandom committed
                    <pathelement location="apps/i2ptunnel/java/src" />
                    <pathelement location="apps/systray/java/src" />
    
                    <pathelement location="apps/desktopgui/src" />
    
    jrandom's avatar
    jrandom committed
                    <pathelement location="apps/routerconsole/java/src" />
    
                    <pathelement location="apps/addressbook/java/src" />
                    <pathelement location="apps/i2psnark/java/src" />
                    <pathelement location="apps/sam/java/src" />
    
                    <pathelement location="apps/BOB/src" />
    
    zzz's avatar
    zzz committed
                    <pathelement location="apps/BOB/Demos/echo/echoclient/src" />
                    <pathelement location="apps/BOB/Demos/echo/echoserver/src" />
    
                    <pathelement location="apps/susidns/src/java/src" />
                    <pathelement location="apps/susimail/src/src" />
    
                    <pathelement location="apps/jetty/java/src" />
    
                    <pathelement location="apps/imagegen/imagegen/webapp/src/main/java" />
                    <pathelement location="apps/imagegen/identicon/core/src/main/java" />
                    <pathelement location="apps/imagegen/zxing/core/src/main/java" />
                    <pathelement location="apps/imagegen/zxing/javase/src/main/java" />
    
                    <pathelement location="apps/jrobin/java/src" />
    
                    <pathelement location="installer/java/src" />
    
    jrandom's avatar
    jrandom committed
                </sourcepath>
                <classpath>
                    <pathelement location="apps/jetty/jettylib/org.mortbay.jetty.jar" />
    
                    <pathelement location="apps/jetty/jettylib/jasper-runtime.jar" />
    
    sponge's avatar
    sponge committed
                    <pathelement location="apps/jetty/jettylib/javax.servlet.jar" />
    
    zzz's avatar
    zzz committed
                    <pathelement location="apps/jetty/jettylib/jetty-http.jar" />
                    <pathelement location="apps/jetty/jettylib/jetty-security.jar" />
                    <pathelement location="apps/jetty/jettylib/jetty-servlet.jar" />
    
                    <pathelement location="apps/jetty/jettylib/jetty-start.jar" />
                    <pathelement location="apps/jetty/jettylib/jetty-util.jar" />
    
    zzz's avatar
    zzz committed
                    <pathelement location="apps/jetty/jettylib/jetty-webapp.jar" />
                    <pathelement location="apps/jetty/jettylib/jetty-xml.jar" />
    
    zzz's avatar
    zzz committed
                    <pathelement location="apps/jrobin/jrobin-1.5.9.1.jar" />
    
                    <pathelement location="installer/lib/wrapper/all/wrapper.jar" />
    
    zzz's avatar
    zzz committed
                    <!-- following are only for debian builds -->
                    <pathelement location="core/java/build/libintl.jar" />
                    <pathelement location="core/java/build/gnu-getopt.jar" />
    
    jrandom's avatar
    jrandom committed
                </classpath>
    
                <!-- These variables are stored in build.properties.
                      End-users can override by creating the file override.properties -->
    
                <link offline="true" href="${javasedocs.url}" packagelistLoc="installer/resources/package-lists/java/" />
    
                <link offline="true" href="${javaeedocs.url}" packagelistLoc="installer/resources/package-lists/javaee/" />
    
                <link offline="true" href="${jettydocs.url}" packagelistLoc="installer/resources/package-lists/jetty/" />
                <link offline="true" href="${wrapperdocs.url}" packagelistLoc="installer/resources/package-lists/wrapper/" />
    
    jrandom's avatar
    jrandom committed
            </javadoc>
    
            <echo message="Warning, javadoc embeds timestamps in the output, run with 'TZ=UTC ant javadoc' if you plan to distribute" />
    
    zzz's avatar
    zzz committed
    
    
        <target name="javadoc-zip" depends="javadoc">
            <zip destfile="javadoc.zip" basedir="build" level="9" includes="javadoc\**" />
    
    zzz's avatar
    zzz committed
        </target>
    
        <target name="javadoc-test" depends="buildRouter, javadoc" >
            <mkdir dir="./build" />
            <mkdir dir="./build/javadoc-test" />
    
    kytv's avatar
    kytv committed
    
            <!-- set junit home to the old default unless overridden elsewhere -->
            <property name="junit.home" value="${ant.home}/lib/" />
    
    zzz's avatar
    zzz committed
            <javadoc access="package"
                destdir="./build/javadoc-test"
                packagenames="*"
                use="true"
                splitindex="true"
    
                doctitle="I2P Unit Test Javadocs for Release ${release.number} Build ${i2p.build.number}${build.extra}"
    
    zzz's avatar
    zzz committed
                windowtitle="I2P Anonymous Network - Java Documentation - Version ${release.number}">
    
                <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.*" />
    
                <group title="Router" packages="net.i2p.router:net.i2p.router.*:net.i2p.data.i2np:org.cybergarage.*:org.freenetproject:org.xlattice.crypto.filters" />
    
    zzz's avatar
    zzz committed
                <sourcepath>
    
                    <pathelement location="core/java/test/junit" />
                    <pathelement location="router/java/test/junit" />
    
    kytv's avatar
    kytv committed
                    <pathelement location="core/java/test/scalatest" />
    
    zzz's avatar
    zzz committed
                </sourcepath>
                <classpath>
                    <pathelement location="build/i2p.jar" />
                    <pathelement location="build/router.jar" />
    
    kytv's avatar
    kytv committed
                    <pathelement location="${junit.home}/junit4.jar" />
    
                    <pathelement location="${hamcrest.home}/hamcrest-all.jar" />
    
    zzz's avatar
    zzz committed
                </classpath>
    
                <!--
                     These variables are stored in build.properties.
                     End-users can override by creating the file override.properties
                -->
    
    zzz's avatar
    zzz committed
                <link offline="true" href="${javasedocs.url}" packagelistLoc="installer/resources/package-lists/java/" />
                <link offline="true" href="${junitdocs.url}" packagelistLoc="installer/resources/package-lists/junit/" />
                <link offline="true" href="${i2pdocs.url}" packagelistLoc="build/javadoc/" />
            </javadoc>
            <echo message="Warning, javadoc embeds timestamps in the output, run with 'TZ=UTC ant javadoc' if you plan to distribute" />
    
        </target>
    
        <target name="getReleaseNumber">
            <loadfile srcfile="core/java/src/net/i2p/CoreVersion.java" property="release.number">
                <filterchain>
                    <linecontains>
                        <contains value="public final static String VERSION"/>
                    </linecontains>
                    <tokenfilter>
    
    kytv's avatar
    kytv committed
                        <replaceregex pattern='.*"([^"]+)";' replace="\1" flags="gi" />
    
            <property name="release.number" value="unknown" />
    
    zzz's avatar
    zzz committed
            <echo message="Release number is ${release.number}" />
        </target>
    
    
        <target name="getBuildNumber">
            <loadfile srcfile="router/java/src/net/i2p/router/RouterVersion.java" property="i2p.build.number">
                <filterchain>
                    <linecontains>
                        <contains value="public final static long BUILD" />
                    </linecontains>
                    <tokenfilter>
    
    kytv's avatar
    kytv committed
                        <replaceregex pattern=".*=\s+([0-9]+);" replace="\1" flags="gi" />
    
    kytv's avatar
    kytv committed
                    <striplinebreaks/>
    
                </filterchain>
            </loadfile>
            <loadfile srcfile="router/java/src/net/i2p/router/RouterVersion.java" property="build.extra">
                <filterchain>
                    <linecontains>
                        <contains value="public final static String EXTRA" />
                    </linecontains>
                    <tokenfilter>
    
    kytv's avatar
    kytv committed
                        <replaceregex pattern='.*"(.*)";' replace="\1" flags="gi" />
    
    kytv's avatar
    kytv committed
                    <striplinebreaks/>
    
            <property name="i2p.build.number" value="??" />
    
            <property name="build.extra" value="" />
    
            <echo message="Build number is ${i2p.build.number}${build.extra}" />
    
    zzz's avatar
    zzz committed
        </target>
    
    
        <target name="verifyReleaseBuildNumbers" depends="getReleaseNumber, getBuildNumber" >
    
    zzz's avatar
    zzz committed
            <echo message="SDK: ${java.vendor} ${java.version} (${java.runtime.name} ${java.runtime.version})" />
    
            <fail message="Bad release number: ${release.number}" >
                <condition>
                    <or>
                        <equals arg1="${release.number}" arg2="unknown"/>
                        <equals arg1="${release.number}" arg2=""/>
                    </or>
                </condition>
            </fail>
    
            <fail message="Non-zero build number: ${i2p.build.number}" >
    
                        <equals arg1="${i2p.build.number}" arg2="0"/>
    
                    </not>
                </condition>
            </fail>
            <fail message="Non-empty extra build: ${build.extra}" >
                <condition>
                    <not>
                        <equals arg1="${build.extra}" arg2=""/>
                    </not>
                </condition>
            </fail>
        </target>
    
    
        <target name="-pre-sign">
                <!-- if you're distributing su3 files to others, at a minimum you should set these -->
    
    zzz's avatar
    zzz committed
                <fail message="javac.compilerargs must contain a -bootclasspath option in override.properties">
                    <condition>
                        <not><contains string="${javac.compilerargs}" substring="-bootclasspath"/></not>
                    </condition>
                </fail>
    
    zzz's avatar
    zzz committed
                <fail message="javac.compilerargs7 must contain a -bootclasspath option in override.properties">
                    <condition>
                        <not><contains string="${javac.compilerargs7}" substring="-bootclasspath"/></not>
    
    zzz's avatar
    zzz committed
                    </condition>
                </fail>
                <fail message="build.built-by must be set in override.properties">
                    <condition>
                        <equals arg1="${build.built-by}" arg2="unknown"/>
                    </condition>
                </fail>
                <fail message="require.gettext must be true">
                    <condition>
                        <not><equals arg1="${require.gettext}" arg2="true"/></not>
                    </condition>
                </fail>
    
        <target name="-pre-release" depends="-pre-sign, failIfNoMtn">
    
                <echo message="================================================================" />
                <echo message="Did you update these files?" />
                <exec executable="ls" failonerror="true">
                        <arg value="-l" />
                        <arg value="history.txt" />
                        <arg value="installer/install.xml" />
                        <arg value="core/java/src/net/i2p/CoreVersion.java" />
                        <arg value="router/java/src/net/i2p/router/RouterVersion.java" />
                </exec>
                <echo message="Everything is checked in, right? Let's be sure:" />
                <exec executable="mtn" failonerror="true">
                        <arg value="st" />
                </exec>
                <echo message="If there are any modified files above, stop now!" />
                <echo message="================================================================" />
                <sleep seconds="3"/>
        </target>
    
    
            <delete dir="./build" />
    
            <delete dir="./reports" />
            <delete file="installer/lib/izpack/patches.jar" failonerror="false" quiet="true" />
    
    jrandom's avatar
    jrandom committed
            <delete file="syndie-standalone.zip" failonerror="false" quiet="true" />
    
    jrandom's avatar
    jrandom committed
            <delete file="i2psnark-standalone.zip" failonerror="false" quiet="true" />
    
            <delete file="BOB-one.jar" failonerror="false" quiet="true" />
    
            <delete file="core/java/cobertura.ser"/>
    
            <delete file="javadoc.zip" />
            <delete file="i2p.fba" />
            <delete file="${sloccount.report.file}" />
    
            <delete file="mavencentral-i2p.jar" />
    
            <delete file="mavencentral-router.jar" />
    
            <delete file="mavencentral-mstreaming.jar" />
            <delete file="mavencentral-streaming.jar" />
    
            <delete file="mavencentral-servlet-i2p.jar" />
    
        <target name="distclean" depends="clean">