session.setAuthenticationSelector(authSelector);
LocalRepository localRepo = new LocalRepository(new File(settings.getLocalRepository()));
session.setLocalRepositoryManager(repoSystem.newLocalRepositoryManager(session, localRepo));
session.setChecksumPolicy(RepositoryPolicy.CHECKSUM_POLICY_IGNORE);
session.setCache(new DefaultRepositoryCache());
boolean cacheNotFoundArtifacts = true;
boolean cacheTransferErrors = true;
session.setResolutionErrorPolicy(new SimpleResolutionErrorPolicy(cacheNotFoundArtifacts, cacheTransferErrors));
session.setWorkspaceReader(new ClasspathWorkspaceReader());
session.setTransferListener(new LogTransferListener(System.out));