本文整理了Java中org.apache.maven.settings.Mirror.setId()
方法的一些代码示例,展示了Mirror.setId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mirror.setId()
方法的具体详情如下:
包路径:org.apache.maven.settings.Mirror
类名称:Mirror
方法名:setId
暂无
代码示例来源:origin: apache/maven
private Mirror getMirror( RepositorySystemSession session, ArtifactRepository repository )
{
if ( session != null )
{
org.eclipse.aether.repository.MirrorSelector selector = session.getMirrorSelector();
if ( selector != null )
{
RemoteRepository repo = selector.getMirror( RepositoryUtils.toRepo( repository ) );
if ( repo != null )
{
Mirror mirror = new Mirror();
mirror.setId( repo.getId() );
mirror.setUrl( repo.getUrl() );
mirror.setLayout( repo.getContentType() );
return mirror;
}
}
}
return null;
}
代码示例来源:origin: apache/maven
private Mirror getMirror( RepositorySystemSession session, ArtifactRepository repository )
{
if ( session != null )
{
org.eclipse.aether.repository.MirrorSelector selector = session.getMirrorSelector();
if ( selector != null )
{
RemoteRepository repo = selector.getMirror( RepositoryUtils.toRepo( repository ) );
if ( repo != null )
{
Mirror mirror = new Mirror();
mirror.setId( repo.getId() );
mirror.setUrl( repo.getUrl() );
mirror.setLayout( repo.getContentType() );
return mirror;
}
}
}
return null;
}
代码示例来源:origin: apache/maven
mirror.setId( interpolatedTrimmed( parser.nextText(), "id" ) );
代码示例来源:origin: ru.yandex.qatools.clay/clay-maven-settings-builder
/**
* Set the id field.
* @param id
*/
public FluentMirrorBuilder withId(String id) {
mirror.setId(id);
return this;
}
代码示例来源:origin: org.apache.maven/maven-settings
mirror.setId( interpolatedTrimmed( parser.nextText(), "id" ) );
代码示例来源:origin: org.eclipse.tycho/tycho-core
private Mirror createMirror(ArtifactRepository repo, Mirror toMirror) {
Mirror mirror = toMirror.clone();
String urlToReplace = toMirror.getMirrorOf();
String newUrl = StringUtils.replaceOnce(repo.getUrl(), urlToReplace, toMirror.getUrl());
mirror.setUrl(newUrl);
mirror.setId(toMirror.getId());
return mirror;
}
内容来源于网络,如有侵权,请联系作者删除!