Index: trunk/build.xml
===================================================================
--- trunk/build.xml	(revision 17337)
+++ trunk/build.xml	(revision 17338)
@@ -16,5 +16,5 @@
          xmlns:unless="ant:unless"
 >
-    <target name="init-ivy">
+    <target name="init-ivy" description="Initialize dependency management system Apache Ivy">
         <property name="ivy.version" value="2.5.0"/>
         <dirname property="base.dir" file="${ant.file.josm}"/>
@@ -31,5 +31,5 @@
         <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpath="${ivy.jar.file}"/>
     </target>
-    <target name="init-properties">
+    <target name="init-properties" description="Initialize properties for the build">
         <property environment="env"/>
         <!-- Load properties in a target and not at top level, so this build file can be
@@ -100,8 +100,6 @@
         </condition>
     </target>
-    <!--
-      ** Initializes the REVISION.XML file from SVN information
-    -->
-    <target name="init-svn-revision-xml" if="svn.present" depends="init-properties">
+    <target name="init-svn-revision-xml" if="svn.present" depends="init-properties"
+            description="Initialize the REVISION.XML file from SVN information">
         <exec append="false" output="${base.dir}/REVISION.XML" executable="svn" dir="${base.dir}" resultproperty="svn.info.result">
             <env key="LANG" value="C"/>
@@ -111,8 +109,6 @@
         </exec>
     </target>
-    <!--
-      ** Initializes the REVISION.XML file from git information
-    -->
-    <target name="init-git-revision-xml" if="git.present" depends="init-properties">
+    <target name="init-git-revision-xml" if="git.present" depends="init-properties"
+            description="Initialize the REVISION.XML file from git information">
         <exec append="false" output="${base.dir}/REVISION.XML" executable="git" dir="${base.dir}">
             <arg value="log"/>
@@ -131,8 +127,6 @@
                        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>
-    <!--
-      ** Creates the REVISION file to be included in the distribution
-    -->
-    <target name="create-revision" depends="init-properties,init-svn-revision-xml,init-git-revision-xml">
+    <target name="create-revision" depends="init-properties,init-svn-revision-xml,init-git-revision-xml"
+            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"/>
@@ -150,16 +144,12 @@
 </echo>
     </target>
-    <!--
-      ** Check internal XML files against their XSD
-    -->
-    <target name="check-schemas" unless="check-schemas.notRequired" depends="init-properties">
+    <target name="check-schemas" unless="check-schemas.notRequired" depends="init-properties"
+            description="Check internal XML files against their XSD">
         <schemavalidate file="${resources.dir}/data/defaultpresets.xml" >
             <schema namespace="http://josm.openstreetmap.de/tagging-preset-1.0" file="${resources.dir}/data/tagging-preset.xsd" />
         </schemavalidate>
     </target>
-    <!--
-      ** Main target that builds JOSM and checks XML against schemas
-    -->
-    <target name="dist" depends="compile,extract-libraries,epsg,copy-resources,check-schemas">
+    <target name="dist" depends="compile,extract-libraries,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}"/>
@@ -244,5 +234,5 @@
         </exec>
     </target>
-    <target name="javacc" depends="init" unless="javacc.notRequired">
+    <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"/>
@@ -258,5 +248,5 @@
         </java>
     </target>
-    <target name="compile-cots" depends="init" description="Compiles third-party dependencies not retrieved with Ivy">
+    <target name="compile-cots" depends="init" description="Compile third-party dependencies not retrieved with Ivy">
         <!-- COTS -->
         <javac srcdir="${src.dir}" includes="com/kitfox/**" excludes="**/package-info.java" nowarn="on" encoding="iso-8859-1"
@@ -269,5 +259,5 @@
         </javac>
     </target>
-    <target name="compile" depends="init,javacc,compile-cots" unless="compile.notRequired" description="Compiles 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"/>
@@ -312,5 +302,5 @@
         </copy>
     </target>
-    <target name="init" depends="init-properties,resolve">
+    <target name="init" depends="init-properties,resolve" description="Initialize the build">
         <uptodate property="javacc.notRequired" targetfile="${mapcss.dir}/parsergen/MapCSSParser.java" >
             <srcfiles dir="${mapcss.dir}" includes="MapCSSParser.jj"/>
