Although Maven is the most common build tool used to build Java projects, it can be a hard beast to tame.
I have fought many frustrating battles with it, and I know that getting things to work can require a lot of effort and time.
That is why I decided to help you by documenting some of them on my blog.
This tutorial assumes that you already know how to use Maven. It doesn’t help you to get started, but it will help you to solve some non trivial problems and save some of your precious time.
Introducing: Maven Tutorial
My Maven tutorial consists of several blog posts and each blog post solve a specific problem. These blog posts are:
- Creating a Runnable Binary Distribution With Maven Assembly Plugin describes how you can create a runnable binary distribution that doesn’t use the so called “far jar” approach.
- Creating Code Coverage Reports for Unit and Integration Tests With the JaCoCo Maven Plugin describes how you can create code coverage reports for unit and integration tests.
- Creating Profile Specific Configuration Files With Maven describes how you can use different configuration files for different environments.
- Deploying Static and Dynamic Content With Maven Wagon Plugin describes how you can deploy static and dynamic content into different servers.
- Findbugs Maven Plugin Tutorial describes how you can find problems from your code by using Findbugs.
- Generating HTML Documentation From RAML Documents With Maven describes how you can create HTML API documentation from RAML documents by using Maven.
- Integration Testing With Maven describes how you can create a Maven build that has different directories for unit and integration tests.
- Running Integration Tests With Maven is a free sample lesson of my Test With Spring course. This lesson explains how you can add custom source and resource directories into your Maven build and helps you to run your integration tests with Maven.
- Running Solr With Maven describes how you can run Solr by using the Jetty Maven plugin and ensure that all developers use the same configuration, schema, and Solr version.
- Writing Unit Tests With Spock Framework: Creating a Maven Project describes how you can create a Maven project that compiles and runs unit tests which use the Spock Framework.
Running Unit Tests With Maven is a free sample lesson of my Test With Spring course. It explains why you should use JUnit 4 categories and describes how you can use Maven for running unit tests which use JUnit 4 categories.