source: apps/streaming/java/build.xml @ fd91927c

Last change on this file since fd91927c was fd91927c, checked in by zzz <zzz@…>, 9 years ago
  • 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)
  • Property mode set to 100644
File size: 3.8 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<project basedir="." default="all" name="streaming">
3    <target name="all" depends="clean, build" />
4    <target name="build" depends="builddep, jar" />
5    <target name="builddep">
6        <!-- run from top level build.xml to get dependencies built -->
7    </target>
8    <condition property="depend.available">
9        <typefound name="depend" />
10    </condition>
11    <target name="depend" if="depend.available">
12        <depend
13            cache="../../../build"
14            srcdir="./src:./test" 
15            destdir="./build/obj" >
16            <!-- Depend on classes instead of jars where available -->
17            <classpath>
18                <pathelement location="../../../core/java/build/obj" />
19                <pathelement location="../../ministreaming/java/build/obj" />
20            </classpath>
21        </depend>
22    </target>
23    <property name="javac.compilerargs" value="" />
24    <target name="compile" depends="depend">
25        <mkdir dir="./build" />
26        <mkdir dir="./build/obj" />
27        <javac 
28            srcdir="./src" 
29            debug="true" deprecation="on" source="1.5" target="1.5" 
30            includeAntRuntime="false"
31            destdir="./build/obj" 
32            classpath="../../../core/java/build/i2p.jar:../../ministreaming/java/build/mstreaming.jar" >
33            <compilerarg line="${javac.compilerargs}" />
34        </javac>
35    </target>
36    <target name="compileTest" depends="compile">
37        <javac 
38            srcdir="./test" 
39            debug="true" deprecation="on" source="1.5" target="1.5" 
40            includeAntRuntime="false"
41            destdir="./build/obj" 
42            classpath="../../../core/java/build/i2p.jar:../../ministreaming/java/build/mstreaming.jar" >
43            <compilerarg line="${javac.compilerargs}" />
44        </javac>
45    </target>
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>
66    </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
74    <target name="jarTest" depends="jar, compileTest">
75        <jar destfile="./build/streaming.jar" basedir="./build/obj" includes="**/*Test*.class" update="true" />
76    </target>
77    <target name="javadoc">
78        <mkdir dir="./build" />
79        <mkdir dir="./build/javadoc" />
80        <javadoc 
81            sourcepath="./src:../../../core/java/src:../../ministreaming/java/src" destdir="./build/javadoc" 
82            packagenames="*" 
83            use="true" 
84            splitindex="true" 
85            windowtitle="Streaming" />
86    </target>
87    <target name="clean">
88        <delete dir="./build" />
89    </target>
90    <target name="cleandep" depends="clean">
91    </target>
92    <target name="distclean" depends="clean">
93    </target>
94</project>
Note: See TracBrowser for help on using the repository browser.