Settings settings = container.getSettings();
// TODO this needs to be configurable via .forge
// TODO this reference to the M2_REPO should probably be centralized
MavenExecutionRequest executionRequest = new DefaultMavenExecutionRequest();
MavenExecutionRequestPopulator populator = plexus.lookup(MavenExecutionRequestPopulator.class);
populator.populateFromSettings(executionRequest, container.getSettings());
populator.populateDefaults(executionRequest);
RepositorySystem system = plexus.lookup(RepositorySystem.class);
ProjectBuildingRequest request = executionRequest.getProjectBuildingRequest();
ArtifactRepository localRepository = RepositoryUtils.toArtifactRepository("local",
new File(settings.getLocalRepository()).toURI().toURL().toString(), null, true, true);