title: Build error in jenkins ERROR: Maven Home /home/app/maven-2.2.1 doesn’t exist
body: <p>I am trying run <code>Jenkins</code> and Building a project.
  I have install <code>Maven 2.2.1</code>. I downloaded Maven 2.2.1 and extracted in a folder Maven 2.2.1.
  set the home path in <code>.bash_profile</code>.
  content of <code>.bash_profile</code></p>
  
  <pre><code>M2_HOME=/home/qaserver3/app/maven-2.2.1
  export M2_HOME
  
  PATH=$M2_HOME/bin:$JAVA_HOME/bin:$PATH
  </code></pre>
  
  <p>when I run mvn --version on terminal, I get</p>
  
  <pre><code>Apache Maven 2.2.1 (r801777; 2009-08-07 00:46:01+0530)
  Java version: 1.6.0_45
  Java home: /home/qaserver3/app/jdk1.6.0_45/jre
  Default locale: en_US, platform encoding: UTF-8
  OS name: "linux" version: "2.6.32-358.el6.x86_64" arch: "amd64" Family: "unix"
  [root@qaserver3 qaserver3]# 
  </code></pre>
  
  <p>when I run <code>echo $M2_HOME</code> I get the correct home path
  <code>/home/qaserver3/app/maven-2.2.1</code></p>
  
  <p>The above home path I have set in Jenkins.</p>
  
  <pre><code>Manage Jenkins -&gt; Configure System -&gt; Maven -&gt;  Maven installations -&gt;  
      MAVEN_HOME = /home/qaserver3/app/maven-2.2.1
  </code></pre>
  
  <p>beloo I get a warining saying :</p>
  
  <blockquote>
    <p>`home/qaserver3/app/maven-2.2.1 is not a directory on the Jenkins
    master (but perhaps it exists on some slaves)'</p>
  </blockquote>
  
  <p>but when I build the project I get this error</p>
  
  <p><strong>Console Output</strong></p>
  
  <blockquote>
    <p>ERROR: Maven Home /home/qaserver3/app/maven-2.2.1 doesn’t exist</p>
  </blockquote>
  
  <p>How do I solve this issue?</p>