當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。