@@ -323,5 +313,5 @@
         <mkdir dir="${dist.dir}"/>
     </target>
-    <target name="javadoc" depends="init">
+    <target name="javadoc" depends="init" description="Generate API documentation from JOSM source files">
         <javadoc destdir="javadoc"
                 sourcepath="${src.dir}"
@@ -349,5 +339,5 @@
         </javadoc>
     </target>
-    <target name="clean" depends="init-properties">
+    <target name="clean" depends="init-properties" description="Delete all build files">
         <delete dir="${build.dir}"/>
         <delete dir="${proj-build.dir}"/>
@@ -369,5 +359,5 @@
         </sequential>
     </macrodef>
-    <target name="test-init" depends="init">
+    <target name="test-init" depends="init" description="Initialize the tests">
         <mkdir dir="${test.dir}/build"/>
         <mkdir dir="${test.dir}/build/unit"/>
@@ -388,5 +378,5 @@
         <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpath="${tools.dir}/jacocoant.jar" />
     </target>
-    <target name="test-clean" depends="init-properties">
+    <target name="test-clean" depends="init-properties" description="Delete all built test files">
         <delete dir="${test.dir}/build"/>
         <delete dir="${test.dir}/report"/>
@@ -413,5 +403,5 @@
         </sequential>
     </macrodef>
-    <target name="test-compile" depends="test-init,compile,extract-libraries,epsg,copy-resources" description="Compiles all tests">
+    <target name="test-compile" depends="test-init,compile,extract-libraries,epsg,copy-resources" description="Compile all tests">
         <call-javac testfamily="unit">
             <cp-elements>
@@ -558,5 +548,5 @@
         </jacoco:report>
     </target>
-    <target name="dist-optimized" depends="dist" unless="isJava13">
+    <target name="dist-optimized" depends="dist" unless="isJava13" description="Build an optimized JOSM distribution file">
         <ivy:cachepath log="download-only" file="${tools.ivy}" pathid="proguard.classpath" conf="proguard"/>
         <taskdef resource="proguard/ant/task.properties" classpathref="proguard.classpath"/>
@@ -789,5 +779,5 @@
     </target>
 
-    <target name="script-compile" depends="test-compile" description="Compiles all scripts">
+    <target name="script-compile" depends="test-compile" description="Compile all scripts">
         <javac sourcepath="" srcdir="${base.dir}/scripts" failonerror="true" includes="*.java"
                destdir="${script-build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on"
@@ -824,5 +814,5 @@
     </macrodef>
 
-    <target name="taginfo" depends="script-compile">
+    <target name="taginfo" depends="script-compile" description="Generate project files Taginfo">
         <_taginfo type="mappaint" output="taginfo_style.json"/>
         <_taginfo type="presets" output="taginfo_presets.json"/>
@@ -830,5 +820,5 @@
     </target>
 
-    <target name="imageryindex" depends="script-compile">
+    <target name="imageryindex" depends="script-compile"  description="Check editor imagery difference">
         <echo message="Checking editor imagery difference"/>
         <java classname="SyncEditorLayerIndex" failonerror="true" fork="false">
@@ -846,5 +836,5 @@
     </target>
 
-    <target name="imageryindexdownload">
+    <target name="imageryindexdownload" description="Download and check editor imagery">
         <exec append="false" executable="wget" failifexecutionfails="true">
             <arg value="https://josm.openstreetmap.de/maps"/>
@@ -868,5 +858,5 @@
     </target>
 
-    <target name="checkstyle-compile" depends="init">
+    <target name="checkstyle-compile" depends="init" description="Compile Checkstyle rules">
         <ivy:cachepath log="download-only" file="${tools.ivy}" pathid="checkstyle.classpath" conf="checkstyle"/>
         <mkdir dir="${checkstyle-build.dir}"/>
@@ -877,5 +867,5 @@
         </javac>
     </target>
-    <target name="checkstyle-changed" depends="checkstyle-compile">
+    <target name="checkstyle-changed" depends="checkstyle-compile" description="Run Checkstyle on SVN/Git-changed source files">
         <exec append="false" osfamily="unix" executable="bash" failifexecutionfails="true">
             <arg value="-c"/>
@@ -887,5 +877,5 @@
         </exec>
     </target>
