本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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");
}