[SOLVED] Maven settings.xml password with special characters

[SOLVED] Maven settings.xml password with special characters
Photo by Jason Leung on Unsplash

Problem

We define a connection to a proxy server or to, for example, an artifact repository that contains names specifically such as:

  • < (less-than)
  • > (greater-than)
  • & (ampersand)
  • ‘ (apostrophe or single quote)
  • ” (double-quote)

Solution

Of course, we can change the password to one that does not contain special characters, but a much better solution will be to use the so-called escape characters. Below is a table on how to replace a particular special character.

Summary

The truth is that we should convert special characters to avoid characters wherever we have XML. This will avoid unpleasant surprises when suddenly we come across one of these signs in the data.

If you enjoyed this post please add the comment below or share this post on your Facebook, Twitter, LinkedIn or another social media webpage.
Thanks in advanced!

Leave a Reply

avatar
  Subscribe  
Notify of
Close Menu