}
private MavenProject buildProject(final CommandContext context) throws Exception {
assert context != null;
ProjectBuilder builder = plexus.lookup(ProjectBuilder.class);
ProjectBuildingRequest request = new DefaultProjectBuildingRequest();
RepositorySystem rsys = plexus.lookup(RepositorySystem.class);
request.setLocalRepository(rsys.createDefaultLocalRepository());
request.setRemoteRepositories(Collections.singletonList(rsys.createDefaultRemoteRepository()));
// request.setLocalRepository( getLocalRepository() );
// request.setSystemProperties( getSystemProperties() );
// request.setUserProperties( getUserProperties() );
// request.setRemoteRepositories( getRemoteRepositories() );
// request.setPluginArtifactRepositories( getPluginArtifactRepositories() );
// request.setRepositoryCache( getRepositoryCache() );
// request.setOffline( isOffline() );
// request.setForceUpdate( isUpdateSnapshots() );
// request.setServers( getServers() );
// request.setMirrors( getMirrors() );
// request.setProxies( getProxies() );
// request.setActiveProfileIds( getActiveProfiles() );
// request.setInactiveProfileIds( getInactiveProfiles() );
// request.setProfiles( getProfiles() );
// request.setProcessPlugins( true );
// request.setBuildStartTime( getStartTime() );
// request.setTransferListener( getTransferListener() );
ProjectBuildingResult result = builder.build(pomFile, request);
// TODO: Handle problems?
return result.getProject();
}