You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2026/08/09 18:33:52 UTC
(maven-site-plugin) branch master updated: XML snippets
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-site-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 8062ac6c XML snippets
8062ac6c is described below
commit 8062ac6c6c6fdcd1000bd98562806b75d45213a4
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sun Aug 9 19:31:53 2026 +0100
XML snippets
---
.../markdown/examples/adding-deploy-protocol.md.vm | 2 +-
src/site/markdown/examples/configuring-reports.md | 4 +--
src/site/markdown/examples/creating-content.md.vm | 2 +-
.../inheritance-site-distribution-management.md | 10 +++----
src/site/markdown/examples/moduleexcludes.md.vm | 2 +-
src/site/markdown/examples/multimodule.md | 4 +--
.../examples/site-deploy-to-sourceforge.net.md | 4 +--
src/site/markdown/examples/sitedescriptor.md | 32 +++++++++++-----------
src/site/markdown/examples/siterun.md.vm | 2 +-
src/site/markdown/migrate.md | 4 +--
src/site/markdown/usage.md | 16 +++++------
11 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/src/site/markdown/examples/adding-deploy-protocol.md.vm b/src/site/markdown/examples/adding-deploy-protocol.md.vm
index 69f8c04f..cf8eb568 100644
--- a/src/site/markdown/examples/adding-deploy-protocol.md.vm
+++ b/src/site/markdown/examples/adding-deploy-protocol.md.vm
@@ -42,7 +42,7 @@ As explained in the error message, to deploy a site with a non-built-in protocol
You can add it either as a [global extension](/guides/mini/guide-using-extensions.html), or declare it as a dependency of the site plugin:
-```unknown
+```xml
<project>
...
<build>
diff --git a/src/site/markdown/examples/configuring-reports.md b/src/site/markdown/examples/configuring-reports.md
index 60349439..87aa999d 100644
--- a/src/site/markdown/examples/configuring-reports.md
+++ b/src/site/markdown/examples/configuring-reports.md
@@ -43,7 +43,7 @@ To find out more please see to the [Project Info Reports Plugin](/plugins/maven-
To add these reports to your site, you must add the plugin to the `<reporting>` element in the POM. The following example shows how to configure the standard Project Info Reports that display information from the POM in a friendly format:
-```unknown
+```xml
<project>
...
<reporting>
@@ -71,7 +71,7 @@ By default, when you add a plugin in reporting section, _every_ reporting goal a
If you want to choose only some reports from a plugin, or if you want to run a report multiple times with a different configuration, you need to configure report sets:
-```unknown
+```xml
<project>
...
<reporting>
diff --git a/src/site/markdown/examples/creating-content.md.vm b/src/site/markdown/examples/creating-content.md.vm
index ae56fbb7..8426188e 100644
--- a/src/site/markdown/examples/creating-content.md.vm
+++ b/src/site/markdown/examples/creating-content.md.vm
@@ -138,7 +138,7 @@ Internationalization in Maven is very simple, as long as the reports you are usi
To enable multiple locales, or languages, add a configuration similar to the following to your POM:
-```unknown
+```xml
<project>
...
<build>
diff --git a/src/site/markdown/examples/inheritance-site-distribution-management.md b/src/site/markdown/examples/inheritance-site-distribution-management.md
index 8bc48c0c..e85ea4a1 100644
--- a/src/site/markdown/examples/inheritance-site-distribution-management.md
+++ b/src/site/markdown/examples/inheritance-site-distribution-management.md
@@ -28,7 +28,7 @@ under the License.
Inside your POM you can not only configure the `distributionManagement` for the releases and snapshots of your project, but also where to deploy your site when using the [`site:deploy`](../deploy-mojo.html) goal. The following configuration would deploy the project's site to a local directory called `bar`.
-```unknown
+```xml
<distributionManagement>
<site>
<id>local</id>
@@ -53,11 +53,11 @@ To handle this easily you can use a the same parent POM with each of your projec
bar/ (root of site)
├── css
├── project-A
-│ ├── css
-│ └── report.html
+│ ├── css
+│ └── report.html
├── project-B
-│ ├── css
-│ └── report.html
+│ ├── css
+│ └── report.html
└── report.html
```
diff --git a/src/site/markdown/examples/moduleexcludes.md.vm b/src/site/markdown/examples/moduleexcludes.md.vm
index 4067e17e..fabae56b 100644
--- a/src/site/markdown/examples/moduleexcludes.md.vm
+++ b/src/site/markdown/examples/moduleexcludes.md.vm
@@ -44,7 +44,7 @@ Module1
and you want to exclude all the documents in the fml format from the generated site, you need to set the following in your POM and then execute "`mvn site`".
-```unknown
+```xml
<project>
...
<build>
diff --git a/src/site/markdown/examples/multimodule.md b/src/site/markdown/examples/multimodule.md
index 6e25881f..d314991c 100644
--- a/src/site/markdown/examples/multimodule.md
+++ b/src/site/markdown/examples/multimodule.md
@@ -56,7 +56,7 @@ By default, all the parent descriptor settings are inherited with the only excep
However, it is possible to inherit menus as well. To do so, use the `inherit` attribute in the site descriptor. This can be either `top` or `bottom`, indicating where the inherited menu will be placed. For example:
-```unknown
+```xml
<project>
...
<body>
@@ -76,7 +76,7 @@ Some reports can be run against the sum of every modules: these are aggregate re
To benefit from aggregate reports, you must configure a reportSet in the parent pom, and turn inheritance off to avoid the aggregate report to be run in modules. For example, with maven-jxr-report:
-```unknown
+```xml
<project>
...
<reporting>
diff --git a/src/site/markdown/examples/site-deploy-to-sourceforge.net.md b/src/site/markdown/examples/site-deploy-to-sourceforge.net.md
index ab0da7dc..ca4a7081 100644
--- a/src/site/markdown/examples/site-deploy-to-sourceforge.net.md
+++ b/src/site/markdown/examples/site-deploy-to-sourceforge.net.md
@@ -42,7 +42,7 @@ Both of these mean that if you attempt to deploy your site without following the
- Use `shell.sourceforge.net` (instead of `web.sourceforge.net`) in you site URL
- ```unknown
+ ```xml
...
<distributionManagement>
...
@@ -81,7 +81,7 @@ For path information and login help, type "sf-help".
In the project's `pom.xml`:
-```unknown
+```xml
...
<distributionManagement>
...
diff --git a/src/site/markdown/examples/sitedescriptor.md b/src/site/markdown/examples/sitedescriptor.md
index 0e648d87..114e8d8a 100644
--- a/src/site/markdown/examples/sitedescriptor.md
+++ b/src/site/markdown/examples/sitedescriptor.md
@@ -41,7 +41,7 @@ The title of each generated page will be a combination of the _site title_ and t
If you want to use a different site title, but do not want to change the `<name>` element in your `pom.xml`, you can configure this in your `site.xml`, like this:
-```unknown
+```xml
<site name="My Site Title">
...
</site>
@@ -51,7 +51,7 @@ If you want to use a different site title, but do not want to change the `<name>
You can include some logos on top of your site, using the following syntax:
-```unknown
+```xml
<site>
...
<bannerLeft href="https://maven.apache.org">
@@ -71,7 +71,7 @@ Refer to the site descriptor [reference](/doxia/doxia-sitetools/doxia-site-model
With the out-of-the-box Velocity template, the position of the "Last Published" date is configurable. By default, the position is on the left but you can change it. To do this, you can add a `<publishDate>` element to your `site.xml` like the following:
-```unknown
+```xml
<site>
...
<publishDate position="right"/>
@@ -83,7 +83,7 @@ The `position` attribute can have one of these values: `left`, `right`, `navigat
If you want hide the publish date, you can use this in your `site.xml`:
-```unknown
+```xml
<site>
...
<publishDate position="none"/>
@@ -97,7 +97,7 @@ The format of the "Last Published" date is the ISO extended date forma
You can show the "Version" of your project on the site, by adding a `<version>` element to your `site.xml` like this:
-```unknown
+```xml
<site>
...
<version position="right"/>
@@ -109,7 +109,7 @@ The `position` attribute can have the same values as the `publishDate` attribute
If you want hide the version, you can use this in your `site.xml`:
-```unknown
+```xml
<site>
...
<version position="none"/>
@@ -121,7 +121,7 @@ If you want hide the version, you can use this in your `site.xml`:
You can add your own "Powered by" logo to your site. To do this, you add a `<poweredBy>` element in your `site.xml` like this:
-```unknown
+```xml
<site>
...
<poweredBy>
@@ -141,7 +141,7 @@ See [ Building multi-module sites](./multimodule.html).
Files in the format-based directory structure can be linked to by their target HTML filename, e.g. `${basedir}/src/site/apt/foo.apt` and `${basedir}/src/site/fml/faq.fml` can be linked to via:
-```unknown
+```xml
<site>
...
<body>
@@ -158,7 +158,7 @@ Files in the format-based directory structure can be linked to by their target H
There are also several preset menus that can be used in the site descriptor to include generated content from your project. These are linked via the `ref` attribute, like so:
-```unknown
+```xml
<site>
...
<body>
@@ -181,7 +181,7 @@ The currently available preset menus are:
You can inject some HTML code into the generated `<head>` element of each page by adding a head element to the body element of your project's site descriptor. The following example adds some javascript:
-```unknown
+```xml
<site>
...
<body>
@@ -201,7 +201,7 @@ Notice: since Maven Site Plugin version 3\.5, if XHTML content is used, it has t
To add links below your site logo, just add a links element to the `<body>` element of the site descriptor. Each item in the links element will be rendered as a link in a bar directly below your project's logo.
-```unknown
+```xml
<site>
...
<body>
@@ -222,7 +222,7 @@ If there exists a logical hierarchy within your site modules, you may want to ge
To configure breadcrumbs, add a `<breadcrumbs>` element to the `<body>` element in the site descriptor. Each item element will render a link, and the items in the `<breadcrumbs>` element will be rendered in order. The breadcrumb items should be listed from highest level to lowest level.
-```unknown
+```xml
<site>
...
<body>
@@ -243,7 +243,7 @@ To configure breadcrumbs, add a `<breadcrumbs>` element to the `<body>` element
You can replace the auto-generated footer content by specifying a custom `<footer>` element:
-```unknown
+```xml
<site>
...
<body>
@@ -261,7 +261,7 @@ Notice: since Maven Site Plugin version 3\.5, if XHTML content is used, it has t
There is also a dummy `<custom>` element then can be used to specify some arbitrary content. Note that you need to write your own velocity template to make use of this element, it is ignored by the default Velocity template used by the Site Plugin.
-```unknown
+```xml
<site>
...
<custom>Custom content</custom>
@@ -273,7 +273,7 @@ There is also a dummy `<custom>` element then can be used to specify some arbitr
Skins can be created to customize the look and feel of a site in a consistent way. For more information on creating a skin, see [Creating a Skin](./creatingskins.html). To use a specific skin in your project, you use the `<skin>` element of the site descriptor. This is a regular artifact or dependency-like element. For example, to use the [Maven Fluido Skin](/skins/maven-fluido-skin/), you would include:
-```unknown
+```xml
<site>
...
<skin>
@@ -297,7 +297,7 @@ The authors of skins have the option to use custom properties that are unique to
One skin that uses this is the Maven Fluido Skin. There are many examples on [their site](/skins/maven-fluido-skin/) showing what is possible to do with custom properties. Here is one example:
-```unknown
+```xml
<site>
...
<custom>
diff --git a/src/site/markdown/examples/siterun.md.vm b/src/site/markdown/examples/siterun.md.vm
index 8f7106ee..6bbe53d5 100644
--- a/src/site/markdown/examples/siterun.md.vm
+++ b/src/site/markdown/examples/siterun.md.vm
@@ -30,7 +30,7 @@ For the [`site:run`](../run-mojo.html) goal, you can configure which port to use
For example, you can have the following configuration in your POM:
-```unknown
+```xml
<project>
...
<build>
diff --git a/src/site/markdown/migrate.md b/src/site/markdown/migrate.md
index 65e56714..8f1937b6 100644
--- a/src/site/markdown/migrate.md
+++ b/src/site/markdown/migrate.md
@@ -33,7 +33,7 @@ The Site Plugin has had a couple of upgrades that requires the user to make adju
- Since [Velocity](http://velocity.apache.org) has been upgraded from version 1\.5 to version 1\.7, which changes escaping rules, you may need to update escape sequences in your `.vm` documents and/or skins. If you can't update content and/or skin immediately, you can manually downgrade Velocity version by configuring a dependency to Maven Site Plugin:
- ```unknown
+ ```xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
@@ -49,7 +49,7 @@ The Site Plugin has had a couple of upgrades that requires the user to make adju
- Site Decoration Model 1\.7\.0 has changed type for `head` and `footer` from `DOM` to `String`: if your `site.xml` (or one parent) contains XML content, you'll need to escape it, usually by adding `<![CDATA[` and `]]>` around the content:
- ```unknown
+ ```xml
<project xmlns="http://maven.apache.org/DECORATION/1.7.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.7.0 http://maven.apache.org/xsd/decoration-1.7.0.xsd">
<body>
diff --git a/src/site/markdown/usage.md b/src/site/markdown/usage.md
index 45250769..2df5e65a 100644
--- a/src/site/markdown/usage.md
+++ b/src/site/markdown/usage.md
@@ -36,7 +36,7 @@ You can put additional content (e.g. documentation, resources, etc.) in your sit
To generate the project's site and reports, execute:
-```unknown
+```shell
mvn site
```
@@ -50,7 +50,7 @@ By default, the resulting site will be in the `target/site/` directory.
To be able to deploy the site, you must first specify where the site will be deployed. This is set in the `<distributionManagement>` element of the POM as shown below.
-```unknown
+```xml
<project>
...
<distributionManagement>
@@ -71,13 +71,13 @@ Now you can execute the [`site:deploy`](./deploy-mojo.html) goal from your proje
**Note:** A site must be generated first before executing `site:deploy`.
-```unknown
+```shell
mvn site:deploy
```
If you want to generate the site _and_ deploy it in one go, you can utilize the `site-deploy` phase of the site lifecycle. To do this, just execute:
-```unknown
+```shell
mvn site-deploy
```
@@ -87,7 +87,7 @@ To review/test the generated web site before an official deploy, you can stage t
Just execute the [`site:stage`](./stage-mojo.html) goal from your project
-```unknown
+```shell
mvn site:stage
```
@@ -95,7 +95,7 @@ mvn site:stage
By default, the site will be staged in a directory `target/staging/`. A different staging location can be chosen with the `stagingDirectory` parameter as shown below:
-```unknown
+```shell
mvn site:stage -DstagingDirectory=C:\fullsite
```
@@ -105,7 +105,7 @@ To stage a site and deploy it, execute the [`site:stage-deploy`](./stage-deploy-
By default, the site will be stage-deployed to `${distributionManagement.site.url}/staging/`. A different location can be chosen with the `stagingSiteURL` parameter as shown below:
-```unknown
+```shell
mvn site:stage-deploy -DstagingSiteURL=scp://www.mycompany.com/www/project/
```
@@ -115,7 +115,7 @@ mvn site:stage-deploy -DstagingSiteURL=scp://www.mycompany.com/www/project/
The Site Plugin can also be used to start up the site in Jetty. To do this, execute:
-```unknown
+```shell
mvn site:run
```