use of org.eclipse.aether.repository.LocalRepository in project qpid-broker-j by apache.
the class Booter method newRepositorySystemSession.
public static DefaultRepositorySystemSession newRepositorySystemSession(RepositorySystem system) {
DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
LocalRepository localRepo = new LocalRepository("target/local-repo");
session.setLocalRepositoryManager(system.newLocalRepositoryManager(session, localRepo));
session.setTransferListener(new ConsoleTransferListener());
session.setRepositoryListener(new ConsoleRepositoryListener());
return session;
}
use of org.eclipse.aether.repository.LocalRepository in project acceptance-test-harness by jenkinsci.
the class AetherModule method newRepositorySystemSession.
@Provides
public RepositorySystemSession newRepositorySystemSession(RepositorySystem system) {
DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
LocalRepository localRepo = new LocalRepository(MavenLocalRepository.getMavenLocalRepository());
session.setLocalRepositoryManager(system.newLocalRepositoryManager(session, localRepo));
session.setTransferListener(new ConsoleTransferListener() {
@Override
public void transferProgressed(TransferEvent event) {
// NOOP
}
});
return session;
}
use of org.eclipse.aether.repository.LocalRepository in project gate-core by GateNLP.
the class Utils method getRepositorySession.
public static DefaultRepositorySystemSession getRepositorySession(RepositorySystem repoSystem, WorkspaceReader workspace) {
DefaultRepositorySystemSession repoSystemSession = MavenRepositorySystemUtils.newSession();
String repoLocation = System.getProperty("user.home") + File.separator + ".m2" + File.separator + "repository/";
try {
Settings effectiveSettings = loadMavenSettings();
if (effectiveSettings.getLocalRepository() != null) {
repoLocation = effectiveSettings.getLocalRepository();
}
} catch (Exception e) {
log.warn("Unable to load Maven settings, using default repository location", e);
}
LocalRepository localRepo = new LocalRepository(repoLocation);
log.debug("Using local repository at: " + repoLocation);
repoSystemSession.setLocalRepositoryManager(repoSystem.newLocalRepositoryManager(repoSystemSession, localRepo));
// repoSystemSession.setWorkspaceReader(new SimpleMavenCache(new File("repo")));
if (workspace != null)
repoSystemSession.setWorkspaceReader(workspace);
return repoSystemSession;
}
use of org.eclipse.aether.repository.LocalRepository in project pinpoint by naver.
the class DependencyResolver method newRepositorySystemSession.
static DefaultRepositorySystemSession newRepositorySystemSession(RepositorySystem system) {
DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
session.setCache(newRepositoryCache());
String localRepositoryPath = resolveLocalRepository();
if (logger.isInfoEnabled()) {
logger.info("Local repository: {}", localRepositoryPath);
}
LocalRepository localRepository = new LocalRepository(localRepositoryPath);
LocalRepositoryManager localRepositoryManager = system.newLocalRepositoryManager(session, localRepository);
session.setLocalRepositoryManager(localRepositoryManager);
return session;
}
use of org.eclipse.aether.repository.LocalRepository in project launcher by runelite.
the class ArtifactResolver method newRepositorySystemSession.
public DefaultRepositorySystemSession newRepositorySystemSession(RepositorySystem system) {
DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
LocalRepository localRepo = new LocalRepository(repositoryCache.getAbsolutePath());
session.setLocalRepositoryManager(system.newLocalRepositoryManager(session, localRepo));
session.setTransferListener(listener);
return session;
}
Aggregations