Index: trunk/build.xml
===================================================================
--- trunk/build.xml	(revision 12627)
+++ trunk/build.xml	(revision 12628)
@@ -28,5 +28,8 @@
         <property name="groovy.jar" location="${base.dir}/tools/groovy-all.jar"/>
         <property name="error_prone_ant.jar" location="${base.dir}/tools/error_prone_ant.jar"/>
+        <property name="dist.jar" location="${dist.dir}/josm-custom.jar"/>
+        <property name="dist-optimized.jar" location="${dist.dir}/josm-custom-optimized.jar"/>
         <property name="javac.compiler" value="com.google.errorprone.ErrorProneAntCompilerAdapter" />
+        <property name="java.lang.version" value="1.8" />
         <!-- build parameter: compression level (ant -Dclevel=N)
                  N ranges from 0 (no compression) to 9 (maximum compression)
@@ -43,5 +46,5 @@
                 <include name="**/*.jar"/>
             </fileset>
-            <pathelement path="${dist.dir}/josm-custom.jar"/>
+            <pathelement path="${dist.jar}"/>
             <pathelement path="${groovy.jar}"/>
             <pathelement path="tools/findbugs/annotations.jar"/>
@@ -134,6 +137,6 @@
         <copy file="LICENSE" todir="build"/>
         <!-- create josm-custom.jar -->
-        <delete file="${dist.dir}/josm-custom.jar"/>
-        <jar destfile="${dist.dir}/josm-custom.jar" basedir="${build.dir}" level="${clevel}">
+        <delete file="${dist.jar}"/>
+        <jar destfile="${dist.jar}" basedir="${build.dir}" level="${clevel}">
             <!-- add attribute excludes="**/*BZip2*,**/*Bzip2*" to create a non-bzip2 supporting jar -->
             <manifest>
@@ -205,5 +208,5 @@
         <antcall target="mac">
             <param name="bundle.outdir" value="${dist.dir}"/>
-            <param name="bundle.jar" value="${dist.dir}/josm-custom.jar"/>
+            <param name="bundle.jar" value="${dist.jar}"/>
         </antcall>
     </target>
@@ -212,5 +215,5 @@
         <exec dir="windows" executable="./josm-setup-unix.sh">
             <arg value="${version.entry.commit.revision}"/>
-            <arg value="../dist/josm-custom.jar"/>
+            <arg value="${dist.jar}"/>
         </exec>
     </target>
@@ -221,5 +224,5 @@
             <arg value="-DEBUG_PARSER=false"/>
             <arg value="-DEBUG_TOKEN_MANAGER=false"/>
-            <arg value="-JDK_VERSION=1.8"/>
+            <arg value="-JDK_VERSION=${java.lang.version}"/>
             <arg value="-GRAMMAR_ENCODING=UTF-8"/>
             <arg value="-OUTPUT_DIRECTORY=${mapcss.dir}/parsergen"/>
@@ -230,5 +233,5 @@
         <!-- COTS -->
         <javac srcdir="${src.dir}" includes="com/**,oauth/**,org/apache/commons/**,org/glassfish/**" nowarn="on" encoding="iso-8859-1"
-            destdir="build" target="1.8" source="1.8" debug="on" includeAntRuntime="false" createMissingPackageInfoClass="false">
+            destdir="build" target="${java.lang.version}" source="${java.lang.version}" debug="on" includeAntRuntime="false" createMissingPackageInfoClass="false">
             <!-- get rid of "internal proprietary API" warning -->
             <compilerarg value="-XDignore.symbol.file"/>
@@ -282,5 +285,5 @@
         <javac compiler="${javac.compiler}" sourcepath="" srcdir="${src.dir}" 
             excludes="com/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/openstreetmap/gui/jmapviewer/Demo.java,org/openstreetmap/gui/jmapviewer/JMapViewerTree.java,org/openstreetmap/gui/jmapviewer/checkBoxTree/**,org/openstreetmap/josm/**,gnu/**"
-            destdir="build" target="1.8" source="1.8" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
+            destdir="build" target="${java.lang.version}" source="${java.lang.version}" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
             <compilerclasspath>
                 <pathelement location="${error_prone_ant.jar}"/>
@@ -305,5 +308,5 @@
         <javac compiler="${javac.compiler}" sourcepath="" srcdir="${src.dir}"
             excludes="com/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/openstreetmap/gui/jmapviewer/**"
-            destdir="build" target="1.8" source="1.8" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
+            destdir="build" target="${java.lang.version}" source="${java.lang.version}" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
             <compilerclasspath>
                 <pathelement location="${error_prone_ant.jar}"/>
