org.sonatype.nexus.proxy.repository.Repository.recreateAttributes()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(94)

本文整理了Java中org.sonatype.nexus.proxy.repository.Repository.recreateAttributes方法的一些代码示例,展示了Repository.recreateAttributes的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.recreateAttributes方法的具体详情如下:
包路径:org.sonatype.nexus.proxy.repository.Repository
类名称:Repository
方法名:recreateAttributes

Repository.recreateAttributes介绍

[英]Forces the recreation of attributes on this repository.
[中]强制在此存储库上重新创建属性。

代码示例

代码示例来源:origin: org.sonatype.nexus/nexus-app

@Deprecated
public void rebuildAttributesAllRepositories( ResourceStoreRequest req )
  throws IOException
{
  List<Repository> reposes = repositoryRegistry.getRepositories();
  for ( Repository repo : reposes )
  {
    repo.recreateAttributes( req, null );
  }
}

代码示例来源:origin: org.sonatype.nexus/nexus-app

@Override
public Object doRun()
  throws Exception
{
  ResourceStoreRequest req = new ResourceStoreRequest( getResourceStorePath() );
  Map<String, String> initialData = new HashMap<String, String>();
  if ( getRepositoryId() != null )
  {
    getRepositoryRegistry().getRepository( getRepositoryId() ).recreateAttributes( req, initialData );
  }
  else
  {
    List<Repository> reposes = getRepositoryRegistry().getRepositories();
    for ( Repository repo : reposes )
    {
      repo.recreateAttributes( req, null );
    }
  }
  return null;
}

代码示例来源:origin: org.sonatype.nexus/nexus-proxy

req.getRequestContext().put( RecreateAttributesWalker.LEGACY_ATTRIBUTES_ONLY,
  Boolean.TRUE );
repo.recreateAttributes( req, null );
markUpgradeDone( repo.getId() );
logger.info( "Upgrade of legacy attributes of repository {} done.",

相关文章

微信公众号

最新文章

更多