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


Java DefaultRepositorySystemSession.setConfigProperty方法代码示例

本文整理汇总了Java中org.eclipse.aether.DefaultRepositorySystemSession.setConfigProperty方法的典型用法代码示例。如果您正苦于以下问题:Java DefaultRepositorySystemSession.setConfigProperty方法的具体用法?Java DefaultRepositorySystemSession.setConfigProperty怎么用?Java DefaultRepositorySystemSession.setConfigProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.aether.DefaultRepositorySystemSession的用法示例。


在下文中一共展示了DefaultRepositorySystemSession.setConfigProperty方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: newRepositorySystemSession

import org.eclipse.aether.DefaultRepositorySystemSession; //导入方法依赖的package包/类
private DefaultRepositorySystemSession newRepositorySystemSession(RepositorySystem system, String localRepoPath) {
	DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
	LocalRepository localRepo = new LocalRepository(localRepoPath);
	session.setLocalRepositoryManager(system.newLocalRepositoryManager(session, localRepo));
	session.setOffline(this.properties.isOffline());
	if (this.properties.getConnectTimeout() != null) {
		session.setConfigProperty(ConfigurationProperties.CONNECT_TIMEOUT, this.properties.getConnectTimeout());
	}
	if (this.properties.getRequestTimeout() != null) {
		session.setConfigProperty(ConfigurationProperties.REQUEST_TIMEOUT, this.properties.getRequestTimeout());
	}
	if (isProxyEnabled()) {
		DefaultProxySelector proxySelector = new DefaultProxySelector();
		Proxy proxy = new Proxy(this.properties.getProxy().getProtocol(),
				this.properties.getProxy().getHost(),
				this.properties.getProxy().getPort(),
				this.authentication);
		proxySelector.add(proxy, this.properties.getProxy().getNonProxyHosts());
		session.setProxySelector(proxySelector);
	}
	return session;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-deployer,代码行数:23,代码来源:MavenArtifactResolver.java

示例2: newRepositorySystemSession

import org.eclipse.aether.DefaultRepositorySystemSession; //导入方法依赖的package包/类
public static DefaultRepositorySystemSession newRepositorySystemSession ( final Path tempDir, final RepositorySystem system )
{
    final DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession ();

    final LocalRepository localRepo = new LocalRepository ( tempDir.toFile () );
    session.setLocalRepositoryManager ( system.newLocalRepositoryManager ( session, localRepo ) );

    session.setTransferListener ( new LoggerTransferListener () );
    session.setConfigProperty ( ConfigurationProperties.USER_AGENT, VersionInformation.USER_AGENT );

    return session;
}
 
开发者ID:ctron,项目名称:package-drone,代码行数:13,代码来源:Helper.java

示例3: repositorySystemSession

import org.eclipse.aether.DefaultRepositorySystemSession; //导入方法依赖的package包/类
@Bean
public RepositorySystemSession repositorySystemSession(RepositorySystem repositorySystem) {
    // see MavenRepositorySystemUtils.newSession()

    DependencySelector selector = new AndDependencySelector(
            new ScopeDependencySelector("test", "provided"),
            new DepthOneOptionalDependencySelector(),
            new ExclusionDependencySelector());

    DependencyGraphTransformer transformer = new ConflictResolver(
            new NearestVersionSelector(),
            new JavaScopeSelector(),
            new SimpleOptionalitySelector(),
            new JavaScopeDeriver());

    DefaultRepositorySystemSession session = new DefaultRepositorySystemSession();
    session.setLocalRepositoryManager(repositorySystem.newLocalRepositoryManager(session, localRepository()));
    session.setSystemProperties(System.getProperties());
    session.setConfigProperties(System.getProperties());
    session.setArtifactTypeRegistry(artifactTypeRegistry());
    session.setDependencyManager(new ClassicDependencyManager());
    session.setArtifactDescriptorPolicy(new SimpleArtifactDescriptorPolicy(true, true));
    session.setDependencySelector(selector);
    session.setDependencyGraphTransformer(transformer);
    session.setTransferListener(new LogTransferListener());
    session.setRepositoryListener(new LogRepositoryListener());

    if (!session.getConfigProperties().containsKey(ConfigurationProperties.REQUEST_TIMEOUT)) {
        session.setConfigProperty(ConfigurationProperties.REQUEST_TIMEOUT, 3 * 60 * 1000);
    }

    return session;
}
 
开发者ID:release-engineering,项目名称:redhat-repository-validator,代码行数:34,代码来源:AppConfig.java

示例4: disableHttpsCertificateCheck

import org.eclipse.aether.DefaultRepositorySystemSession; //导入方法依赖的package包/类
public void disableHttpsCertificateCheck(DefaultRepositorySystemSession session) {
	session.setConfigProperty("maven.wagon.http.ssl.insecure", "true");
	session.setConfigProperty("maven.wagon.http.ssl.allowall", "true");
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:5,代码来源:AetherConfigurer.java


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