Environment variable refs in Maven settings.xml path and TC 5 Maven support

All of my build configurations have the following setting in their Maven 2 Runner configuration:


User settings path: %env.M2_SETTINGS%

My agents are the only ones that have env.M2_SETTINGS defined in their buildAgent.properties which points to a usable settings.xml.

I never run builds on the TC server itself, so I don't have Maven installed, and I haven't defined that environment variable there.  I get the following error when clicking on the Maven tab of a build configuration:

An error occurred during collecting maven data: Cannot fully resolve user settings location: %env.M2_SETTINGS%

Is there another way I can configure my system to take advantage of the new Maven features?

5 comments
Comment actions Permalink

Do I need to fix this by installing Maven and providing the agent properties to the TeamCity server?

0
Comment actions Permalink

I do not think installing Maven on the server side is a convenient solution. I would recommend to submit a bug report (http://jetbrains.net/tracker) and we will try to find a solution.

0
Comment actions Permalink

Hi Leon,

You don't need to install Maven on server. You can fix it by setting M2_SETTINGS variable on the server machine.

Thank you for reporting. I'll make it more robust.

0
Comment actions Permalink

Should I still log this in the issue tracker?

0
Comment actions Permalink

Nevermind.  I see the issue has been added.  Thanks.

0

Please sign in to leave a comment.