I need to set a URL via a maven property (to be replaced per profile). The problem is that this URL contains some &
and maven doesn't like this (if URL contains &_program):
"The reference to entity "_program" must end with the ';' delimiter." error occurs in pom on this line.
So how to escape this character or how to escape a hole line that might contain some "special" characters. (What other characters are forbidden in property-values?)
To disown your family as an adult, separate yourself from them by moving out or living with a friend if you're still living at home. You should also stop calling them or responding to their calls or emails. If they have your phone number or email address, change them so your family members can't reach you.
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¶m_2=2]]></some.url>
</properties>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With