title: Cannot run program "mvn" error=2, No such file or directory
body: <p>I'm doing a build on my Ubuntu 14.04 LTS but I'm getting the following:</p>
  
  <pre><code>Started by user anonymous
  Building in workspace /var/lib/jenkins/workspace/videovixx
   &gt; /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
  Fetching changes from the remote Git repository
   &gt; /usr/bin/git config remote.origin.url https://bitbucket.org/mdennis10/videovixx.git #     timeout=10
  Fetching upstream changes from https://bitbucket.org/mdennis10/videovixx.git
   &gt; /usr/bin/git --version # timeout=10
  using .gitcredentials to set credentials
   &gt; /usr/bin/git config --local credential.helper store --    file=/tmp/git6236060328558794078.credentials # timeout=10
   &gt; /usr/bin/git fetch --tags --progress https://bitbucket.org/mdennis10/videovixx.git   +refs/heads/*:refs/remotes/origin/*
   &gt; /usr/bin/git config --local --remove-section credential # timeout=10
   &gt; /usr/bin/git rev-parse refs/remotes/origin/master^{commit} # timeout=10
   &gt; /usr/bin/git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
  Checking out Revision f5c53e95d33c1e15abd7519346c18ec6bc0c81d7      (refs/remotes/origin/master)
   &gt; /usr/bin/git config core.sparsecheckout # timeout=10
   &gt; /usr/bin/git checkout -f f5c53e95d33c1e15abd7519346c18ec6bc0c81d7
   &gt; /usr/bin/git rev-list f5c53e95d33c1e15abd7519346c18ec6bc0c81d7 # timeout=10
  [videovixx] $ mvn install package
  FATAL: command execution failed
  java.io.IOException: Cannot run program "mvn" (in directory    "/var/lib/jenkins/workspace/videovixx"): error=2, No such file or directory
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
      at hudson.Proc$LocalProc.&lt;init&gt;(Proc.java:244)
      at hudson.Proc$LocalProc.&lt;init&gt;(Proc.java:216)
      at hudson.Launcher$LocalLauncher.launch(Launcher.java:802)
      at hudson.Launcher$ProcStarter.start(Launcher.java:380)
      at hudson.Launcher$ProcStarter.join(Launcher.java:387)
      at hudson.tasks.Maven.perform(Maven.java:328)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
      at hudson.model.Build$BuildExecution.build(Build.java:199)
      at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533)
      at hudson.model.Run.execute(Run.java:1745)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:89)
      at hudson.model.Executor.run(Executor.java:240)
  Caused by: java.io.IOException: error=2, No such file or directory
      at java.lang.UNIXProcess.forkAndExec(Native Method)
      at java.lang.UNIXProcess.&lt;init&gt;(UNIXProcess.java:186)
      at java.lang.ProcessImpl.start(ProcessImpl.java:130)
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
      ... 15 more
  Build step 'Invoke top-level Maven targets' marked build as failure
  Archiving artifacts
  Recording test results
  Finished: FAILURE
  </code></pre>
  
  <p>I'm assuming that this caused by some linux security feature that stops the /var/lib/jenkins/workspace/videovixx from being created without the correct permissions
  which I might not have. Is this the problem and how do I solve it?</p>