Example usage for org.apache.maven.graph DefaultProjectDependencyGraph DefaultProjectDependencyGraph

List of usage examples for org.apache.maven.graph DefaultProjectDependencyGraph DefaultProjectDependencyGraph

Introduction

In this page you can find the example usage for org.apache.maven.graph DefaultProjectDependencyGraph DefaultProjectDependencyGraph.

Prototype

public DefaultProjectDependencyGraph(Collection<MavenProject> projects)
        throws CycleDetectedException, DuplicateProjectException 

Source Link

Document

Creates a new project dependency graph based on the specified projects.

Usage

From source file:info.ronjenkins.maven.rtr.RTR.java

License:Apache License

private static void checkForRequiredClasses() {
    try {/*  w w w  .  ja  v a  2  s.  c  om*/
        new DefaultProjectDependencyGraph(new ArrayList<MavenProject>());
        throw new Exception();
    } catch (final Exception e) {
        // Irrelevant.
    }
}

From source file:info.ronjenkins.maven.rtr.steps.RebuildProjectDependencyGraph.java

License:Apache License

@Override
public void execute(final MavenSession session, final RTRComponents components) throws MavenExecutionException {
    try {// w  w  w  .j  ava  2  s  .c om
        session.setProjectDependencyGraph(new DefaultProjectDependencyGraph(session.getProjects()));
    } catch (final CycleDetectedException | DuplicateProjectException e) {
        this.logger.error("");
        throw new MavenExecutionException("Could not assemble new project dependency graph", e);
    }
}