From e85cd0c2c33f8948ed7f607b773a09e8522645d3 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Wed, 21 Oct 2009 23:49:07 +0000 Subject: [PATCH] o Restored backward-compat git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@828259 13f79535-47bb-0310-9956-ffa450edef68 --- maven-core/src/main/java/org/apache/maven/DefaultMaven.java | 4 ++-- .../org/apache/maven/DefaultProjectDependencyGraph.java | 2 +- .../java/org/apache/maven/execution/ReactorManager.java | 2 ++ .../{execution => project}/DuplicateProjectException.java | 2 +- .../apache/maven/{execution => project}/ProjectSorter.java | 6 ++---- .../java/org/apache/maven/execution/ProjectSorterTest.java | 2 ++ .../plugin/PluginParameterExpressionEvaluatorTest.java | 2 +- 7 files changed, 11 insertions(+), 9 deletions(-) rename maven-core/src/main/java/org/apache/maven/{execution => project}/DuplicateProjectException.java (98%) rename maven-core/src/main/java/org/apache/maven/{execution => project}/ProjectSorter.java (98%) diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java index d032d853c4..047df19ea0 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java @@ -31,21 +31,21 @@ import java.util.Map; import org.apache.maven.artifact.ArtifactUtils; import org.apache.maven.execution.DefaultLifecycleEvent; import org.apache.maven.execution.DefaultMavenExecutionResult; -import org.apache.maven.execution.DuplicateProjectException; import org.apache.maven.execution.ExecutionEvent; import org.apache.maven.execution.ExecutionListener; import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.execution.MavenExecutionResult; import org.apache.maven.execution.MavenSession; import org.apache.maven.execution.ProjectDependencyGraph; -import org.apache.maven.execution.ProjectSorter; import org.apache.maven.lifecycle.LifecycleExecutor; import org.apache.maven.model.building.ModelProblem; +import org.apache.maven.project.DuplicateProjectException; import org.apache.maven.project.MavenProject; import org.apache.maven.project.ProjectBuilder; import org.apache.maven.project.ProjectBuildingException; import org.apache.maven.project.ProjectBuildingRequest; import org.apache.maven.project.ProjectBuildingResult; +import org.apache.maven.project.ProjectSorter; import org.apache.maven.repository.DelegatingLocalArtifactRepository; import org.apache.maven.repository.LocalRepositoryNotAccessibleException; import org.codehaus.plexus.PlexusContainer; diff --git a/maven-core/src/main/java/org/apache/maven/DefaultProjectDependencyGraph.java b/maven-core/src/main/java/org/apache/maven/DefaultProjectDependencyGraph.java index 9a5ee64c47..00fdd14491 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultProjectDependencyGraph.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultProjectDependencyGraph.java @@ -25,8 +25,8 @@ import java.util.HashSet; import java.util.List; import org.apache.maven.execution.ProjectDependencyGraph; -import org.apache.maven.execution.ProjectSorter; import org.apache.maven.project.MavenProject; +import org.apache.maven.project.ProjectSorter; /** * Describes the inter-dependencies between projects in the reactor. diff --git a/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java b/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java index aa6675a10b..6cbc133517 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java +++ b/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java @@ -22,7 +22,9 @@ package org.apache.maven.execution; import org.apache.maven.artifact.ArtifactUtils; import org.apache.maven.plugin.descriptor.PluginDescriptor; +import org.apache.maven.project.DuplicateProjectException; import org.apache.maven.project.MavenProject; +import org.apache.maven.project.ProjectSorter; import org.codehaus.plexus.util.dag.CycleDetectedException; import java.util.ArrayList; diff --git a/maven-core/src/main/java/org/apache/maven/execution/DuplicateProjectException.java b/maven-core/src/main/java/org/apache/maven/project/DuplicateProjectException.java similarity index 98% rename from maven-core/src/main/java/org/apache/maven/execution/DuplicateProjectException.java rename to maven-core/src/main/java/org/apache/maven/project/DuplicateProjectException.java index 94e10e1d15..42f66c3575 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/DuplicateProjectException.java +++ b/maven-core/src/main/java/org/apache/maven/project/DuplicateProjectException.java @@ -1,4 +1,4 @@ -package org.apache.maven.execution; +package org.apache.maven.project; import java.io.File; diff --git a/maven-core/src/main/java/org/apache/maven/execution/ProjectSorter.java b/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java similarity index 98% rename from maven-core/src/main/java/org/apache/maven/execution/ProjectSorter.java rename to maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java index 48a8b402fc..fa85b80eae 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/ProjectSorter.java +++ b/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java @@ -1,4 +1,4 @@ -package org.apache.maven.execution; +package org.apache.maven.project; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -20,7 +20,6 @@ package org.apache.maven.execution; */ import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; @@ -32,7 +31,6 @@ import org.apache.maven.model.Dependency; import org.apache.maven.model.Extension; import org.apache.maven.model.Parent; import org.apache.maven.model.Plugin; -import org.apache.maven.project.MavenProject; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.dag.CycleDetectedException; import org.codehaus.plexus.util.dag.DAG; @@ -70,7 +68,7 @@ public class ProjectSorter // 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( Collection projects ) + public ProjectSorter( List projects ) throws CycleDetectedException, DuplicateProjectException { dag = new DAG(); diff --git a/maven-core/src/test/java/org/apache/maven/execution/ProjectSorterTest.java b/maven-core/src/test/java/org/apache/maven/execution/ProjectSorterTest.java index 1ebbfb8286..6aa66e14d3 100644 --- a/maven-core/src/test/java/org/apache/maven/execution/ProjectSorterTest.java +++ b/maven-core/src/test/java/org/apache/maven/execution/ProjectSorterTest.java @@ -32,7 +32,9 @@ import org.apache.maven.model.Model; import org.apache.maven.model.Parent; import org.apache.maven.model.Plugin; import org.apache.maven.model.PluginManagement; +import org.apache.maven.project.DuplicateProjectException; import org.apache.maven.project.MavenProject; +import org.apache.maven.project.ProjectSorter; import org.codehaus.plexus.util.dag.CycleDetectedException; /** diff --git a/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java b/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java index 2ac199a9d6..e1acfef6a1 100644 --- a/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java +++ b/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java @@ -36,13 +36,13 @@ import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.artifact.versioning.VersionRange; import org.apache.maven.execution.DefaultMavenExecutionRequest; import org.apache.maven.execution.DefaultMavenExecutionResult; -import org.apache.maven.execution.DuplicateProjectException; import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.execution.MavenSession; import org.apache.maven.model.Build; import org.apache.maven.model.Model; import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.apache.maven.plugin.descriptor.PluginDescriptor; +import org.apache.maven.project.DuplicateProjectException; import org.apache.maven.project.MavenProject; import org.codehaus.plexus.MutablePlexusContainer; import org.codehaus.plexus.PlexusContainer;