Maven inconsistencies on Windows buildagents: .m2 repo created on C:\ root
I'm having a long time probleme of library update on Windows buildagent.
Dependencies sometimes don't get updated to the katest snapshot.
While investigating the problem, I realized that the build agent creates a .m2 repository in C:\ instaed of C:\Users\Administrator.
The buildagent also runs under the Administrator user afaiu.
If I start the same build in a command line, the proper .m2 repository is used.
The builds are configured to use the <default> maven instance, $M2_HOME, as the command line. There shouldn't be any difference between the 2 runs.
The depedency snapshot problem could be related.
Any reason why this .m2 repo would be created at the C:\ root?
thanks
Please sign in to leave a comment.
Hello Nodje,
Please, double check which account is used to run TeamCity Build Agent Service - this information is available on "Log On" tab of service properties. By default agents are setup to run under local system account, that will cause C:\.m2 to appear
Cheers, this wasn't very clear to me. It makes sense now.
It should help me solve my problem.