source: apps/ministreaming/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.1 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<project basedir="." default="all" name="ministreaming">
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" 
15            destdir="./build/obj" >
16            <!-- Depend on classes instead of jars where available -->
17            <classpath>
18                <pathelement location="../../../core/java/build/obj" />
19            </classpath>
20        </depend>
21    </target>
22    <property name="javac.compilerargs" value="" />
23    <target name="compile" depends="depend">
24        <mkdir dir="./build" />
25        <mkdir dir="./build/obj" />
26        <!-- half of this is deprecated classes so turn deprecation off -->
27        <javac srcdir="./src" debug="true" deprecation="off" source="1.5" target="1.5"
28               includeAntRuntime="false"
29               destdir="./build/obj" classpath="../../../core/java/build/i2p.jar" >
30            <compilerarg line="${javac.compilerargs}" />
31        </javac>
32    </target>
33
34    <target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" >
35        <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
36            <arg value="list" />
37            <arg value="changed" />
38            <arg value="." />
39        </exec>
40        <!-- \n in an attribute value generates an invalid manifest -->
41        <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
42            <arg value="-s" />
43            <arg value="[:space:]" />
44            <arg value="," />
45        </exec>
46        <jar destfile="./build/mstreaming.jar" basedir="./build/obj" includes="**/*.class" >
47            <manifest>
48                <attribute name="Build-Date" value="${build.timestamp}" />
49                <attribute name="Base-Revision" value="${workspace.version}" />
50                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
51            </manifest>
52        </jar>
53    </target>
54
55    <target name="jarUpToDate">
56        <uptodate property="jar.uptodate" targetfile="build/mstreaming.jar" >
57            <srcfiles dir= "." includes="build/obj/**/*.class" />
58        </uptodate>
59    </target>
60
61    <target name="javadoc">
62        <mkdir dir="./build" />
63        <mkdir dir="./build/javadoc" />
64        <javadoc 
65            sourcepath="./src:../../../core/java/src:../../../core/java/test" destdir="./build/javadoc" 
66            packagenames="*" 
67            use="true" 
68            splitindex="true" 
69            windowtitle="I2P ministreaming library" />
70    </target>
71    <target name="clean">
72        <delete dir="./build" />
73    </target>
74    <target name="cleandep" depends="clean">
75    </target>
76    <target name="distclean" depends="clean">
77    </target>
78</project>
Note: See TracBrowser for help on using the repository browser.