MNG-4628 ReactorArtifactRepository is not setup soon enough for AbstractMavenLifecycleParticipant#afterProjectsRead

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@931641 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Igor Fedorenko 2010-04-07 18:58:53 +00:00
parent 1f9e91da55
commit fba6edc9ae
1 changed files with 17 additions and 10 deletions

View File

@ -181,6 +181,23 @@ public class DefaultMaven
result.setProject( session.getTopLevelProject() );
try
{
Map<String, MavenProject> projectMap;
projectMap = getProjectMap( session.getProjects() );
// Desired order of precedence for local artifact repositories
//
// Reactor
// Workspace
// User Local Repository
delegatingLocalArtifactRepository.setBuildReactor( new ReactorArtifactRepository( projectMap, session ) );
}
catch ( org.apache.maven.DuplicateProjectException e )
{
return processResult( result, e );
}
ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
try
{
@ -200,11 +217,8 @@ public class DefaultMaven
Thread.currentThread().setContextClassLoader( originalClassLoader );
}
Map<String, MavenProject> projectMap;
try
{
projectMap = getProjectMap( session.getProjects() );
ProjectSorter projectSorter = new ProjectSorter( session.getProjects() );
ProjectDependencyGraph projectDependencyGraph = createDependencyGraph( projectSorter, request );
@ -231,13 +245,6 @@ public class DefaultMaven
}
result.setTopologicallySortedProjects( session.getProjects() );
// Desired order of precedence for local artifact repositories
//
// Reactor
// Workspace
// User Local Repository
delegatingLocalArtifactRepository.setBuildReactor( new ReactorArtifactRepository( projectMap, session ) );
if ( result.hasExceptions() )
{