source: apps/susimail/build.xml @ fd91927c

Last change on this file since fd91927c was fd91927c, checked in by zzz <zzz@…>, 10 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: 2.9 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<project basedir="." default="all" name="susimail">
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    <property name="javac.compilerargs" value="" />
9    <target name="compile">
10        <javac 
11            srcdir="./src/src"
12            debug="true" deprecation="off" source="1.5" target="1.5" 
13            includeAntRuntime="false"
14            destdir="./src/WEB-INF/classes">
15            <compilerarg line="${javac.compilerargs}" />
16            <classpath>
17                <pathelement location="../jetty/jettylib/javax.servlet.jar" />
18                <pathelement location="../jetty/jettylib/org.mortbay.jetty.jar" />
19                <pathelement location="../../core/java/build/i2p.jar" />
20            </classpath>
21        </javac>
22    </target>
23    <target name="jar" depends="compile, war" />
24
25    <target name="war" depends="compile, warUpToDate" unless="war.uptodate" >
26        <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
27            <arg value="list" />
28            <arg value="changed" />
29            <arg value="." />
30        </exec>
31        <!-- \n in an attribute value generates an invalid manifest -->
32        <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
33            <arg value="-s" />
34            <arg value="[:space:]" />
35            <arg value="," />
36        </exec>
37        <war destfile="susimail.war" webxml="src/WEB-INF/web.xml"
38             basedir="src/" excludes="WEB-INF/web.xml LICENSE src/**/*">
39            <manifest>
40                <attribute name="Build-Date" value="${build.timestamp}" />
41                <attribute name="Base-Revision" value="${workspace.version}" />
42                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
43            </manifest>
44        </war>
45    </target>
46
47    <target name="warUpToDate">
48        <uptodate property="war.uptodate" targetfile="susimail.war">
49            <srcfiles dir= "src" excludes="LICENSE src/**/*" />
50        </uptodate>
51    </target>
52
53    <target name="javadoc">
54        <mkdir dir="./build" />
55        <mkdir dir="./build/javadoc" />
56        <javadoc 
57            sourcepath="./src/src/" destdir="./build/javadoc" 
58            packagenames="*" 
59            use="true" 
60            splitindex="true" 
61            windowtitle="susimail" />
62    </target>
63    <target name="clean">
64        <delete>
65            <fileset dir="src/WEB-INF/classes/" includes="**/*.class" />
66        </delete>
67        <delete dir="src/WEB-INF/classes/i2p"/>
68        <delete file="susimail.war"/>
69    </target>
70    <target name="cleandep" depends="clean" />
71    <target name="distclean" depends="clean" />
72</project>
Note: See TracBrowser for help on using the repository browser.