Files
i2p.i2p/apps/susimail/build.xml
zzz 094cf14d4a Debian:
Prep for dependency on libtomcat7
Doesn't work yet, breaks susidns.
glassfish-javaee for jstl.jar and standard.jar version 1.2 won't work with tomcat7,
it's ancient and not compatible with recent el libs.
Add back option to depend on libjakarta-taglibs-standard and libjstl1.1-java which are version 1.1.2,
but not clear if they will work with tomcat7 either, even though they are
dependencies of libjetty8-extra-java.
We switched from JSTL 1.1.2 to JSTL 1.2 when we went from Jetty 5 to Jetty 6 in 2012.
1.2 libs are not available anywhere except for Glassfish, and
Debian only has the ancient Java EE 5 Glassfish 2.1.
Not clear there's any way to get susidns (and bote) to work with both Tomcat 6 and 7.
- Fix wrong jsp-api version
- Fix other minor errors in install and links files.
- Log stack trace for Jetty warnings if log level is WARN
- SusiDNS: Move standard.jar and jstl.jar out of WEB-INF/lib, where Tomcat 7 build refuses to find them
2016-04-07 14:38:30 +00:00

151 lines
6.5 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="" />
<property name="javac.version" value="1.6" />
<property name="require.gettext" value="true" />
<condition property="no.bundle">
<isfalse value="${require.gettext}" />
</condition>
<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" />
<pathelement location="../jetty/jettylib/javax.servlet.jar" />
<!-- jsp-api.jar only present for debian builds -->
<pathelement location="../jetty/jettylib/jsp-api.jar" />
<!-- tomcat-api.jar only present for debian builds -->
<pathelement location="../jetty/jettylib/tomcat-api.jar" />
<pathelement location="../jetty/jettylib/jetty-i2p.jar" />
</classpath>
</depend>
</target>
<target name="compile" depends="depend" >
<mkdir dir="./src/WEB-INF/classes" />
<javac
srcdir="./src/src"
debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
includeAntRuntime="false"
destdir="./src/WEB-INF/classes">
<compilerarg line="${javac.compilerargs}" />
<classpath>
<pathelement location="../../core/java/build/i2p.jar" />
<pathelement location="../jetty/jettylib/javax.servlet.jar" />
<!-- jsp-api.jar only present for debian builds -->
<pathelement location="../jetty/jettylib/jsp-api.jar" />
<!-- tomcat-api.jar only present for debian builds -->
<pathelement location="../jetty/jettylib/tomcat-api.jar" />
<pathelement location="../jetty/jettylib/jetty-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 src/**/* susimail.properties">
<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>