• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java LocalRepositoryManagerFactory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.aether.spi.localrepo.LocalRepositoryManagerFactory的典型用法代码示例。如果您正苦于以下问题:Java LocalRepositoryManagerFactory类的具体用法?Java LocalRepositoryManagerFactory怎么用?Java LocalRepositoryManagerFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LocalRepositoryManagerFactory类属于org.eclipse.aether.spi.localrepo包,在下文中一共展示了LocalRepositoryManagerFactory类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: lookupDelegate

import org.eclipse.aether.spi.localrepo.LocalRepositoryManagerFactory; //导入依赖的package包/类
/**
 * Looks up the {@link LocalRepositoryManagerFactory} specified in {@link #preferedDelegateFactoryName}.
 *
 * @return the delegate factory
 * @throws IllegalStateException
 *             if the {@link #preferedDelegateFactoryName} was not found in the list of available
 *             {@link LocalRepositoryManagerFactory} implementations.
 */
private LocalRepositoryManagerFactory lookupDelegate() {
    Map<String, LocalRepositoryManagerFactory> factoryImpls = factories.get();
    log.debug("SrcdepsRepositoryManagerFactory got {} LocalRepositoryManagerFactory instances",
            factoryImpls.size());

    for (Entry<String, LocalRepositoryManagerFactory> en : factoryImpls.entrySet()) {
        LocalRepositoryManagerFactory factory = en.getValue();

        log.debug("SrcdepsRepositoryManagerFactory iterating over LocalRepositoryManagerFactory {}: {}",
                en.getKey(), factory.getClass().getName());

        String factoryClassName = factory.getClass().getName();
        if (factoryClassName.equals(preferedDelegateFactoryName)) {
            log.info("SrcdepsLocalRepositoryManager will decorate {}", factoryClassName);
            return factory;
        }
    }

    throw new IllegalStateException(String.format(
            "Could not find [%s] in the list of available LocalRepositoryManagerFactory implementations",
            preferedDelegateFactoryName));

}
 
开发者ID:srcdeps,项目名称:srcdeps-maven,代码行数:32,代码来源:SrcdepsRepositoryManagerFactory.java


示例2: AetherResolver

import org.eclipse.aether.spi.localrepo.LocalRepositoryManagerFactory; //导入依赖的package包/类
public AetherResolver() {
  localMavenRepo = System.getProperty(LOCAL_REPO_SYS_PROP, DEFAULT_MAVEN_LOCAL);
  String remoteString = System.getProperty(REMOTE_REPOS_SYS_PROP, DEFAULT_MAVEN_REMOTES);
  // They are space delimited (space is illegal char in urls)
  remoteMavenRepos = Arrays.asList(remoteString.split(" "));
  httpProxy = System.getProperty(HTTP_PROXY_SYS_PROP);
  httpsProxy = System.getProperty(HTTPS_PROXY_SYS_PROP);

  DefaultServiceLocator locator = MavenRepositorySystemUtils.newServiceLocator();
  locator.addService(RepositoryConnectorFactory.class, AetherRepositoryConnectorFactory.class);
  locator.addService(LocalRepositoryManagerFactory.class, TakariLocalRepositoryManagerFactory.class);
  locator.setErrorHandler(new DefaultServiceLocator.ErrorHandler()
  {
    @Override
    public void serviceCreationFailed(Class<?> type, Class<?> impl, Throwable exception) {
      exception.printStackTrace();
    }
  });
  this.repositorySystem = locator.getService(RepositorySystem.class);
}
 
开发者ID:cstamas,项目名称:vertx-sisu,代码行数:21,代码来源:AetherResolver.java


示例3: newSession

import org.eclipse.aether.spi.localrepo.LocalRepositoryManagerFactory; //导入依赖的package包/类
private MavenSession newSession(MavenProject project, File localrepo, Properties properties) throws Exception {
  MavenExecutionRequest request = new DefaultMavenExecutionRequest();
  MavenExecutionResult result = new DefaultMavenExecutionResult();
  DefaultRepositorySystemSession repoSession = MavenRepositorySystemUtils.newSession();
  LocalRepository localRepo = new LocalRepository(localrepo);
  repoSession.setLocalRepositoryManager(mojos.getContainer().lookup(LocalRepositoryManagerFactory.class, "simple").newInstance(repoSession, localRepo));
  MavenSession session = new MavenSession(mojos.getContainer(), repoSession, request, result);
  List<MavenProject> projects = new ArrayList<>();
  projects.add(project);
  for (String module : project.getModules()) {
    MavenProject moduleProject = readMavenProject(new File(project.getBasedir(), module), properties);
    moduleProject.setParent(project);
    projects.add(moduleProject);
  }

  session.setProjects(projects);
  return session;
}
 
开发者ID:takari,项目名称:takari-lifecycle,代码行数:19,代码来源:InstallDeployTest.java


示例4: configure

import org.eclipse.aether.spi.localrepo.LocalRepositoryManagerFactory; //导入依赖的package包/类
@Override
    public void configure(Binder binder) {
        binder.bind(PluginDependenciesResolver.class).to(NbPluginDependenciesResolver.class);
        binder.bind(Roles.componentKey(RepositoryConnectorFactory.class, "offline")).to(OfflineConnector.class);
        //#212214 the EnhancedLocalRepositoryManager will claim artifact is not locally present even if file is there but some metadata is missing
        //we just replace it with the simple variant that relies on file's presence only. 
        //I'm a bit afraid to remove the binding altogether, that's why we map simple to enhanced.
        binder.bind(Roles.componentKey(LocalRepositoryManagerFactory.class, "enhanced")).to(SimpleLocalRepositoryManagerFactory.class);
        
        //exxperimental only.
//        binder.bind(InheritanceAssembler.class).to(NbInheritanceAssembler.class);
        binder.bind(ModelBuilder.class).to(NBModelBuilder.class);
    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:ExtensionModule.java


示例5: newInstance

import org.eclipse.aether.spi.localrepo.LocalRepositoryManagerFactory; //导入依赖的package包/类
/**
 * Looks up the delegate using {@link #lookupDelegate()}, calls
 * {@link SrcdepsRepositoryManagerFactory#newInstance(RepositorySystemSession, LocalRepository)} on the delegate
 * producing a delegate {@link LocalRepositoryManager} that is passed to
 * {@link SrcdepsLocalRepositoryManager#SrcdepsLocalRepositoryManager(LocalRepositoryManager, Provider, BuildService)}.
 * The new {@link SrcdepsLocalRepositoryManager} instance is then returned.
 *
 * @see org.eclipse.aether.spi.localrepo.LocalRepositoryManagerFactory#newInstance(org.eclipse.aether.RepositorySystemSession,
 *      org.eclipse.aether.repository.LocalRepository)
 */
@Override
public LocalRepositoryManager newInstance(RepositorySystemSession session, LocalRepository repository)
        throws NoLocalRepositoryManagerException {
    LocalRepositoryManagerFactory delegate = lookupDelegate();

    log.debug("Creating a new SrcdepsLocalRepositoryManager");
    return new SrcdepsLocalRepositoryManager(delegate.newInstance(session, repository), buildService, pathLocker, configurationProducer);
}
 
开发者ID:srcdeps,项目名称:srcdeps-maven,代码行数:19,代码来源:SrcdepsRepositoryManagerFactory.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java BiMap类代码示例发布时间:2022-05-22
下一篇:
Java ShadowBitmap类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap