本文整理了Java中org.sonatype.nexus.proxy.repository.Repository.getPublishedMirrors
方法的一些代码示例,展示了Repository.getPublishedMirrors
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.getPublishedMirrors
方法的具体详情如下:
包路径:org.sonatype.nexus.proxy.repository.Repository
类名称:Repository
方法名:getPublishedMirrors
[英]Gets the published mirrors.
[中]获取已发布的镜像。
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-restlet1x-plugin
protected List<Mirror> getMirrors(Repository repository) {
return repository.getPublishedMirrors().getMirrors();
}
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-restlet1x-plugin
protected void setMirrors(Repository repository, List<Mirror> mirrors)
throws IOException
{
//populate ids if not set
for (Mirror mirror : mirrors) {
if (StringUtils.isEmpty(mirror.getId())) {
mirror.setId(mirror.getUrl());
}
}
repository.getPublishedMirrors().setMirrors(mirrors);
getNexusConfiguration().saveConfiguration();
}
}
代码示例来源:origin: org.sonatype.nexus/nexus-app
PublishedMirrors publishedMirrors = repository.getPublishedMirrors();
代码示例来源:origin: org.sonatype.nexus/nexus-rest-api
protected List<Mirror> getMirrors( Repository repository )
{
if ( repository.getRepositoryKind().isFacetAvailable( ProxyRepository.class ) )
{
return repository.adaptToFacet( ProxyRepository.class ).getDownloadMirrors().getMirrors();
}
else
{
return repository.getPublishedMirrors().getMirrors();
}
}
代码示例来源:origin: org.sonatype.nexus/nexus-rest-api
protected void setMirrors( Repository repository, List<Mirror> mirrors )
throws IOException
{
//populate ids if not set
for ( Mirror mirror : mirrors )
{
if ( StringUtils.isEmpty( mirror.getId() ) )
{
mirror.setId( mirror.getUrl() );
}
}
if ( repository.getRepositoryKind().isFacetAvailable( ProxyRepository.class ) )
{
repository.adaptToFacet( ProxyRepository.class ).getDownloadMirrors().setMirrors( mirrors );
getNexusConfiguration().saveConfiguration();
}
else
{
repository.getPublishedMirrors().setMirrors( mirrors );
getNexusConfiguration().saveConfiguration();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!