本文整理了Java中org.apache.maven.settings.Mirror.getLayout()
方法的一些代码示例,展示了Mirror.getLayout()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mirror.getLayout()
方法的具体详情如下:
包路径:org.apache.maven.settings.Mirror
类名称:Mirror
方法名:getLayout
[英]Get the layout of the mirror repository. Since Maven 3.
[中]获取镜像存储库的布局。从Maven 3开始。
代码示例来源:origin: apache/maven
private void injectMirror( ArtifactRepository repository, Mirror mirror )
{
if ( mirror != null )
{
ArtifactRepository original =
createArtifactRepository( repository.getId(), repository.getUrl(), repository.getLayout(),
repository.getSnapshots(), repository.getReleases() );
repository.setMirroredRepositories( Collections.singletonList( original ) );
repository.setId( mirror.getId() );
repository.setUrl( mirror.getUrl() );
if ( StringUtils.isNotEmpty( mirror.getLayout() ) )
{
repository.setLayout( getLayout( mirror.getLayout() ) );
}
}
}
代码示例来源:origin: apache/maven
private void injectMirror( ArtifactRepository repository, Mirror mirror )
{
if ( mirror != null )
{
ArtifactRepository original =
createArtifactRepository( repository.getId(), repository.getUrl(), repository.getLayout(),
repository.getSnapshots(), repository.getReleases() );
repository.setMirroredRepositories( Collections.singletonList( original ) );
repository.setId( mirror.getId() );
repository.setUrl( mirror.getUrl() );
if ( StringUtils.isNotEmpty( mirror.getLayout() ) )
{
repository.setLayout( getLayout( mirror.getLayout() ) );
}
}
}
代码示例来源:origin: apache/maven
if ( ( mirror.getLayout() != null ) && !mirror.getLayout().equals( "default" ) )
serializer.startTag( NAMESPACE, "layout" ).text( mirror.getLayout() ).endTag( NAMESPACE, "layout" );
代码示例来源:origin: apache/maven
for ( Mirror mirror : request.getMirrors() )
mirrorSelector.add( mirror.getId(), mirror.getUrl(), mirror.getLayout(), false, mirror.getMirrorOf(),
mirror.getMirrorOfLayouts() );
代码示例来源:origin: org.apache.maven/maven-settings
if ( ( mirror.getLayout() != null ) && !mirror.getLayout().equals( "default" ) )
serializer.startTag( NAMESPACE, "layout" ).text( mirror.getLayout() ).endTag( NAMESPACE, "layout" );
代码示例来源: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: 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/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: org.uberfire/uberfire-maven-integration
public RemoteRepository resolveMirroredRepo( RemoteRepository repo ) {
for ( Mirror mirror : settings.getMirrors() ) {
if ( isMirror( repo, mirror.getMirrorOf() ) ) {
return toRemoteRepositoryBuilder( settings,
mirror.getId(),
mirror.getLayout(),
mirror.getUrl() ).build();
}
}
return repo;
}
代码示例来源: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.kie.soup/kie-soup-maven-integration
public RemoteRepository resolveMirroredRepo( RemoteRepository repo ) {
for ( Mirror mirror : settings.getMirrors() ) {
if ( isMirror( repo, mirror.getMirrorOf() ) ) {
return toRemoteRepositoryBuilder( settings,
mirror.getId(),
mirror.getLayout(),
mirror.getUrl() ).build();
}
}
return repo;
}
代码示例来源: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());
内容来源于网络,如有侵权,请联系作者删除!