Icon

You are viewing the documentation of TeamCity 10.x and 2017.x, which is not the most recently released version of TeamCity.
View this page in TeamCity 2018.1 documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

 
Skip to end of metadata
Go to start of metadata

Maven Settings Resolution on the Server Side

The TeamCity server invokes Maven on the server side for functionality like Maven dependency triggers and  the Maven model display on the "Maven" build configuration tab.

You can upload Maven settings using the Administration | Project Settings | Maven Settings tab and then select one of the uploaded settings on the Maven step settings.

During the process, TeamCity uses the usual Maven logic for finding the settings.xml files with several differences (see below). 

Global Settings

Maven global-level settings are used from the .xml file in the default Maven location for the TeamCity server process:
${env.M2_HOME}/conf/settings.xml (or ${system.maven.home}/conf/settings.xml) (global values of M2_HOME environment variable and maven.home JVM option are used - those set for the TeamCity server process),

User-Level Settings

Maven user-level settings are defined in the User settings selection section of the Maven build step of the build configuration (if there are several Maven steps, settings from the first one are used).


The following options are available: 

ValueDescription
<Default>

TeamCity searches the following locations for the settings.xml file (listed in order of priority):

  1. <TeamCity Data Directory>/system/pluginData/maven/settings.xml
  2. <User Home>/.m2/settings.xml (The home directory of the user under whom the TeamCity server process runs is used)
<Custom>

The path to the file is provided by user. The file should be available both on the server and all the agents where the build will be run.

Uploaded settings name

TeamCity automatically uses the specified file content both on the server and agents. Maven settings are defined on the project level: the Project Settings | Maven Settings tab. The settings are stored in the <TeamCity Data Directory>/config/projects/%projectID%/pluginData/mavenSettings directory.

Icon

The settings are available in the current project and its subprojects. To override the inherited settings, in a subproject create a new settings file with the same name as the inherited one.

For the logic of Maven settings, please refer to the related Maven documentation.

User-level settings can be configured in the Maven Artifact Dependency Trigger.



See also:

Administrator's Guide: Maven | Maven Artifact Dependency Trigger