本文整理了Java中org.apache.maven.model.Repository.getName
方法的一些代码示例,展示了Repository.getName
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.getName
方法的具体详情如下:
包路径:org.apache.maven.model.Repository
类名称:Repository
方法名:getName
暂无
代码示例来源:origin: apache/maven
if ( repository.getName() != null )
serializer.startTag( NAMESPACE, "name" ).text( repository.getName() ).endTag( NAMESPACE, "name" );
代码示例来源:origin: apache/maven
/**
* @param modelRepo
* @return a repository
*/
private static Repository convertToSettingsRepository( org.apache.maven.model.Repository modelRepo )
{
Repository repo = new Repository();
repo.setId( modelRepo.getId() );
repo.setLayout( modelRepo.getLayout() );
repo.setName( modelRepo.getName() );
repo.setUrl( modelRepo.getUrl() );
if ( modelRepo.getSnapshots() != null )
{
repo.setSnapshots( convertRepositoryPolicy( modelRepo.getSnapshots() ) );
}
if ( modelRepo.getReleases() != null )
{
repo.setReleases( convertRepositoryPolicy( modelRepo.getReleases() ) );
}
return repo;
}
代码示例来源:origin: takari/polyglot-maven
out.write("url -> \"" + repository.getUrl() + "\"");
if (repository.getName() != null) {
out.write(", name -> \"" + repository.getName() + "\"");
代码示例来源:origin: takari/polyglot-maven
private void printRepositories(String name,
Repository... repositories) {
for (Repository r: repositories) {
if ( r.getReleases() == null && r.getSnapshots() == null )
{
p.printWithOptions( name,
options( "id", r.getId(),
"name", r.getName(),
"url", r.getUrl() ) );
}
else
{
p.printStartBlock( name,
options( "id", r.getId(),
"name", r.getName(),
"url", r.getUrl() ) );
printRepositoryPolicy( "releases", r.getReleases() );
printRepositoryPolicy( "snapshots", r.getSnapshots() );
p.printEndBlock();
}
}
}
代码示例来源:origin: takari/polyglot-maven
if ( repository.getName() != null )
serializer.attribute( NAMESPACE, "name", repository.getName() );
代码示例来源:origin: org.jboss.forge/forge-javaee-impl
private void addPluginRepository(MetaModelProvider provider)
{
Repository repository = provider.getAptPluginRepository();
if (repository != null)
{
MavenPluginFacet pluginFacet = project.getFacet(MavenPluginFacet.class);
pluginFacet.addPluginRepository(repository.getName(), repository.getUrl());
}
}
代码示例来源:origin: org.guvnor/guvnor-project-backend
private org.guvnor.common.services.project.model.Repository fromPomModelToClientModel(final Repository from) {
org.guvnor.common.services.project.model.Repository to = new org.guvnor.common.services.project.model.Repository();
to.setId(from.getId());
to.setName(from.getName());
to.setUrl(from.getUrl());
return to;
}
}
代码示例来源:origin: org.kie.guvnor/guvnor-project-backend
private org.kie.guvnor.project.model.Repository fromPomModelToClientModel(Repository from) {
org.kie.guvnor.project.model.Repository to = new org.kie.guvnor.project.model.Repository();
to.setId(from.getId());
to.setName(from.getName());
to.setUrl(from.getUrl());
return to;
}
代码示例来源:origin: org.uberfire/uberfire-project-backend
private MavenRepository fromPomModelToClientModel(final Repository from) {
MavenRepository to = new MavenRepository();
to.setId(from.getId());
to.setName(from.getName());
to.setUrl(from.getUrl());
return to;
}
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-project-backend
private org.kie.workbench.common.services.project.service.model.Repository fromPomModelToClientModel(Repository from) {
org.kie.workbench.common.services.project.service.model.Repository to = new org.kie.workbench.common.services.project.service.model.Repository();
to.setId(from.getId());
to.setName(from.getName());
to.setUrl(from.getUrl());
return to;
}
代码示例来源:origin: kiegroup/appformer
private MavenRepository fromPomModelToClientModel(final Repository from) {
MavenRepository to = new MavenRepository();
to.setId(from.getId());
to.setName(from.getName());
to.setUrl(from.getUrl());
return to;
}
代码示例来源:origin: io.tesla.polyglot/tesla-polyglot-ruby
private void printRepositories(String name,
Repository... repositories) {
for (Repository r: repositories) {
if ( r.getReleases() == null && r.getSnapshots() == null )
{
p.printWithOptions( name,
options( "id", r.getId(),
"name", r.getName(),
"url", r.getUrl() ) );
}
else
{
p.printStartBlock( name,
options( "id", r.getId(),
"name", r.getName(),
"url", r.getUrl() ) );
printRepositoryPolicy( "releases", r.getReleases() );
printRepositoryPolicy( "snapshots", r.getSnapshots() );
p.printEndBlock();
}
}
}
代码示例来源:origin: io.takari.polyglot/polyglot-ruby
private void printRepositories(String name,
Repository... repositories) {
for (Repository r: repositories) {
if ( r.getReleases() == null && r.getSnapshots() == null )
{
p.printWithOptions( name,
options( "id", r.getId(),
"name", r.getName(),
"url", r.getUrl() ) );
}
else
{
p.printStartBlock( name,
options( "id", r.getId(),
"name", r.getName(),
"url", r.getUrl() ) );
printRepositoryPolicy( "releases", r.getReleases() );
printRepositoryPolicy( "snapshots", r.getSnapshots() );
p.printEndBlock();
}
}
}
代码示例来源:origin: org.apache.maven.plugins/maven-shade-plugin
/**
* Method updateRepository
*
* @param value
* @param element
* @param counter
* @param xmlTag
*/
protected void updateRepository( Repository value, String xmlTag, Counter counter, Element element )
{
Element root = element;
Counter innerCount = new Counter( counter.getDepth() + 1 );
updateRepositoryPolicy( value.getReleases(), "releases", innerCount, root );
updateRepositoryPolicy( value.getSnapshots(), "snapshots", innerCount, root );
findAndReplaceSimpleElement( innerCount, root, "id", value.getId(), null );
findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null );
findAndReplaceSimpleElement( innerCount, root, "url", value.getUrl(), null );
findAndReplaceSimpleElement( innerCount, root, "layout", value.getLayout(), "default" );
} // -- void updateRepository(Repository, String, Counter, Element)
代码示例来源:origin: org.jboss.forge.addon/maven-impl
/**
* Method updateRepository.
*
* @param value
* @param element
* @param counter
* @param xmlTag
*/
protected void updateRepository(Repository value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
updateRepositoryPolicy(value.getReleases(), "releases", innerCount, root);
updateRepositoryPolicy(value.getSnapshots(), "snapshots", innerCount, root);
findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null);
findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null);
findAndReplaceSimpleElement(innerCount, root, "url", value.getUrl(), null);
findAndReplaceSimpleElement(innerCount, root, "layout", value.getLayout(), "default");
} // -- void updateRepository(Repository, String, Counter, Element)
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-maven-embedder
/**
* Method updateRepository.
*
* @param value
* @param element
* @param counter
* @param xmlTag
*/
protected void updateRepository(Repository value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
updateRepositoryPolicy( value.getReleases(), "releases", innerCount, root);
updateRepositoryPolicy( value.getSnapshots(), "snapshots", innerCount, root);
findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null);
findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null);
findAndReplaceSimpleElement(innerCount, root, "url", value.getUrl(), null);
findAndReplaceSimpleElement(innerCount, root, "layout", value.getLayout(), "default");
} //-- void updateRepository(Repository, String, Counter, Element)
代码示例来源:origin: org.codehaus.mevenide/nb-mvn-embedder
/**
* Method updateRepository
*
* @param value
* @param element
* @param counter
* @param xmlTag
*/
protected void updateRepository(Repository value, String xmlTag, Counter counter, Element element)
{
Element root = element;
Counter innerCount = new Counter(counter.getDepth() + 1);
updateRepositoryPolicy( value.getReleases(), "releases", innerCount, root);
updateRepositoryPolicy( value.getSnapshots(), "snapshots", innerCount, root);
findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null);
findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null);
findAndReplaceSimpleElement(innerCount, root, "url", value.getUrl(), null);
findAndReplaceSimpleElement(innerCount, root, "layout", value.getLayout(), "default");
} //-- void updateRepository(Repository, String, Counter, Element)
代码示例来源:origin: org.apache.felix/maven-bundle-plugin
/**
* Method updateRepository
*
* @param value
* @param element
* @param counter
* @param xmlTag
*/
protected void updateRepository( Repository value, String xmlTag, Counter counter, Element element )
{
Element root = element;
Counter innerCount = new Counter( counter.getDepth() + 1 );
updateRepositoryPolicy( value.getReleases(), "releases", innerCount, root );
updateRepositoryPolicy( value.getSnapshots(), "snapshots", innerCount, root );
findAndReplaceSimpleElement( innerCount, root, "id", value.getId(), null );
findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null );
findAndReplaceSimpleElement( innerCount, root, "url", value.getUrl(), null );
findAndReplaceSimpleElement( innerCount, root, "layout", value.getLayout(), "default" );
} // -- void updateRepository(Repository, String, Counter, Element)
代码示例来源:origin: apache/maven-archetype
/**
* Method updateRepository.
*
* @param value
* @param element
* @param counter
* @param xmlTag
*/
protected void updateRepository( Repository value, String xmlTag, Counter counter, Element element )
{
Element root = element;
Counter innerCount = new Counter( counter.getDepth() + 1 );
updateRepositoryPolicy( value.getReleases(), "releases", innerCount, root );
updateRepositoryPolicy( value.getSnapshots(), "snapshots", innerCount, root );
findAndReplaceSimpleElement( innerCount, root, "id", value.getId(), null );
findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null );
findAndReplaceSimpleElement( innerCount, root, "url", value.getUrl(), null );
findAndReplaceSimpleElement( innerCount, root, "layout", value.getLayout(), "default" );
} // -- void updateRepository(Repository, String, Counter, Element)
代码示例来源:origin: org.sonatype.maven.archetype/archetype-common
/**
* Method updateRepository.
*
* @param value
* @param element
* @param counter
* @param xmlTag
*/
protected void updateRepository(
Repository value,
String xmlTag,
Counter counter,
Element element
)
{
Element root = element;
Counter innerCount = new Counter( counter.getDepth() + 1 );
updateRepositoryPolicy( value.getReleases(), "releases", innerCount, root );
updateRepositoryPolicy( value.getSnapshots(), "snapshots", innerCount, root );
findAndReplaceSimpleElement( innerCount, root, "id", value.getId(), null );
findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null );
findAndReplaceSimpleElement( innerCount, root, "url", value.getUrl(), null );
findAndReplaceSimpleElement( innerCount, root, "layout", value.getLayout(), "default" );
} // -- void updateRepository(Repository, String, Counter, Element)
内容来源于网络,如有侵权,请联系作者删除!