This parent POM:-
- Consolidates static code analysis report configuration in one place and declutters app's
pom.xml
. - Generates reports for Continuous Integration servers (Jenkins, etc) and Maven site.
- Enables Spring Boot by inheriting from the
spring-boot-starter-parent
to leverage the full power of Spring Boot.- While an app may enable Spring Boot without inheriting from the
spring-boot-starter-parent
, it can only leverage Spring Boot's dependency management but not the plugin management. Furthermore, it requires the app to re-configure several plugins used by Spring Boot to continue working properly.
- While an app may enable Spring Boot without inheriting from the
- Enables Groovy compiler.
- Includes a Maven profile to deploy:-
- Project artifacts to Sonatype OSSRH (OSS Repository Hosting).
- Maven generated site to project GitHub page.
<project ...>
<parent>
<groupId>com.github.choonchernlim</groupId>
<artifactId>spring-boot-ci</artifactId>
<version>0.4.0</version>
</parent>
...
</project>
mvn clean test site
mvn clean deploy -P ossrh
mvn clean test site -P ossrh
- Maven Compiler Plugin - Enables Groovy compiler.
- Groovy Eclipse Maven Plugin - Handles possible missing
src/main/java
andsrc/test/java
when using Groovy. - Spring Boot Maven Plugin - Enables Spring Boot support.
- Versions Maven plugin - Handles dependencies and plugins date.
- Surefire Maven Plugin - Runs unit tests.
- Maven Failsafe Plugin - Runs integration tests.
- Maven Site Plugin - Generates site.
- JaCoCo Maven Plugin - Code coverage report for JVM languages.
- Maven Enforcer Plugin Bans certain dependencies and ensures minimum Maven version is met.
- Maven Source Plugin - Generates source JAR file.
- Maven Project Info Reports Plugin - Generates reports information about the project.
- Maven Surefire Reports Plugin - Parses generated test results from both unit tests and integration tests.
- JaCoCo Maven Plugin - Code coverage report for JVM languages.
- Maven Javadoc Plugin - Generates Javadoc.
- Maven JXR Plugin - Generates a cross-reference of the project's sources.
- JDepend Maven Plugin - Generates design quality metrics for each Java package.
- Maven PMD Plugin - Generates PMD and CPD reports.
- FindBugs Maven Plugin - Inspects Java bytecode for occurrences of bug patterns.
- TagList Maven Plugin - Generates a report on various tags found in the code.
- Nexus Staging Maven Plugin - Deploys artifacts to Sonatype OSSRH.
- Maven Source Plugin - Generates source code.
- GitHub Site Plugin - Generates Maven site in project GitHub page.
- Maven Javadoc Plugin - Generates Javadoc.
- Maven GPG Plugin - Signs all of the project's attached artifacts with GnuPG..
- If the JaCoCo web report is not rendering properly in the GitHub page, please read this post for solution: JaCoCo Web Report Not Rendering Properly in GitHub Pages