Blog Archives

Findbugs and Maven tutorial

Findbugs is an open source project for a static analysis of the Java bytecode to identify potential software bugs. Step 1: The pom.xml with the findbug & site reporting plugins and properties.

Step 2: Exclude certain classes with an exclude filter src/main/resources/findbugs/excludeFilter.xml

Step 3: Running mvn command to

Read more ›

Posted in Productivity Tools Tutorial

Checkstyle & Maven Tutorial

Step 1: The pom.xml with the checkstyle plugin and properties.

Step 2: The checkstyle files that define the rules. src/main/resources/checkstyle/myapp-checks.xml

src/main/resources/checkstyle/myapp-suppressions.xml

Step 3: Running via mvn command. This reports any stylying errors.

Posted in Productivity Tools Tutorial

Maven and Cobertura Tutorial

Cobertura is a free code coverage tool, which calculates the percentage of Java code accessed by unit tests. Step 1: The pom.xml file with the relevant reporting plugins. The properties also shown to set the coverage percentage and to skip code coverage or not.

Step 2: Run the maven

Read more ›

Posted in Code Coverage, Productivity Tools Tutorial

20+ Maven plugins listed for an enterprise Java (i.e. a JEE) project

In Maven, there are build and the reporting plugins. Build plugins will be executed during the build, and they should be configured in the “build” element. What is a “Plugin Architecture”? In this architecture, a core application defines an interface, and the functionality will be implemented as a set of

Read more ›

Posted in Maven Tutorials

♥ Creating a Maven profile to compile using a different JDK version tutorial

Profiles are very handy in maven to use different JDK versions, include different files for different environments, etc. Step 1: Say you have a pom.xml file using Java 7 to compile.

Step 2: Say now you want to compile using Java 1.5. Why would you need to do that?

Read more ›

Posted in Maven Profiles Tutorials
Tags:

Part 3- Adding plugins to multi-module MVN project to perform specific tasks

This extends Part 1: Creating an empty multi module maven project structure and Part 2- Adding dependency jars to multi-module MVN project. The “pluginManagement” defines the settings for plugins that will be inherited by modules in your build. Let’s define the jaxb2 plugin in the parent pom file “simple-app-parent/pom.xml” file

Read more ›

Posted in Maven Tutorials

Part 2- Adding dependency jars to multi-module MVN project

This extends Part 1: Creating an empty multi module maven project structure. Dependency Management allows you to consolidate and centralize the management of dependency versions without adding dependencies which are inherited by all children. The dependencyManagement control the versions of artifacts used in transitive dependencies. So, add this to the

Read more ›

Posted in Maven Tutorials

Part 1: Creating an empty multi module maven project structure

Enterprise projects will have multi maven modules. Step 1: Create simple-app-parent is a package of type “pom”

press “Y” for all the questions. Step 2: cd into your newly created root dir “simple-app-parent”

Step 3: Create a child module “simple-app-service”, which is a packaging type of “jar”

Read more ›

Posted in Maven Tutorials
Page 1 of 3123

800+ Q&As – ♥ Free | ♦ FAQs

open all | close all

Java FAQs 200+ Quick Prep

open all | close all

16 Java Key Areas to be a top-notch

open all | close all

100+ Java Tutorials – Step by step

open all | close all

100+ Java Coding Exercises

open all | close all

How good are your

open all | close all

List by categories