The first thing we need to do is download the tar Maven file and deploy it to a common location on the workstation.
wget http://mirrors.gigenet.com/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz su -c "tar -zxvf apache-maven-3.0.5-bin.tar.gz -C /opt/"
Set the Maven environment variables to the shared profile. The next step is to configure the Maven environment variables in the general profile so that all users on the system receive imports during login.
su -c "vi /etc/profile.d/maven.sh"
Now test your Maven installation. Log out and then log in. Enter the following command:
[ jsmith@regan ~]$ mvn -version
If you did everything correctly, your result should look something like this:
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 08:51:28-0500) Maven home: /opt/apache-maven-3.0.5 Java version: 1.7.0_19, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.19/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "2.6.32-358.2.1.el6.i686", arch: "i386", family: "unix"
Chetan potdar
source share