Maven Properties

Reference properties from pom.xml and site.xml directly in your Markdown files.

Note: This feature extends the default Maven Site behavior through special processing in the skin.

Properties from pom.xml

Define properties in your pom.xml:

<project>
  <properties>
    <productShortname>MetricsHub</productShortname>
    <serviceUrl>https://metricshub.com/api</serviceUrl>
  </properties>
</project>

Reference them in Markdown using $propertyName:

**$productShortname** connects to the [API]($serviceUrl)...

Result:

MetricsHub connects to the API[1]

Dotted Property Names

For properties with dots, use this syntax:

Generated on ${context.get("project.build.outputTimestamp")}.

Properties from site.xml

Define custom properties in src/site/site.xml:

<project name="My Documentation">
  <custom>
    <productShortname>MetricsHub</productShortname>
    <serviceUrl>https://metricshub.com/api</serviceUrl>
  </custom>
</project>

Reference them with:

**$decoration.getCustomValue("productShortname")** uses the [API]($decoration.getCustomValue("serviceUrl"))...

Recommendation: Prefer site.xml properties to keep documentation configuration separate from build configuration.

Other Available Objects

Documents can also reference objects from the Doxia Site Renderer[2], including various tools and project metadata.

Searching...
No results.