Question

when I create a maven site with (doxia-module-markdown)[http://maven.apache.org/doxia/doxia/doxia-modules/doxia-module-markdown] and the .md file has links with ampersands it results in an errormessage. example.md:

# Getting Started

## Now

1. goto [google] (https://www.google.com/?gws_rd=cr&q=test+site:com)
2. or goto <https://www.google.com/?gws_rd=cr&q=test+site:com>

Errormessage: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project test: Error during page generation: Error parsing 'xxx\projects\test\src\site\markdown\not_working.md': line [3] Error parsing the model: entity reference name can not contain character =' (position: TEXT seen ...<a href="https://www.google.com/?gws_rd=cr&q=... @3:57) -> [Help 1]

The error dissapears as soon as I remove the ampersand.

Was it helpful?

Solution

Try replacing your ampersands with &amp;

It appears the strings are parsed as part of the maven XML and for that to work you need to escape &, <, >, and the like.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top