List of usage examples for org.apache.maven.graph DefaultProjectDependencyGraph DefaultProjectDependencyGraph
public DefaultProjectDependencyGraph(Collection<MavenProject> projects) throws CycleDetectedException, DuplicateProjectException
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); } }