Skip to main content

Posts

Showing posts with the label FindBugs

Adding a Maven behavior to not Maven projects

Not Maven projects built through Jenkins cannot be automatically uploaded to a build artifact repository (like Apache Archiva or JFrog Artifactory) at the end of a successful build. In order to allow this level of automation whenever you won't (or can't) transform a standard Java project into a Maven project (but you need to have a uniform build management process) you need to simply add a pom.xml file to the root of your project and commit it to your source code repository along with all the other project files. You can create a basic template following the official documentation and then add/update the specific sections as described in this post. This way developers wouldn't need to change anything else in the current projects' structure. And no need to have Maven on their local development machine or a Maven plugin in the IDE they use. Here's a description of all the sections of the pom.xml file. The values to overwrite are highlighted in bold . Ma...

Inspect code with FindBugs

Today I'd like to introduce an Open Source software we use for three years at least to perform code review and identify potential bugs in our Java code. Its name is FindBugs. It works performing static analysis of the Java bytecode. It covers different categories of bugs, including those related to the web applications security (this was the main reason we started to use it, but later we begun to use it for different categories of bugs). The software is distributed as a standalone GUI application or as plug-in available for the most famous IDEs. In this post I will refer to the plugin for Eclipse Indigo. You can download FindBugs from the the official website http://findbugs.sourceforge.net/ If you plan to use FindBugs as Eclipse plug-in you don’t need to download and install the standalone application too. The plug-in requires the Eclipse release 3.3 or later and the JDK release 1.5 or later. The installation of the plug-in is very simple: In Eclipse, click on Help ...