Changeset fd91927c


Ignore:
Timestamp:
Feb 17, 2011 12:47:35 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
d59e3f9
Parents:
a3d466e
Message:
  • Build:
    • Add includeAntRuntime=false to all javac targets
    • Add build date, mtn rev, and changed file list to all manifests
    • Add unless=uptodate to all jar and war targets (bob and dtg still todo)
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • apps/addressbook/build.xml

    ra3d466e rfd91927c  
    3939        <target name="compile" depends="init, depend">
    4040                <javac debug="true" deprecation="on" source="1.5" target="1.5"
     41                       includeAntRuntime="false"
    4142                       srcdir="${src}" destdir="${build}">
    4243            <compilerarg line="${javac.compilerargs}" />
     
    4849        </target>
    4950
    50         <target name="jar" depends="compile">
     51        <!-- unused for now, as we oddly ship addressbook as a .war -->
     52        <target name="jar" depends="compile, changes">
    5153                <jar basedir="${build}" destfile="${dist}/${jar}">
    5254                        <manifest>
    5355                                <attribute name="Main-Class" value="addressbook.Daemon"/>
     56                                <attribute name="Build-Date" value="${build.timestamp}" />
     57                                <attribute name="Base-Revision" value="${workspace.version}" />
     58                                <attribute name="Workspace-Changes" value="${workspace.changes}" />
    5459                        </manifest>
    5560                </jar>
    5661        </target>
    5762       
    58         <target name="war" depends="compile" unless="war.uptodate">
     63        <target name="war" depends="compile, changes, warUpToDate" unless="war.uptodate">
    5964                <mkdir dir="${dist}/tmp"/>
    6065                <mkdir dir="${dist}/tmp/WEB-INF"/>
     
    6368                        <fileset dir="${build}"/>
    6469                </copy>
    65                 <war basedir="${dist}/tmp" webxml="web.xml" destfile="${dist}/${war}"/>
     70                <war basedir="${dist}/tmp" webxml="web.xml" destfile="${dist}/${war}">
     71                        <manifest>
     72                                <attribute name="Build-Date" value="${build.timestamp}" />
     73                                <attribute name="Base-Revision" value="${workspace.version}" />
     74                                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
     75                        </manifest>
     76                </war>
    6677                <delete dir="${dist}/tmp"/>
    6778        </target>
    6879       
    69         <uptodate property="war.uptodate" targetfile="${dist}/${war}">
    70             <srcfiles dir= "." includes="${build}/**/*.class, web.xml"/>
    71         </uptodate>
     80        <target name="warUpToDate">
     81                <uptodate property="war.uptodate" targetfile="${dist}/${war}">
     82                            <srcfiles dir= "." includes="${build}/**/*.class, web.xml"/>
     83                </uptodate>
     84        </target>
    7285
     86        <target name="changes">
     87                <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
     88                    <arg value="list" />
     89                    <arg value="changed" />
     90                    <arg value="." />
     91                </exec>
     92                <!-- \n in an attribute value generates an invalid manifest -->
     93                <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     94                        <arg value="-s" />
     95                        <arg value="[:space:]" />
     96                        <arg value="," />
     97                </exec>
     98        </target>
    7399</project>
  • apps/desktopgui/build.xml

    ra3d466e rfd91927c  
    2525        <target name="compile" depends="init">
    2626                <javac debug="true" deprecation="on" source="1.5" target="1.5"
     27                       includeAntRuntime="false"
    2728                       srcdir="${src}" destdir="${build}">
    2829            <compilerarg line="${javac.compilerargs}" />
     
    4950            <arg value="./bundle-messages.sh" />
    5051        </exec>
     52        <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
     53            <arg value="list" />
     54            <arg value="changed" />
     55            <arg value="." />
     56        </exec>
     57        <!-- \n in an attribute value generates an invalid manifest -->
     58        <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     59            <arg value="-s" />
     60            <arg value="[:space:]" />
     61            <arg value="," />
     62        </exec>
    5163                <jar basedir="${build}" destfile="${dist}/${jar}">
    5264                        <manifest>
    5365                                <attribute name="Main-Class" value="net.i2p.desktopgui.Main"/>
     66                                <attribute name="Build-Date" value="${build.timestamp}" />
     67                                <attribute name="Base-Revision" value="${workspace.version}" />
     68                                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
    5469                        </manifest>
    5570                </jar>
  • apps/i2psnark/java/build.xml

    ra3d466e rfd91927c  
    3131            debug="true" deprecation="on" source="1.5" target="1.5"
    3232            destdir="./build/obj"
     33            includeAntRuntime="false"
    3334            classpath="../../../core/java/build/i2p.jar:../../jetty/jettylib/org.mortbay.jetty.jar:../../jetty/jettylib/javax.servlet.jar:../../ministreaming/java/build/mstreaming.jar" >
    3435            <compilerarg line="${javac.compilerargs}" />
    3536        </javac>
    3637    </target>
    37     <target name="jar" depends="builddep, compile">
     38
     39    <target name="jar" depends="builddep, compile, jarUpToDate" unless="jar.uptodate" >
     40        <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
     41            <arg value="list" />
     42            <arg value="changed" />
     43            <arg value=".." />
     44        </exec>
     45        <!-- \n in an attribute value generates an invalid manifest -->
     46        <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     47            <arg value="-s" />
     48            <arg value="[:space:]" />
     49            <arg value="," />
     50        </exec>
    3851        <jar destfile="./build/i2psnark.jar" basedir="./build/obj" includes="**/*.class" excludes="**/I2PSnarkServlet*.class **/messages_*.class">
    3952            <manifest>
    4053                <attribute name="Main-Class" value="org.klomp.snark.Snark" />
    4154                <attribute name="Class-Path" value="i2p.jar mstreaming.jar streaming.jar" />
     55                <attribute name="Build-Date" value="${build.timestamp}" />
     56                <attribute name="Base-Revision" value="${workspace.version}" />
     57                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
    4258            </manifest>
    4359        </jar>
    4460    </target>   
     61   
     62    <target name="jarUpToDate">
     63        <uptodate property="jar.uptodate" targetfile="build/i2psnark.jar" >
     64            <srcfiles dir= "build/obj" includes="**/*.class" excludes="**/I2PSnarkServlet*.class **/messages_*.class" />
     65        </uptodate>
     66    </target>   
     67
    4568    <!-- Ideally we would include
    4669      -  only include the servlet, everything else is in the jar.
     
    5073          <classes dir="./build/obj" includes="**/I2PSnarkServlet*.class" />
    5174     -->
    52     <target name="war" depends="jar, bundle">
     75    <target name="war" depends="jar, bundle, warUpToDate" unless="war.uptodate" >
    5376        <war destfile="../i2psnark.war" webxml="../web.xml" basedir="../" includes="_icons/*" >
    5477          <!-- include only the web stuff, as of 0.7.12 the router will add i2psnark.jar to the classpath for the war -->
    5578          <classes dir="./build/obj" includes="**/web/*.class" />
     79            <manifest>
     80                <attribute name="Build-Date" value="${build.timestamp}" />
     81                <attribute name="Base-Revision" value="${workspace.version}" />
     82                <attribute name="Workspace-Changes" value="${workspace.changes}" />
     83            </manifest>
    5684        </war>
     85    </target>
     86   
     87    <target name="warUpToDate">
     88        <uptodate property="war.uptodate" targetfile="../i2psnark.war" >
     89            <srcfiles dir= "." includes="build/obj/web/**/*.class ../_icons/* ../web.xml" />
     90        </uptodate>
    5791    </target>
    5892   
  • apps/i2ptunnel/java/build.xml

    ra3d466e rfd91927c  
    2929            debug="true" deprecation="on" source="1.5" target="1.5"
    3030            destdir="./build/obj"
     31            includeAntRuntime="false"
    3132            classpath="../../../core/java/build/i2p.jar:../../ministreaming/java/build/mstreaming.jar" >
    3233            <compilerarg line="${javac.compilerargs}" />
     
    3738      -  This will require sponge to rewrite some seedless stuff that uses it.
    3839     -->
    39     <target name="jar" depends="builddep, compile">
     40    <target name="jar" depends="builddep, compile, jarUpToDate" unless="jar.uptodate" >
     41        <exec executable="mtn" outputproperty="workspace.changes.j" errorproperty="mtn.error2" failifexecutionfails="false" >
     42            <arg value="list" />
     43            <arg value="changed" />
     44            <arg value="." />
     45        </exec>
     46        <!-- \n in an attribute value generates an invalid manifest -->
     47        <exec executable="tr" inputstring="${workspace.changes.j}" outputproperty="workspace.changes.j.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     48            <arg value="-s" />
     49            <arg value="[:space:]" />
     50            <arg value="," />
     51        </exec>
    4052        <jar destfile="./build/i2ptunnel.jar" basedir="./build/obj" includes="**/*.class">
    4153            <manifest>
    4254                <attribute name="Main-Class" value="net.i2p.i2ptunnel.I2PTunnel" />
    4355                <attribute name="Class-Path" value="i2p.jar mstreaming.jar" />
     56                <attribute name="Build-Date" value="${build.timestamp}" />
     57                <attribute name="Base-Revision" value="${workspace.version}" />
     58                <attribute name="Workspace-Changes" value="${workspace.changes.j.tr}" />
    4459            </manifest>
    4560        </jar>
     61    </target>
     62
     63    <target name="jarUpToDate">
     64        <uptodate property="jar.uptodate" targetfile="build/i2ptunnel.jar" >
     65            <srcfiles dir= "build/obj" includes="**/*.class" />
     66        </uptodate>
    4667    </target>
    4768
     
    7697    </target>
    7798
    78     <target name="war" depends="precompilejsp, bundle">
     99    <target name="war" depends="precompilejsp, bundle, warUpToDate" unless="war.uptodate" >
     100        <exec executable="mtn" outputproperty="workspace.changes.w" errorproperty="mtn.error2" failifexecutionfails="false" >
     101            <arg value="list" />
     102            <arg value="changed" />
     103            <arg value="../jsp" />
     104        </exec>
     105        <!-- \n in an attribute value generates an invalid manifest -->
     106        <exec executable="tr" inputstring="${workspace.changes.w}" outputproperty="workspace.changes.w.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     107            <arg value="-s" />
     108            <arg value="[:space:]" />
     109            <arg value="," />
     110        </exec>
    79111        <war destfile="build/i2ptunnel.war" webxml="../jsp/web-out.xml"
    80112             basedir="../jsp/" excludes="web.xml, web-fragment.xml, web-out.xml, **/*.java, *.jsp">
     113            <manifest>
     114                <attribute name="Build-Date" value="${build.timestamp}" />
     115                <attribute name="Base-Revision" value="${workspace.version}" />
     116                <attribute name="Workspace-Changes" value="${workspace.changes.w.tr}" />
     117            </manifest>
    81118        </war>
     119    </target>
     120
     121    <target name="warUpToDate">
     122        <uptodate property="war.uptodate" targetfile="build/i2ptunnel.war" >
     123            <srcfiles dir= "../jsp" excludes="web.xml, web-fragment.xml, **/*.java, *.jsp" />
     124        </uptodate>
    82125    </target>
    83126
     
    109152        </java>
    110153        <javac debug="true" deprecation="on" source="1.5" target="1.5"
     154               includeAntRuntime="false"
    111155               destdir="../jsp/WEB-INF/classes/" srcdir="../jsp/WEB-INF/classes" includes="**/*.java">
    112156            <compilerarg line="${javac.compilerargs}" />
     
    144188        <mkdir dir="./build" />
    145189        <mkdir dir="./build/obj" />
    146         <javac srcdir="./src:./test" debug="true" source="1.5" target="1.5" deprecation="on" destdir="./build/obj" >
     190        <javac srcdir="./src:./test" debug="true" source="1.5" target="1.5"
     191               includeAntRuntime="false"
     192               deprecation="on" destdir="./build/obj" >
    147193            <compilerarg line="${javac.compilerargs}" />
    148194            <classpath>
  • apps/jetty/build.xml

    ra3d466e rfd91927c  
    9797            debug="true" source="1.5" target="1.5"
    9898            destdir="./build/obj"
     99            includeAntRuntime="false"
    99100            classpath="./jettylib/commons-logging.jar:./jettylib/javax.servlet.jar:./jettylib/org.mortbay.jetty.jar" >
    100101            <compilerarg line="${javac.compilerargs}" />
    101102        </javac>
    102103    </target>
    103     <target name="jar" depends="compile">
     104
     105    <target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" >
     106        <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
     107            <arg value="list" />
     108            <arg value="changed" />
     109            <arg value="." />
     110        </exec>
     111        <!-- \n in an attribute value generates an invalid manifest -->
     112        <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     113            <arg value="-s" />
     114            <arg value="[:space:]" />
     115            <arg value="," />
     116        </exec>
    104117        <jar destfile="./jettylib/org.mortbay.jetty.jar" basedir="./build/obj" includes="**/*.class" update="true" >
     118            <manifest>
     119                <attribute name="Build-Date" value="${build.timestamp}" />
     120                <attribute name="Base-Revision" value="${workspace.version}" />
     121                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
     122            </manifest>
    105123        </jar>
    106124    </target>   
     125
     126    <target name="jarUpToDate">
     127        <uptodate property="jar.uptodate" targetfile="jettylib/org.mortbay.jetty.jar" >
     128            <srcfiles dir= "build/obj" includes="**/*.class" />
     129        </uptodate>
     130    </target>   
     131
    107132    <target name="clean" >
    108133        <delete dir="./build" />
  • apps/ministreaming/java/build.xml

    ra3d466e rfd91927c  
    2525        <mkdir dir="./build/obj" />
    2626        <!-- half of this is deprecated classes so turn deprecation off -->
    27         <javac srcdir="./src" debug="true" deprecation="off" source="1.5" target="1.5" destdir="./build/obj" classpath="../../../core/java/build/i2p.jar" >
     27        <javac srcdir="./src" debug="true" deprecation="off" source="1.5" target="1.5"
     28               includeAntRuntime="false"
     29               destdir="./build/obj" classpath="../../../core/java/build/i2p.jar" >
    2830            <compilerarg line="${javac.compilerargs}" />
    2931        </javac>
    3032    </target>
    31     <target name="jar" depends="compile">
    32         <jar destfile="./build/mstreaming.jar" basedir="./build/obj" includes="**/*.class" />
     33
     34    <target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" >
     35        <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
     36            <arg value="list" />
     37            <arg value="changed" />
     38            <arg value="." />
     39        </exec>
     40        <!-- \n in an attribute value generates an invalid manifest -->
     41        <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     42            <arg value="-s" />
     43            <arg value="[:space:]" />
     44            <arg value="," />
     45        </exec>
     46        <jar destfile="./build/mstreaming.jar" basedir="./build/obj" includes="**/*.class" >
     47            <manifest>
     48                <attribute name="Build-Date" value="${build.timestamp}" />
     49                <attribute name="Base-Revision" value="${workspace.version}" />
     50                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
     51            </manifest>
     52        </jar>
    3353    </target>
     54
     55    <target name="jarUpToDate">
     56        <uptodate property="jar.uptodate" targetfile="build/mstreaming.jar" >
     57            <srcfiles dir= "." includes="build/obj/**/*.class" />
     58        </uptodate>
     59    </target>
     60
    3461    <target name="javadoc">
    3562        <mkdir dir="./build" />
  • apps/routerconsole/java/build.xml

    ra3d466e rfd91927c  
    4747            srcdir="./src"
    4848            debug="true" deprecation="on" source="1.5" target="1.5"
     49            includeAntRuntime="false"
    4950            destdir="./build/obj">
    5051            <compilerarg line="${javac.compilerargs}" />
     
    6263        </javac>
    6364    </target>
    64     <target name="jar" depends="compile">
     65
     66    <target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" >
     67        <exec executable="mtn" outputproperty="workspace.changes.j" errorproperty="mtn.error2" failifexecutionfails="false" >
     68            <arg value="list" />
     69            <arg value="changed" />
     70            <arg value="." />
     71        </exec>
     72        <!-- \n in an attribute value generates an invalid manifest -->
     73        <exec executable="tr" inputstring="${workspace.changes.j}" outputproperty="workspace.changes.j.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     74            <arg value="-s" />
     75            <arg value="[:space:]" />
     76            <arg value="," />
     77        </exec>
    6578        <jar destfile="./build/routerconsole.jar" basedir="./build/obj" includes="**/*.class">
    6679            <manifest>
     
    6881                <!-- DTG added in 0.8.4, not in the classpath for very old installs, before we changed wrapper.config to specify * -->
    6982                <attribute name="Class-Path" value="i2p.jar router.jar jrobin.jar desktopgui.jar" />
     83                <attribute name="Build-Date" value="${build.timestamp}" />
     84                <attribute name="Base-Revision" value="${workspace.version}" />
     85                <attribute name="Workspace-Changes" value="${workspace.changes.j.tr}" />
    7086            </manifest>
    7187        </jar>
     
    94110    </target>
    95111
     112
     113    <target name="jarUpToDate">
     114        <uptodate property="jar.uptodate" targetfile="build/routerconsole.jar" >
     115            <srcfiles dir= "build/obj" includes="**/*.class" />
     116        </uptodate>
     117    </target>
     118
    96119    <target name="poupdate" depends="build">
    97120        <ant target="war" />
     
    111134        </exec>
    112135    </target>
    113     <target name="war" depends="precompilejsp">
     136
     137    <target name="war" depends="precompilejsp, warUpToDate" unless="war.uptodate" >
     138        <exec executable="mtn" outputproperty="workspace.changes.w" errorproperty="mtn.error2" failifexecutionfails="false" >
     139            <arg value="list" />
     140            <arg value="changed" />
     141            <arg value="../jsp" />
     142        </exec>
     143        <!-- \n in an attribute value generates an invalid manifest -->
     144        <exec executable="tr" inputstring="${workspace.changes.w}" outputproperty="workspace.changes.w.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     145            <arg value="-s" />
     146            <arg value="[:space:]" />
     147            <arg value="," />
     148        </exec>
    114149        <!-- Don't include the css in the war, the main build.xml will copy it to docs/themes/console/ -->
    115150        <war destfile="build/routerconsole.war" webxml="../jsp/web-out.xml"
    116151             basedir="../jsp/" excludes="web.xml, *.css, **/*.java, *.jsp, *.jsi, web-fragment.xml, web-out.xml">
     152            <manifest>
     153                <attribute name="Build-Date" value="${build.timestamp}" />
     154                <attribute name="Base-Revision" value="${workspace.version}" />
     155                <attribute name="Workspace-Changes" value="${workspace.changes.w.tr}" />
     156            </manifest>
    117157        </war>
    118158    </target>
     159
     160    <target name="warUpToDate">
     161        <uptodate property="war.uptodate" targetfile="build/routerconsole.war" >
     162            <srcfiles dir= "../jsp" excludes="web.xml, web-fragment.xml, *.css, **/*.java, *.jsp, *.jsi" />
     163        </uptodate>
     164    </target>
     165
    119166    <target name="precompilejsp" unless="precompilejsp.uptodate">
    120167        <delete dir="../jsp/WEB-INF/" />
     
    183230        <javac debug="true" deprecation="on" source="1.5" target="1.5"
    184231               encoding="UTF-8"
     232               includeAntRuntime="false"
    185233               destdir="../jsp/WEB-INF/classes/"
    186234               srcdir="../jsp/WEB-INF/classes" includes="**/*.java">
  • apps/sam/java/build.xml

    ra3d466e rfd91927c  
    2929            srcdir="./src"
    3030            debug="true" deprecation="on" source="1.5" target="1.5"
     31            includeAntRuntime="false"
    3132            destdir="./build/obj"
    3233            classpath="../../../core/java/build/i2p.jar:../../ministreaming/java/build/mstreaming.jar:../../streaming/java/build/streaming.jar" >
     
    3839            srcdir="./test"
    3940            debug="true" deprecation="on" source="1.5" target="1.5"
     41            includeAntRuntime="false"
    4042            destdir="./build/obj"
    4143            classpath="../../../core/java/build/i2p.jar:../../ministreaming/java/build/mstreaming.jar:../../streaming/java/build/streaming.jar" >
     
    4345        </javac>
    4446    </target>
    45     <target name="jar" depends="compile">
     47
     48    <target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" >
     49        <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
     50            <arg value="list" />
     51            <arg value="changed" />
     52            <arg value="." />
     53        </exec>
     54        <!-- \n in an attribute value generates an invalid manifest -->
     55        <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     56            <arg value="-s" />
     57            <arg value="[:space:]" />
     58            <arg value="," />
     59        </exec>
    4660        <jar destfile="./build/sam.jar" basedir="./build/obj" includes="**/*.class">
    4761            <manifest>
    4862                <attribute name="Main-Class" value="net.i2p.sam.SAMBridge" />
    4963                <attribute name="Class-Path" value="i2p.jar mstreaming.jar streaming.jar" />
     64                <attribute name="Build-Date" value="${build.timestamp}" />
     65                <attribute name="Base-Revision" value="${workspace.version}" />
     66                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
    5067            </manifest>
    5168        </jar>
    5269    </target>
     70
     71    <target name="jarUpToDate">
     72        <uptodate property="jar.uptodate" targetfile="build/sam.jar" >
     73            <srcfiles dir= "build/obj" includes="**/*.class" />
     74        </uptodate>
     75    </target>
     76
    5377    <target name="jarTest" depends="jar, compileTest">
    5478        <jar destfile="./build/sam.jar" basedir="./build/obj" includes="**/*Test*.class" update="true" />
  • apps/streaming/java/build.xml

    ra3d466e rfd91927c  
    2828            srcdir="./src"
    2929            debug="true" deprecation="on" source="1.5" target="1.5"
     30            includeAntRuntime="false"
    3031            destdir="./build/obj"
    3132            classpath="../../../core/java/build/i2p.jar:../../ministreaming/java/build/mstreaming.jar" >
     
    3738            srcdir="./test"
    3839            debug="true" deprecation="on" source="1.5" target="1.5"
     40            includeAntRuntime="false"
    3941            destdir="./build/obj"
    4042            classpath="../../../core/java/build/i2p.jar:../../ministreaming/java/build/mstreaming.jar" >
     
    4244        </javac>
    4345    </target>
    44     <target name="jar" depends="builddep, compile">
    45         <jar destfile="./build/streaming.jar" basedir="./build/obj" includes="**/*.class" />
     46
     47    <target name="jar" depends="builddep, compile, jarUpToDate" unless="jar.uptodate" >
     48        <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
     49            <arg value="list" />
     50            <arg value="changed" />
     51            <arg value="." />
     52        </exec>
     53        <!-- \n in an attribute value generates an invalid manifest -->
     54        <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     55            <arg value="-s" />
     56            <arg value="[:space:]" />
     57            <arg value="," />
     58        </exec>
     59        <jar destfile="./build/streaming.jar" basedir="./build/obj" includes="**/*.class" >
     60            <manifest>
     61                <attribute name="Build-Date" value="${build.timestamp}" />
     62                <attribute name="Base-Revision" value="${workspace.version}" />
     63                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
     64            </manifest>
     65        </jar>
    4666    </target>
     67
     68    <target name="jarUpToDate">
     69        <uptodate property="jar.uptodate" targetfile="build/streaming.jar" >
     70            <srcfiles dir= "." includes="build/obj/**/*.class" />
     71        </uptodate>
     72    </target>
     73
    4774    <target name="jarTest" depends="jar, compileTest">
    4875        <jar destfile="./build/streaming.jar" basedir="./build/obj" includes="**/*Test*.class" update="true" />
  • apps/susidns/src/build.xml

    ra3d466e rfd91927c  
    2424        </path>
    2525        <property name="javac.compilerargs" value="" />
     26
    2627        <target name="compile">
    2728                <mkdir dir="${bin}" />
    2829                <javac debug="true" deprecation="on" source="1.5" target="1.5"
     30                        includeAntRuntime="false"
    2931                        classpathref="cp" destdir="${bin}" srcdir="${src}" includes="**/*.java" >
    3032                        <compilerarg line="${javac.compilerargs}" />
    3133                </javac>
    3234        </target>
     35
    3336    <target name="precompilejsp" unless="precompilejsp.uptodate">
    3437        <delete file="WEB-INF/web-fragment.xml" />
     
    4851        </java>
    4952        <javac debug="true" deprecation="on" source="1.5" target="1.5"
     53               includeAntRuntime="false"
    5054               destdir="${bin}" srcdir="${tmp}" includes="**/*.java" classpathref="cp">
    5155                <compilerarg line="${javac.compilerargs}" />
     
    6266    </uptodate>
    6367
    64     <target name="all" depends="compile,precompilejsp,bundle,war"/>
    65     <target name="war">
     68    <target name="all" depends="war"/>
     69
     70    <target name="war" depends="compile, precompilejsp, bundle, warUpToDate" unless="war.uptodate" >
     71        <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
     72            <arg value="list" />
     73            <arg value="changed" />
     74            <arg value="." />
     75        </exec>
     76        <!-- \n in an attribute value generates an invalid manifest -->
     77        <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     78            <arg value="-s" />
     79            <arg value="[:space:]" />
     80            <arg value="," />
     81        </exec>
    6682        <war destfile="${project}.war" webxml="WEB-INF/web-out.xml">
    6783                <fileset dir=".">
     
    7591                        <include name="WEB-INF/classes/${project}.properties"/>
    7692                </fileset>
     93            <manifest>
     94                <attribute name="Build-Date" value="${build.timestamp}" />
     95                <attribute name="Base-Revision" value="${workspace.version}" />
     96                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
     97            </manifest>
    7798        </war>
     99    </target>
     100
     101    <target name="warUpToDate">
     102        <uptodate property="war.uptodate" targetfile="${project}.war">
     103            <srcfiles dir= "." includes="WEB-INF/web-out.xml WEB-INF/**/*.class images/*.png css.css index.html WEB-INF/classes/${project}.properties" />
     104        </uptodate>
    78105    </target>
    79106
  • apps/susimail/build.xml

    ra3d466e rfd91927c  
    1111            srcdir="./src/src"
    1212            debug="true" deprecation="off" source="1.5" target="1.5"
     13            includeAntRuntime="false"
    1314            destdir="./src/WEB-INF/classes">
    1415            <compilerarg line="${javac.compilerargs}" />
     
    2122    </target>
    2223    <target name="jar" depends="compile, war" />
    23     <target name="war" depends="compile">
     24
     25    <target name="war" depends="compile, warUpToDate" unless="war.uptodate" >
     26        <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
     27            <arg value="list" />
     28            <arg value="changed" />
     29            <arg value="." />
     30        </exec>
     31        <!-- \n in an attribute value generates an invalid manifest -->
     32        <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     33            <arg value="-s" />
     34            <arg value="[:space:]" />
     35            <arg value="," />
     36        </exec>
    2437        <war destfile="susimail.war" webxml="src/WEB-INF/web.xml"
    2538             basedir="src/" excludes="WEB-INF/web.xml LICENSE src/**/*">
     39            <manifest>
     40                <attribute name="Build-Date" value="${build.timestamp}" />
     41                <attribute name="Base-Revision" value="${workspace.version}" />
     42                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
     43            </manifest>
    2644        </war>
    2745    </target>
     46
     47    <target name="warUpToDate">
     48        <uptodate property="war.uptodate" targetfile="susimail.war">
     49            <srcfiles dir= "src" excludes="LICENSE src/**/*" />
     50        </uptodate>
     51    </target>
     52
    2853    <target name="javadoc">
    2954        <mkdir dir="./build" />
  • apps/systray/java/build.xml

    ra3d466e rfd91927c  
    1717            target="1.5"
    1818            destdir="./build/obj"
     19            includeAntRuntime="false"
    1920            includes="**/*.java"
    2021            classpath="./lib/systray4j.jar:../../../core/java/build/i2p.jar" >
     
    2223        </javac>
    2324    </target>
    24     <target name="jar" depends="compile" unless="jar.uptodate">
    25         <mkdir dir="./build/jar_temp" />
    26         <copy todir="./build/jar_temp">
    27             <fileset dir="./build/obj" includes="**/*.class" />
    28         </copy>
    29         <jar destfile="./build/systray.jar" basedir="./build/jar_temp" includes="**/*">
     25
     26    <target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate">
     27        <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
     28            <arg value="list" />
     29            <arg value="changed" />
     30            <arg value="." />
     31        </exec>
     32        <!-- \n in an attribute value generates an invalid manifest -->
     33        <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     34            <arg value="-s" />
     35            <arg value="[:space:]" />
     36            <arg value="," />
     37        </exec>
     38        <jar destfile="./build/systray.jar" basedir="./build/obj" includes="**/*.class">
    3039            <manifest>
    3140                <attribute name="Main-Class" value="net.i2p.apps.systray.SysTray" />
    3241                <attribute name="Class-Path" value="systray4j.jar" />
     42                <attribute name="Build-Date" value="${build.timestamp}" />
     43                <attribute name="Base-Revision" value="${workspace.version}" />
     44                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
    3345            </manifest>
    3446        </jar>
    35         <delete dir="./build/jar_temp" />
    3647    </target>
    3748
    38     <uptodate property="jar.uptodate" targetfile="./build/systray.jar">
    39         <srcfiles dir= "src" includes="**/*.java" />
    40     </uptodate>
     49    <target name="jarUpToDate">
     50        <uptodate property="jar.uptodate" targetfile="./build/systray.jar">
     51            <srcfiles dir= "build/obj" includes="**/*.class" />
     52        </uptodate>
     53    </target>
    4154
    4255    <target name="javadoc">
  • build.xml

    ra3d466e rfd91927c  
    9898
    9999    <target name="buildDesktopGui" depends="buildCore, buildrouter" >
     100<!--
    100101        <ant dir="apps/desktopgui" target="clean" />
     102-->
    101103        <ant dir="apps/desktopgui" target="jar" />
    102104    </target>
     
    106108    </target>
    107109
    108     <target name="buildJetty" >
     110    <target name="buildJetty" depends="buildProperties" >
    109111        <ant dir="apps/jetty" target="build" />
    110112    </target>
     
    128130    </target>
    129131
    130     <target name="buildCore" >
     132    <target name="buildCore" depends="buildProperties" >
    131133        <ant dir="core/java/" target="jar" />
    132134        <copy file="core/java/build/i2p.jar" todir="build/" />
     135    </target>
     136
     137    <target name="buildProperties" >
     138        <exec executable="mtn" outputproperty="workspace.version" errorproperty="mtn.error1" failifexecutionfails="false" >
     139            <arg value="automate" />
     140            <arg value="get_base_revision_id" />
     141        </exec>
     142        <tstamp>
     143            <format property="build.timestamp" pattern="yyyy-MM-dd HH:mm:ss z" timezone="UTC" locale="en" />
     144        </tstamp>
    133145    </target>
    134146
     
    166178        <ant target="doBuildEXE" />
    167179    </target>
    168     <target name="doBuildEXE" unless="noExe">
     180    <target name="doBuildEXE" depends="buildProperties" unless="noExe">
    169181        <jar destfile="./build/launchi2p.jar">
    170182            <manifest>
    171183             <attribute name="Main-Class" value="net.i2p.router.RouterLaunch" />
    172184             <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-compiler.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" />
     185             <attribute name="Build-Date" value="${build.timestamp}" />
     186             <attribute name="Base-Revision" value="${workspace.version}" />
    173187            </manifest>
    174188        </jar>
     
    679693        <copy file="build/org.mortbay.jetty.jar" todir="pkg-temp/lib/" />
    680694    </target>
    681     <target name="installer" depends="preppkg">
     695    <target name="installer" depends="preppkg, buildProperties">
    682696        <taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" />
    683697        <mkdir dir="pkg-temp/installer" />
     698        <exec executable="mtn" outputproperty="workspace.changes.util" errorproperty="mtn.error.util" failifexecutionfails="false" >
     699            <arg value="list" />
     700            <arg value="changed" />
     701            <arg value="core/java/src/net/i2p/util" />
     702        </exec>
     703        <!-- \n in an attribute value generates an invalid manifest -->
     704        <exec executable="tr" inputstring="${workspace.changes.util}" outputproperty="workspace.changes.util.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     705            <arg value="-s" />
     706            <arg value="[:space:]" />
     707            <arg value="," />
     708        </exec>
    684709        <jar destfile="./pkg-temp/installer/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class">
    685             <manifest><attribute name="Main-Class" value="net.i2p.util.Copy" /></manifest>
     710            <manifest>
     711                <attribute name="Main-Class" value="net.i2p.util.Copy" />
     712                <attribute name="Build-Date" value="${build.timestamp}" />
     713                <attribute name="Base-Revision" value="${workspace.version}" />
     714                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
     715            </manifest>
    686716        </jar>
    687717        <jar destfile="./pkg-temp/installer/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Delete.class net/i2p/util/FileUtil.class">
    688             <manifest><attribute name="Main-Class" value="net.i2p.util.Delete" /></manifest>
     718            <manifest>
     719                <attribute name="Main-Class" value="net.i2p.util.Delete" />
     720                <attribute name="Build-Date" value="${build.timestamp}" />
     721                <attribute name="Base-Revision" value="${workspace.version}" />
     722                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
     723            </manifest>
    689724        </jar>
    690725        <jar destfile="./pkg-temp/installer/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Exec.class">
    691             <manifest><attribute name="Main-Class" value="net.i2p.util.Exec" /></manifest>
     726            <manifest>
     727                <attribute name="Main-Class" value="net.i2p.util.Exec" />
     728                <attribute name="Build-Date" value="${build.timestamp}" />
     729                <attribute name="Base-Revision" value="${workspace.version}" />
     730                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
     731            </manifest>
    692732        </jar>
    693733        <!--
  • core/java/build.xml

    ra3d466e rfd91927c  
    2222        <mkdir dir="./build" />
    2323        <mkdir dir="./build/obj" />
    24         <javac srcdir="./src" debug="true" source="1.5" target="1.5" deprecation="on" destdir="./build/obj" classpath="${javac.classpath}" >
     24        <javac srcdir="./src" debug="true" source="1.5" target="1.5" deprecation="on"
     25               includeAntRuntime="false"
     26               destdir="./build/obj" classpath="${javac.classpath}" >
    2527            <compilerarg line="${javac.compilerargs}" />
    2628        </javac>
    2729    </target>
     30
    2831    <target name="compileTest">
    2932        <mkdir dir="./build" />
    3033        <mkdir dir="./build/obj" />
    31         <javac srcdir="./src:./test" debug="true" source="1.5" target="1.5" deprecation="on" destdir="./build/obj" >
     34        <javac srcdir="./src:./test" debug="true" source="1.5" target="1.5" deprecation="on"
     35               includeAntRuntime="false"
     36               destdir="./build/obj" >
    3237            <compilerarg line="${javac.compilerargs}" />
    3338        </javac>
    3439    </target>
    35     <target name="jar" depends="compile">
    36         <jar destfile="./build/i2p.jar" basedir="./build/obj" includes="**/*.class" />
     40
     41    <target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" >
     42        <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
     43            <arg value="list" />
     44            <arg value="changed" />
     45            <arg value="." />
     46        </exec>
     47        <!-- \n in an attribute value generates an invalid manifest -->
     48        <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     49            <arg value="-s" />
     50            <arg value="[:space:]" />
     51            <arg value="," />
     52        </exec>
     53        <jar destfile="./build/i2p.jar" basedir="./build/obj" includes="**/*.class" >
     54            <manifest>
     55                <attribute name="Build-Date" value="${build.timestamp}" />
     56                <attribute name="Base-Revision" value="${workspace.version}" />
     57                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
     58            </manifest>
     59        </jar>
    3760    </target>
     61
     62    <target name="jarUpToDate" >
     63        <uptodate property="jar.uptodate" targetfile="build/i2p.jar" >
     64            <srcfiles dir= "build/obj" includes="**/*.class" />
     65        </uptodate>
     66    </target>
     67
    3868    <target name="jarTest" depends="compileTest">
    3969        <jar destfile="./build/i2ptest.jar" basedir="./build/obj" includes="**/*.class" />
  • router/java/build.xml

    ra3d466e rfd91927c  
    3636        <mkdir dir="./build" />
    3737        <mkdir dir="./build/obj" />
    38         <javac srcdir="./src" debug="true" source="1.5" target="1.5" deprecation="on" destdir="./build/obj" classpath="../../core/java/build/i2p.jar" >
     38        <javac srcdir="./src" debug="true" source="1.5" target="1.5" deprecation="on"
     39               includeAntRuntime="false"
     40               destdir="./build/obj" classpath="../../core/java/build/i2p.jar" >
    3941            <compilerarg line="${javac.compilerargs}" />
    4042        </javac>
     
    4345        <mkdir dir="./build" />
    4446        <mkdir dir="./build/obj" />
    45         <javac srcdir="./src:./test" debug="true" source="1.5" target="1.5" deprecation="on" destdir="./build/obj" classpath="../../core/java/build/i2ptest.jar" >
     47        <javac srcdir="./src:./test" debug="true" source="1.5" target="1.5" deprecation="on"
     48               includeAntRuntime="false"
     49               destdir="./build/obj" classpath="../../core/java/build/i2ptest.jar" >
    4650            <compilerarg line="${javac.compilerargs}" />
    4751        </javac>
    4852    </target>
    49     <target name="jar" depends="compile">
    50         <jar destfile="./build/router.jar" basedir="./build/obj" includes="**/*.class" />
     53
     54    <target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" >
     55        <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
     56            <arg value="list" />
     57            <arg value="changed" />
     58            <arg value="." />
     59        </exec>
     60        <!-- \n in an attribute value generates an invalid manifest -->
     61        <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
     62            <arg value="-s" />
     63            <arg value="[:space:]" />
     64            <arg value="," />
     65        </exec>
     66        <jar destfile="./build/router.jar" basedir="./build/obj" includes="**/*.class" >
     67            <manifest>
     68                <attribute name="Build-Date" value="${build.timestamp}" />
     69                <attribute name="Base-Revision" value="${workspace.version}" />
     70                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
     71            </manifest>
     72        </jar>
    5173    </target>
     74
     75    <target name="jarUpToDate">
     76        <uptodate property="jar.uptodate" targetfile="build/router.jar" >
     77            <srcfiles dir= "." includes="build/obj/**/*.class" />
     78        </uptodate>
     79    </target>
     80
    5281    <target name="jarTest" depends="compileTest">
    5382        <jar destfile="./build/routertest.jar" basedir="./build/obj" includes="**/*.class" />
Note: See TracChangeset for help on using the changeset viewer.