source: apps/susimail/build.xml @ a5b5572

Last change on this file since a5b5572 was a5b5572, checked in by duck <duck@…>, 10 years ago

I18N for susimail, including dutch translation.

  • Property mode set to 100644
File size: 4.2 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, bundle, 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="bundle" depends="compile">
54        <!-- Update the messages_*.po files.
55             We need to supply the bat file for windows, and then change the fail property to true -->
56        <exec executable="sh" osfamily="unix" failifexecutionfails="true" >
57            <arg value="./bundle-messages.sh" />
58        </exec>
59        <exec executable="sh" osfamily="mac" failifexecutionfails="true" >
60            <arg value="./bundle-messages.sh" />
61        </exec>
62        <!-- multi-lang is optional -->
63        <exec executable="sh" osfamily="windows" failifexecutionfails="false" >
64            <arg value="./bundle-messages.sh" />
65        </exec>
66    </target>
67
68    <target name="poupdate" depends="builddep, compile">
69        <!-- Update the messages_*.po files.  -->
70        <exec executable="sh" osfamily="unix" failifexecutionfails="true" >
71            <arg value="./bundle-messages.sh" />
72            <arg value="-p" />
73        </exec>
74        <exec executable="sh" osfamily="mac" failifexecutionfails="true" >
75            <arg value="./bundle-messages.sh" />
76            <arg value="-p" />
77        </exec>
78        <exec executable="sh" osfamily="windows" failifexecutionfails="true" >
79            <arg value="./bundle-messages.sh" />
80            <arg value="-p" />
81        </exec>
82    </target>
83
84    <target name="javadoc">
85        <mkdir dir="./build" />
86        <mkdir dir="./build/javadoc" />
87        <javadoc 
88            sourcepath="./src/src/" destdir="./build/javadoc" 
89            packagenames="*" 
90            use="true" 
91            splitindex="true" 
92            windowtitle="susimail" />
93    </target>
94    <target name="clean">
95        <delete>
96            <fileset dir="src/WEB-INF/classes/" includes="**/*.class" />
97        </delete>
98        <delete dir="src/WEB-INF/classes/i2p"/>
99        <delete file="susimail.war"/>
100    </target>
101    <target name="cleandep" depends="clean" />
102    <target name="distclean" depends="clean" />
103</project>
Note: See TracBrowser for help on using the repository browser.