o remove redundancy

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@572041 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2007-09-02 17:25:01 +00:00
parent ed5868ebc7
commit 248c7199a0
1 changed files with 14 additions and 1 deletions

View File

@ -41,6 +41,7 @@ import org.apache.maven.execution.DefaultMavenExecutionResult;
import org.apache.maven.execution.MavenExecutionRequest;
import org.apache.maven.execution.MavenExecutionResult;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.execution.ReactorManager;
import org.apache.maven.lifecycle.LifecycleUtils;
import org.apache.maven.model.Model;
import org.apache.maven.model.Plugin;
@ -421,7 +422,7 @@ public class MavenEmbedder
{
MavenExecutionResult result = new DefaultMavenExecutionResult();
MavenProject project = null;
MavenProject project;
try
{
@ -447,6 +448,18 @@ public class MavenEmbedder
MavenProjectBuildingResult r = null;
ReactorManager reactorManager = maven.createReactorManager( request, result );
if ( result.hasExceptions() )
{
return result;
}
result.setTopologicallySortedProjects( reactorManager.getSortedProjects() );
// Now I should be able to pass this projects to the next request so that I don't have to process
// any local projects again. And this logic is still too complicated.
try
{
r = mavenProjectBuilder.buildWithDependencies(