Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
3.12.1, 4.0.0-M6
-
None
-
None
-
None
-
Ubuntu 22.04.2 LTS
Apache Maven 3.9.0
Java version: 17.0.4.1, vendor: Eclipse Adoptium
Description
A project containing an escaped ampersand in the name element fails in mvn site.
Consider a project containing nothing but this pom.xml:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>experiments</groupId>
<artifactId>experiments</artifactId>
<name>client for A&B services</name>
<version>0.0.1-SNAPSHOT</version>
</project>
This project builds fine with the standard build cycle, e.g. mvn install.
However, with mvn site (or explicitly mvn site:4.0.0-M6:site) it throws an error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:4.0.0-M6:site (default-cli) on project experiments: SiteToolException: Error parsing site descriptor: entity reference name can not contain character ' (position: START_DOCUMENT seen ...//maven.apache.org/xsd/decoration-2.0.0.xsd" name="client for A&B ... @2:142) -> [Help 1]
Escaping the ampersand twice helps, but it shouldn't be necessary:
<name>client for A&amp;B services</name>
Attachments
Issue Links
- duplicates
-
MSITE-226 Missing escaping of ${project.name} for default site descriptor
- Closed
- is fixed by
-
DOXIASITETOOLS-299 Site descriptor interpolation does not properly escape reserved XML chars
- Closed
- is related to
-
MNG-6435 DefaultSettingsBuilder assumes all SettingsReader/Writer impls will use XML
- Open