本文整理了Java中org.apache.maven.settings.Mirror.getMirrorOfLayouts()
方法的一些代码示例,展示了Mirror.getMirrorOfLayouts()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mirror.getMirrorOfLayouts()
方法的具体详情如下:
包路径:org.apache.maven.settings.Mirror
类名称:Mirror
方法名:getMirrorOfLayouts
[英]Get the layouts of repositories being mirrored. This value can be used to restrict the usage of the mirror to repositories with a matching layout (apart from a matching id). Since Maven 3.
[中]获取镜像存储库的布局。此值可用于将镜像的使用限制为具有匹配布局(除了匹配id)的存储库。从Maven 3开始。
代码示例来源:origin: apache/maven
static boolean matchesLayout( ArtifactRepository repository, Mirror mirror )
{
return matchesLayout( RepositoryUtils.getLayout( repository ), mirror.getMirrorOfLayouts() );
}
代码示例来源:origin: apache/maven
static boolean matchesLayout( ArtifactRepository repository, Mirror mirror )
{
return matchesLayout( RepositoryUtils.getLayout( repository ), mirror.getMirrorOfLayouts() );
}
代码示例来源:origin: apache/maven
if ( ( mirror.getMirrorOfLayouts() != null ) && !mirror.getMirrorOfLayouts().equals( "default,legacy" ) )
serializer.startTag( NAMESPACE, "mirrorOfLayouts" ).text( mirror.getMirrorOfLayouts() ).endTag( NAMESPACE, "mirrorOfLayouts" );
代码示例来源:origin: apache/maven
mirror.getMirrorOfLayouts() );
代码示例来源:origin: org.apache.maven/maven-settings
if ( ( mirror.getMirrorOfLayouts() != null ) && !mirror.getMirrorOfLayouts().equals( "default,legacy" ) )
serializer.startTag( NAMESPACE, "mirrorOfLayouts" ).text( mirror.getMirrorOfLayouts() ).endTag( NAMESPACE, "mirrorOfLayouts" );
代码示例来源:origin: apache/maven-archetype
static boolean matchesLayout( ArtifactRepository repository, Mirror mirror )
{
return matchesLayout( repository.getLayout().getId(), mirror.getMirrorOfLayouts() );
}
代码示例来源:origin: org.eclipse.tycho/tycho-core
private boolean isPrefixMirrorOf(ArtifactRepository repo, Mirror mirror) {
boolean isMirrorOfRepoUrl = repo.getUrl() != null && repo.getUrl().startsWith(mirror.getMirrorOf());
boolean matchesLayout = repo.getLayout() != null
&& repo.getLayout().getId().equals(mirror.getMirrorOfLayouts());
return isMirrorOfRepoUrl && matchesLayout;
}
代码示例来源:origin: io.fabric8/maven-util
/**
* Returns the default {@link MirrorSelector} as configured in the maven settings.xml
*
* @return
*/
public static MirrorSelector getMirrorSelector() {
DefaultMirrorSelector selector = new DefaultMirrorSelector();
Settings settings = getSettings();
for (org.apache.maven.settings.Mirror mirror : settings.getMirrors()) {
selector.add(String.valueOf(mirror.getId()), mirror.getUrl(), mirror.getLayout(), false,
mirror.getMirrorOf(), mirror.getMirrorOfLayouts());
}
return selector;
}
代码示例来源:origin: org.fusesource/maven-util
/**
* Returns the default {@link MirrorSelector} as configured in the maven settings.xml
*
* @return
*/
public static MirrorSelector getMirrorSelector() {
DefaultMirrorSelector selector = new DefaultMirrorSelector();
Settings settings = getSettings();
for (org.apache.maven.settings.Mirror mirror : settings.getMirrors()) {
selector.add(String.valueOf(mirror.getId()), mirror.getUrl(), mirror.getLayout(), false,
mirror.getMirrorOf(), mirror.getMirrorOfLayouts());
}
return selector;
}
代码示例来源:origin: org.springframework.boot/spring-boot-cli
private MirrorSelector createMirrorSelector(Settings settings) {
DefaultMirrorSelector selector = new DefaultMirrorSelector();
for (Mirror mirror : settings.getMirrors()) {
selector.add(mirror.getId(), mirror.getUrl(), mirror.getLayout(), false,
mirror.getMirrorOf(), mirror.getMirrorOfLayouts());
}
return selector;
}
代码示例来源:origin: spring-cloud/spring-cloud-function
private MirrorSelector createMirrorSelector(Settings settings) {
DefaultMirrorSelector selector = new DefaultMirrorSelector();
for (Mirror mirror : settings.getMirrors()) {
selector.add(mirror.getId(), mirror.getUrl(), mirror.getLayout(), false,
mirror.getMirrorOf(), mirror.getMirrorOfLayouts());
}
return selector;
}
代码示例来源:origin: org.springframework.boot.experimental/spring-boot-thin-launcher
private MirrorSelector createMirrorSelector(Settings settings) {
DefaultMirrorSelector selector = new DefaultMirrorSelector();
for (Mirror mirror : settings.getMirrors()) {
selector.add(mirror.getId(), mirror.getUrl(), mirror.getLayout(), false,
mirror.getMirrorOf(), mirror.getMirrorOfLayouts());
}
return selector;
}
代码示例来源:origin: org.jboss.forge.furnace/furnace-manager-resolver-maven
private DefaultMirrorSelector createMirrorSelector(Settings settings)
{
final DefaultMirrorSelector mirrorSelector = new DefaultMirrorSelector();
final List<Mirror> mirrors = settings.getMirrors();
if (mirrors != null)
{
for (Mirror mirror : mirrors)
{
mirrorSelector.add(mirror.getId(), mirror.getUrl(), mirror.getLayout(), false, mirror.getMirrorOf(),
mirror.getMirrorOfLayouts());
}
}
return mirrorSelector;
}
代码示例来源:origin: org.jboss.shrinkwrap.resolver/shrinkwrap-resolver-impl-maven
/**
* Gets mirror selector
*
* @return the selector
*/
public MirrorSelector mirrorSelector() {
DefaultMirrorSelector dms = new DefaultMirrorSelector();
// fill in mirrors
for (Mirror mirror : settings.getMirrors()) {
// Repository manager flag is set to false
// Maven does not support specifying it in the settings.xml
dms.add(mirror.getId(), mirror.getUrl(), mirror.getLayout(), false, mirror.getMirrorOf(),
mirror.getMirrorOfLayouts());
}
return dms;
}
代码示例来源:origin: shrinkwrap/resolver
/**
* Gets mirror selector
*
* @return the selector
*/
public MirrorSelector mirrorSelector() {
DefaultMirrorSelector dms = new DefaultMirrorSelector();
// fill in mirrors
for (Mirror mirror : settings.getMirrors()) {
// Repository manager flag is set to false
// Maven does not support specifying it in the settings.xml
dms.add(mirror.getId(), mirror.getUrl(), mirror.getLayout(), false, mirror.getMirrorOf(),
mirror.getMirrorOfLayouts());
}
return dms;
}
代码示例来源:origin: jcabi/jcabi-aether
/**
* Setup mirrors based on maven settings.
* @param settings Settings to use.
* @return Mirror selector.
*/
private DefaultMirrorSelector mirror(final Settings settings) {
final DefaultMirrorSelector selector =
new DefaultMirrorSelector();
final List<Mirror> mirrors = settings.getMirrors();
Logger.warn(
this,
"mirrors: %s",
mirrors
);
if (mirrors != null) {
for (final Mirror mirror : mirrors) {
selector.add(
mirror.getId(), mirror.getUrl(), mirror.getLayout(), false,
mirror.getMirrorOf(), mirror.getMirrorOfLayouts()
);
}
}
return selector;
}
代码示例来源:origin: com.atlassian.confluence.plugin/func-test
for (final Mirror m : settings.getMirrors())
mirrorSelector.add(m.getId(), m.getUrl(), m.getLayout(), false, m.getMirrorOf(), m.getMirrorOfLayouts());
代码示例来源:origin: com.atlassian.confluence/confluence-stateless-test-runner
for (final Mirror m : settings.getMirrors())
mirrorSelector.add(m.getId(), m.getUrl(), m.getLayout(), false, m.getMirrorOf(), m.getMirrorOfLayouts());
代码示例来源:origin: io.squark.yggdrasil/yggdrasil-maven-provider
DefaultMirrorSelector mirrorSelector = new DefaultMirrorSelector();
for (Mirror mirror : mavenSettings.getMirrors()) {mirrorSelector.add(mirror.getId(), mirror.getUrl(),
mirror.getLayout(), false, mirror.getMirrorOf(), mirror.getMirrorOfLayouts());
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-maven-embedder
Settings _settings = getSettings();
for (Mirror m : _settings.getMirrors()) {
mirrorSelector.add(m.getId(), m.getUrl(), m.getLayout(), false, m.getMirrorOf(), m.getMirrorOfLayouts());
内容来源于网络,如有侵权,请联系作者删除!