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