Add M2_REPO to eclipse
While working with maven projects we normally need to create the M2_REPO variable on Eclipse.
Normally I was used to do manually with these steps:
- Eclipse > Window > Preferences > Select the Java > Build Path > Classpath - Point to your maven repository, shall me under: ~/.m2/repository - >rebuild your project
But a easiest way is:
>mvn eclipse:add-maven-repo -Declipse.workspace={PATH_TO_YOUR_WORKSPACE}
If you are thinking on “Where do I need to point my M2_REPO”
Answer: You need to point to your {home}/.m2/repository
Advertisement

