org.apache.maven.model.Model.getMailingLists()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(83)

本文整理了Java中org.apache.maven.model.Model.getMailingLists()方法的一些代码示例,展示了Model.getMailingLists()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.getMailingLists()方法的具体详情如下:
包路径:org.apache.maven.model.Model
类名称:Model
方法名:getMailingLists

Model.getMailingLists介绍

[英]Method getMailingLists.
[中]方法getMailingList。

代码示例

代码示例来源:origin: apache/maven

/**
 * Method addMailingList.
 * 
 * @param mailingList
 */
public void addMailingList( MailingList mailingList )
{
  getMailingLists().add( mailingList );
} //-- void addMailingList( MailingList )

代码示例来源:origin: apache/maven

/**
 * Method removeMailingList.
 * 
 * @param mailingList
 */
public void removeMailingList( MailingList mailingList )
{
  getMailingLists().remove( mailingList );
} //-- void removeMailingList( MailingList )

代码示例来源:origin: apache/maven

@Override
protected void mergeModel_MailingLists( Model target, Model source, boolean sourceDominant,
                    Map<Object, Object> context )
{
  if ( target.getMailingLists().isEmpty() )
  {
    target.setMailingLists( new ArrayList<>( source.getMailingLists() ) );
  }
}

代码示例来源:origin: org.apache.maven/maven-project

public List getMailingLists()
{
  return getModel().getMailingLists();
}

代码示例来源:origin: apache/maven

public List<MailingList> getMailingLists()
{
  return getModel().getMailingLists();
}

代码示例来源:origin: apache/maven

protected void mergeModel_MailingLists( Model target, Model source, boolean sourceDominant,
                    Map<Object, Object> context )
{
  List<MailingList> src = source.getMailingLists();
  if ( !src.isEmpty() )
  {
    List<MailingList> tgt = target.getMailingLists();
    Map<Object, MailingList> merged = new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 );
    for ( MailingList element : tgt )
    {
      Object key = getMailingListKey( element );
      merged.put( key, element );
    }
    for ( MailingList element : src )
    {
      Object key = getMailingListKey( element );
      if ( sourceDominant || !merged.containsKey( key ) )
      {
        merged.put( key, element );
      }
    }
    target.setMailingLists( new ArrayList<>( merged.values() ) );
  }
}

代码示例来源:origin: apache/maven

if ( ( model.getMailingLists() != null ) && ( model.getMailingLists().size() > 0 ) )
  for ( Iterator iter = model.getMailingLists().iterator(); iter.hasNext(); )

代码示例来源:origin: apache/maven

if ( child.getMailingLists().size() == 0 )
  child.setMailingLists( parent.getMailingLists() );

代码示例来源:origin: org.apache.maven/maven-project

if ( child.getMailingLists().size() == 0 )
  child.setMailingLists( parent.getMailingLists() );

代码示例来源:origin: org.apache.maven/maven-project

result.setLicenses( cloneList( src.getLicenses(), LICENSE_CLONER ) );
result.setMailingLists( cloneList( src.getMailingLists(), MAILING_LIST_CLONER ) );
result.setModelVersion( src.getModelVersion() );
result.setName( src.getName() );

代码示例来源:origin: mojohaus/flatten-maven-plugin

@Override
public List<MailingList> get( Model model )
{
  return model.getMailingLists();
}

代码示例来源:origin: com.buschmais.jqassistant.plugin/jqassistant.plugin.m2repo

@Override
public List<MailingList> getMailingLists() {
  return delegate.getMailingLists();
}

代码示例来源:origin: io.tesla.maven/maven-model

/**
 * Method addMailingList.
 * 
 * @param mailingList
 */
public void addMailingList( MailingList mailingList )
{
  getMailingLists().add( mailingList );
} //-- void addMailingList( MailingList )

代码示例来源:origin: io.tesla.maven/maven-model

/**
 * Method removeMailingList.
 * 
 * @param mailingList
 */
public void removeMailingList( MailingList mailingList )
{
  getMailingLists().remove( mailingList );
} //-- void removeMailingList( MailingList )

代码示例来源:origin: org.apache.maven/maven-model-builder

@Override
protected void mergeModel_MailingLists( Model target, Model source, boolean sourceDominant,
                    Map<Object, Object> context )
{
  if ( target.getMailingLists().isEmpty() )
  {
    target.setMailingLists( new ArrayList<>( source.getMailingLists() ) );
  }
}

代码示例来源:origin: maven/maven-model

/**
 * Method addMailingList
 * 
 * @param mailingList
 */
public void addMailingList(MailingList mailingList)
{
  if ( !(mailingList instanceof MailingList) )
  {
    throw new ClassCastException( "Model.addMailingLists(mailingList) parameter must be instanceof " + MailingList.class.getName() );
  }
  getMailingLists().add( mailingList );
} //-- void addMailingList(MailingList)

代码示例来源:origin: maven/maven-model

/**
 * Method removeMailingList
 * 
 * @param mailingList
 */
public void removeMailingList(MailingList mailingList)
{
  if ( !(mailingList instanceof MailingList) )
  {
    throw new ClassCastException( "Model.removeMailingLists(mailingList) parameter must be instanceof " + MailingList.class.getName() );
  }
  getMailingLists().remove( mailingList );
} //-- void removeMailingList(MailingList)

代码示例来源:origin: takari/polyglot-maven

if ( ( model.getMailingLists() != null ) && ( model.getMailingLists().size() > 0 ) )
  for ( Iterator iter = model.getMailingLists().iterator(); iter.hasNext(); )

代码示例来源: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().getMailingLists() );
  }
  return result;
}

代码示例来源:origin: takari/polyglot-maven

void project(Model model) {
  String name = model.getName();
  if (name == null) {
    name = model.getArtifactId();
  }
  p.printStartBlock( "project", name, model.getUrl() );
  p.println();
  p.println( "model_version", model.getModelVersion() );
  p.println( "inception_year", model.getInceptionYear() );
  id(model);
  parent(model.getParent());
  p.println("packaging", model.getPackaging());
  p.println();
  description(model.getDescription());
  developers( model.getDevelopers() );
  issueManagement( model.getIssueManagement() );
  mailingLists( model.getMailingLists() );
  repositories( toRepositoryArray( model.getRepositories() ) );
  pluginRepositories( toRepositoryArray( model.getPluginRepositories() ) );
  sourceControl( model.getScm() );
  distribution( model.getDistributionManagement() );
  properties( model.getProperties() );
  dependencies( model.getDependencies() );
  modules( model.getModules() );
  managements( model.getDependencyManagement(), model.getBuild() );
  build( model.getBuild(), model.getBuild() );
  profiles( model.getProfiles() );
  reporting( model.getReporting() );
  p.printEndBlock();
}

相关文章

Model类方法