Reporting
About
The Reporting category in Maven involves plugins that generate various types of reports during the build process. These reports can include:
Test coverage
Code metrics
Static code analysis
Dependency and plugin usage
Project documentation summaries
These reports are useful for both developers and project stakeholders to assess code quality, test effectiveness, compliance, and maintainability.
Need for Reporting Plugins
Provide insight into codebase health (quality, complexity, bugs)
Enable auditable documentation of project state
Track test performance, coverage, and errors
Automatically document dependencies and plugin usage
Enhance transparency and maintainability across teams
maven-project-info-reports-plugin
Generates standard project documentation including dependencies, plugins, team info, SCM, licenses, and more.
Common Reports
dependencies
Shows all project dependencies
dependency-management
Shows dependencies managed via dependencyManagement
plugins
Lists build plugins
licenses
Details licenses used in the project
scm
Shows source code management info (like Git)
summary
High-level project info summary
Syntax
Usage
Runs with mvn site
, or we can run individual goals like:
maven-surefire-report-plugin
Generates HTML reports from test results produced by the Surefire plugin. Useful for viewing pass/fail details, error messages, and test case summaries.
Syntax
Common Config Options
aggregate
Combine reports for multimodule projects
showSuccess
Show passed tests
outputName
Set custom name for report file
Usage
This typically outputs surefire-report.html
under target/site
.
jacoco-maven-plugin
Generates code coverage reports for our tests. Helps us analyze which parts of the code are covered and which are not.
Syntax
Report Types
HTML
XML
CSV
Output
Reports go into target/site/jacoco/index.html
sonar-maven-plugin (SonarQube)
Integrates with SonarQube, a powerful code quality platform that analyzes:
Code smells
Bugs
Security vulnerabilities
Code coverage
Duplications
Syntax
Usage
Run with
Requires a running SonarQube server and a configured token.
maven-site-plugin
This is the core plugin for generating a complete Maven site that includes all reporting, documentation, and static HTML pages for our project.
Syntax
Command to Generate Site
It will include reports from all reporting plugins into the target/site/
directory in a browsable form.
Last updated
Was this helpful?