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