how to escape '&' in maven pom property values [duplicate] how to escape '&' in maven pom property values [duplicate] xml xml

how to escape '&' in maven pom property values [duplicate]


I've not used maven but from the sounds of it, standard XML escaping would get the job done. In your case you can try using

& instead of &

What characters do I need to escape in XML documents?


You can escape one character or a whole line that might contain some "special" characters by surrounding property value with <![CDATA[ property value ]]>. For example for some URL it would look like:

<properties>    <some.url><![CDATA[http://stackoverflow.com?param_1=1&param_2=2]]></some.url></properties>