• Home
  • Docker
  • Kubernetes
  • LLMs
  • Java
  • Ubuntu
  • Maven
  • Big Data
  • Archived
Maven | Site and Reports
  1. References
  2. Generating a site
  3. Deploying a site (FTP Server)
  4. Javadoc Reports
  5. Unit Test Reports
  6. Code Coverage Reports
  7. SpotBugs Report

  1. References
    See this page for more details about maven site:
    http://maven.apache.org/guides/mini/guide-site.html

    See this page for more details on how to install and configure:
    vsftpd (FTP server)
    Apache HTTP Server
  2. Generating a site
    Update the POM file and add the maven-site-plugin plugin:
    To generate the site:

    By default, the resulting site will be in "target/site/" folder:
  3. Deploying a site (FTP Server)
    First let create the folder "maven-sites" where the site will be created:

    Modify the "settings.xml" file to include the FTP server configuration:

    Modify the "pom.xml" file of your project to include the "site" configuration:

    Modify the "pom.xml" file of your project to include the "wagon-ftp" plugin configuration:

    Generating and deploying the Site:

    HTTP server: Creating a soft link to the site folder:

    You can use the browser to access the generated site: http://localhost/maven-sites/mtitek-svn-test-a/

    HTTP - Maven site
  4. Javadoc Reports
    To generate javadoc reports, you need to add Maven Javadoc Plugin to your pom file:

    To generate the reports:

    By default, the resulting javadoc will be in the folders "target/site/apidocs/" and "target/site/testapidocs/":


    Reports: JavaDoc - Unit Test - Bugs:
    Reports: JavaDoc - Unit Test - Bugs
  5. Unit Test Reports
    To generate unit test reports, you need to add Maven Surefire Report Plugin to your pom file:

    To generate the reports:

    By default, the resulting unit test reports will be in "target/site/surefire-report.html" file.

    See screenshot above (Reports: JavaDoc - Unit Test - Bugs).
  6. Code Coverage Reports
    JaCoCo is a code coverage tool that provides a measurement of the how much source code was covered by unit tests.

    To generate code coverage reports, you need to add JaCoCot Plugin to your pom file:

    To generate the reports:

    By default, the resulting code coverage reports will be in the folder "target/site/jacoco/":

    Reports: JaCoCo Code Coverage
  7. SpotBugs Report
    SpotBugs is a static code analysis tool that check for bugs in the source code.

    To generate bugs reports, you need to add SpotBugs Plugin to your pom file:

    To generate the reports:

    By default, the resulting bug report will be in "target/site/spotbugs.html" file.

    See screenshot above (Reports: JavaDoc - Unit Test - Bugs).
© 2025  mtitek