Is there a way for me to have eclipse start and point to a different M2_HOME for a specific workspace? When I start eclipse, M2_HOME points to ~/.m2/repository, but I want to change that for this specific workspace which is a maven project with lots of child modules.
The project keeps its own M2 repo, and I don’t want this to affect my other projects not in this workspace that would continue to use the default ~/.m2/repository repo.
I am able to build this project fine by setting some ENV variables, like MAVEN_OPTS, to point to this other M2 repo.
In Window->Preferences, select Maven->User Settings. You can select the settings.xml and the Local Repository.