本文整理匯總了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;
}