Windows BuildAgent: specifying JRE, Maven and User ??


I'm having a lot of trouble with a Windows BuildAgent that I'm trying to configure.
Basically, everything runs fine from cli on the machine, but I can't reproduce it with the local BuildAgent instance.

Problems arise from the .m2 repository that isn't the same of the local user's, and could potentially come from different JRE or Maven version.

I need to be able to change the User under which BuildAgent runs - SYSTEM right now -, change the Maven instance used from the plugin to the local one, and same for the JRE.

It seems far more difficult than expected, I need help for that!


Comment actions Permalink

follow up:

- as for specifying Maven instance, it's possible to do it into the build itself, but it's a path, so it's system dependant, meaning it ties the build to an agent.
Isn't there a way to tell the agent to use a MAVEN_HOME var?

- as for not using the SYSTEM, I guess I'll just reinstall the buildagent - welcome back to the MS world

- as for the JRE it seems the one included in the BuildAgent is not in use, but it's also not the JAVA_HOME that is in use. That might be solved with BuildAgent running as another agent...

Comment actions Permalink

Everything seem to be running fine with a std Administrator account.

And M2_HOME variable seems to be recognized, even though it's not indicated in the documentation.

This solves my problem.


Please sign in to leave a comment.