• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ProjectDependencyGraph类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ReactorBuildQueue

import org.apache.maven.execution.ProjectDependencyGraph; //导入依赖的package包/类
public ReactorBuildQueue(Collection<MavenProject> projects,
    ProjectDependencyGraph dependencyGraph) {
  this.dependencyGraph = dependencyGraph;

  final Set<MavenProject> rootProjects = new HashSet<MavenProject>();

  for (MavenProject project : projects) {
    if (dependencyGraph.getUpstreamProjects(project, false).isEmpty()) {
      rootProjects.add(project);
    } else {
      blockedProjects.add(project);
    }
  }

  this.rootProjects = ImmutableSet.copyOf(rootProjects);
  this.projects = ImmutableSet.copyOf(projects);
}
 
开发者ID:takari,项目名称:takari-smart-builder,代码行数:18,代码来源:ReactorBuildQueue.java


示例2: FilteredProjectDependencyGraph

import org.apache.maven.execution.ProjectDependencyGraph; //导入依赖的package包/类
/**
 * Creates a new project dependency graph from the specified graph.
 * 
 * @param projectDependencyGraph The project dependency graph to create a sub view from, must not be {@code null}.
 * @param whiteList The projects on which the dependency view should focus, must not be {@code null}.
 */
public FilteredProjectDependencyGraph( ProjectDependencyGraph projectDependencyGraph,
                                       Collection<? extends MavenProject> whiteList )
{
    if ( projectDependencyGraph == null )
    {
        throw new IllegalArgumentException( "project dependency graph missing" );
    }

    this.projectDependencyGraph = projectDependencyGraph;

    this.whiteList = new IdentityHashMap<MavenProject, Object>();

    for ( MavenProject project : whiteList )
    {
        this.whiteList.put( project, null );
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:24,代码来源:FilteredProjectDependencyGraph.java


示例3: createDependencyGraph

import org.apache.maven.execution.ProjectDependencyGraph; //导入依赖的package包/类
private ProjectDependencyGraph createDependencyGraph( ProjectSorter sorter, MavenExecutionRequest request )
    throws MavenExecutionException
{
    ProjectDependencyGraph graph = new DefaultProjectDependencyGraph( sorter );

    List<MavenProject> activeProjects = sorter.getSortedProjects();

    activeProjects = trimSelectedProjects( activeProjects, graph, request );
    activeProjects = trimResumedProjects( activeProjects, request );

    if ( activeProjects.size() != sorter.getSortedProjects().size() )
    {
        graph = new FilteredProjectDependencyGraph( graph, activeProjects );
    }

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


示例4: testConcurrencyGraphDifferentCompletionOrder

import org.apache.maven.execution.ProjectDependencyGraph; //导入依赖的package包/类
public void testConcurrencyGraphDifferentCompletionOrder()
    throws InvalidPluginDescriptorException, PluginVersionResolutionException, PluginDescriptorParsingException,
    NoPluginFoundForPrefixException, MojoNotFoundException, PluginNotFoundException, PluginResolutionException,
    LifecyclePhaseNotFoundException, LifecycleNotFoundException
{
    ProjectDependencyGraph dependencyGraph = new ProjectDependencyGraphStub();
    final MavenSession session = ProjectDependencyGraphStub.getMavenSession();
    ConcurrencyDependencyGraph graph =
        new ConcurrencyDependencyGraph( getProjectBuildList( session ), dependencyGraph );

    graph.markAsFinished( A );
    final List<MavenProject> cDescendants = graph.markAsFinished( C );
    assertEquals( 1, cDescendants.size() );
    assertEquals( Z, cDescendants.get( 0 ) );

    final List<MavenProject> bDescendants = graph.markAsFinished( B );
    assertEquals( 2, bDescendants.size() );
    assertEquals( X, bDescendants.get( 0 ) );
    assertEquals( Y, bDescendants.get( 1 ) );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:21,代码来源:ConcurrencyDependencyGraphTest.java


示例5: IncrementalModuleBuilderImpl

import org.apache.maven.execution.ProjectDependencyGraph; //导入依赖的package包/类
IncrementalModuleBuilderImpl( List<MavenProject> selectedProjects, LifecycleModuleBuilder lifecycleModuleBuilder,
                              MavenSession session, ReactorContext reactorContext, List<TaskSegment> taskSegments )
{

    this.lifecycleModuleBuilder =
        Objects.requireNonNull( lifecycleModuleBuilder, "lifecycleModuleBuilder is not allowed to be null." );
    this.mavenSession = Objects.requireNonNull( session, "session is not allowed to be null." );
    this.taskSegments = Objects.requireNonNull( taskSegments, "taskSegements is not allowed to be null" );
    this.reactorContext = Objects.requireNonNull( reactorContext, "reactorContext is not allowed to be null." );

    ProjectDependencyGraph projectDependencyGraph = session.getProjectDependencyGraph();

    List<MavenProject> intermediateResult = new LinkedList<>();

    for ( MavenProject selectedProject : selectedProjects )
    {
        intermediateResult.add( selectedProject );
        // Up or downstream ? (-amd)
        intermediateResult.addAll( projectDependencyGraph.getDownstreamProjects( selectedProject, true ) );
        // TODO: Need to think about this? -am ?
        // intermediateResult.addAll(projectDependencyGraph.getUpstreamProjects(selectedProject,
        // true));
    }

    List<MavenProject> result = new LinkedList<>();

    for ( MavenProject project : intermediateResult )
    {
        if ( !result.contains( project ) )
        {
            result.add( project );
        }
    }

    this.projects = result;

}
 
开发者ID:khmarbaise,项目名称:incremental-module-builder,代码行数:38,代码来源:IncrementalModuleBuilderImpl.java


示例6: ProjectSegment

import org.apache.maven.execution.ProjectDependencyGraph; //导入依赖的package包/类
public ProjectSegment( MavenProject project, TaskSegment taskSegment, MavenSession copiedSession )
{
    this.project = project;
    this.taskSegment = taskSegment;
    this.session = copiedSession;
    final ProjectDependencyGraph dependencyGraph = getSession().getProjectDependencyGraph();
    nonTransitiveUpstreamProjects = dependencyGraph.getUpstreamProjects( getProject(), false );
    transitiveUpstreamProjects = dependencyGraph.getUpstreamProjects( getProject(), true );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:10,代码来源:ProjectSegment.java


示例7: logWeavePlan

import org.apache.maven.execution.ProjectDependencyGraph; //导入依赖的package包/类
public void logWeavePlan( MavenSession session )
{
    if ( !logger.isInfoEnabled() )
    {
        return;
    }

    final ProjectDependencyGraph dependencyGraph = session.getProjectDependencyGraph();
    logger.info( "=== WEAVE CONCURRENCY BUILD PLAN ======================================" );
    for ( MavenProject mavenProject : dependencyGraph.getSortedProjects() )
    {

        StringBuilder item = new StringBuilder();
        item.append( "Project: " );
        item.append( mavenProject.getArtifactId() );
        final List<MavenProject> upstreamProjects = dependencyGraph.getUpstreamProjects( mavenProject, false );
        if ( upstreamProjects.size() > 0 )
        {
            item.append( " ( " );
            for ( Iterator<MavenProject> it = upstreamProjects.iterator(); it.hasNext(); )
            {
                final MavenProject kid = it.next();
                item.append( kid.getArtifactId() );
                if ( it.hasNext() )
                {
                    item.append( ", " );
                }
            }
            item.append( ")" );
        }
        logger.info( item.toString() );

    }
    logger.info( "=======================================================================" );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:36,代码来源:LifecycleDebugLogger.java


示例8: testConcurrencyGraphPrimaryVersion

import org.apache.maven.execution.ProjectDependencyGraph; //导入依赖的package包/类
public void testConcurrencyGraphPrimaryVersion()
    throws InvalidPluginDescriptorException, PluginVersionResolutionException, PluginDescriptorParsingException,
    NoPluginFoundForPrefixException, MojoNotFoundException, PluginNotFoundException, PluginResolutionException,
    LifecyclePhaseNotFoundException, LifecycleNotFoundException
{
    ProjectDependencyGraph dependencyGraph = new ProjectDependencyGraphStub();
    final MavenSession session = ProjectDependencyGraphStub.getMavenSession();

    ConcurrencyDependencyGraph graph =
        new ConcurrencyDependencyGraph( getProjectBuildList( session ), dependencyGraph );

    final List<MavenProject> projectBuilds = graph.getRootSchedulableBuilds();
    assertEquals( 1, projectBuilds.size() );
    assertEquals( A, projectBuilds.get( 0 ) );

    final List<MavenProject> subsequent = graph.markAsFinished( A );
    assertEquals( 2, subsequent.size() );
    assertEquals( ProjectDependencyGraphStub.B, subsequent.get( 0 ) );
    assertEquals( C, subsequent.get( 1 ) );

    final List<MavenProject> bDescendants = graph.markAsFinished( B );
    assertEquals( 1, bDescendants.size() );
    assertEquals( Y, bDescendants.get( 0 ) );

    final List<MavenProject> cDescendants = graph.markAsFinished( C );
    assertEquals( 2, cDescendants.size() );
    assertEquals( X, cDescendants.get( 0 ) );
    assertEquals( Z, cDescendants.get( 1 ) );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:30,代码来源:ConcurrencyDependencyGraphTest.java


示例9: renderCriticalPath

import org.apache.maven.execution.ProjectDependencyGraph; //导入依赖的package包/类
public String renderCriticalPath(ProjectDependencyGraph graph) {
  return renderCriticalPath(DependencyGraph.fromMaven(graph), p -> projectGA(p));
}
 
开发者ID:takari,项目名称:takari-smart-builder,代码行数:4,代码来源:ReactorBuildStats.java


示例10: create

import org.apache.maven.execution.ProjectDependencyGraph; //导入依赖的package包/类
public static Comparator<MavenProject> create(MavenSession session) {
  final ProjectDependencyGraph dependencyGraph = session.getProjectDependencyGraph();
  return create0(DependencyGraph.fromMaven(dependencyGraph), ImmutableMap.of(), p -> id(p));
}
 
开发者ID:takari,项目名称:takari-smart-builder,代码行数:5,代码来源:ProjectComparator.java


示例11: ConcurrencyDependencyGraph

import org.apache.maven.execution.ProjectDependencyGraph; //导入依赖的package包/类
public ConcurrencyDependencyGraph( ProjectBuildList projectBuilds, ProjectDependencyGraph projectDependencyGraph )
{
    this.projectDependencyGraph = projectDependencyGraph;
    this.projectBuilds = projectBuilds;
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:6,代码来源:ConcurrencyDependencyGraph.java


示例12: ReactorBuildStatus

import org.apache.maven.execution.ProjectDependencyGraph; //导入依赖的package包/类
public ReactorBuildStatus( ProjectDependencyGraph projectDependencyGraph )
{
    this.projectDependencyGraph = projectDependencyGraph;
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:5,代码来源:ReactorBuildStatus.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AsyncAppenderFactory类代码示例发布时间:2022-05-23
下一篇:
Java Range类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap