Index: /applications/editors/josm/plugins/build-common.xml
===================================================================
--- /applications/editors/josm/plugins/build-common.xml	(revision 34619)
+++ /applications/editors/josm/plugins/build-common.xml	(revision 34620)
@@ -16,7 +16,9 @@
     <property name="josm.test.build.dir"    location="../../core/test/build"/>
     <property name="jmockit.jar"            location="../00_core_test_lib/jmockit-1.41.jar"/>
-    <property name="error_prone_ant.jar"    location="../00_core_tools/error_prone_ant.jar"/>
+    <property name="error_prone_core.jar"   location="../00_core_tools/error_prone_core.jar"/>
+    <property name="error_prone_javac.jar"  location="../00_core_tools/error_prone_javac.jar"/>
     <property name="checkstyle.jar"         location="../00_core_tools/checkstyle/checkstyle-all.jar"/>
     <property name="checkstyle-build.dir"   location="../00_core_tools/checkstyle/build"/>
+    <property name="jformatstring.jar"      location="../00_core_tools/spotbugs/jFormatString-3.0.0.jar"/>
     <property name="spotbugs-ant.jar"       location="../00_core_tools/spotbugs/spotbugs-ant.jar"/>
     <property name="annotations.jar"        location="../00_core_tools/spotbugs/spotbugs-annotations.jar"/>
@@ -42,24 +44,14 @@
         <os family="Windows"/>
     </condition>
-    <!-- For Java9-specific stuff -->
-    <condition property="isJava9">
-        <matches string="${ant.java.version}" pattern="(1.)?(9|1[0-9])" />
-    </condition>
-    <!-- For Java10-specific stuff -->
-    <condition property="isJava10">
-        <matches string="${ant.java.version}" pattern="1[0-9]" />
-    </condition>
-    <!-- For Java11-specific stuff -->
-    <condition property="isJava11">
-        <matches string="${ant.java.version}" pattern="1[1-9]" />
-    </condition>
-    <!-- Disable error_prone on Java 10+, see https://github.com/google/error-prone/issues/860 -->
-    <condition property="javac.compiler" value="modern" else="com.google.errorprone.ErrorProneAntCompilerAdapter">
-        <isset property="isJava10"/>
-    </condition>
-    <!-- Disable jacoco on Java 11+, see https://github.com/jacoco/jacoco/issues/629 -->
+    <!-- For Java specific stuff by version -->
+    <condition property="isJava9"><matches string="${ant.java.version}" pattern="(1.)?(9|1[0-9])" /></condition>
+    <condition property="isJava10"><matches string="${ant.java.version}" pattern="1[0-9]" /></condition>
+    <condition property="isJava11"><matches string="${ant.java.version}" pattern="1[1-9]" /></condition>
+    <condition property="isJava12"><matches string="${ant.java.version}" pattern="1[2-9]" /></condition>
+    <condition property="isJava13"><matches string="${ant.java.version}" pattern="1[3-9]" /></condition>
+    <!-- Disable jacoco on Java 13+, see https://github.com/jacoco/jacoco/pull/738 -->
     <condition property="coverageByDefault">
         <not>
-            <isset property="isJava11"/>
+            <isset property="isJava13"/>
         </not>
     </condition>
@@ -86,4 +78,8 @@
         <fileset refid="jaxb.jars"/>
     </path>
+    <path id="processor.path">
+        <pathelement location="${error_prone_core.jar}"/>
+        <pathelement location="${jformatstring.jar}"/>
+    </path>
 
     <!--
@@ -105,16 +101,13 @@
     <target name="compile" depends="init, pre-compile" unless="skip-compile">
         <echo message="compiling sources for ${plugin.jar} ..."/>
-        <javac compiler="${javac.compiler}" srcdir="${plugin.src.dir}" debug="true" destdir="${plugin.build.dir}" includeantruntime="false"
-            encoding="UTF-8" target="${java.lang.version}" source="${java.lang.version}">
-            <compilerclasspath>
-                <pathelement location="${error_prone_ant.jar}"/>
-            </compilerclasspath>
+        <javac srcdir="${plugin.src.dir}" debug="true" destdir="${plugin.build.dir}" includeantruntime="false"
+            encoding="UTF-8" target="${java.lang.version}" source="${java.lang.version}" fork="yes">
+            <compilerarg value="-J-Xbootclasspath/p:${error_prone_javac.jar}" unless:set="isJava9"/>
+            <compilerarg line="-XDcompilePolicy=simple"/>
+            <compilerarg value="-processorpath"/>
+            <compilerarg pathref="processor.path"/>
             <compilerarg value="-Xlint:deprecation"/>
             <compilerarg value="-Xlint:unchecked"/>
-            <compilerarg value="-Xep:StringSplitter:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
-            <compilerarg value="-Xep:ReferenceEquality:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
-            <compilerarg value="-Xep:InsecureCryptoUsage:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
-            <compilerarg value="-Xep:FutureReturnValueIgnored:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
-            <compilerarg value="-Xep:JdkObsolete:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
+            <compilerarg value="-Xplugin:ErrorProne -Xep:StringSplitter:OFF -Xep:ReferenceEquality:OFF -Xep:InsecureCryptoUsage:OFF -Xep:FutureReturnValueIgnored:OFF -Xep:JdkObsolete:OFF"/>
             <compilerarg line="-Xmaxwarns 1000"/>
             <classpath refid="plugin.classpath"/>
