Friday, May 4, 2018

How do you add M2_REPO classpath variable to your eclipse IDE?

M2_REPO is just a normal classpath variable in eclipse/sts to find your local maven repository.

I can add in two ways M2_REPO classpath variable into eclipse/sts ide.
  • Add M2_REPO manually:
step-1: go to eclipse ide menu bar
step-2: select Windows -> Preferences
step-3: select Java -> Build Path --> Classpath Variable
step-4: click on New... button --> define New Variable Entry NameM2_REPO variable and Path point it to your local maven repository
step-5: enjoy !!
  • Add M2_REPO automatically:
step-1: execute the following command in the cmd

mvn -Declipse.workspace="your Eclipse Workspace" eclipse:configure-workspace

MAVEN_HOME: MAVEN_HOME : D:\Ishaan\tools\apache-maven-3.0.5

MAVEN PATH: PATH VARIABLE: %MAVEN_HOME%\bin

MAVEN VERSION: mvn -version

No comments:

Post a Comment

Blueprint for self-improvement

To learn faster: Make the process fun To understand yourself : Write To understand the world better : Read To build deeper connection : Lis...