本文整理了Java中org.apache.maven.settings.Mirror.getName()
方法的一些代码示例,展示了Mirror.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mirror.getName()
方法的具体详情如下:
包路径:org.apache.maven.settings.Mirror
类名称:Mirror
方法名:getName
[英]Get the optional name that describes the mirror.
[中]获取描述镜像的可选名称。
代码示例来源:origin: apache/maven
if ( mirror.getName() != null )
serializer.startTag( NAMESPACE, "name" ).text( mirror.getName() ).endTag( NAMESPACE, "name" );
代码示例来源:origin: org.apache.maven/maven-settings
if ( mirror.getName() != null )
serializer.startTag( NAMESPACE, "name" ).text( mirror.getName() ).endTag( NAMESPACE, "name" );
代码示例来源:origin: io.fabric8/fabric-maven
private MirrorSelector selectMirrors( Mirror mirror ) {
// configure mirror
DefaultMirrorSelector selector = new DefaultMirrorSelector();
for( Mirror m : m_settings.getMirrors() ) {
selector.add( m.getName(), m.getUrl(), null, false, m.getMirrorOf(), "*" );
}
if( mirror != null ) {
selector.add(mirror.getName(), mirror.getUrl(), null, false, mirror.getMirrorOf(), "*");
}
return selector;
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-maven-indexer
/**
* if the repository has a mirror, then create a repositoryinfo object for it..
*/
private RepositoryInfo getMirrorInfo(RepositoryInfo info, MirrorSelector selector, Settings settings) {
RemoteRepository original = new RemoteRepository(info.getId(), /* XXX do we even support any other layout?*/"default", info.getRepositoryUrl());
RemoteRepository mirror = selector.getMirror(original);
if (mirror != null) {
try {
String name = mirror.getId();
//#213078 need to lookup name for mirror
for (Mirror m : settings.getMirrors()) {
if (m.getId() != null && m.getId().equals(mirror.getId())) {
name = m.getName();
break;
}
}
RepositoryInfo toret = new RepositoryInfo(mirror.getId(), name, null, mirror.getUrl());
toret.setMirrorStrategy(RepositoryInfo.MirrorStrategy.NONE);
return toret;
} catch (URISyntaxException ex) {
Exceptions.printStackTrace(ex);
}
}
return null;
}
代码示例来源:origin: org.codehaus.mevenide/nb-mvn-embedder
/**
* Method updateMirror
*
* @param value
* @param element
* @param counter
* @param xmlTag
*/
protected void updateMirror(Mirror value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "mirrorOf", value.getMirrorOf(), null);
findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null);
findAndReplaceSimpleElement(innerCount, root, "url", value.getUrl(), null);
findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null);
} //-- void updateMirror(Mirror, String, Counter, Element)
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-maven-embedder
/**
* Method updateMirror.
*
* @param value
* @param element
* @param counter
* @param xmlTag
*/
protected void updateMirror(Mirror value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
findAndReplaceSimpleElement(innerCount, root, "mirrorOf", value.getMirrorOf(), null);
findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null);
findAndReplaceSimpleElement(innerCount, root, "url", value.getUrl(), null);
findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null);
} //-- void updateMirror(Mirror, String, Counter, Element)
内容来源于网络,如有侵权,请联系作者删除!