Index: /trunk/build.xml
===================================================================
--- /trunk/build.xml	(revision 16165)
+++ /trunk/build.xml	(revision 16166)
@@ -948,14 +948,9 @@
 
     <target name="spotbugs" depends="dist">
-        <taskdef name="spotbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${spotbugs.dir}/spotbugs-ant.jar"/>
-        <path id="spotbugs-classpath">
-            <fileset dir="${spotbugs.dir}">
-                <include name="*.jar"/>
-            </fileset>
-        </path>
-        <property name="spotbugs-classpath" refid="spotbugs-classpath"/>
+        <ivy:cachepath pathid="spotbugs.classpath" conf="spotbugs"/>
+        <taskdef name="spotbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${toString:spotbugs.classpath}"/>
         <spotbugs output="xml"
                 outputFile="spotbugs-josm.xml"
-                classpath="${spotbugs-classpath}"
+                classpath="${toString:spotbugs.classpath}"
                 pluginList=""
                 excludeFilter="${spotbugs.dir}/josm-filter.xml"
Index: /trunk/ivy.xml
===================================================================
--- /trunk/ivy.xml	(revision 16165)
+++ /trunk/ivy.xml	(revision 16166)
@@ -11,4 +11,5 @@
         <conf name="provided" description="The libs we need during compilation but not on application start"/>
         <conf name="pmd" description="Everything needed for running PMD"/>
+        <conf name="spotbugs" description="Everything needed for running SpotBugs"/>
         <conf name="epsg" description="Everything epsg needs- which is currently all of JOSM."/>
         <!--  Meta configuration used in build scripts -->
@@ -34,4 +35,7 @@
             <artifact name="saxon" type="jar" maven:classifier="dom"/>
         </dependency>
+        <!-- spotbugs->default -->
+        <dependency org="com.github.spotbugs" name="spotbugs" rev="3.1.12" conf="spotbugs->default"/>
+        <dependency org="com.github.spotbugs" name="spotbugs-ant" rev="3.1.12" conf="spotbugs->default"/>
         <!-- sources->sources -->
         <dependency org="javax.json" name="javax.json-api" rev="1.1.4" conf="sources->sources"/>
