The settings.xml
file does not belong in your project. This is a private file that is kept on the filesystem and is not version-controled. When adding a mirror inside the settings, there is no reason for the POM to be modified.
There are two locations for the Maven settings:
- The Maven install:
$M2_HOME/conf/settings.xml
.
- A user's install:
${user.home}/.m2/settings.xml
The former settings.xml
is called global settings (since it resides inside the Maven installation itself), while the latter is referred to as user settings. If both files exists, their contents gets merged, with the user-specific settings.xml
being dominant.
I would suggest that you put this information inside your user settings, so as not to modify your Maven installation.