Changing the location of the Maven repository
There are three types of Maven repositories:
- Local: This is the repository in your computer filesystem
- Remote: This is the repository from where the required Maven files get downloaded
- Mirrors: These are repository managers, such as Nexus and Artifactory, that mirror various repositories
You will have seen Maven downloading a number of files (called poms and jars). Let us see where they are located in your computer:
- Go to your
HOME
folder (C:\Users\username
) in the case of Microsoft Windows,/Users/username
for Mac, and,/home/username
(or a similar location) for Linux - You will notice the
.m2
folder and within that, a subfolder calledrepository
Tip
Any folder that starts with a dot (
.
) is typically hidden ...
Get Apache Maven Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.