Index: trunk/README
===================================================================
--- trunk/README	(revision 16555)
+++ trunk/README	(revision 16556)
@@ -155,5 +155,4 @@
     - checkstyle/           libs and config files for checkstyle (automatically detects code style
                             problems in source code); can be launched as an ant target in build.xml
-    - error_prone_ant.jar   used to detect code errors during compilation
     - ivy/                  Apache Ivy binary, configuration file, and downloaded dependencies 
     - jacocoant.jar         used to include coverage data into JUnit test reports
@@ -195,5 +194,4 @@
     -> https://github.com/drewnoakes/metadata-extractor
 * Signpost: OAuth library
-    src/oauth, src/com/google
     -> https://github.com/mttkay/signpost
 * MultiSplitPane: Small lib for GUI layout management
Index: trunk/build.xml
===================================================================
--- trunk/build.xml	(revision 16555)
+++ trunk/build.xml	(revision 16556)
@@ -64,12 +64,6 @@
         <property name="checkstyle-build.dir" location="${base.dir}/build2"/>
         <property name="epsg.output" location="${resources.dir}/data/projection/custom-epsg"/>
-        <property name="error_prone_core.jar" location="${tools.dir}/error_prone_core.jar"/>
-        <property name="error_prone_javac.jar" location="${tools.dir}/error_prone_javac.jar"/>
-        <property name="auto-value-annotations.jar" location="${tools.dir}/auto-value-annotations.jar"/>
-        <property name="dataflow.jar" location="${tools.dir}/dataflow-shaded.jar"/>
-        <property name="javacutil.jar" location="${tools.dir}/javacutil.jar"/>
-        <property name="failureaccess.jar" location="${tools.dir}/failureaccess.jar"/>
+        <property name="error_prone_javac.jar" location="${tools.dir}/error_prone/javac.jar"/>
         <property name="commons-lang3.jar" location="${tools.dir}/commons-lang3.jar"/>
-        <property name="jformatstring.jar" location="${spotbugs.dir}/jFormatString-3.0.0.jar"/>
         <property name="dist.jar" location="${dist.dir}/josm-custom.jar"/>
         <property name="dist-optimized.jar" location="${dist.dir}/josm-custom-optimized.jar"/>
@@ -105,12 +99,4 @@
             <isset property="isJava9"/>
         </condition>
-        <path id="processor.path">
-            <pathelement location="${error_prone_core.jar}"/>
-            <pathelement location="${dataflow.jar}"/>
-            <pathelement location="${javacutil.jar}"/>
-            <pathelement location="${failureaccess.jar}"/>
-            <pathelement location="${jformatstring.jar}"/>
-            <pathelement location="${auto-value-annotations.jar}"/>
-        </path>
     </target>
 
@@ -294,12 +280,14 @@
     </target>
     <target name="compile" depends="init,javacc,compile-cots" unless="compile.notRequired" description="Compiles JOSM">
+        <ivy:cachepath log="download-only" file="${tools.ivy}" pathid="errorprone.classpath" conf="errorprone"/>
+        <ivy:retrieve log="download-only" file="${tools.ivy}" pattern="${tools.dir}/error_prone/[artifact].[ext]" conf="errorprone"/>
         <!-- JOSM -->
         <javac sourcepath="" srcdir="${src.dir}" fork="yes"
-            excludes="com/**,oauth/**,org/apache/commons/**,**/package-info.java"
+            excludes="com/**,org/apache/commons/**,**/package-info.java"
             destdir="${build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on" includeantruntime="false" encoding="UTF-8">
             <compilerarg value="-J-Xbootclasspath/p:${error_prone_javac.jar}" unless:set="isJava9"/>
             <compilerarg line="-XDcompilePolicy=simple"/>
             <compilerarg value="-processorpath"/>
-            <compilerarg pathref="processor.path"/>
+            <compilerarg pathref="errorprone.classpath"/>
             <compilerarg value="-Xlint:cast"/>
             <compilerarg value="-Xlint:deprecation"/>
