Description: Adjustments to the ant build.xml file.
 Mainly to use system-provided JARs and not depend on Internet connection.
 Also adds support to build the translations in the i18n directory.
 The Debian package build is identified using the Build-Name in the REVISION
 file and is not considered local build.
Author: Giovanni Mascellani <gio@debian.org>
Author: Bas Couwenberg <sebastic@debian.org>
Forwarded: not-needed

--- a/build.xml
+++ b/build.xml
@@ -23,12 +23,14 @@
         <property name="tools.ivy" location="${tools.dir}/ivy.xml"/>
         <property name="ivy.jar.dir" location="${tools.dir}/ivy"/>
         <property name="ivy.jar.file" location="${ivy.jar.dir}/ivy-${ivy.version}.jar"/>
+<!--
         <mkdir dir="${ivy.jar.dir}"/>
         <get src="https://josm.openstreetmap.de/nexus/content/repositories/public/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar"
              dest="${ivy.jar.file}"
              skipexisting="true"
         />
         <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpath="${ivy.jar.file}"/>
+-->
     </target>
     <target name="init-properties" description="Initialize properties for the build">
         <property environment="env"/>
@@ -73,6 +75,7 @@
         <property name="script-build.dir" location="${base.dir}/build2"/>
         <property name="checkstyle-build.dir" location="${base.dir}/build2"/>
         <property name="epsg.output" location="${resources.dir}/data/projection/custom-epsg"/>
+        <property name="antcontrib.jar" value="/usr/share/java/ant-contrib.jar"/>
         <property name="commons-lang3.jar" location="${tools.dir}/commons-lang3.jar"/>
         <property name="dist.jar" location="${dist.dir}/josm-custom.jar"/>
         <property name="dist-optimized.jar" location="${dist.dir}/josm-custom-optimized.jar"/>
@@ -112,6 +115,17 @@
         <condition property="java.library.dir" value="jmods" else="lib">
             <isset property="isJava9"/>
         </condition>
+        <!-- Java classpath addition (all jar files to compile tests with this) -->
+        <path id="classpath">
+            <fileset dir="/usr/share/java">
+                <include name="gettext-commons.jar"/>
+                <include name="jsr305.jar"/>
+                <include name="commons-codec.jar"/>
+                <include name="commons-compress.jar"/>
+                <include name="jmapviewer.jar"/>
+            </fileset>
+        </path>
+        <property name="classpathprop-colon" refid="classpath"/>
     </target>
     <target name="init-svn-revision-xml" if="svn.present" depends="init-properties"
             description="Initialize the REVISION.XML file from SVN information">
@@ -140,10 +154,9 @@
                        match=".*git-svn-id: [^@]*@([0-9]+).*(\d{4}-\d{2}-\d{2}.\d{2}\:\d{2}\:\d{2}\s*[+-]\d{2}:?\d{2})\s*$"
                        replace="&lt;info&gt;&lt;entry&gt;&lt;commit revision=&quot;\1&quot;&gt;&lt;date&gt;\2&lt;/date&gt;&lt;/commit&gt;&lt;/entry&gt;&lt;/info&gt;"/>
     </target>
-    <target name="create-revision" depends="init-properties,init-svn-revision-xml,init-git-revision-xml"
+    <target name="create-revision"
             description="Create the REVISION file to be included in the distribution based on the latest SVN/Git commit">
-        <xmlproperty file="${base.dir}/REVISION.XML" prefix="version" keepRoot="false" collapseAttributes="true"/>
-        <delete file="${base.dir}/REVISION.XML"/>
+        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
         <tstamp>
             <format property="build.tstamp" pattern="yyyy-MM-dd HH:mm:ss"/>
         </tstamp>
@@ -154,9 +167,9 @@
 # automatically generated by JOSM build.xml - do not edit
 Revision: ${version.entry.commit.revision}
 Build-Date: ${build.tstamp}
-</echo>
-        <echo unless:set="releasebuild" file="${resources.dir}/REVISION" append="true">
-        Is-Local-Build: true
+Is-Local-Build: false
+Build-Name: Debian
+Debian-Release: ${debian.version}
 </echo>
     </target>
     <target name="check-schemas" unless="check-schemas.notRequired" depends="init-properties"
