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)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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">
Note: See TracChangeset for help on using the changeset viewer.