@@ -410,5 +413,5 @@
                     <cp-elements/>
                 </classpath>
-                <javac target="1.8" source="1.8" debug="on" encoding="UTF-8">
+                <javac target="${java.lang.version}" source="${java.lang.version}" debug="on" encoding="UTF-8">
                     <compilerarg value="-Xlint:all"/>
                     <compilerarg value="-Xlint:-serial"/>
@@ -529,6 +532,6 @@
         <taskdef resource="proguard/ant/task.properties" classpath="tools/proguard.jar"/>
         <proguard>
-        -injars dist/josm-custom.jar
-        -outjars dist/josm-custom-optimized.jar
+        -injars ${dist.jar}
+        -outjars ${dist-optimized.jar}
 
         -libraryjars ${java.home}/lib/rt.jar
@@ -586,6 +589,6 @@
             <arg value="--v2=${version.entry.commit.revision}-optimized"/>
             <arg value="--report-path=${dist.dir}/compat_report.html"/>
-            <arg value="${dist.dir}/josm-custom.jar"/>
-            <arg value="${dist.dir}/josm-custom-optimized.jar"/>
+            <arg value="${dist.jar}"/>
+            <arg value="${dist-optimized.jar}"/>
         </exec>
     </target>
@@ -659,5 +662,5 @@
         <as:build-signatures destfile="${dir}/api.sig">
             <path>
-                <fileset file="${dist.dir}/josm-custom-optimized.jar"/>
+                <fileset file="${dist-optimized.jar}"/>
                 <fileset file="${java.home}/lib/rt.jar"/>
                 <fileset file="${java.home}/lib/jce.jar"/>
@@ -706,5 +709,5 @@
         <sequential>
             <echo message="Generating Taginfo for type @{type} to @{output}"/>
-            <groovy src="${taginfoextract}" classpath="${dist.dir}/josm-custom.jar:tools/findbugs/annotations.jar">
+            <groovy src="${taginfoextract}" classpath="${dist.jar}:tools/findbugs/annotations.jar">
                 <arg value="-t"/>
                 <arg value="@{type}"/>
@@ -731,5 +734,5 @@
         <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpath="${groovy.jar};tools/commons-cli-1.3.1.jar"/>
         <echo message="Checking editor imagery difference"/>
-        <groovy src="scripts/SyncEditorLayerIndex.groovy" classpath="${dist.dir}/josm-custom.jar">
+        <groovy src="scripts/SyncEditorLayerIndex.groovy" classpath="${dist.jar}">
                 <arg value="-noeli"/>
                 <arg value="-p"/>
@@ -765,5 +768,5 @@
         <mkdir dir="${checkstyle-build.dir}"/>
         <javac sourcepath="" srcdir="${base.dir}/tools/checkstyle/src" failonerror="true"
-            destdir="${checkstyle-build.dir}" target="1.8" source="1.8" debug="on"
+            destdir="${checkstyle-build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on"
             includeantruntime="false" createMissingPackageInfoClass="false"
             encoding="UTF-8" classpath="tools/checkstyle/checkstyle-all.jar">
@@ -799,5 +802,5 @@
                 >
             <sourcePath path="${base.dir}/src" />
-            <class location="${dist.dir}/josm-custom.jar" />
+            <class location="${dist.jar}" />
         </findbugs>
     </target>
@@ -806,5 +809,5 @@
         <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpath="${toString:pmd.classpath}"/>
         <pmd shortFilenames="true" encoding="UTF-8">
-            <sourceLanguage name="java" version="1.8" />
+            <sourceLanguage name="java" version="${java.lang.version}" />
             <ruleset>${base.dir}/tools/pmd/josm-ruleset.xml</ruleset>
             <formatter type="text" toConsole="true" />
@@ -820,5 +823,5 @@
 
     <target name="run" depends="dist">
-        <java jar="${dist.dir}/josm-custom.jar" fork="true">
+        <java jar="${dist.jar}" fork="true">
             <arg value="--set=expert=true"/>
             <arg value="--set=remotecontrol.enabled=true"/>
@@ -834,5 +837,5 @@
         <mkdir dir="${proj-build.dir}"/>
         <javac sourcepath="" srcdir="${base.dir}/scripts" failonerror="true"
-            destdir="${proj-build.dir}" target="1.8" source="1.8" debug="on"
+            destdir="${proj-build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on"
             includeantruntime="false" createMissingPackageInfoClass="false"
             encoding="UTF-8" classpath="${proj-classpath}">
