This is because, as others have said, non-printable but invalid XML characters are inserted into pom.xml, usually between XML elements. In my case, this often happens when I copy and paste from another place, usually documentation, an article, a tutorial, etc. In my browser.
For me, the IntelliJ IDEA editor displays these characters as a pink space, possibly a function of my color scheme, so it's easy to find and remove.
Russ Bateman
source share