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

How to run standalone mock server on local laptop

 Please download the standalone wiremock server from Direct download section at the bottom of the page.  Download and installation Feel fre...