• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar

Techlame

Reviews-Techtips-How to Problems

  • Android
  • Windows
    • Windows 10 ISO
    • Windows 7 ISO
    • Windows 10 Preactivated ISO
  • IOS
  • How To
  • Better Discord
    • Better Discord Plugins
    • Better Discord Themes
  • Contact Us

Install Maven On Mac OS X in Next 5 Min with Simple Trick

August 21, 2018 By Abhishek Yadav Leave a Comment

Install Maven On Mac OS X

Many of the people heard about Apache Maven which is a built-in software and mainly used for Java Programs but if you are new to Apache Maven and don’t even know what is Maven, Don’t worry by the end of this article you can get a clear-cut information about What is Maven? and How to Install Maven On Mac OS X.

First things first now we can learn about What is Maven?

What is Maven?

A maven is just a Build tool, For example, generally, a developer develops a code and places it in any of the repositories like SVN, Github repositories to make it open source, Then the common user will clone the code manually and make an executable file using this maven build tool. This Maven is mainly used for Java Code.

Visit Also: How to open Mac Task Manager

Install Maven On Mac OS X:

First before Installing Maven on Mac, just make sure that Maven is not previously installed in your Mac.

To do so follow the steps carefully which are listed below:

Step-1: Check whether Maven is Already Installed on your Computer:

  • First things first open your Terminal by using Spotlight and Type the below command to cross-check whether Maven is already Installed on your Computer
mvn --version

If it shows maven command not found then Maven is not installed on your System or else if maven is in your Computer it shows the version of your Maven.

Now you can get very angry that instead of telling how to install maven why you are telling this unnecessary thing, Yaa I know, So without further ado let’s get into our main Topic.

Method-1: Installing Maven only in the Present Terminal – Temporary Purpose

  • Some people don’t want to install the Softwares permanently in their computer so for those people who want to use maven for the temporary purpose this section is perfect for them.
  • First Download the Maven Zip file from the link below and Download the Maven Zip file under the Files section

install maven on mac os

Download Maven

 

  • Now Unzip the file and change the folder from Downloads to some other path.
  • In this tutorial, I am changing my Path to (Users/Vinod/) means literally after unzipping, copy the maven file and paste in some other folder and remember the path. If you are the person like me asking that where we can see our path? Then don’t worry you can right click on the copied file and click on copy path.
  • Now if you got your path then you need to set your system variables to do that first go to terminal and type these two variables.

export M2_HOME="**********" (Here * this symbol in the sense the newly pasted folder path

Note: Folder Path means the newly pasted folder path, For example, I have Copied and Pasted the Maven file in Users>vinod>apache-maven-3.3.9 so in the terminal I need to write…

export M2_HOME=/Users/vinod/apache-maven-3.3.9/ 

  • After writing this variable click Enter and Now you need to set the path variable. To set the path variable you need to type this line.

export PATH=$PATH:**********(Here * this symbol in the sense the newly pasted folder path)

Note: Folder Path means the newly pasted folder path, For example, I have Copied and Pasted the Maven file in Users>vinod>apache-maven-3.3.9 so in the terminal I need to write this Line and click Enter

export PATH=$PATH:/Users/vinod/apache-maven-3.3.9/ 

  • Now the Variables is all set and the Maven is Installed successfully Now Check whether the Maven is Installed or not by typing “mvn —version” Then you can observe the current Maven version which is installed on your PC.

But remember one thing that this is a temporary process and If you closed the present terminal then you can’t see Maven in the another Terminal

Now, what to do? Yes, there is a Permanent way to install maven on mac os If you want to know that then Continue Reading.

Method-2: Installing Maven only in Your PC Permanently- Permanent Purpose.

  • To make Maven permanent for all Terminal sessions in you PC First you need to create a bash file in your Users folder to do so type the below command in the terminal.

touch .bash_profile

  • If you open the Users folder you cannot see the bash file normally because it is a hidden file so to see the bash file copy the below command and paste in the Terminal.

$ defaults write com.apple.finder AppleShowAllFiles TRUE

  • Now right click on the finder and Tap on Relaunch to see the bash file Now Edit the bash file with any editor available in your device.
  • Now you need to type the two variables which we have seen clearly in the Method-1 if you don’t have any idea or skipped the article one’s look into Method-1 there you can find the two HOME and PATH VARIABLE copy and paste the same variables in this file and save the bash file.
  • Yes, That’s it You have successfully installed the maven in your PC and this is permanent.

Install Maven on Mac OS- Conclusion:

Yes it is a bit long process but it will be the easiest process once you have understood, There are many uses of maven like you can easily clone the java related codes from almost all the repositories, So if you want to clone the codes so what are you waiting for just go and install Maven.

Visit Also: How to Force Quit on Mac or Not Responding Solved

Share this:

  • Click to share on WhatsApp (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Google+ (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Telegram (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to email this to a friend (Opens in new window)
  • Click to share on Reddit (Opens in new window)

Filed Under: How To, IOS Tagged With: app force quit in mac, mac activity monitor, maven in mac, taskmanager

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • What is the best time to work out?
  • How to Kill “Anti-Malware Service Executable” High PC Usage
  • How to take charge of your Finances
  • How to Make Extra Cash Online
  • Best Hostgator VPS Alternatives

Copyright © 2021

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.