当前位置: 首页>>代码示例>>Java>>正文


Java BuildSummary类代码示例

本文整理汇总了Java中org.apache.maven.execution.BuildSummary的典型用法代码示例。如果您正苦于以下问题:Java BuildSummary类的具体用法?Java BuildSummary怎么用?Java BuildSummary使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BuildSummary类属于org.apache.maven.execution包,在下文中一共展示了BuildSummary类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: _handle

import org.apache.maven.execution.BuildSummary; //导入依赖的package包/类
@Override
protected boolean _handle(MavenExecutionResult result) {
    Xpp3Dom root = new Xpp3Dom("MavenExecutionResult");
    root.setAttribute("class", result.getClass().getName());

    for (MavenProject project : result.getTopologicallySortedProjects()) {
        BuildSummary summary = result.getBuildSummary(project);
        if (summary == null) {
            Xpp3Dom comment = new Xpp3Dom("comment");
            comment.setValue("No build summary found for maven project: " + project);
            root.addChild(comment);
        } else {
            Xpp3Dom buildSummary = newElement("buildSummary", project);
            root.addChild(buildSummary);
            buildSummary.setAttribute("class", summary.getClass().getName());
            buildSummary.setAttribute("time", Long.toString(summary.getTime()));
        }
    }
    for(Throwable throwable: result.getExceptions()) {
        root.addChild(newElement("exception", throwable));
    }
    reporter.print(root);
    return true;
}
 
开发者ID:jenkinsci,项目名称:pipeline-maven-plugin,代码行数:25,代码来源:MavenExecutionResultHandler.java

示例2: logCompleted

import org.apache.maven.execution.BuildSummary; //导入依赖的package包/类
private void logCompleted(MavenProject project) {
  BuildSummary buildSummary = rootSession.getResult().getBuildSummary(project);
  String message = "SKIPPED";
  if (buildSummary instanceof BuildSuccess) {
    message = "SUCCESS";
  } else if (buildSummary instanceof BuildFailure) {
    message = "FAILURE";
  } else if (buildSummary != null) {
    logger.warn("Unexpected project build summary class {}", buildSummary.getClass());
    message = "UNKNOWN";
  }
  logger.info("{} build of project {}", message, projectGA(project));
}
 
开发者ID:takari,项目名称:takari-smart-builder,代码行数:14,代码来源:SmartBuilderImpl.java

示例3: logReactorSummary

import org.apache.maven.execution.BuildSummary; //导入依赖的package包/类
private void logReactorSummary( MavenSession session )
{
    logger.info( chars( '-', LINE_LENGTH ) );

    logger.info( "Reactor Summary:" );

    logger.info( "" );

    MavenExecutionResult result = session.getResult();

    for ( MavenProject project : session.getProjects() )
    {
        StringBuilder buffer = new StringBuilder( 128 );

        buffer.append( project.getName() );

        buffer.append( ' ' );
        while ( buffer.length() < LINE_LENGTH - 21 )
        {
            buffer.append( '.' );
        }
        buffer.append( ' ' );

        BuildSummary buildSummary = result.getBuildSummary( project );

        if ( buildSummary == null )
        {
            buffer.append( "SKIPPED" );
        }
        else if ( buildSummary instanceof BuildSuccess )
        {
            buffer.append( "SUCCESS [" );
            buffer.append( getFormattedTime( buildSummary.getTime() ) );
            buffer.append( "]" );
        }
        else if ( buildSummary instanceof BuildFailure )
        {
            buffer.append( "FAILURE [" );
            buffer.append( getFormattedTime( buildSummary.getTime() ) );
            buffer.append( "]" );
        }

        logger.info( buffer.toString() );
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:46,代码来源:ExecutionEventLogger.java


注:本文中的org.apache.maven.execution.BuildSummary类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。