Forgot what i did, may be installed m2eclipse plguin, it made the M2_REPO classpath variable is unable to edit. Select Windows -> Preferences -> Java -> Build Path -> Classpath Variables.

Eclipse come with embedded Maven and have this M2_REPO classpath variable default non modifiable also.

Figure – M2_REPO is non modifiable

M2_REPO non modifiable


To modify the M2_REPO value, you need to change it at Eclipse’s Maven configuration page. Select Windows -> Preferences -> Maven -> User Settings.

Figure – Change it to another Maven repository.

M2_REPO non modifiable

Once above value is updated, it will update the M2_REPO classpath variable automatically.

For Mac OSX Eclipse users
The “preferences” is at menu, Eclipse -> Preferences -> Maven -> User Settings.