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
This commit is contained in:
Kenney Westerhof 2006-12-20 15:30:10 +00:00
parent c15aadbe04
commit 2327f170e6
1 changed files with 11 additions and 0 deletions

View File

@ -58,6 +58,17 @@ public class ProjectSorter
* </ul> * </ul>
* @throws DuplicateProjectException if any projects are duplicated by id * @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 <parent>, <build><plugin>, <reports>. 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 ) public ProjectSorter( List projects )
throws CycleDetectedException, DuplicateProjectException throws CycleDetectedException, DuplicateProjectException
{ {