January 9, 2013

How to Install Maven 3 on RHEL 6.3

In RHEL 6 there is no package for Apache Maven 3 and if you search the official repo you will end up with.

But that package does not contain any maven binaries. So since there is no official package and I do not want to clutter my RHEL installation, by adding custom repositories, we will do it manually. And that is no big thing.

First download the apache maven binaries, I downloaded the zip file. And extract it in /usr/share.

Now "install" it, i.e. create a soft link.

And finally set all needed environment variables in /etc/environment. And for my RHEL 6.3 machine they look like this.

Now test your installation of Apache Maven 3.0.4.


Zippisan said...

Det var bra gjort, jag fixade fast stå kvar att uppgradera java dock när jag kör mvn --version då JDK 7 kommer som JAVA_HOME men när jag kör java -version då är sexan som kommer.

RPM för jdk 7 verkar att har problem att installera.

Tack för post!

Anonymous said...

Good steps w/ 'proper' install locations. I used these steps for v3.2.1 recently. You might want to mention that JAVA_HOME needs to point to a JDK install (not just JRE) _or_ javac needs to be available in the system path.