what up guys welcome back to the channel in this video i'm
going to be showing you how you can install maven on your mac machine
all right guys the first thing you want to do is hop over to our machine to see if maven is
is not installed in order to do that we're going to open up terminal so let's do that
so i'm here on my computer i'm going to open up terminal and i'm going to type mvn hyphen version
to see if maven is not installed so at this time i have apache maven 3.63 installed on my machine
you guys may see maven command not phone and we're going to fix that issue right now all right first
thing you want to do let's minimize this first thing you want to do is open up your your browser
in this case i'm going to use google chrome in the search field you're going to do maven download
so may even download is there you're going to click the very first link maybe download apache
maven once you're on the site what we're going to do is going to scroll down a bit
um you're going to see the binary tar gz archive file and we want to click that link
all right so let's give it a little bit of time to download all right guys now that our file is
downloaded let's hop over to terminal again so we're going to open up terminal and what
we want to do is we want to cd into our downloads folder so what we're going to type is cd downloads
enter so now we are in our downloads folder so what we want to do right now is actually move that
folder that we downloaded and actually put it into our applications folder so let's hop back over
to my screen i'm going to open back our finder and go back to downloads or we should have our
apache maven 3.63 file what we want to do right now is unzip this file so double click and now
that we should have apache maven folder itself all right so let's hop back over to terminal
and what we want to do again is actually move that folder and actually place it in the applications
um location all right so in order to do that we're going to type the command mv which is to
move you're going to type the folder name so apache hyphen maven hyphen 3.6.3 we're going
to say move and we're going to put this in the applications folder so forward slash applications
and then you have another forward slash you hit enter since i already have this folder in my
applications folder but let's see what happens you see i hit enter it throws a error oh that's pretty
much letting me know that i already have that hold up in that location already so that's pretty
good um you guys should go into that smoothly all right guys now that we've moved the apache maven
folder into the applications we're going to cd into the application just to make sure everything
was moved successfully so what you want to do is you're going to cd into applications so cd slash
applications another file slash now in my applications folder and i want to get into
the apache maven so i'm going to type apache hyphen maven and depending on your version
i have 3.63 at the time of this video this may be different if you watch this later on
and i'm going to hit forward slash enter all right so boom the apache maven 3.63 you can see it
right here i'm actually in that so that's pretty good you guys should see the same thing as well
all right guys when i type pwd you can see the actual location of the apache maven so that's
that's working good you guys should see the same thing as well and location and everything
is good now that we confirm that maven it's where it's at we moved it into the applications folder
the next thing we want to do is actually set the maven home variables if you guys was watching my
previous video on how to install java that's where we install the java home variables
the same type of setup is going to happen for the maven home variables as well
so in order to set the maven home variable all we need to do is hop over back into terminal again
and what we're going to do is open up a new terminal so i'll declare your screen
and what we want to do is we're going to cd into our users um folder so let's say cd slash
user users and this case is richard all right so now that i'm here what i want to
do is i want to list all of the hidden files so in order to do that you type ls hyphen el
all right so this is going to list all the hidden files
and what we are looking for is the dot bash profile here we go dot bash profile if you
guys don't have that what you can do is create a new batch profile in order to do that if you
don't see it listed above you will type touch and you will do dot bash underscore profile hit enter
and that should create um a new batch profile for you and then you should be good all right so if
you do already have a batch profile what you want to do is open up that file so in order to open
it let's type open and we're going to do hyphen e and the name dot bash underscore profile hit enter
and now you can see to my dot bash profile so in this case i have a few other variables
installed on my bash profile your one may be empty or you may have some other stuff
if you've been you know working with this before all right so in this one i have my my export my
java home so this is what i set up i have some stuff with python and i already have my maven
home directory let's get it set up for you i'm going to leave these these export commands in
the description so you guys can just copy and paste it into your batch profile file
once you have that set up you can just close all you need to do right now is
just to refresh the terminal make sure the batch profile is refreshed and load the new settings
and what we're going to do is just type clear and in order to refresh the batch profile you're
going to type this simple command it's going to be source dot bash profile underscore profile
oh
that's my mistake i put it back to space
all right there we go now that's it's refreshed and at this time you guys can type maven iphone
version and this time you should see exactly what i have on my screen apache maven 3.6.3 so there
you have it that's how you install me even on your mac machine i hope it didn't take too long
and you guys was able to follow along nicely if you do enjoy the content or the video please feel
free to hit the like button i would definitely appreciate it and if you haven't subscribed
us yet no biggie no biggie but you know if you wanna you know hit that subscribe button turn to
get notifications on definitely going to be dropping some more videos on how to use maven some
stuff about software engineering animation what i do on a day-to-day basis definitely got like a new
monitor here to help me with my productivity i'm going to be dropping a video about my
first impressions about that so it's gonna be definitely some new content for the upcoming year
and again thank you guys for watching appreciate it i see you guys in another video peace
out
you