Files
i2p.i2p/apps/susimail/build.xml
zzz fe391ff29f Convert all jars and wars to compile to 1.6 target,
except for the following which are used by android,
to maintain compatibility with very old phones, for now:

	addressbook.war
	BOB.jar
	i2p.jar
	i2ptunnel.jar
	mstreaming.jar
	router.jar
	streaming.jar
2014-02-03 23:59:48 +00:00

128 lines
5.3 KiB
XML

<?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">
<!-- run from top level build.xml to get dependencies built -->
</target>
<property name="javac.compilerargs" value="" />
<condition property="no.bundle">
<isfalse value="${require.gettext}" />
</condition>
<property name="require.gettext" value="true" />
<target name="compile">
<mkdir dir="./src/WEB-INF/classes" />
<javac
srcdir="./src/src"
debug="true" deprecation="off" source="1.6" target="1.6"
includeAntRuntime="false"
destdir="./src/WEB-INF/classes">
<compilerarg line="${javac.compilerargs}" />
<classpath>
<pathelement location="../jetty/jettylib/javax.servlet.jar" />
<pathelement location="../jetty/jettylib/org.mortbay.jetty.jar" />
<pathelement location="../jetty/jettylib/jetty-util.jar" />
<pathelement location="../jetty/jettylib/jetty-http.jar" />
<pathelement location="../../core/java/build/i2p.jar" />
</classpath>
</javac>
</target>
<target name="jar" depends="compile, war" />
<target name="listChangedFiles" depends="warUpToDate" if="shouldListChanges" >
<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>
</target>
<target name="war" depends="compile, bundle, warUpToDate, listChangedFiles" unless="war.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<copy file="src/susimail.properties" todir="src/WEB-INF/classes" />
<war destfile="susimail.war" webxml="src/WEB-INF/web.xml"
basedir="src/" excludes="WEB-INF/web.xml LICENSE src/**/*">
<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}" />
</manifest>
</war>
</target>
<target name="warUpToDate">
<uptodate property="war.uptodate" targetfile="susimail.war">
<srcfiles dir= "src" excludes="LICENSE src/**/*" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="war.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="bundle" depends="compile" unless="no.bundle">
<!-- Update the messages_*.po files.
We need to supply the bat file for windows, and then change the fail property to true -->
<exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="${require.gettext}" >
<env key="JAVA_HOME" value="${java.home}" />
<arg value="./bundle-messages.sh" />
</exec>
<exec executable="sh" osfamily="mac" failifexecutionfails="true" failonerror="${require.gettext}" >
<arg value="./bundle-messages.sh" />
</exec>
<!-- multi-lang is optional -->
<exec executable="sh" osfamily="windows" failifexecutionfails="false" >
<arg value="./bundle-messages.sh" />
</exec>
</target>
<target name="poupdate" depends="builddep, compile">
<!-- Update the messages_*.po files. -->
<exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="true" >
<arg value="./bundle-messages.sh" />
<arg value="-p" />
</exec>
<exec executable="sh" osfamily="mac" failifexecutionfails="true" failonerror="true" >
<arg value="./bundle-messages.sh" />
<arg value="-p" />
</exec>
<exec executable="sh" osfamily="windows" failifexecutionfails="true" failonerror="true" >
<arg value="./bundle-messages.sh" />
<arg value="-p" />
</exec>
</target>
<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">
<delete dir="src/WEB-INF/classes"/>
<delete file="susimail.war"/>
</target>
<target name="cleandep" depends="clean" />
<target name="distclean" depends="clean" />
</project>