title: How to install maven on redhat linux
body: <p>Note: When originally posted I was trying to install maven2. Since the main answer is for maven3 I have updated the title. The rest of the question remains as it was originally posted.</p>
  
  <p>I'm trying to install maven2 on a redhat linux box using the command</p>
  
  <pre><code> yum install maven2
  </code></pre>
  
  <p>but yum doesn't seem to be able to find maven2.</p>
  
  <pre><code>No package maven2 available
  </code></pre>
  
  <p>I've run across other posts about this topic, but the answer to the following post suggests to add repos. I add said repos, but run into errors after adding them.</p>
  
  <p><a href="https://stackoverflow.com/questions/6298865/how-to-install-maven-into-red-hat-linux-enterprise-addition-6">How to install Maven into Red Hat Enterprise Linux 6?</a></p>
  
  <p>I can only access this box via command line so simply downloading maven from their website is difficult for me.</p>