forked from I2P_Developers/i2p.i2p
* 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)
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user