Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Environment:Windows XP
Description
In my project.xml, I have a description that includes a URL; the URL contains ampersands, so I encode the & as &, like this: http://mysite.com/x.jsp?a=1&b=2.
By the time this data makes it to target/generated-xdocs/navigation.xml, it's been unescaped, so the data in there is simply: http://mysite.com/x.jsp?a=1&b=2. Of course, this is no longer valid XML, so the xdoc plugin fails:
BUILD FAILED
File...... file:/d:/maven/plugins/maven-xdoc-plugin-1.4/
Element... x:parse
Line...... 328
Column.... 43
Error on line 12 of document file:/D:/maven/target/generated-xdocs/index.xml : The reference to entity "nodeId" must end
with the ';' delimiter. Nested exception: The reference to entity "nodeId" must end with the ';' delimiter.
I tried double-escaping, so that the original has & for the original ampersand. The plugin runs to completion, but the resulting HTML file has spaces before and after the ampersand.
I think this is unavoidable. You should wrap the description in the POM with a <![CDATA[...]]> tag. Tested and confirmed this works.