From the course: Creating a Book Search Engine from Scratch Using Java and GitHub Copilot

Installing Maven

- [Instructor] In order to manage our Java project for compilation, building, and testing, we are going to leverage Apache Maven, which is the build tool of our choice. Now, if you go to maven.apache.org, you will see a link that says Install. If you go to the Install, it has information on how to do that. This is important if you are on Linux or Windows. But for Mac, I'm going to show you a faster way to install Maven on your machine. Now, if you are not using Homebrew already on Mac, Homebrew is a package manager for Mac operating system. If you don't have it available on your machine, all you need to do is to copy this command, go to the terminal, paste, and hit Enter. And in few moments, you will have Homebrew on your machine installed. To ensure that you have Homebrew running, you type brew -v, and you see a Homebrew version. Now, in order to install Maven, all you need to do is say brew install maven. And within few moments, Maven will be installed on your machine. Now, since Maven is already installed on my machine, I got Maven 3.9.9 is already installed, but you will see a different message. But at the end of the command, you will have Maven up and running. To ensure that Maven is up and running, type mvn -v, and hit Enter. And then it'll show you that it is using Maven home, which is available here, and what Java version it is leveraging. So, which means, at this point in time, we have Java 24 that is available on our machine, we have installed Maven successfully, and when we checked the version for Maven, it told me that it is 3.9.9, and it was able to successfully locate Java version 24. So we have two things up and running already. Let's move on to the third step, where we are going to create a new project.

Contents