Monday Sep 18, 2006

How to find & install FindBugs plug-in for NetBeans

There has been some discussions at Sun on using FindBugs, the static analysis tool, to help isolate potential bugs before they are committed to a builds.

Thought I would share how get and install the FindBug plug-in for NetBeans.

The instructions below are for NetBeans IDE 5.5. They should work for NetBeans 5.0 also.

1. Launch NetBeans.
2. Select Tools > Options from the main menu.
3. Click on the "Advanced Options" button in the lower left.
4. Expand the node "IDE Configuration > System.
5. Right click on "Autoupdate Types" and select "New > General Update Center".
6. In the "Name:" field enter "FindBugs Update Center" and click on the Finish Button.
7. Back on the Advanced Options dialog, expand "IDE Configuration > System > Autoupdate Types" and you will see a new update center type for the name you just entered in #6.
8. Select the label on the left hand side called "FindBugs Update Center". On the right hand side, enter the following URL for the "Server URL" entry:
https://sqe.dev.java.net/updatecenters/nbheaven-updatecenter.xml
** NOTE: Use "https", not "http".
9. Make sure the "Enabled" box is checked.
10. Click on the "Close" button to exit the Advanced Options dialog.
11. Select Tools > Update Center from the main menu.
12. You'll now see "FindBugs Update Center" as one of the Update Centers to connect too.
13. If you are behind a firewall and need to configure a proxy, click on the "Proxy Configuration" button. Set your proxy configuration as needed.
14. Click the "Next" button to connect to the Update Center(s).
15. In the Update Center dialog, scroll down in the "Available Updates and New Modules" and look for the "FindBugs Update Center".
16. Under the "Software Quality" folder, select "FindBugs NetBeans Integration" and click on the "Add > " button.
17. Click on the "Next" button on the "Update Center" dialog.
18. Accept the licenses.
19. NetBeans will then prepare to install the FindBugs plug-in. Press the "Next" button when the pre-installation completes.
20. On the "Update Center" dialog, be sure to select the check boxes on the left hand side under the "Include" column. NetBeans may ask you if you want install a "unsigned module". If it asks you this question, answer "Yes to All" or "Yes".
21. Check the "Include" box for each module, (all of them).
22. After you have checked the "Include" button on all modules, click on the "Finish" button.
23. Now NetBeans will install the FindBugs plug-in.
24. When it is finished you will see a "FindBugs" icon in the toolbar.
25. When you have a project open, you can click on FindBugs to execute the FindBugs static analyzer. In the Output Window you will see what it has detected as potential bugs.

Enjoy!!!

Comments:

Post a Comment:
Comments are closed for this entry.