Creating or finding .M2 folder

If you are setting up your system for first time, you have installed java set path variable for java and maven both.
You checked both are installed successfully but if .m2 & repository both folder are not there in then do the below things.

open Command promt run the below command

mvn help:evaluate -Dexpression=settings.localRepository

It will help you to find the location of .m2 if someone has changed.
Also if there is no folder created it will create .m2/repository folder under C:\Users\{user}\

If you run this command for first time it will download repository so it will take some time.
That's it and your folder is created.





After repository creation make sure you are giving the same path in setting.xml localrepository
  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${user.home}/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
KEEP EDUCATING YOURSELF!!!!




Comments

Popular posts from this blog

AEM in docker

Sling API vs JCR API