Issue
I have a maven project and I need to add server details in settings.xml
to gain access to a repo that needs authentication.
I have the following, where mypass includes this &c%
substring.
<server>
<id>myid-releases</id>
<username>myusername</username>
<password>mypass</password>
</server>
Solution
A &
is a special character in xml because it marks the start of a so-called entity.
If your xml parser (or the one that maven uses) tries to resolve entities, they need to be valid. Thus, you need to place the entity that resolves to &
into your xml: &
TL;DR:
Replace the &
in in your password with &
Answered By - f1sh
Answer Checked By - David Marino (JavaFixing Volunteer)