Index: trunk/build.xml
===================================================================
--- trunk/build.xml	(revision 16007)
+++ trunk/build.xml	(revision 16011)
@@ -978,5 +978,5 @@
     </target>
 
-    <target name="spotbugs" depends="dist">
+    <target name="spotbugs" depends="compile">
         <taskdef name="spotbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${spotbugs.dir}/spotbugs-ant.jar"/>
         <path id="spotbugs-classpath">
@@ -994,10 +994,8 @@
                 reportLevel="low"
                 >
-            <classpath>
-                <path refid="spotbugs-classpath"/>
-                <path refid="compile.path"/>
-            </classpath>
-            <sourcePath path="${base.dir}/src" />
-            <class location="${dist.jar}" />
+            <fileset dir="${build.dir}">
+                <include name="org/openstreetmap/josm/**/*.class"/>
+                <exclude name="org/openstreetmap/josm/gui/mappaint/mapcss/parsergen/*.class"/>
+            </fileset>
         </spotbugs>
     </target>
