1

I'm trying to setup simple continuous integration system on my local PC. I use gradle as my build system (gradle wrapper option). One of the steps in the build process in to deploy build artifacts to a local repository (located at: "{user_dir}/.m2/repository)". It works ok when I run it from local PC, but when it runs on Team City CI (version 9) it deploys it to a "{windows_dir}\System32\config\systemprofile.m2\repository". This is probably some configuration issue but I couldn't manage to solve it. In the build logs I saw that it can't find the local repository in the settings.xml file. I've tried to add it but it didn't help. How can I configure Team City to use local repository folder in user directory?

Rade Milović
  • 61
  • 1
  • 4
  • Do you use maven plugin and install task? Check that `localRepository` is not defined under `${env.M2_HOME}/conf/settings.xml` – Ori Dar Jan 17 '15 at 11:07
  • Yes I do use maven plugin and install task. It wasn't defined, but even after I defined it, Team City continued to deploy artifacts to windows directory. I also restarted the service. – Rade Milović Jan 17 '15 at 11:12
  • It may be that default Maven settings have been overridden [This may help](https://confluence.jetbrains.com/display/TCD9/Maven+Server-Side+Settings) – Ori Dar Jan 17 '15 at 11:15

1 Answers1

0

I found out what was the issue. If you install Team City system services to run under admin account it will always use windows directory. In order to use the User's directory you need to install the services under that user account.

Source: https://confluence.jetbrains.com/display/TCD9/Maven+Server-Side+Settings.

Rade Milović
  • 61
  • 1
  • 4