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