What are you trying to do?
If you are running jobs on master, there is an environment variables
section under global properties; check the box and you might be able to
set M2_HOME. I have not tried doing this, but it might work. The help
says "These key-value pairs apply for every build on every node. They
can be used in Jenkins' configuration (as $key or ${key}) and will be
added to the environment for processes launched from the build."
The automatically installed Maven is deployed onto a slave and uses the
default repository location, for example, $HOME/.m2/repository on Linux.
This is shared between all jobs on that slave. If you set the private
repository option for a job, the repository is ".repository" in the
workspace for that job.
There is provision in slave configuration to set environment variables,
just like for the master; I expect that setting M2_HOME here might work,
but I have not tried.
If you are starting your slave as a service that calls back to master
via JNLP, I expect that you can set M2_REPO on the slave. For example,
if you are starting your slave via an initscript, there are standard
ways of setting daemon environment variables depending on platform.
Again, if you can tell us what you are trying to do, we might be able to
give better advice.
Kind regards,
Ben.
On 18/12/12 13:35, Z W wrote:
Hi All
We are using the bundled Maven of Jenkins.
We could not find M2_HOME variable used by Jenkins.
Where is it set in Jenkins as an enviroment variable ?
Thanks
--
Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre