本文整理了Java中org.apache.maven.model.Model.getContributors()
方法的一些代码示例,展示了Model.getContributors()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.getContributors()
方法的具体详情如下:
包路径:org.apache.maven.model.Model
类名称:Model
方法名:getContributors
[英]Method getContributors.
[中]方法getContributors。
代码示例来源:origin: apache/maven
/**
* Method removeContributor.
*
* @param contributor
*/
public void removeContributor( Contributor contributor )
{
getContributors().remove( contributor );
} //-- void removeContributor( Contributor )
代码示例来源:origin: apache/maven
/**
* Method addContributor.
*
* @param contributor
*/
public void addContributor( Contributor contributor )
{
getContributors().add( contributor );
} //-- void addContributor( Contributor )
代码示例来源:origin: apache/maven
@Override
protected void mergeModel_Contributors( Model target, Model source, boolean sourceDominant,
Map<Object, Object> context )
{
if ( target.getContributors().isEmpty() )
{
target.setContributors( new ArrayList<>( source.getContributors() ) );
}
}
代码示例来源:origin: org.apache.maven/maven-project
public List getContributors()
{
return getModel().getContributors();
}
代码示例来源:origin: apache/maven
public List<Contributor> getContributors()
{
return getModel().getContributors();
}
代码示例来源:origin: apache/maven
protected void mergeModel_Contributors( Model target, Model source, boolean sourceDominant,
Map<Object, Object> context )
{
List<Contributor> src = source.getContributors();
if ( !src.isEmpty() )
{
List<Contributor> tgt = target.getContributors();
Map<Object, Contributor> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 );
for ( Contributor element : tgt )
{
Object key = getContributorKey( element );
merged.put( key, element );
}
for ( Contributor element : src )
{
Object key = getContributorKey( element );
if ( sourceDominant || !merged.containsKey( key ) )
{
merged.put( key, element );
}
}
target.setContributors( new ArrayList<>( merged.values() ) );
}
}
代码示例来源:origin: apache/maven
if ( ( model.getContributors() != null ) && ( model.getContributors().size() > 0 ) )
for ( Iterator iter = model.getContributors().iterator(); iter.hasNext(); )
代码示例来源:origin: apache/maven
if ( child.getContributors().size() == 0 )
child.setContributors( parent.getContributors() );
代码示例来源:origin: org.apache.maven/maven-project
if ( child.getContributors().size() == 0 )
child.setContributors( parent.getContributors() );
代码示例来源:origin: org.apache.maven/maven-project
result.setCiManagement( cloneCiManagement( src.getCiManagement() ) );
result.setContributors( cloneList( src.getContributors(), CONTRIBUTOR_CLONER ) );
代码示例来源:origin: com.buschmais.jqassistant.plugin/jqassistant.plugin.m2repo
@Override
public List<Contributor> getContributors() {
return delegate.getContributors();
}
代码示例来源:origin: mojohaus/flatten-maven-plugin
@Override
public List<Contributor> get( Model model )
{
return model.getContributors();
}
代码示例来源:origin: io.tesla.maven/maven-model
/**
* Method addContributor.
*
* @param contributor
*/
public void addContributor( Contributor contributor )
{
getContributors().add( contributor );
} //-- void addContributor( Contributor )
代码示例来源:origin: io.tesla.maven/maven-model
/**
* Method removeContributor.
*
* @param contributor
*/
public void removeContributor( Contributor contributor )
{
getContributors().remove( contributor );
} //-- void removeContributor( Contributor )
代码示例来源:origin: org.apache.maven/maven-model-builder
@Override
protected void mergeModel_Contributors( Model target, Model source, boolean sourceDominant,
Map<Object, Object> context )
{
if ( target.getContributors().isEmpty() )
{
target.setContributors( new ArrayList<>( source.getContributors() ) );
}
}
代码示例来源:origin: maven/maven-model
/**
* Method addContributor
*
* @param contributor
*/
public void addContributor(Contributor contributor)
{
if ( !(contributor instanceof Contributor) )
{
throw new ClassCastException( "Model.addContributors(contributor) parameter must be instanceof " + Contributor.class.getName() );
}
getContributors().add( contributor );
} //-- void addContributor(Contributor)
代码示例来源:origin: maven/maven-model
/**
* Method removeContributor
*
* @param contributor
*/
public void removeContributor(Contributor contributor)
{
if ( !(contributor instanceof Contributor) )
{
throw new ClassCastException( "Model.removeContributors(contributor) parameter must be instanceof " + Contributor.class.getName() );
}
getContributors().remove( contributor );
} //-- void removeContributor(Contributor)
代码示例来源:origin: takari/polyglot-maven
if ( ( model.getContributors() != null ) && ( model.getContributors().size() > 0 ) )
for ( Iterator iter = model.getContributors().iterator(); iter.hasNext(); )
代码示例来源:origin: com.buschmais.jqassistant.plugin/jqassistant.plugin.maven3
private void addContributors(MavenPomDescriptor pomDescriptor, Model model, Store store) {
List<Contributor> contributors = model.getContributors();
for (Contributor contributor : contributors) {
MavenContributorDescriptor contributorDescriptor = store.create(MavenContributorDescriptor.class);
addCommonParticipantAttributes(contributorDescriptor, contributor, store);
pomDescriptor.getContributors().add(contributorDescriptor);
}
}
代码示例来源:origin: org.apache.maven.plugins/maven-project-info-reports-plugin
@Override
public boolean canGenerateReport()
{
boolean result = super.canGenerateReport();
if ( result && skipEmptyReport )
{
result = !isEmpty( getProject().getModel().getDevelopers() )
|| !isEmpty( getProject().getModel().getContributors() );
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!