From 2327f170e6d0ef386d54a5eefa8147be3f26c887 Mon Sep 17 00:00:00 2001 From: Kenney Westerhof Date: Wed, 20 Dec 2006 15:30:10 +0000 Subject: [PATCH] Added a note on project sorting and cycles. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@489114 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/maven/project/ProjectSorter.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java b/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java index 20790c8161..0762d338e4 100644 --- a/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java +++ b/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java @@ -58,6 +58,17 @@ public class ProjectSorter * * @throws DuplicateProjectException if any projects are duplicated by id */ + // MAVENAPI FIXME: the DAG used is NOT only used to represent the dependency relation, + // but also for , , . We need multiple DAG's + // since a DAG can only handle 1 type of relationship properly. + // Usecase: This is detected as a cycle: + // org.apache.maven:maven-plugin-api -(PARENT)-> + // org.apache.maven:maven -(inherited REPORTING)-> + // org.apache.maven.plugins:maven-checkstyle-plugin -(DEPENDENCY)-> + // org.apache.maven:maven-plugin-api + // In this case, both the verify and the report goals are called + // in a different lifecycle. Though the compiler-plugin has a valid usecase, although + // that seems to work fine. We need to take versions and lifecycle into account. public ProjectSorter( List projects ) throws CycleDetectedException, DuplicateProjectException {