2005-02-17 20:55:07 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<project basedir="." default="all" name="susimail">
|
|
|
|
<target name="all" depends="clean, build" />
|
|
|
|
<target name="build" depends="builddep, jar" />
|
|
|
|
<target name="builddep">
|
2010-11-28 03:56:56 +00:00
|
|
|
<!-- run from top level build.xml to get dependencies built -->
|
2005-02-17 20:55:07 +00:00
|
|
|
</target>
|
2011-06-13 14:31:41 +00:00
|
|
|
|
2009-04-26 15:54:51 +00:00
|
|
|
<property name="javac.compilerargs" value="" />
|
2016-10-26 16:56:13 +00:00
|
|
|
<property name="javac.version" value="1.7" />
|
2014-02-21 13:59:27 +00:00
|
|
|
<property name="require.gettext" value="true" />
|
|
|
|
|
2013-01-10 16:51:06 +00:00
|
|
|
<condition property="no.bundle">
|
|
|
|
<isfalse value="${require.gettext}" />
|
|
|
|
</condition>
|
2014-04-18 01:48:03 +00:00
|
|
|
<condition property="depend.available">
|
|
|
|
<typefound name="depend" />
|
|
|
|
</condition>
|
|
|
|
<target name="depend" if="depend.available">
|
|
|
|
<depend
|
|
|
|
cache="../../build"
|
|
|
|
srcdir="./src/src"
|
|
|
|
destdir="./src/WEB-INF/classes" >
|
|
|
|
<!-- Depend on classes instead of jars where available -->
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="../../core/java/build/obj" />
|
2015-03-20 12:30:04 +00:00
|
|
|
<pathelement location="../jetty/jettylib/javax.servlet.jar" />
|
2016-04-01 18:19:06 +00:00
|
|
|
<!-- jsp-api.jar only present for debian builds -->
|
2016-04-07 14:38:30 +00:00
|
|
|
<pathelement location="../jetty/jettylib/jsp-api.jar" />
|
|
|
|
<!-- tomcat-api.jar only present for debian builds -->
|
|
|
|
<pathelement location="../jetty/jettylib/tomcat-api.jar" />
|
2015-03-20 12:30:04 +00:00
|
|
|
<pathelement location="../jetty/jettylib/jetty-i2p.jar" />
|
2014-04-18 01:48:03 +00:00
|
|
|
</classpath>
|
|
|
|
</depend>
|
|
|
|
</target>
|
2013-01-10 16:51:06 +00:00
|
|
|
|
2014-04-18 01:48:03 +00:00
|
|
|
<target name="compile" depends="depend" >
|
2012-12-08 02:02:04 +00:00
|
|
|
<mkdir dir="./src/WEB-INF/classes" />
|
2005-02-17 20:55:07 +00:00
|
|
|
<javac
|
|
|
|
srcdir="./src/src"
|
2014-02-21 13:59:27 +00:00
|
|
|
debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
|
2011-02-17 12:47:35 +00:00
|
|
|
includeAntRuntime="false"
|
2005-02-17 20:55:07 +00:00
|
|
|
destdir="./src/WEB-INF/classes">
|
2009-04-26 15:54:51 +00:00
|
|
|
<compilerarg line="${javac.compilerargs}" />
|
2005-02-17 20:55:07 +00:00
|
|
|
<classpath>
|
2016-04-07 14:38:30 +00:00
|
|
|
<pathelement location="../../core/java/build/i2p.jar" />
|
2005-02-17 20:55:07 +00:00
|
|
|
<pathelement location="../jetty/jettylib/javax.servlet.jar" />
|
2016-04-01 18:19:06 +00:00
|
|
|
<!-- jsp-api.jar only present for debian builds -->
|
2016-04-07 14:38:30 +00:00
|
|
|
<pathelement location="../jetty/jettylib/jsp-api.jar" />
|
|
|
|
<!-- tomcat-api.jar only present for debian builds -->
|
|
|
|
<pathelement location="../jetty/jettylib/tomcat-api.jar" />
|
2015-03-20 12:30:04 +00:00
|
|
|
<pathelement location="../jetty/jettylib/jetty-i2p.jar" />
|
2005-02-17 20:55:07 +00:00
|
|
|
</classpath>
|
|
|
|
</javac>
|
|
|
|
</target>
|
2018-01-08 14:46:26 +00:00
|
|
|
|
|
|
|
<!-- jar (not war) for testing only -->
|
|
|
|
<target name="jar" depends="compile, bundle, warUpToDate, listChangedFiles" >
|
|
|
|
<!-- set if unset -->
|
|
|
|
<property name="workspace.changes.tr" value="" />
|
|
|
|
<copy file="src/susimail.properties" todir="src/WEB-INF/classes" />
|
|
|
|
<jar destfile="susimail.jar"
|
|
|
|
basedir="src/WEB-INF/classes">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Implementation-Version" value="${full.version}" />
|
|
|
|
<attribute name="Built-By" value="${build.built-by}" />
|
|
|
|
<attribute name="Build-Date" value="${build.timestamp}" />
|
|
|
|
<attribute name="Base-Revision" value="${workspace.version}" />
|
|
|
|
<attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
|
|
|
|
<attribute name="X-Compile-Source-JDK" value="${javac.version}" />
|
|
|
|
<attribute name="X-Compile-Target-JDK" value="${javac.version}" />
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
</target>
|
2011-02-17 12:47:35 +00:00
|
|
|
|
2011-06-08 20:15:53 +00:00
|
|
|
<target name="listChangedFiles" depends="warUpToDate" if="shouldListChanges" >
|
2011-02-17 12:47:35 +00:00
|
|
|
<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>
|
2011-06-08 20:15:53 +00:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="war" depends="compile, bundle, warUpToDate, listChangedFiles" unless="war.uptodate" >
|
|
|
|
<!-- set if unset -->
|
|
|
|
<property name="workspace.changes.tr" value="" />
|
2012-12-08 02:02:04 +00:00
|
|
|
<copy file="src/susimail.properties" todir="src/WEB-INF/classes" />
|
2005-02-17 20:55:07 +00:00
|
|
|
<war destfile="susimail.war" webxml="src/WEB-INF/web.xml"
|
2014-05-01 17:05:57 +00:00
|
|
|
basedir="src/" excludes="WEB-INF/web.xml LICENSE src src/**/* susimail.properties">
|
2011-02-17 12:47:35 +00:00
|
|
|
<manifest>
|
2012-01-15 16:36:17 +00:00
|
|
|
<attribute name="Implementation-Version" value="${full.version}" />
|
2012-03-01 16:04:17 +00:00
|
|
|
<attribute name="Built-By" value="${build.built-by}" />
|
2011-02-17 12:47:35 +00:00
|
|
|
<attribute name="Build-Date" value="${build.timestamp}" />
|
|
|
|
<attribute name="Base-Revision" value="${workspace.version}" />
|
|
|
|
<attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
|
2016-11-17 15:14:50 +00:00
|
|
|
<attribute name="X-Compile-Source-JDK" value="${javac.version}" />
|
|
|
|
<attribute name="X-Compile-Target-JDK" value="${javac.version}" />
|
2011-02-17 12:47:35 +00:00
|
|
|
</manifest>
|
2005-02-17 20:55:07 +00:00
|
|
|
</war>
|
|
|
|
</target>
|
2011-02-17 12:47:35 +00:00
|
|
|
|
|
|
|
<target name="warUpToDate">
|
|
|
|
<uptodate property="war.uptodate" targetfile="susimail.war">
|
|
|
|
<srcfiles dir= "src" excludes="LICENSE src/**/*" />
|
|
|
|
</uptodate>
|
2011-06-08 20:15:53 +00:00
|
|
|
<condition property="shouldListChanges" >
|
|
|
|
<and>
|
|
|
|
<not>
|
|
|
|
<isset property="war.uptodate" />
|
|
|
|
</not>
|
|
|
|
<isset property="mtn.available" />
|
|
|
|
</and>
|
|
|
|
</condition>
|
2011-02-17 12:47:35 +00:00
|
|
|
</target>
|
|
|
|
|
2013-01-10 16:51:06 +00:00
|
|
|
<target name="bundle" depends="compile" unless="no.bundle">
|
2016-05-07 12:57:49 +00:00
|
|
|
<mkdir dir="build/messages-src" />
|
2011-03-11 21:47:00 +00:00
|
|
|
<!-- Update the messages_*.po files.
|
|
|
|
We need to supply the bat file for windows, and then change the fail property to true -->
|
2011-06-13 14:31:41 +00:00
|
|
|
<exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="${require.gettext}" >
|
2013-09-20 01:21:43 +00:00
|
|
|
<env key="JAVA_HOME" value="${java.home}" />
|
2011-03-11 21:47:00 +00:00
|
|
|
<arg value="./bundle-messages.sh" />
|
|
|
|
</exec>
|
2011-06-13 14:31:41 +00:00
|
|
|
<exec executable="sh" osfamily="mac" failifexecutionfails="true" failonerror="${require.gettext}" >
|
2011-03-11 21:47:00 +00:00
|
|
|
<arg value="./bundle-messages.sh" />
|
|
|
|
</exec>
|
|
|
|
<!-- multi-lang is optional -->
|
|
|
|
<exec executable="sh" osfamily="windows" failifexecutionfails="false" >
|
|
|
|
<arg value="./bundle-messages.sh" />
|
|
|
|
</exec>
|
2016-05-01 20:19:56 +00:00
|
|
|
<javac source="${javac.version}" target="${javac.version}"
|
|
|
|
includeAntRuntime="false"
|
|
|
|
srcdir="build/messages-src" destdir="src/WEB-INF/classes">
|
|
|
|
<compilerarg line="${javac.compilerargs}" />
|
|
|
|
</javac>
|
2011-03-11 21:47:00 +00:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="poupdate" depends="builddep, compile">
|
|
|
|
<!-- Update the messages_*.po files. -->
|
2018-01-18 10:18:11 +00:00
|
|
|
<!-- set if unset -->
|
|
|
|
<property name="lg2" value="" />
|
2011-06-13 14:31:41 +00:00
|
|
|
<exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="true" >
|
2018-01-18 10:18:11 +00:00
|
|
|
<env key="LG2" value="${lg2}" />
|
2011-03-11 21:47:00 +00:00
|
|
|
<arg value="./bundle-messages.sh" />
|
|
|
|
<arg value="-p" />
|
|
|
|
</exec>
|
2011-06-13 14:31:41 +00:00
|
|
|
<exec executable="sh" osfamily="mac" failifexecutionfails="true" failonerror="true" >
|
2018-01-18 10:18:11 +00:00
|
|
|
<env key="LG2" value="${lg2}" />
|
2011-03-11 21:47:00 +00:00
|
|
|
<arg value="./bundle-messages.sh" />
|
|
|
|
<arg value="-p" />
|
|
|
|
</exec>
|
2011-06-13 14:31:41 +00:00
|
|
|
<exec executable="sh" osfamily="windows" failifexecutionfails="true" failonerror="true" >
|
2018-01-18 10:18:11 +00:00
|
|
|
<env key="LG2" value="${lg2}" />
|
2011-03-11 21:47:00 +00:00
|
|
|
<arg value="./bundle-messages.sh" />
|
|
|
|
<arg value="-p" />
|
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
|
2005-02-17 20:55:07 +00:00
|
|
|
<target name="javadoc">
|
|
|
|
<mkdir dir="./build" />
|
|
|
|
<mkdir dir="./build/javadoc" />
|
|
|
|
<javadoc
|
|
|
|
sourcepath="./src/src/" destdir="./build/javadoc"
|
|
|
|
packagenames="*"
|
|
|
|
use="true"
|
|
|
|
splitindex="true"
|
|
|
|
windowtitle="susimail" />
|
|
|
|
</target>
|
|
|
|
<target name="clean">
|
2012-12-08 02:02:04 +00:00
|
|
|
<delete dir="src/WEB-INF/classes"/>
|
2005-03-01 23:25:15 +00:00
|
|
|
<delete file="susimail.war"/>
|
2018-01-08 14:46:26 +00:00
|
|
|
<delete file="susimail.jar"/>
|
2016-06-08 16:41:01 +00:00
|
|
|
<delete dir="build"/>
|
2005-02-17 20:55:07 +00:00
|
|
|
</target>
|
|
|
|
<target name="cleandep" depends="clean" />
|
|
|
|
<target name="distclean" depends="clean" />
|
|
|
|
</project>
|