本文整理汇总了Java中org.eclipse.aether.RepositorySystem.newLocalRepositoryManager方法的典型用法代码示例。如果您正苦于以下问题:Java RepositorySystem.newLocalRepositoryManager方法的具体用法?Java RepositorySystem.newLocalRepositoryManager怎么用?Java RepositorySystem.newLocalRepositoryManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.aether.RepositorySystem
的用法示例。
在下文中一共展示了RepositorySystem.newLocalRepositoryManager方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: apply
import org.eclipse.aether.RepositorySystem; //导入方法依赖的package包/类
@Override
public void apply(DefaultRepositorySystemSession session,
RepositorySystem repositorySystem) {
if (session.getLocalRepositoryManager() == null) {
LocalRepository localRepository = new LocalRepository(getM2RepoDirectory());
LocalRepositoryManager localRepositoryManager = repositorySystem
.newLocalRepositoryManager(session, localRepository);
session.setLocalRepositoryManager(localRepositoryManager);
}
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);
}
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:20,代码来源:DefaultRepositorySystemSessionAutoConfiguration.java
示例2: configureLocalRepository
import org.eclipse.aether.RepositorySystem; //导入方法依赖的package包/类
private void configureLocalRepository(DefaultRepositorySystemSession session,
RepositorySystem repositorySystem, String grapeRoot) {
File repositoryDir = new File(grapeRoot, "repository");
LocalRepository localRepository = new LocalRepository(repositoryDir);
LocalRepositoryManager localRepositoryManager = repositorySystem
.newLocalRepositoryManager(session, localRepository);
session.setLocalRepositoryManager(localRepositoryManager);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:GrapeRootRepositorySystemSessionAutoConfiguration.java
示例3: newSession
import org.eclipse.aether.RepositorySystem; //导入方法依赖的package包/类
private static RepositorySystemSession newSession(RepositorySystem system, String localRepositoryPath) {
DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
LocalRepository localRepo = new LocalRepository(localRepositoryPath);
LocalRepositoryManager localRepoManager = system.newLocalRepositoryManager(session, localRepo);
session.setLocalRepositoryManager(localRepoManager);
return session;
}
示例4: applySettings
import org.eclipse.aether.RepositorySystem; //导入方法依赖的package包/类
protected void applySettings(RepositorySystem system, DefaultRepositorySystemSession session) {
if(!Boolean.getBoolean("skipMavenSettings")){
SettingsXmlRepositorySystemSessionAutoConfiguration autoConfiguration =
new SettingsXmlRepositorySystemSessionAutoConfiguration();
autoConfiguration.apply(session, system);
}
if (session.getLocalRepositoryManager() == null) {
LocalRepository localRepository = new LocalRepository(Settings.localRepoPath());
LocalRepositoryManager localRepositoryManager = system.newLocalRepositoryManager(session, localRepository);
session.setLocalRepositoryManager(localRepositoryManager);
}
}
示例5: newSession
import org.eclipse.aether.RepositorySystem; //导入方法依赖的package包/类
public RepositorySystemSession newSession(RepositorySystem system, LocalRepository localRepository) {
DefaultRepositorySystemSession session;
session = MavenRepositorySystemUtils.newSession();
final LocalRepositoryManager localRepositoryManager = system.newLocalRepositoryManager(session,localRepository);
session.setLocalRepositoryManager(localRepositoryManager);
session.setTransferListener(new ConsoleTransferListener(System.out));
session.setRepositoryListener(new ConsoleRepositoryListener(System.out));
disableLocalCaching(session);
disableArtifactNotFoundCache(session);
disableHttpsCertificateCheck(session);
session.setProxySelector(proxyManager.selectProxies());
session.setReadOnly();
return session;
}
示例6: newRepositorySystemSession
import org.eclipse.aether.RepositorySystem; //导入方法依赖的package包/类
/**
* Retrieves a new instance of a standalone {@link org.eclipse.aether.RepositorySystemSession}, which {@link org.eclipse.aether.repository.LocalRepositoryManager} points to 'target/local-repository' dir.
* @param system
* @return
*/
private static RepositorySystemSession newRepositorySystemSession(RepositorySystem system, File localRepositoryBaseDir) {
final DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
final LocalRepositoryManager localRepositoryManager = system.newLocalRepositoryManager(session, new LocalRepository(localRepositoryBaseDir));
session.setLocalRepositoryManager(localRepositoryManager);
return session;
}
示例7: newRepositorySystemSession
import org.eclipse.aether.RepositorySystem; //导入方法依赖的package包/类
private DefaultRepositorySystemSession newRepositorySystemSession(RepositorySystem system, Path localRepoFile) {
DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
LocalRepository localRepo = new LocalRepository(localRepoFile.toFile());
LocalRepositoryManager manager = system.newLocalRepositoryManager(session, localRepo);
session.setLocalRepositoryManager(manager);
return session;
}