Maven Doxia Integration Tools
This shared component has some utilities that are useful when integrating Doxia in Maven, mainly for site generation and report creation.
The main entry point is the SiteTool JSR-330 component.
Usage
Using the SiteTool in a Mojo shows how to read the site descriptor of a project from your own plugin.
Default Locale
The default site, the one generated at the top of the output directory, uses the root locale: it reads site.xml and the untranslated texts. Since Doxia Sitetools 2.2.0, the system property maven.doxiaSitetools.defaultLocale sets another locale for it, in the form of the Maven Site Plugin's locales parameter (en, en_US) or as a language tag (en-US). With the property set to de, the default site reads site_de.xml when it exists and falls back to site.xml, as a translated site does. A parent descriptor resolved from a repository falls back to the plain site classifier, the one under which a parent attaches its site.xml.
The property is read once, when the SiteTool class is loaded, so set it for the JVM that runs Maven, for example in .mvn/jvm.config:
-Dmaven.doxiaSitetools.defaultLocale=en
Under the Maven Daemon (mvnd), a daemon keeps the value it started with.
site.xml Model Interpolation
Interpolation of site.xml model injects Maven project's information, replacing ${...} with calculated values like it happens in Maven model interpolation.
Interpolation can be late or early:
- with late interpolation, replacement happens after inheritance. This is the classical behaviour in Maven pom,
- with early interpolation, replacement happens before inheritance: this was the default behaviour for
project.*values until Doxia Sitetools 1.7 (used in Maven Site Plugin 3.5), when these early and late interpolation definitions didn't exist. Since Doxia Sitetools 1.7.1 (used in Maven Site Plugin 3.5.1), early interpolation happens forthis.*values. Early interpolation doesn't support user and system properties.
Values are evaluated in sequence from different syntaxes:
| late value | early value | evaluation result | common examples |
|---|---|---|---|
project.* |
this.* |
POM content (see POM reference) | ${project.version} ${this.url} |
* |
this.* |
model properties, such as project properties set in the pom | ${any.key} ${this.any.key} |
env.* * |
environment variables | ${env.PATH} | |


