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

x33g5p2x  于2022-01-29 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(131)

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

Reporting.getPlugins介绍

[英]Method getPlugins.
[中]方法获取插件。

代码示例

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

/**
 * Method addPlugin.
 * 
 * @param reportPlugin
 */
public void addPlugin( ReportPlugin reportPlugin )
{
  getPlugins().add( reportPlugin );
} //-- void addPlugin( ReportPlugin )

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

/**
 * Method removePlugin.
 * 
 * @param reportPlugin
 */
public void removePlugin( ReportPlugin reportPlugin )
{
  getPlugins().remove( reportPlugin );
} //-- void removePlugin( ReportPlugin )

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

/**
 * @return a Map of plugins field with <code>ReportPlugin#getKey()</code> as key
 * @see org.apache.maven.model.ReportPlugin#getKey()
 */
public synchronized java.util.Map<String, ReportPlugin> getReportPluginsAsMap()
{
  if ( reportPluginMap == null )
  {
    reportPluginMap = new java.util.LinkedHashMap<String, ReportPlugin>();
    if ( getPlugins() != null )
    {
      for ( java.util.Iterator<ReportPlugin> it = getPlugins().iterator(); it.hasNext(); )
      {
        ReportPlugin reportPlugin = (ReportPlugin) it.next();
        reportPluginMap.put( reportPlugin.getKey(), reportPlugin );
      }
    }
  }
  return reportPluginMap;
}

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

protected void mergeReporting_Plugins( Reporting target, Reporting source, boolean sourceDominant,
                    Map<Object, Object> context )
{
  List<ReportPlugin> src = source.getPlugins();
  if ( !src.isEmpty() )
  {
    List<ReportPlugin> tgt = target.getPlugins();
    Map<Object, ReportPlugin> merged =
      new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 );
    for ( ReportPlugin element : tgt )
    {
      Object key = getReportPluginKey( element );
      merged.put( key, element );
    }
    for ( ReportPlugin element : src )
    {
      Object key = getReportPluginKey( element );
      if ( sourceDominant || !merged.containsKey( key ) )
      {
        merged.put( key, element );
      }
    }
    target.setPlugins( new ArrayList<>( merged.values() ) );
  }
}

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

@Deprecated
public List<ReportPlugin> getReportPlugins()
{
  if ( getModel().getReporting() == null )
  {
    return Collections.emptyList();
  }
  return Collections.unmodifiableList( getModel().getReporting().getPlugins() );
}

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

Map<Object, Object> context )
List<ReportPlugin> src = source.getPlugins();
if ( !src.isEmpty() )
  List<ReportPlugin> tgt = target.getPlugins();
  Map<Object, ReportPlugin> merged =
    new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 );

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

List parentPlugins = parent.getPlugins();
                                child.getPlugins() );

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

Map<Object, Object> context )
List<ReportPlugin> src = source.getPlugins();
if ( !src.isEmpty() )
  List<ReportPlugin> tgt = target.getPlugins();
  Map<Object, ReportPlugin> merged =
    new LinkedHashMap<>( ( src.size() + tgt.size() ) * 2 );

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

public List getReportPlugins()
{
  if ( getModel().getReporting() == null )
  {
    return null;
  }
  return getModel().getReporting().getPlugins();
}

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

List modelReportPlugins = modelReporting.getPlugins();

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

List<ReportPlugin> parentPlugins = parent.getPlugins();

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

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

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

public static Reporting cloneReporting( Reporting src )
{
  if ( src == null )
  {
    return null;
  }
  
  Reporting result = new Reporting();
  
  result.setExcludeDefaults( src.isExcludeDefaults() );
  result.setOutputDirectory( src.getOutputDirectory() );
  result.setPlugins( cloneList( src.getPlugins(), REPORT_PLUGIN_CLONER ) );
  
  return result;
}

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

@Override
public void expandPluginConfiguration( Model model, ModelBuildingRequest request, ModelProblemCollector problems )
{
  Reporting reporting = model.getReporting();
  if ( reporting != null )
  {
    for ( ReportPlugin reportPlugin : reporting.getPlugins() )
    {
      Xpp3Dom parentDom = (Xpp3Dom) reportPlugin.getConfiguration();
      if ( parentDom != null )
      {
        for ( ReportSet execution : reportPlugin.getReportSets() )
        {
          Xpp3Dom childDom = (Xpp3Dom) execution.getConfiguration();
          childDom = Xpp3Dom.mergeXpp3Dom( childDom, new Xpp3Dom( parentDom ) );
          execution.setConfiguration( childDom );
        }
      }
    }
  }
}

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

if ( reporting != null )
  for ( Iterator it = reporting.getPlugins().iterator(); it.hasNext(); )

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

if ( reporting != null )
  for ( ReportPlugin p : reporting.getPlugins() )

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

for ( ReportPlugin plugin : reporting.getPlugins() )

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

void reporting(Reporting reporting) {
  if ( reporting != null ){
    p.printStartBlock( "reporting" );
    plugins( reporting.getPlugins() );
    p.printEndBlock();
    p.println();
  }
}

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

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

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

/**
 * Method addPlugin.
 * 
 * @param reportPlugin
 */
public void addPlugin( ReportPlugin reportPlugin )
{
  getPlugins().add( reportPlugin );
} //-- void addPlugin( ReportPlugin )

相关文章