new ArtifactRepositoryPolicy(true, ArtifactRepositoryPolicy.UPDATE_POLICY_NEVER,
ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN));
request.setLocalRepository(localRepository);
request.setRemoteRepositories(new ArrayList<ArtifactRepository>());
MavenRepositorySystemSession repositorySession = new MavenRepositorySystemSession();
Proxy activeProxy = settings.getActiveProxy();
if (activeProxy != null) {
DefaultProxySelector dps = new DefaultProxySelector();
dps.add(RepositoryUtils.convertFromMavenProxy(activeProxy), activeProxy.getNonProxyHosts());
repositorySession.setProxySelector(dps);
}
repositorySession.setLocalRepositoryManager(new SimpleLocalRepositoryManager(settings.getLocalRepository()));
repositorySession.setOffline(offline);
request.setRepositorySession(repositorySession);
request.setProcessPlugins(false);
request.setPluginArtifactRepositories(Arrays.asList(localRepository));
request.setResolveDependencies(false);