@@ -165,14 +178,14 @@ Build-Date: ${build.tstamp}
             <schema namespace="http://josm.openstreetmap.de/tagging-preset-1.0" file="${resources.dir}/data/tagging-preset.xsd" />
         </schemavalidate>
     </target>
-    <target name="dist" depends="compile,extract-libraries,epsg,copy-resources,check-schemas"
+    <target name="dist" depends="compile,epsg,copy-resources,check-schemas"
             description="Main target that builds JOSM and checks XML against schemas">
         <echo>Revision ${version.entry.commit.revision}</echo>
         <copy file="CONTRIBUTION" todir="${build.dir}"/>
         <copy file="README" todir="${build.dir}"/>
         <copy file="LICENSE" todir="${build.dir}"/>
         <!-- create josm-custom.jar -->
-        <delete file="${dist.jar}"/>
+        <propertyregex property="classpathprop" input="${classpathprop-colon}" global="true" regexp=":" replace=" "/>
         <jar destfile="${dist.jar}" basedir="${build.dir}" level="${clevel}">
             <!-- add attribute excludes="**/*BZip2*,**/*Bzip2*" to create a non-bzip2 supporting jar -->
             <manifest>
@@ -182,30 +195,130 @@ Build-Date: ${build.tstamp}
                 <attribute name="Permissions" value="all-permissions"/>
                 <attribute name="Codebase" value="josm.openstreetmap.de"/>
                 <attribute name="Application-Name" value="JOSM - Java OpenStreetMap Editor"/>
+                <attribute name="Debian-Release" value="${debian.version}"/>
+                <attribute name="Class-Path" value="${classpathprop}"/>
                 <!-- Java 9 stuff. Entries are safely ignored by Java 8 -->
                 <attribute name="Add-Exports" value="java.base/sun.security.action java.desktop/com.apple.eawt java.desktop/com.sun.imageio.spi java.desktop/com.sun.imageio.plugins.jpeg javafx.graphics/com.sun.javafx.application jdk.deploy/com.sun.deploy.config" />
                 <attribute name="Add-Opens" value="java.base/java.lang java.base/java.nio java.base/jdk.internal.loader java.base/jdk.internal.ref java.desktop/javax.imageio.spi java.desktop/javax.swing.text.html java.prefs/java.util.prefs" />
                 <!-- Indicate that this jar may have version specific classes. Only used in Java9+. -->
                 <attribute name="Multi-Release" value="true"/>
             </manifest>
+            <service type="org.apache.commons.jcs3.log.LogFactory">
+                <provider classname="org.apache.commons.jcs3.log.JulLogFactory"/>
+                <provider classname="org.apache.commons.jcs3.log.Log4j2Factory"/>
+            </service>
         </jar>
         <!-- Sign jar if all environment variables are set -->
     	<signjar jar="${dist.jar}" alias="${env.SIGN_ALIAS}" tsaurl="${env.SIGN_TSA}"
             keystore="${env.SIGN_KEYSTORE}" storepass="${env.SIGN_STOREPASS}" keypass="${env.SIGN_KEYPASS}" if:set="sign.jar" />
     </target>
     <target name="javacc" depends="init" unless="javacc.notRequired" description="Compile the MapCSS compiler">
-        <ivy:cachepath log="download-only" file="${tools.ivy}" pathid="javacc.classpath" conf="javacc"/>
         <mkdir dir="${mapcss.dir}/parsergen"/>
-        <java classname="javacc" fork="true" dir="${mapcss.dir}" failonerror="true">
-            <classpath path="${tools.dir}/javacc"/>
-            <classpath refid="javacc.classpath"/>
+        <exec append="false" executable="javacc" failifexecutionfails="true">
             <arg value="-DEBUG_PARSER=false"/>
             <arg value="-DEBUG_TOKEN_MANAGER=false"/>
             <arg value="-JDK_VERSION=1.${java.lang.version}"/>
             <arg value="-GRAMMAR_ENCODING=UTF-8"/>
             <arg value="-UNICODE_INPUT=true"/>
+            <arg value="-OUTPUT_DIRECTORY=${mapcss.dir}/parsergen"/>
             <arg value="${mapcss.dir}/MapCSSParser.jj"/>