-    <target name="checkstyle" depends="checkstyle-compile">
+    <target name="checkstyle" depends="checkstyle-compile" description="Run Checkstyle on the source files">
         <taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties">
             <classpath refid="checkstyle.classpath"/>
@@ -902,5 +892,5 @@
     </target>
 
-    <target name="spotbugs" depends="dist">
+    <target name="spotbugs" depends="dist" description="Run SpotBugs on the source files">
         <ivy:cachepath log="download-only" file="${tools.ivy}" pathid="spotbugs.classpath" conf="spotbugs"/>
         <taskdef name="spotbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="spotbugs.classpath"/>
@@ -918,5 +908,5 @@
     </target>
 
-    <target name="pmd" depends="init">
+    <target name="pmd" depends="init" description="Run PMD on the source files">
         <ivy:cachepath log="download-only" file="${tools.ivy}" pathid="pmd.classpath" conf="pmd"/>
         <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.classpath"/>
@@ -936,5 +926,5 @@
     </target>
 
-    <target name="run" depends="dist">
+    <target name="run" depends="dist" description="Run JOSM">
         <java jar="${dist.jar}" fork="true">
             <arg value="--set=expert=true"/>
@@ -943,8 +933,6 @@
         </java>
     </target>
-    <!--
-      ** Compile build script for generating projection list.
-    -->
-    <target name="epsg-compile" depends="init">
+    <target name="epsg-compile" depends="init"
+            description="Compile build script for generating projection list">
         <property name="proj-classpath" location="${build.dir}"/>
         <mkdir dir="${proj-build.dir}"/>
@@ -955,8 +943,6 @@
         </javac>
     </target>
-    <!--
-      ** generate projection list.
-    -->
-    <target name="epsg" unless="epsg.notRequired" depends="epsg-compile">
+    <target name="epsg" unless="epsg.notRequired" depends="epsg-compile"
+            description="Generate projection list">
         <touch file="${epsg.output}" mkdirs="true"/>
         <java classname="BuildProjectionDefinitions" failonerror="true" fork="true">
@@ -970,8 +956,6 @@
         </java>
     </target>
-    <!--
-      ** update projection test files after an update of projection definitions
-    -->
-    <target name="update-proj-files" depends="test-compile">
+    <target name="update-proj-files" depends="test-compile"
+            description="Update projection test files after an update of projection definitions">
         <java classname="org.openstreetmap.josm.data.projection.ProjectionRefTest" failonerror="true" fork="true">
             <classpath>
@@ -987,8 +971,5 @@
         </java>
     </target>
-    <!--
-      ** generate jdeps dependency graph
-    -->
-    <target name="jdeps" depends="compile">
+    <target name="jdeps" depends="compile" description="Generate jdeps dependency graph">
         <delete dir="${modules.dir}"/>
         <mkdir dir="${modules.dir}"/>
@@ -1045,5 +1026,5 @@
         <ivy:cachepath log="download-only" pathid="test.path" conf="test"/>
     </target>
-    <target name="extract-libraries" depends="resolve" description="extract libraries to build dir">
+    <target name="extract-libraries" depends="resolve" description="Extract libraries to build dir">
         <unzip dest="${build.dir}">
             <fileset refid="runtime.fileset"/>
@@ -1117,5 +1098,5 @@
         </unzip>
     </target>
-    <target name="sources" description="Generates jar file of JOSM source files and its dependencies" depends="init,epsg,resolve">
+    <target name="sources" description="Generate jar file of JOSM source files and its dependencies" depends="init,epsg,resolve">
         <ivy:cachefileset log="download-only" setid="sources.fileset" conf="sources"/>
         <jar destfile="${dist-sources.jar}" level="${clevel}">
@@ -1130,5 +1111,5 @@
         <ivy:retrieve pattern="${lib.dir}/tools/[artifact]-[type].[ext]" conf="javacc,checkstyle,pmd,spotbugs,errorprone" file="${tools.ivy}"/>
     </target>
-    <target name="ivy-report" description="Generates Ivy reports of dependency resolving" depends="resolve">
+    <target name="ivy-report" description="Generate Ivy reports of dependency resolving" depends="resolve">
         <ivy:report todir="${tools.dir}/ivy-report" graph="false"/>
     </target>
