0

Extract the distribution archive, i.e. apache-maven-3.2.3-bin.tar.gz to the directory you wish to install Maven 3.2.3. These instructions assume you chose /usr/local/apache-maven. The subdirectory apache-maven-3.2.3 will be created from the archive. In a command terminal, add the M2_HOME environment variable, e.g. export M2_HOME=/usr/local/apache-maven/apache-maven-3.2.3. Add the M2 environment variable, e.g. export M2=$M2_HOME/bin. Optional: Add the MAVEN_OPTS environment variable to specify JVM properties, e.g. export MAVEN_OPTS="-Xms256m -Xmx512m". This environment variable can be used to supply extra options to Maven. Add M2 environment variable to your path, e.g. export PATH=$M2:$PATH. Make sure that JAVA_HOME is set to the location of your JDK, e.g. export JAVA_HOME=/usr/java/jdk1.7.0_51 and that $JAVA_HOME/bin is in your PATH environment variable. Run mvn --version to verify that it is correctly installed.

I installed apache-maven following all these instructions but i checked if the maven is correctly installed. It says mvn command not found "Terminal."

I am installing maven on my mac ox X.

joe
  • 15
  • 1
  • 6

1 Answers1

0

In terminal navigate to your M2_HOME path and run the following command

   tar -xvzf PathOfDownload/apache-maven-3.2.3-bin.tar.gz
StackFlowed
  • 6,664
  • 1
  • 29
  • 45
  • Thanks for your answer but it is showing error like this: "tar: Error opening archive: Failed to open 'PathOfDownload/apache-maven-3.2.3-bin.tar.gz" – joe Sep 06 '14 at 04:11
  • you have to replace path of downland by your actual path typically it should be /Users/"youruserid"/Downloads please preplace your userid by your actually user id ... if you did use the correct path before ... then try to redownloading it and run the command before you open it using the finder.... – StackFlowed Sep 08 '14 at 13:26