Search code examples
maventeamcitykotlin-dslmaven-settings

How to specify Maven settings.xml for Kotlin DSL project in TeamCity


So you can have settings.xml for Maven projects in TeamCity, Administration -> Project -> Maven Settings.

You can also store project configuration as Kotlin DSL, which is basically a Maven project stored under .teamcity in VCSROOT. It may even use external libraries as dependencies.

However, this Maven project will not use any settings.xml described above, so it can't go into HTTP auth-protected internal Maven repositories. Is there a way to specify settings.xml file for Kotlin DSL configuration project? Is it possible to have that file alongside pom.xml maybe? In this case, will it pick up Tokens from corresponding TeamCity tab?


Solution

  • Later on I have stumbled upon TW-53584: The settings file needs to be named mavenSettingsDsl.xml and placed in <Root project>'s Maven Settings. It will be picked up and used.