-        </java>
+        </exec>
+    </target>
+    <target name="javacc-openinghoursparser" depends="init" unless="javacc.notRequired">
+        <mkdir dir="${src.dir}/ch/poole/openinghoursparser/parsergen"/>
+        <exec append="false" executable="javacc" failifexecutionfails="true">
+            <arg value="-DEBUG_PARSER=false"/>
+            <arg value="-DEBUG_TOKEN_MANAGER=false"/>
+            <arg value="-JDK_VERSION=1.${java.lang.version}"/>
+            <arg value="-GRAMMAR_ENCODING=UTF-8"/>
+            <arg value="-UNICODE_INPUT=true"/>
+            <arg value="-OUTPUT_DIRECTORY=${src.dir}/ch/poole/openinghoursparser"/>
+            <arg value="${src.dir}/ch/poole/openinghoursparser/OpeningHoursParser.jj"/>
+        </exec>
+    </target>
+    <target name="compile-cots" depends="init,javacc-openinghoursparser" description="Compile third-party dependencies not retrieved with Ivy">
+        <!-- COTS -->
+        <javac srcdir="${src.dir}" classpathref="classpath" includes="ch/**,com/**,javax/**,oauth/signpost/**,org/apache/commons/**,org/glassfish/**,org/jetbrains/annotations/**,org/tukaani/**" excludes="**/package-info.java" nowarn="
+n" encoding="iso-8859-1"
+            destdir="${build.dir}" release="${java.lang.version}" debug="on" includeAntRuntime="false">
+            <!-- get rid of "internal proprietary API" warning -->
+            <compilerarg value="-XDignore.symbol.file"/>
+            <exclude name="ch/poole/openinghoursparser/DataTest.java"/>
+            <exclude name="ch/poole/openinghoursparser/UnitTest.java"/>
+            <exclude name="com/drew/imaging/FileTypeDetector*"/>
+            <exclude name="com/drew/imaging/ImageMetadataReader*"/>
+            <exclude name="com/drew/imaging/avi/**"/>
+            <exclude name="com/drew/imaging/bmp/**"/>
+            <exclude name="com/drew/imaging/eps/**"/>
+            <exclude name="com/drew/imaging/gif/**"/>
+            <exclude name="com/drew/imaging/heif/**"/>
+            <exclude name="com/drew/imaging/ico/**"/>
+            <exclude name="com/drew/imaging/mp3/**"/>
+            <exclude name="com/drew/imaging/mp4/**"/>
+            <exclude name="com/drew/imaging/pcx/**"/>
+            <exclude name="com/drew/imaging/psd/**"/>
+            <exclude name="com/drew/imaging/quicktime/**"/>
+            <exclude name="com/drew/imaging/raf/**"/>
+            <exclude name="com/drew/imaging/riff/**"/>
+            <exclude name="com/drew/imaging/wav/**"/>
+            <exclude name="com/drew/imaging/webp/**"/>
+            <exclude name="com/drew/metadata/avi/**"/>
+            <exclude name="com/drew/metadata/bmp/**"/>
+            <exclude name="com/drew/metadata/eps/**"/>
+            <exclude name="com/drew/metadata/gif/**"/>
+            <exclude name="com/drew/metadata/heif/**"/>
+            <exclude name="com/drew/metadata/ico/**"/>
+            <exclude name="com/drew/metadata/mov/**"/>
+            <exclude name="com/drew/metadata/mp3/**"/>
+            <exclude name="com/drew/metadata/mp4/**"/>
+            <exclude name="com/drew/metadata/pcx/**"/>
+            <exclude name="com/drew/metadata/wav/**"/>
+            <exclude name="com/drew/metadata/webp/**"/>
+            <exclude name="com/drew/tools/**"/>
+            <exclude name="com/kitfox/svg/app/ant/**"/>
+            <exclude name="com/kitfox/svg/app/*Dialog*"/>
+            <exclude name="com/kitfox/svg/app/*Frame*"/>
+            <exclude name="com/kitfox/svg/app/*Player*"/>
+            <exclude name="com/kitfox/svg/app/*Viewer*"/>
+            <exclude name="org/apache/commons/compress/PasswordRequiredException*"/>
+            <exclude name="org/apache/commons/compress/archivers/**"/>
+            <exclude name="org/apache/commons/compress/changes/**"/>
+            <exclude name="org/apache/commons/compress/compressors/bzip2/BZip2Utils*"/>
+            <exclude name="org/apache/commons/compress/compressors/brotli/**"/>
+            <exclude name="org/apache/commons/compress/compressors/CompressorStreamFactory*"/>
+            <exclude name="org/apache/commons/compress/compressors/CompressorStreamProvider*"/>
+            <exclude name="org/apache/commons/compress/compressors/CompressorException*"/>
+            <exclude name="org/apache/commons/compress/compressors/FileNameUtil*"/>
+            <exclude name="org/apache/commons/compress/compressors/deflate/**"/>
+            <exclude name="org/apache/commons/compress/compressors/gzip/**"/>
+            <exclude name="org/apache/commons/compress/compressors/lz4/**"/>
+            <exclude name="org/apache/commons/compress/compressors/lzma/**"/>
+            <exclude name="org/apache/commons/compress/compressors/lz77support/**"/>
+            <exclude name="org/apache/commons/compress/compressors/pack200/**"/>
+            <exclude name="org/apache/commons/compress/compressors/snappy/**"/>
+            <exclude name="org/apache/commons/compress/compressors/xz/XZUtils*"/>
+            <exclude name="org/apache/commons/compress/compressors/z/**"/>
+            <exclude name="org/apache/commons/compress/compressors/zstandard/**"/>
+            <exclude name="org/apache/commons/compress/java/util/jar/Pack200*"/>
+            <exclude name="org/apache/commons/compress/harmony/pack200/**"/>
+            <exclude name="org/apache/commons/compress/harmony/unpack200/**"/>
+            <exclude name="org/apache/commons/compress/parallel/**"/>
+            <exclude name="org/apache/commons/compress/utils/ArchiveUtils*"/>
+            <exclude name="org/apache/commons/jcs3/auxiliary/disk/jdbc/**"/>
+            <exclude name="org/apache/commons/jcs3/auxiliary/remote/http/client/**"/>
+            <exclude name="org/apache/commons/jcs3/auxiliary/remote/http/server/RemoteHttpCacheServlet*"/>
+            <exclude name="org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheStartupServlet*"/>
+            <exclude name="org/apache/commons/jcs3/log/Log4j2Factory*"/>
+            <exclude name="org/apache/commons/jcs3/log/Log4j2LogAdapter*"/>
+            <exclude name="org/apache/commons/jcs3/utils/servlet/**"/>
+            <exclude name="org/jetbrains/annotations/Debug.java"/>
+            <exclude name="org/openstreetmap/gui/jmapviewer/Demo*"/>
+        </javac>
+        <copy todir="${build.dir}">
+            <fileset dir="${src.dir}" includes="ch/poole/**/*.properties,org/glassfish/**/*.properties" excludes="**/*.java"/>
+        </copy>
+        <!-- I18N -->
+        <ant dir="i18n" />
     </target>
     <macrodef name="call-javac-compile">
         <attribute name="sourcepath" default=""/>
