`
sillycat
  • 浏览: 2561752 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Findbugs

阅读更多
Findbugs

1. findbugs
eclipse plugin URL:
http://findbugs.cs.umd.edu/eclipse
http://findbugs.cs.umd.edu/eclipse-daily

error information:
Cannot complete the install because one or more required items could not be found.
  Software currently installed: Groovy-Eclipse Feature 2.1.0.20110222-1500-e35-release
(org.codehaus.groovy.eclipse.feature.feature.group 2.1.0.20110222-1500-e35-release)
  Missing requirement: JDT Core patch for Groovy-Eclipse plugin 2.1.0.20110222-1500-e35-release
(org.codehaus.groovy.jdt.patch.feature.group 2.1.0.20110222-1500-e35-release)
requires 'org.eclipse.jdt.core [3.5.2.20110222-1500-e35-release]' but it could not be found
  Cannot satisfy dependency:
    From:
Groovy-Eclipse Feature 2.1.0.20110222-1500-e35-release
(org.codehaus.groovy.eclipse.feature.feature.group 2.1.0.20110222-1500-e35-release)
    To: org.codehaus.groovy.jdt.patch.feature.group [2.1.0.20110222-1500-e35-release]

I just uninstall groovy plugin and reinstall again. Success.

Eclipse -----Windows ----> Preferences ----> FindBugs ,you can select what do you want to check.

right click the project, [FindBugs] ------ [Find Bug], add Bug Explorer to our windows


Hudson plugin
[Manage Hudson] ------> [Manage Plugins]------>[Avaiable]
select the [findbugs plugin], click [Install]

configure your findbugs plugin in your build job.
choose your job and click [Configure].
click [Post-build Actions] -----[Publish Findbugs analysis results]
FindBugs results:

error informations:
No report files were found. Configuration error?

2. I will try to using ant to call findbug task
download the latest packages from this URL:
http://findbugs.sourceforge.net/downloads.html

unzip the file to my directory
>tar zxvf findbugs-1.3.9.tar.gz
> mv findbugs-1.3.9 ../tools/

copy the jar tools to ant lib
>sudo cp findbugs-1.3.9/lib/findbugs-ant.jar /usr/share/ant/lib/

Change the configurate of the project:
[Build] ----> [Invoke Ant] ----> [Ant Version]: APACHE_ANT
[Targets] : all

I will change the build.xml, add findbugs task.
related changes in build.properties:
findbugs.home=/home/luohua/tools/findbugs-1.3.9

related changes in build.xml:
<property name="findbugs.home" value="${findbugs.home}" />
<property name="findbugs.report.dir" value="${build.dir}/report/findbugs" />

<path id="findbugs.path" > 
<fileset  dir ="${findbugs.home}"> 
<include  name ="**/*.jar"/> 
</fileset> 
</path> 

<delete dir="${findbugs.report.dir}" />
<mkdir dir="${findbugs.report.dir}" />

<!-- findbugs part start  -->
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref ="findbugs.path" /> 
<target name="findbugs" depends="compile">
<findbugs home="${findbugs.home}" output="xml" outputFile="${findbugs.report.dir}/findbugs.xml" reportLevel="medium" jvmargs="-Xmx512m">
<class location ="${build.dir}/WEB-INF/classes/"/>
</findbugs>
</target>
<!-- findbugs part end -->

after that, once I build in hudson, I get this error message in hudson console output:
BUILD FAILED
/var/lib/hudson/jobs/easystatemachine/workspace/build.xml:83:
/home/luohua/tools/jboss-5.1.0-clean/client not found

I really made a stupid mistake. I realize that maybe the hudson does not use a proper user account to
execute the ant command. So I just simply make all the users can access the directory.
>chmod -R 777 /some/fucking/dir

It really solve the problem. I can see the findbugs report on my screen in hudson now.

references:
http://cb.esast.com/cb/wiki/22929
http://hanqunfeng.iteye.com/?page=2
http://findbugs.sourceforge.net/downloads.html
http://hi.baidu.com/_yys/blog/item/7fa914014f05d6047bec2ce1.html

分享到:
评论

相关推荐

    findbugs压缩包+findbugs.jar+findbugs-ant.jar

    标题中的"findbugs压缩包+findbugs.jar+findbugs-ant.jar"指的是该压缩文件内包含FindBugs的主要库文件`findbugs.jar`,这是执行FindBugs分析的核心组件,它包含了各种检测规则和算法。另外,`findbugs-ant.jar`则是...

    findbugs-3.0.1.zip

    《FindBugs 3.0.1:Java代码静态分析工具深度解析》 FindBugs是一款广受欢迎的开源工具,用于检测Java代码中的潜在错误和不良编程习惯。在"findbugs-3.0.1.zip"这个压缩包中,包含了FindBugs 3.0.1版本的详细资料和...

    findbugs 1.3.9 findbugs 1.3.9

    《深入理解FindBugs 1.3.9:静态代码分析的强大工具》 FindBugs是一款广受欢迎的静态代码分析工具,它的版本1.3.9在软件开发领域具有重要的地位。这款开源工具的主要功能是检测Java代码中的潜在错误,帮助开发者在...

    findbugs-annotations-1.3.9-1-API文档-中文版.zip

    赠送jar包:findbugs-annotations-1.3.9-1.jar; 赠送原API文档:findbugs-annotations-1.3.9-1-javadoc.jar; 赠送源代码:findbugs-annotations-1.3.9-1-sources.jar; 赠送Maven依赖信息文件:findbugs-...

    网络上搜集的Findbugs在Ant下的配置方法

    **Findbugs在Ant下的配置方法** FindBugs是一款开源的静态代码分析工具,主要用于检测Java代码中的潜在错误、坏味道和安全漏洞。它通过分析字节码而非源代码,能够发现许多编译器无法捕获的问题。在Ant构建环境中...

    findbugs最新源代码20081008版本的

    《深入理解FindBugs:基于20081008源码的探索》 FindBugs是一款著名的静态代码分析工具,它通过扫描Java字节码来检测潜在的错误和不良编程习惯,被誉为“程序员的无声守护者”。2008年10月08日的版本是FindBugs发展...

    findbugs工具测试java实验报告

    【findbugs工具测试Java实验报告】 在软件开发过程中,代码质量是至关重要的,因为它直接影响到程序的稳定性、可维护性和性能。为了确保代码的质量,开发者通常会采用各种静态代码分析工具,其中FindBugs就是一款...

    findbugs.jar+findbugs-ant.jar

    FindBugs是一款非常知名的静态代码分析工具,它主要用于在Java代码中发现潜在的错误和缺陷。Eclipse是一款广泛使用的集成开发环境(IDE),对于Java开发者来说尤其重要。将FindBugs集成到Eclipse中,可以帮助开发者...

    findbugs插件使用文档

    `FindBugs`是一款强大的静态代码分析工具,主要用于检测Java代码中的潜在错误和不良实践。它通过分析字节码来找出可能存在的问题,而无需实际运行程序。在Maven项目中,我们可以使用`findbugs-maven-plugin`这个...

    IDEA插件-FindBugs-IDEA-1.0.1.rar

    IDEA插件-FindBugs-IDEA-1.0.1,威哥开发使用,决定可以用。自行导入IDEA。Findbugs是一个静态分析工具,它检查类或者JAR 文件,将字节码与一组缺陷模式进行对比以发现可能的问题。Findbugs自带检测器,其中有60余种...

    FindBugs规则(中文版111).doc

    FindBugs是一款静态代码分析工具,它用于检测Java代码中的潜在缺陷。中文版的FindBugs规则文档提供了关于代码质量的多个方面的指导,包括安全、实验性等方面的问题。以下是这些规则的详细解释: 1. Dm: Hardcoded ...

    Findbugs代码检查工具使用说明

    Findbugs 是一个开源的静态代码分析工具,专用于检测Java代码中的潜在问题。它通过分析字节码而非源代码,可以发现多种类型的错误和不良编程习惯,这些错误可能包括空指针异常、资源泄露、并发问题等。在开发过程中...

    findbugs 最新eclipse插件

    **findbugs最新Eclipse插件**是用于静态代码分析的工具,它可以帮助开发者在编码阶段发现潜在的错误和不良编程习惯。FindBugs是开源项目,由University of Maryland开发并维护,广泛应用于Java应用程序的质量保证...

    findbugs最新版本 1.3.8

    FindBugs是一款开源的静态代码分析工具,专用于检测Java应用程序中的潜在错误和不良编程习惯。在Java开发中,FindBugs能够帮助开发者在代码执行之前发现潜在的问题,从而提高软件质量和可维护性。1.3.8是FindBugs的...

    findbugs代码检查工具

    FindBugs是一款强大的静态代码分析工具,主要用于检测Java代码中的潜在错误和不良编程习惯。它通过对编译后的字节码进行分析,而不需要实际运行代码,就能找出可能存在的问题,从而帮助开发者提升代码质量,减少运行...

    FindBugs安装及配置使用说明

    FindBugs是一款强大的Java字节码静态分析工具,它能够帮助开发者在代码执行前发现潜在的缺陷和质量问题。通过检查类文件和JAR包,FindBugs与一系列预定义的缺陷模式进行匹配,从而找出可能存在的问题。这种静态分析...

    eclipse中findbugs插件

    FindBugs插件是将FindBugs工具集成到Eclipse中的一个扩展,使得用户在开发过程中可以方便地检查代码问题。 安装FindBugs插件的过程相对简单。首先,你需要下载`edu.umd.cs.findbugs.plugin.eclipse_3.0.1.20150306-...

    findbugs myeclipse2017可用插件

    FindBugs是一款强大的静态代码分析工具,主要用于检测Java应用程序中的潜在错误、不良编程习惯和可能的安全漏洞。在MyEclipse 2017这样的集成开发环境中(IDE)集成FindBugs插件,可以帮助开发者在编码阶段就发现并...

    findbugs-1.3.9.rar

    《FindBugs:Java代码静态分析工具的深度解析》 FindBugs是一款开源的Java代码静态分析工具,其主要功能是检测源代码中可能存在的错误和潜在问题。这个工具通过扫描字节码来查找可能的问题,而不是运行程序,因此...

    findbugs+ant代码扫描

    ### Findbugs与Ant结合进行代码扫描的知识点 #### 一、Findbugs简介 FindBugs是一款功能强大的静态代码分析工具,主要用于Java项目的开发过程中。它能够深入检查项目的类文件或JAR文件,通过将字节码与一系列预设...

Global site tag (gtag.js) - Google Analytics