Sorry for the bug, it has been fixed and will be released as 1.1.3-
rc1 by the end of the week.
Bill
On Dec 26, 2006, at 5:05 PM, Alex Chapman wrote:
I hadn't figured that out, but you're right, it worked. What I had
done was just download 1.1.1 which didn't have this problem. Thanks,
Alex
On 12/26/06, Scott Wolk <swolk@xxxxxxxxxxxxxxxx> wrote:
You have probably already figured this out but you can work around
this
issue by setting the findbugs.home system property:
<findbugs sourcePathRef="source.dirs"
auxClasspathRef="aux.classpath"
auxAnalyzepathRef="analyze.classpath"
onlyAnalyze="com.accelovation.-"
effort="max"
reportLevel="low"
jvmargs="-Xmx512m"
debug="false"
home="${findbugs}"
output="html"
styleSheet="${findbugs}/src/xsl/fancy.xsl"
outputFile="${global.reports.findbugs}/
findbugs.html">
<systemproperty name="findbugs.home" value="$
{findbugs}" />
</findbugs>
Scott
-----Original Message-----
From: findbugs-discuss-bounces@xxxxxxxxxx
[mailto:findbugs-discuss-bounces@xxxxxxxxxx] On Behalf Of Alex
Chapman
Sent: Monday, December 25, 2006 5:44 PM
To: findbugs-discuss@xxxxxxxxxxxxxxxxxx
Subject: [FB-Discuss] Exception running findbugs ant task
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
(DetectorFactor
yCollection.java:250)
[findbugs] at
edu.umd.cs.findbugs.DetectorFactoryCollection.ensureLoaded
(DetectorFacto
ryCollection.java:214)
[findbugs] at
edu.umd.cs.findbugs.DetectorFactoryCollection.instance
(DetectorFactoryCo
llection.java:99)
[findbugs] at
edu.umd.cs.findbugs.config.ProjectFilterSettings.<init>
(ProjectFilterSet
tings.java:93)
[findbugs] at
edu.umd.cs.findbugs.config.ProjectFilterSettings.createDefault
(ProjectFi
lterSettings.java:110)
[findbugs] at
edu.umd.cs.findbugs.config.UserPreferences.<init>
(UserPreferences.java:7
5)
[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
_______________________________________________
Findbugs-discuss mailing list
Findbugs-discuss@xxxxxxxxxxxxxxxxxx
http://mailman.cs.umd.edu/mailman/listinfo/findbugs-discuss
_______________________________________________
Findbugs-discuss mailing list
Findbugs-discuss@xxxxxxxxxxxxxxxxxx
http://mailman.cs.umd.edu/mailman/listinfo/findbugs-discuss
|