@@ -285,23 +398,56 @@ Build-Date: ${build.tstamp}
         </call-javac-compile>
       </sequential>
     </macrodef>
-    <target name="compile" depends="init,javacc" unless="compile.notRequired" description="Compile JOSM">
+    <target name="compile" depends="init,javacc,compile-cots" unless="compile.notRequired" description="Compile JOSM">
+<!--
         <ivy:cachepath log="download-only" file="${tools.ivy}" pathid="errorprone.classpath" conf="errorprone"/>
         <ivy:cachepath log="download-only" file="${tools.ivy}" pathid="errorprone_javac.classpath" conf="errorprone_javac"/>
+-->
         <!-- JOSM -->
+<!--
         <call-javac-compile excludes="**/package-info.java,**/module-info.java,main/**" release="${java.lang.version}"/>
+-->
         <!-- Java 11 specific files (2018-09 LTS) -->
+<!--
         <call-javac-compile-mrjar release="11"/>
+-->
         <!-- Java 17 specific files (2021-09 LTS) -->
+<!--
         <call-javac-compile-mrjar release="17"/>
+-->
         <!-- Java 18 specific files -->
+<!--
         <call-javac-compile-mrjar release="18"/>
+-->
         <!-- Java 19 specific files -->
+<!--
         <call-javac-compile-mrjar release="19"/>
+-->
         <!-- Java 20 specific files -->
+<!--
         <call-javac-compile-mrjar release="20"/>
+-->
         <!-- Java 21 specific files (2023-09 LTS) -->
+<!--
         <call-javac-compile-mrjar release="21"/>
+-->
+        <javac sourcepath="" srcdir="${src.dir}" fork="yes" classpathref="classpath"
+            excludes="ch/**,com/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/jetbrains/annotations/**,org/openstreetmap/gui/jmapviewer/**,org/tukaani/**,**/package-info.java"
+            destdir="${build.dir}" release="${java.lang.version}" debug="on" includeantruntime="false" encoding="UTF-8">
+            <compilerarg value="-Xlint:cast"/>
+            <compilerarg value="-Xlint:deprecation"/>
+            <compilerarg value="-Xlint:dep-ann"/>
+            <compilerarg value="-Xlint:divzero"/>
+            <compilerarg value="-Xlint:empty"/>
+            <compilerarg value="-Xlint:finally"/>
+            <compilerarg value="-Xlint:overrides"/>
+            <!--<compilerarg value="-Xlint:rawtypes"/>-->
+            <compilerarg value="-Xlint:static"/>
+            <compilerarg value="-Xlint:try"/>
+            <compilerarg value="-Xlint:unchecked"/>
+            <!-- Undocumented argument to ignore "Sun internal proprietary API" warning, see http://stackoverflow.com/a/13862308/2257172 -->
+            <compilerarg value="-XDignore.symbol.file"/>
+        </javac>
     </target>
     <target name="create-resources" depends="create-revision" description="Create generated resource files">
         <copy todir="${resources.dir}">
@@ -325,6 +471,7 @@ Build-Date: ${build.tstamp}
         </uptodate>
         <mkdir dir="${build.dir}"/>
         <mkdir dir="${dist.dir}"/>
+        <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${antcontrib.jar}"/>
     </target>
     <target name="javadoc" depends="init" description="Generate API documentation from JOSM source files">
         <javadoc destdir="javadoc"
@@ -363,6 +510,7 @@ Build-Date: ${build.tstamp}
         <delete dir="${src.dir}/org/openstreetmap/josm/data/imagery/types"/>
         <delete file="${epsg.output}"/>
         <delete file="${pmd.dir}/cache"/>
+        <ant target="clean" dir="i18n"/>
     </target>
     <macrodef name="init-test-preferences">
         <attribute name="testfamily"/>
@@ -977,6 +1125,7 @@ Build-Date: ${build.tstamp}
                 <pathelement path="${resources.dir}"/>
                 <pathelement path="${proj-classpath}"/>
                 <pathelement path="${proj-build.dir}"/>
+                <path refid="classpath"/>
             </classpath>
             <arg value="${base.dir}"/>
         </java>
@@ -1040,12 +1189,14 @@ Build-Date: ${build.tstamp}
         <move file="${modules.dir}/dots/summary.dot.png" tofile="${modules.dir}/josm-with-all-dependencies.png"/>
     </target>
     <target name="resolve" depends="init-ivy" unless="resolve.notRequired" description="Resolve Ivy dependencies">
+<!--
         <ivy:settings file="${base.dir}/ivysettings.xml"/>
         <ivy:resolve log="download-only" file="${base.dir}/ivy.xml" keep="true"/>
         <ivy:cachepath log="download-only" pathid="compile.path" conf="compile"/>
         <ivy:cachepath log="download-only" pathid="runtime.path" conf="runtime"/>
         <ivy:cachefileset log="download-only" setid="runtime.fileset" conf="runtime"/>
         <ivy:cachepath log="download-only" pathid="test.path" conf="test"/>
+-->
     </target>
     <target name="extract-libraries" depends="resolve" description="Extract libraries to build dir">
         <unzip dest="${build.dir}">
--- a/i18n/build.xml
+++ b/i18n/build.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <project name="JOSM i18n" default="build" basedir=".">
     <!-- compilation properties -->
