On my Windows 7 machine I have the following environment variables:
NOTE:
on your jenkins go to Jenkins Dashboard
Manage jenkins -----> Manage Jenkins ----> Global tool configueration ---> add PATH for JAVA_HOME and MAVEN_HOME.
- JAVA_HOME=C:\Program Files\Java\jdk1.7.0_07
- M2_HOME=C:\apache-maven-3.0.3
PATH
variable, I have (among others) the following:- %JAVA_HOME%\bin;%M2_HOME%\bin
%M2%
having the nested %M2_HOME%
and it also works.NOTE:
on your jenkins go to Jenkins Dashboard
Manage jenkins -----> Manage Jenkins ----> Global tool configueration ---> add PATH for JAVA_HOME and MAVEN_HOME.