I am part of a team that uses TeamCity as CI server for our maven based projects. Recently we wanted to profile a slow build and decided to use a maven extension: tesla-profiler. To enable the extension you just need to copy the extension jar into the M2_HOME/lib/ext directory.
All works ok on our local machines, but when run our build on teamcity agents, we see no output from tesla profiler. The extension is copied to the correct folder on the maven location used by the agent. Since we were not sure what was happening, we added more output to the tesla-profiler and noticed that its constructor is not even called when maven is invoked by the TeamCity build agent.
This is why I would like to know how can I enable the teamcity agent to pick up the extension from the standard directory, M2_HOME/lib/ext.