Added in LifecycleExecutor to DefaultMavenProjectBuilder. This cause cyclical component dep.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@769896 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Britton Isbell 2009-04-29 19:44:52 +00:00
parent 7c9cdbc071
commit a630ff99e2
1 changed files with 5 additions and 1 deletions

View File

@ -34,6 +34,7 @@ import org.apache.maven.artifact.resolver.ArtifactResolutionException;
import org.apache.maven.artifact.resolver.ArtifactResolutionRequest; import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
import org.apache.maven.artifact.resolver.ArtifactResolutionResult; import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
import org.apache.maven.artifact.resolver.ResolutionErrorHandler; import org.apache.maven.artifact.resolver.ResolutionErrorHandler;
import org.apache.maven.lifecycle.LifecycleExecutor;
import org.apache.maven.model.Build; import org.apache.maven.model.Build;
import org.apache.maven.model.DomainModel; import org.apache.maven.model.DomainModel;
import org.apache.maven.model.Model; import org.apache.maven.model.Model;
@ -71,6 +72,9 @@ public class DefaultMavenProjectBuilder
@Requirement @Requirement
private ModelValidator validator; private ModelValidator validator;
@Requirement
private LifecycleExecutor lifecycle;
@Requirement @Requirement
private RepositorySystem repositorySystem; private RepositorySystem repositorySystem;
@ -166,7 +170,7 @@ public class DefaultMavenProjectBuilder
MavenProject project; MavenProject project;
try { try {
Model model = interpolateDomainModel( domainModel, configuration, pomFile ); Model model = interpolateDomainModel( domainModel, configuration, pomFile );
ProcessorContext.addPluginsToModel(model, configuration.getPlugins()); ProcessorContext.addPluginsToModel(model, lifecycle.getPluginsBoundByDefaultToAllLifecycles(model.getPackaging()));
ProcessorContext.processManagementNodes(model); ProcessorContext.processManagementNodes(model);
project = this.fromDomainModelToMavenProject(model, domainModel.getParentFile(), configuration, pomFile); project = this.fromDomainModelToMavenProject(model, domainModel.getParentFile(), configuration, pomFile);