Index: trunk/build.xml
===================================================================
--- trunk/build.xml	(revision 4837)
+++ trunk/build.xml	(revision 4838)
@@ -224,5 +224,5 @@
 	 	    public protected *;
 	 	}
-		
+
 		# Disable annoying [proguard] Note: the configuration keeps the entry point '...', but not the descriptor class '...'. This notes should not be a problem as we don't use obfuscation
 		-dontnote
@@ -296,3 +296,24 @@
         </as:check-signature>
     </target>
+
+    <target name="findbugs" depends="dist">
+    	<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="tools/findbugs/findbugs-ant.jar"/>
+        <path id="findbugs-classpath">
+            <fileset dir="tools/findbugs/">
+                <include name="*.jar"/>
+            </fileset>
+        </path>
+    	<property name="findbugs-classpath" refid="findbugs-classpath"/>
+      <findbugs output="xml"
+                outputFile="findbugs-josm.xml"
+      	        classpath="${findbugs-classpath}"
+      	        pluginList=""
+      	        excludeFilter="tools/findbugs/josm-filter.xml"
+      	        effort="max"
+      	        >
+        <sourcePath path="${basedir}/src" />
+        <class location="${basedir}/dist/josm-custom.jar" />
+      </findbugs>
+    </target>
+
 </project>
