Reputation: 129
I am getting the following error while doing the Jenkins build in slave servers. In Master server the build was working fine.
ERROR: Maven Home /bgl-build-1/usr/local/maven doesn?t exist
My setup consists of one Master and two Slave servers. Maven is installed in Master server. Slave doent have the maven. The setup was working fine earlier. Getting this error for the past two days,
The ".bashrc" file of slaves contains the maven path installed in the master server.
export EDITOR=/usr/bin/vim
export BGL_BUILD_1=/bgl-build-1
export JAVA_HOME=$BGL_BUILD_1/usr/java/default
export M2_HOME=$BGL_BUILD_1/usr/local/apache-maven-2.2.1
export PATH="$BGL_BUILD_1/usr/local/bin:$BGL_BUILD_1/usr/local/maven/bin:$BGL_BUILD_1/usr/java/default/bin:$PATH";
export PATH="/bgl-build-1/usr/local/maven/bin:$PATH";
I referred the similar post reg this issue I have an issue running a jenkins job in slave using maven (Maven home doesn´t exist)
My question is do i need to have maven in all the servers ( including slave) or I am missing some configuration reg master and slave setup in Jenkins.
My Jenkins version - 1.582
Maven version - 2.2.1
Upvotes: 8
Views: 32999
Reputation: 4808
This issue may also appear when the maven version has been updated and the old version removed but the project still points to the old version. To solve it simply select the new version!
Upvotes: 0
Reputation: 27505
Yes, you need Maven on the slave in order to execute a Maven build on that slave.
There are 2 ways to get Maven onto that slave:
(You could have both methods too)
To let Jenkins install maven:
Then when you configure your maven job:
Upvotes: 11