-    <property name="josm.build.dir" value="../core"/>
+    <property name="josm.build.dir" value=".."/>
     <property name="josm.resources.dir" value="${josm.build.dir}/resources"/>
     <property name="josm.presets" value="${josm.resources.dir}/data/defaultpresets.xml"/>
     <property name="plugin.dir" value="../plugins"/>
@@ -14,8 +14,8 @@
     <property name="po.build.dir" value="${i18n.build.dir}"/>
     <property name="ant.build.javac.target" value="1.5"/>
     <property name="gettext.keywords" value="-k -ktrc:1c,2 -kmarktrc:1c,2 -ktr -kmarktr -ktrn:1,2 -ktrnc:1c,2,3"/>
-    <property name="gettexttasks.jar" value="lib/gettext-ant-tasks-0.9.7.jar"/>
-    <property name="antcontrib.jar" value="lib/ant-contrib-1.0b3.jar"/>
+    <property name="gettexttasks.jar" value="/usr/share/java/gettext-ant-tasks.jar"/>
+    <property name="antcontrib.jar" value="/usr/share/java/ant-contrib.jar"/>
     <property name="grand.jar" value="lib/grand-1.9.5.jar"/>
     <target name="init" description="Loads the Ant gettext and contrib tasks">
         <taskdef name="gettext-extract" classname="org.xnap.commons.ant.gettext.GettextExtractKeysTask" classpath="${gettexttasks.jar}"/>
@@ -87,7 +87,7 @@
             <arg line="po/core.pot po/maplist.pot po/presets.pot"/>
         </exec>
     </target>
-    <target name="po/core.pot" description="Extracts message keys from the JOSM core source code" depends="init">
+    <target name="po/core.pot" description="Extracts message keys from the JOSM core source code" depends="builddir,init">
         <gettext-extract keysFile="core.pot" poDirectory="po" keywords="${gettext.keywords} --exclude-file=excludes.pot">
             <fileset dir="${josm.build.dir}/src" includes="**/*.java"/>
             <fileset dir="${i18n.build.dir}" includes="specialmessages.java"/>
@@ -117,9 +117,14 @@
             <fileset dir="${i18n.build.dir}" includes="trans_surveyor.java"/>
         </gettext-extract>
     </target>
-    <target name="build">
+    <target name="build.check">
+        <condition property="build.run">
+            <not><available file="build-timestamp"/></not>
+        </condition>
+    </target>
+    <target name="build" depends="build.check" if="build.run">
         <antcall target="buildcore"/>
-        <antcall target="buildplugins"/>
+        <touch file="build-timestamp"/>
     </target>
     <target name="buildplugins" depends="init">
         <foreach param="path" target="plugintrans" parallel="true" maxThreads="8">
@@ -138,13 +143,12 @@
             <param name="path" value="${plugin}"/>
         </antcall>
     </target>
-    <target name="buildcore" depends="pot">
+    <target name="buildcore">
         <antcall target="coretrans"/>
-        <antcall target="pluginlisttrans"/>
     </target>
-    <target name="coretrans" depends="po/core+maplist+presets.pot">
+    <target name="coretrans" depends="po/core.pot">
         <exec executable="perl" failonerror="true">
-            <arg line="i18n.pl --potfile=po/core+maplist+presets.pot --basedir=${i18n.install.dir}/ po/*.po"/>
+            <arg line="i18n.pl --potfile=po/core.pot --basedir=${i18n.install.dir}/ po/*.po"/>
         </exec>
     </target>
     <target name="pluginlisttrans" depends="po/pluginlist.pot">
@@ -187,15 +191,14 @@
             </else>
         </if>
     </target>
+    <target name="dist" depends="build">
+        <copy todir="../build">
+            <fileset dir="build"/>
+        </copy>
+    </target>
     <target name="clean">
         <delete dir="${i18n.build.dir}"/>
-        <delete file="build.dot"/>
-        <delete file="build.png"/>
-        <delete>
-            <fileset dir="po" includes="*.*~" defaultexcludes="false"/>
-            <fileset dir="po" includes="*.po" defaultexcludes="false"/>
-            <fileset dir="po" includes="*.pot" defaultexcludes="false"/>
-        </delete>
+        <delete file="build-timestamp"/>
     </target>
     <target name="test" depends="pot">
         <mkdir dir="${i18n.build.dir}/test"/>
