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


Java MavenExecutionResult.addException方法代码示例

本文整理汇总了Java中org.apache.maven.execution.MavenExecutionResult.addException方法的典型用法代码示例。如果您正苦于以下问题:Java MavenExecutionResult.addException方法的具体用法?Java MavenExecutionResult.addException怎么用?Java MavenExecutionResult.addException使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.maven.execution.MavenExecutionResult的用法示例。


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

示例1: readProjectWithDependencies

import org.apache.maven.execution.MavenExecutionResult; //导入方法依赖的package包/类
public MavenExecutionResult readProjectWithDependencies(MavenExecutionRequest req, boolean useWorkspaceResolution) {
    if (useWorkspaceResolution) {
        req.setWorkspaceReader(new NbWorkspaceReader());
    }
    File pomFile = req.getPom();
    MavenExecutionResult result = new DefaultMavenExecutionResult();
    try {
        ProjectBuildingRequest configuration = req.getProjectBuildingRequest();
        configuration.setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL);
        configuration.setResolveDependencies(true);
        configuration.setRepositorySession(maven.newRepositorySession(req));
        ProjectBuildingResult projectBuildingResult = projectBuilder.build(pomFile, configuration);
        result.setProject(projectBuildingResult.getProject());
        result.setDependencyResolutionResult(projectBuildingResult.getDependencyResolutionResult());
    } catch (ProjectBuildingException ex) {
        //don't add the exception here. this should come out as a build marker, not fill
        //the error logs with msgs
        return result.addException(ex);
    }
    normalizePaths(result.getProject());
    return result;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:MavenEmbedder.java

示例2: addExceptionToResult

import org.apache.maven.execution.MavenExecutionResult; //导入方法依赖的package包/类
private MavenExecutionResult addExceptionToResult( MavenExecutionResult result, Throwable e )
{
    if ( !result.getExceptions().contains( e ) )
    {
        result.addException( e );
    }

    return result;
}
 
开发者ID:rvs-fluid-it,项目名称:mvn-fluid-cd,代码行数:10,代码来源:JenkinsDefaultMaven.java

示例3: processResult

import org.apache.maven.execution.MavenExecutionResult; //导入方法依赖的package包/类
private MavenExecutionResult processResult( MavenExecutionResult result, Throwable e )
{
    if ( !result.getExceptions().contains( e ) )
    {
        result.addException( e );
    }

    return result;
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:10,代码来源:DefaultMaven.java


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