Files
i2p.i2p/apps/susidns/src/build.xml
zzz 471ff5b939 Fix distclean for deb builds
Deb build doc updates
Checklist updates
Deb 8 changelog
2016-06-08 16:41:01 +00:00

189 lines
8.3 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="susidns" default="all" basedir=".">
<property name="jetty" value="../../jetty/" />
<property name="project" value="susidns" />
<property name="src" value="java/src" />
<property name="bin" value="./WEB-INF/classes" />
<property name="lib" value="${jetty}/jettylib" />
<property name="tmp" value="./tmp" />
<property name="jsp" value="./jsp" />
<path id="cp">
<pathelement path="${classpath}" />
<pathelement location="${bin}" />
<!-- commons-el MUST be first to ensure we get the right (2.2) version
- otherwise:
- Exception in thread "main" java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
-->
<pathelement location="${lib}/commons-el.jar" />
<pathelement location="${lib}/javax.servlet.jar"/>
<!-- jsp-api.jar only present for debian builds -->
<pathelement location="${lib}/jsp-api.jar" />
<!-- tomcat-api.jar only present for debian builds -->
<pathelement location="${lib}/tomcat-api.jar" />
<!-- tomcat-util.jar only present for debian builds -->
<pathelement location="${lib}/tomcat-util.jar" />
<pathelement location="lib/jstl.jar" />
<pathelement location="lib/standard.jar" />
<pathelement location="${lib}/jasper-runtime.jar" />
<pathelement location="${lib}/commons-logging.jar" />
<!-- jasper-el.jar only present for debian builds -->
<pathelement location="${lib}/jasper-el.jar" />
<pathelement location="${ant.home}/lib/ant.jar" />
<pathelement location="../../../core/java/build/i2p.jar" />
</path>
<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>
<target name="compile">
<mkdir dir="${bin}" />
<javac debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
includeAntRuntime="false"
classpathref="cp" destdir="${bin}" srcdir="${src}" includes="**/*.java" >
<compilerarg line="${javac.compilerargs}" />
</javac>
</target>
<target name="precompilejsp" unless="precompilejsp.uptodate">
<delete file="WEB-INF/web-fragment.xml" />
<delete file="WEB-INF/web-out.xml" />
<mkdir dir="${tmp}" />
<echo message="Ignore any warning about /WEB-INF/web.xml not found" />
<java classname="org.apache.jasper.JspC" fork="true" classpathref="cp" failonerror="true">
<arg value="-d" />
<arg value="${tmp}" />
<arg value="-v" />
<arg value="-p" />
<arg value="i2p.susi.dns.jsp" />
<arg value="-webinc" />
<arg value="WEB-INF/web-fragment.xml" />
<arg value="-webapp" />
<arg value="./jsp" />
</java>
<javac debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
includeAntRuntime="false"
destdir="${bin}" srcdir="${tmp}" includes="**/*.java" classpathref="cp">
<compilerarg line="${javac.compilerargs}" />
</javac>
<copy file="WEB-INF/web-template.xml" tofile="WEB-INF/web-out.xml" />
<loadfile property="jspc.web.fragment" srcfile="WEB-INF/web-fragment.xml" />
<replace file="WEB-INF/web-out.xml">
<replacefilter token="&lt;!-- precompiled servlets --&gt;" value="${jspc.web.fragment}" />
</replace>
</target>
<uptodate property="precompilejsp.uptodate" targetfile="WEB-INF/web-out.xml">
<srcfiles dir= "." includes="jsp/*.jsp, WEB-INF/web-template.xml"/>
</uptodate>
<target name="all" depends="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, precompilejsp, bundle, warUpToDate" unless="war.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<war destfile="${project}.war" webxml="WEB-INF/web-out.xml">
<fileset dir=".">
<include name="WEB-INF/**/*.class"/>
<!-- pulled out of the jar in 0.7.12
<include name="WEB-INF/lib/*.jar"/>
-->
<include name="images/*.png"/>
<include name="css.css"/>
<include name="index.html"/>
<include name="WEB-INF/classes/${project}.properties"/>
</fileset>
<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="${project}.war">
<srcfiles dir= "." includes="WEB-INF/web-out.xml WEB-INF/**/*.class images/*.png css.css index.html WEB-INF/classes/${project}.properties" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="war.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="bundle" depends="compile, precompilejsp" unless="no.bundle">
<mkdir dir="build/messages-src" />
<!-- 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>
<javac source="${javac.version}" target="${javac.version}"
includeAntRuntime="false"
srcdir="build/messages-src" destdir="${bin}">
<compilerarg line="${javac.compilerargs}" />
</javac>
</target>
<target name="poupdate" depends="compile, precompilejsp">
<!-- 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="clean">
<delete file="susidns.war" />
<delete>
<fileset dir="." includes="**/*.class" />
<fileset dir="." includes="tmp, build" />
<fileset dir="WEB-INF" includes="web-fragment.xml, web-out.xml" />
</delete>
<delete dir="${bin}" />
<delete dir="${tmp}" />
<delete dir="build" />
</target>
<target name="distclean" depends="clean" />
</project>