Index: /trunk/build.xml
===================================================================
--- /trunk/build.xml	(revision 16019)
+++ /trunk/build.xml	(revision 16020)
@@ -978,5 +978,5 @@
     </target>
 
-    <target name="spotbugs" depends="compile">
+    <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">
@@ -991,11 +991,9 @@
                 pluginList=""
                 excludeFilter="${spotbugs.dir}/josm-filter.xml"
+        	    onlyAnalyze="org.openstreetmap.josm.-"
                 effort="max"
                 reportLevel="low"
                 >
-            <fileset dir="${build.dir}">
-                <include name="org/openstreetmap/josm/**/*.class"/>
-                <exclude name="org/openstreetmap/josm/gui/mappaint/mapcss/parsergen/*.class"/>
-            </fileset>
+        	<class location="${dist.jar}" />
         </spotbugs>
     </target>
