Skip to content
Latchkey

mvn site: Usage, Options & Common CI Errors

Generate the project documentation site and reports.

site is the goal of Maven’s site lifecycle. It generates a documentation website for the project - including reports such as dependencies, plugins, and test results - using the maven-site-plugin and Doxia.

What it does

site renders the project information and configured reporting plugins into static HTML under target/site. Reports are declared in the <reporting> section of the POM. site:run serves it locally; site:deploy publishes it.

Common usage

Terminal
mvn site
mvn site:run                # serve at http://localhost:8080
mvn site -DgenerateReports=false   # skip report plugins, just render pages

Common error in CI (and the fix)

Symptom: "Error generating maven-site-plugin: Unable to determine if resource ... exists" or a failure resolving the site skin in an offline/locked-down CI. Cause: the site plugin or default skin (maven-default-skin) is not in the local repo and the agent cannot reach Central. Fix: pre-warm the skin/plugin into ~/.m2 in a network-enabled step, pin maven-site-plugin and the skin versions explicitly in the POM, and only then run mvn -o site.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →