Problem:
I am trying to install Apache Maven 3 in Ubuntu 12.04 lts. What I did is open the terminal then I typed the following commands
- export m2_home=/usr/local/apache-maven/apache-maven-3.0.5 [then pressed Enter]
Li style= "margin:10px 0px; padding:0px; border:0px; Vertical-align:baseline; line-height:1.3; Word-wrap:break-word; Background-color:transparent ">export m2= $M 2_home/bin [then pressed Enter]
- export path= $M 2: $PATH [then pressed Enter]
after that I typed
MVN -- version
And it displayed all the necessary information but after closing the terminal, again I typed the commandmvn --version
the Program' MVN 'can be foundinchThe following packages: *maven*Maven2Trysudo apt-get install<selected-page>
The solutions are as follows Http://askubuntu.com/questions/310059/ubuntu-adding-path-environment-variables
The problem is that path is added to the environment, but
$source / etc / environment
then MVN--vsersion
[email protected]:/usr/local$ mvn--versionapache Maven 3.2.2 ( 45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17t21:51:42+08:00) Maven Home:/usr/local/apache-maven-3.2.2java version:1.7.0_55, Vendor:oracle Corporationjava Home:/usr/lib/jvm/java-7-openjdk-amd64/jredefault Locale:en_us, Platform Encoding:utf-8os name: " Linux ", Version:" 3.13.0-29-generic ", Arch:" AMD64 ", Family:" Unix "