use of org.eclipse.aether.repository.LocalRepository in project spring-cloud-function by spring-cloud.
the class DependencyResolutionModule method createSession.
private DefaultRepositorySystemSession createSession(Properties properties) throws NoLocalRepositoryManagerException {
DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
LocalRepository repository = localRepository(properties);
session.setLocalRepositoryManager(localRepositoryManagerFactory.newInstance(session, repository));
applySettings(session);
ProxySelector existing = session.getProxySelector();
if (existing == null || !(existing instanceof CompositeProxySelector)) {
JreProxySelector fallback = new JreProxySelector();
ProxySelector selector = existing == null ? fallback : new CompositeProxySelector(Arrays.asList(existing, fallback));
session.setProxySelector(selector);
}
return session;
}
use of org.eclipse.aether.repository.LocalRepository in project mule by mulesoft.
the class RepositoryServiceFactory method createRepositoryService.
public RepositoryService createRepositoryService() {
RepositorySystem repositorySystem = new SpiRepositorySystemFactory().createRepositorySystem();
File repositoryFolder = createRepositoryFolderIfDoesNotExists();
List<RemoteRepository> remoteRepositories = collectRemoteRepositories();
DefaultRepositorySystemSession repositorySystemSession = new DefaultRepositorySystemSession();
repositorySystemSession.setLocalRepositoryManager(repositorySystem.newLocalRepositoryManager(repositorySystemSession, new LocalRepository(repositoryFolder)));
return new DefaultRepositoryService(repositorySystem, repositorySystemSession, remoteRepositories);
}
use of org.eclipse.aether.repository.LocalRepository in project google-cloud-intellij by GoogleCloudPlatform.
the class CloudApiMavenService method newRepositorySystemSession.
private static DefaultRepositorySystemSession newRepositorySystemSession(RepositorySystem system) {
DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
session.setLocalRepositoryManager(system.newLocalRepositoryManager(session, new LocalRepository(JarRepositoryManager.getLocalRepositoryPath())));
return session;
}
use of org.eclipse.aether.repository.LocalRepository in project storm by apache.
the class Booter method newRepositorySystemSession.
public static RepositorySystemSession newRepositorySystemSession(RepositorySystem system, String localRepoPath) {
DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
LocalRepository localRepo = new LocalRepository(new File(localRepoPath).getAbsolutePath());
session.setLocalRepositoryManager(system.newLocalRepositoryManager(session, localRepo));
return session;
}
use of org.eclipse.aether.repository.LocalRepository in project spring-boot by spring-projects.
the class SettingsXmlRepositorySystemSessionAutoConfiguration method apply.
@Override
public void apply(DefaultRepositorySystemSession session, RepositorySystem repositorySystem) {
MavenSettings settings = getSettings(session);
String localRepository = settings.getLocalRepository();
if (localRepository != null) {
session.setLocalRepositoryManager(repositorySystem.newLocalRepositoryManager(session, new LocalRepository(localRepository)));
}
}
Aggregations