There are global-level and user-level Maven settings stored in separate XML files.
For the global-level settings in the following location:
For user-level settings TeamCity searches the following locations (listed in order of priority):
where <Data Directory> is TeamCity Data Directory and ~ denotes the home directory of the user under which the TeamCity server is running and valid for both MS Windows and Unix-based systems.
For understanding the logic of Maven settings see the Maven product documentation.