|
Exception running findbugs ant task: msg#00058java.findbugs.general
I'm a new findbugs user. I've installed findbugs-1.1.2 and successfully used the gui on my project to identify bugs. Now I'm trying to add it to my ant build, and I get an error. I've defined the task, and added a findbugs target <target name="findbugs"> <findbugs home="${findbugs.home}" output="xml" outputFile="${findbugs.dir}/findbugs-report.xml" > <sourcePath path="${build.src.dir}" /> <class location="${build.classes.dir}" /> </findbugs> </target> but when I run this target I get the following Buildfile: build.xml findbugs: [findbugs] Running FindBugs... [findbugs] Error: The findbugs.home property is not set! [findbugs] Exception in thread "main" java.lang.ExceptionInInitializerError [findbugs] at edu.umd.cs.findbugs.TextUICommandLine.<init>(TextUICommandLine.java:78) [findbugs] at edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:681) [findbugs] Caused by: java.lang.NullPointerException [findbugs] at edu.umd.cs.findbugs.DetectorFactoryCollection.loadPlugins(DetectorFactoryCollection.java:250) [findbugs] at edu.umd.cs.findbugs.DetectorFactoryCollection.ensureLoaded(DetectorFactoryCollection.java:214) [findbugs] at edu.umd.cs.findbugs.DetectorFactoryCollection.instance(DetectorFactoryCollection.java:99) [findbugs] at edu.umd.cs.findbugs.config.ProjectFilterSettings.<init>(ProjectFilterSettings.java:93) [findbugs] at edu.umd.cs.findbugs.config.ProjectFilterSettings.createDefault(ProjectFilterSettings.java:110) [findbugs] at edu.umd.cs.findbugs.config.UserPreferences.<init>(UserPreferences.java:75) [findbugs] at edu.umd.cs.findbugs.config.UserPreferences.<clinit>(UserPreferences.java:72) [findbugs] ... 2 more [findbugs] Output saved to dist/reports/findbugs/findbugs-report.xml BUILD SUCCESSFUL Total time: 0 seconds The error says that findbugs.home is not set, but I'm sure it is. I've used echoproperties to confirm, and if I change the value, then it correctly reports an error that it cannot find findbugs.jar. So is there something else that I'm forgetting to do? Is there anything else I can try to figure this out? I'm running on Windows XP with jdk1.5.0_10 and apache-ant-1.7.0. Thanks for any help, Alex Chapman
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Announcing FindBugs 1.1.2, Bill Pugh |
|---|---|
| Next by Date: | Re: Exception running findbugs ant task, Bill Pugh |
| Previous by Thread: | Announcing FindBugs 1.1.2, Bill Pugh |
| Next by Thread: | Re: Exception running findbugs ant task, Bill Pugh |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |