- 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)
This commit is contained in:
zzz
2011-02-17 12:47:35 +00:00
parent a3d466eeaa
commit fd91927c11
15 changed files with 484 additions and 48 deletions

View File

@@ -28,6 +28,7 @@
<javac
srcdir="./src"
debug="true" deprecation="on" source="1.5" target="1.5"
includeAntRuntime="false"
destdir="./build/obj"
classpath="../../../core/java/build/i2p.jar:../../ministreaming/java/build/mstreaming.jar:../../streaming/java/build/streaming.jar" >
<compilerarg line="${javac.compilerargs}" />
@@ -37,19 +38,42 @@
<javac
srcdir="./test"
debug="true" deprecation="on" source="1.5" target="1.5"
includeAntRuntime="false"
destdir="./build/obj"
classpath="../../../core/java/build/i2p.jar:../../ministreaming/java/build/mstreaming.jar:../../streaming/java/build/streaming.jar" >
<compilerarg line="${javac.compilerargs}" />
</javac>
</target>
<target name="jar" depends="compile">
<target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
<arg value="." />
</exec>
<!-- \n in an attribute value generates an invalid manifest -->
<exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="-s" />
<arg value="[:space:]" />
<arg value="," />
</exec>
<jar destfile="./build/sam.jar" basedir="./build/obj" includes="**/*.class">
<manifest>
<attribute name="Main-Class" value="net.i2p.sam.SAMBridge" />
<attribute name="Class-Path" value="i2p.jar mstreaming.jar streaming.jar" />
<attribute name="Build-Date" value="${build.timestamp}" />
<attribute name="Base-Revision" value="${workspace.version}" />
<attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
</manifest>
</jar>
</target>
<target name="jarUpToDate">
<uptodate property="jar.uptodate" targetfile="build/sam.jar" >
<srcfiles dir= "build/obj" includes="**/*.class" />
</uptodate>
</target>
<target name="jarTest" depends="jar, compileTest">
<jar destfile="./build/sam.jar" basedir="./build/obj" includes="**/*Test*.class" update="true" />
</target>