[ 
https://issues.apache.org/jira/browse/MSITE-933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Osipov updated MSITE-933:
---------------------------------
    Fix Version/s: 4.0.0-M7

> mvn site fails when <name> contains &amp;
> -----------------------------------------
>
>                 Key: MSITE-933
>                 URL: https://issues.apache.org/jira/browse/MSITE-933
>             Project: Maven Site Plugin
>          Issue Type: Bug
>    Affects Versions: 3.12.1, 4.0.0-M6
>         Environment: Ubuntu 22.04.2 LTS
> Apache Maven 3.9.0
> Java version: 17.0.4.1, vendor: Eclipse Adoptium
>            Reporter: Heiko
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 4.0.0-M7
>
>
> A project containing an escaped ampersand in the name element fails in mvn 
> site.
> Consider a project containing nothing but this pom.xml:
>  
> {code:java}
> <project>
>     <modelVersion>4.0.0</modelVersion>
>     <groupId>experiments</groupId>
>     <artifactId>experiments</artifactId>
>     <name>client for A&amp;B services</name>
>     <version>0.0.1-SNAPSHOT</version>
> </project> {code}
> 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:
> {code:java}
> [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]
> {code}
> Escaping the ampersand twice helps, but it shouldn't be necessary:
> {code:java}
>     <name>client for A&amp;amp;B services</name>  {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to