@@ -315,5 +303,5 @@
             <!-- Undocumented argument to ignore "Sun internal proprietary API" warning, see http://stackoverflow.com/a/13862308/2257172 -->
             <compilerarg value="-XDignore.symbol.file"/>
-            <compilerarg value="-Xplugin:ErrorProne -XepExcludedPaths:.*/parsergen/.* -Xep:ReferenceEquality:OFF -Xep:ImmutableEnumChecker:OFF -Xep:FutureReturnValueIgnored:OFF -Xep:FloatingPointLiteralPrecision:OFF -Xep:ShortCircuitBoolean:OFF -Xep:StringSplitter:OFF -Xep:JdkObsolete:OFF -Xep:UnnecessaryParentheses:OFF -Xep:EqualsGetClass:OFF -Xep:ThreadPriorityCheck:OFF -Xep:UndefinedEquals:OFF -Xep:MixedMutabilityReturnType:OFF -Xep:OverrideThrowableToString:OFF -Xep:JavaTimeDefaultTimeZone:OFF -Xep:UnusedVariable:OFF -Xep:EqualsUsingHashCode:OFF -Xep:BadImport:OFF -Xep:UnnecessaryLambda:OFF -Xep:AnnotateFormatMethod:OFF -Xep:MutablePublicArray:OFF"/>
+            <compilerarg value="-Xplugin:ErrorProne -XepExcludedPaths:.*/parsergen/.* -Xep:ReferenceEquality:OFF -Xep:ImmutableEnumChecker:OFF -Xep:FutureReturnValueIgnored:OFF -Xep:FloatingPointLiteralPrecision:OFF -Xep:ShortCircuitBoolean:OFF -Xep:StringSplitter:OFF -Xep:JdkObsolete:OFF -Xep:UnnecessaryParentheses:OFF -Xep:EqualsGetClass:OFF -Xep:ThreadPriorityCheck:OFF -Xep:UndefinedEquals:OFF -Xep:MixedMutabilityReturnType:OFF -Xep:OverrideThrowableToString:OFF -Xep:JavaTimeDefaultTimeZone:OFF -Xep:UnusedVariable:OFF -Xep:EqualsUsingHashCode:OFF -Xep:BadImport:OFF -Xep:UnnecessaryLambda:OFF -Xep:AnnotateFormatMethod:OFF -Xep:MutablePublicArray:OFF -Xep:StaticAssignmentInConstructor:OFF"/>
             <compilerarg line="-Xmaxwarns 1000"/>
             <classpath>
@@ -1147,5 +1135,5 @@
         <delete dir="${lib.dir}"/>
         <ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[type].[ext]" conf="compile,runtime,sources,test"/>
-        <ivy:retrieve pattern="${lib.dir}/tools/[artifact]-[type].[ext]" conf="javacc,checkstyle,pmd,spotbugs" file="${tools.ivy}"/>
+        <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">
Index: trunk/tools/ivy.xml
===================================================================
--- trunk/tools/ivy.xml	(revision 16555)
+++ trunk/tools/ivy.xml	(revision 16556)
@@ -9,4 +9,5 @@
         <conf name="pmd" description="Everything needed for running PMD"/>
         <conf name="spotbugs" description="Everything needed for running SpotBugs"/>
+        <conf name="errorprone" description="Everything needed for running error-prone"/>
     </configurations>
     <dependencies>
@@ -27,4 +28,6 @@
         <dependency org="com.github.spotbugs" name="spotbugs" rev="4.0.1" conf="spotbugs->default"/>
         <dependency org="com.github.spotbugs" name="spotbugs-ant" rev="4.0.1" conf="spotbugs->default"/>
+        <!-- errorprone->default -->
+        <dependency org="com.google.errorprone" name="error_prone_core" rev="2.4.0" conf="errorprone->default"/>
     </dependencies>
 </ivy-module>
