当前位置: 首页>>代码示例>>Java>>正文


Java RepositorySystem.newLocalRepositoryManager方法代码示例

本文整理汇总了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;
}
 
开发者ID:CodeFX-org,项目名称:jdeps-wall-of-shame,代码行数:10,代码来源:MavenCentral.java

示例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);
    }
}
 
开发者ID:igor-suhorukov,项目名称:mvn-classloader,代码行数:13,代码来源:ClassLoaderBuilder.java

示例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;
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:15,代码来源:AetherConfigurer.java

示例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;
}
 
开发者ID:wildfly,项目名称:wildfly-build-tools,代码行数:12,代码来源:StandaloneAetherArtifactFileResolver.java

示例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;
}
 
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:10,代码来源:MavenPluginRepository.java


注:本文中的org.eclipse.aether.RepositorySystem.newLocalRepositoryManager方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。