mirror of https://github.com/apache/maven.git
MNG-5312: MavenProject.getParent intolerably slow when import scope used heavily
Submitted by: Jesse Glick git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1362736 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
94fde61ad2
commit
e778ea6712
|
@ -99,13 +99,13 @@ public class DefaultProjectBuilder
|
|||
public ProjectBuildingResult build( File pomFile, ProjectBuildingRequest request )
|
||||
throws ProjectBuildingException
|
||||
{
|
||||
return build( pomFile, new FileModelSource( pomFile ), new InternalConfig( request, null, null ) );
|
||||
return build( pomFile, new FileModelSource( pomFile ), new InternalConfig( request, null ) );
|
||||
}
|
||||
|
||||
public ProjectBuildingResult build( ModelSource modelSource, ProjectBuildingRequest request )
|
||||
throws ProjectBuildingException
|
||||
{
|
||||
return build( null, modelSource, new InternalConfig( request, null, null ) );
|
||||
return build( null, modelSource, new InternalConfig( request, null ) );
|
||||
}
|
||||
|
||||
private ProjectBuildingResult build( File pomFile, ModelSource modelSource, InternalConfig config )
|
||||
|
@ -256,7 +256,7 @@ private ModelBuildingRequest getModelBuildingRequest( InternalConfig config )
|
|||
request.setUserProperties( configuration.getUserProperties() );
|
||||
request.setBuildStartTime( configuration.getBuildStartTime() );
|
||||
request.setModelResolver( resolver );
|
||||
request.setModelCache( config.modelCache );
|
||||
request.setModelCache( new ReactorModelCache() );
|
||||
|
||||
return request;
|
||||
}
|
||||
|
@ -273,7 +273,7 @@ public ProjectBuildingResult build( Artifact artifact, boolean allowStubModel, P
|
|||
org.sonatype.aether.artifact.Artifact pomArtifact = RepositoryUtils.toArtifact( artifact );
|
||||
pomArtifact = ArtifactDescriptorUtils.toPomArtifact( pomArtifact );
|
||||
|
||||
InternalConfig config = new InternalConfig( request, null, null );
|
||||
InternalConfig config = new InternalConfig( request, null );
|
||||
|
||||
boolean localProject;
|
||||
|
||||
|
@ -334,9 +334,7 @@ public List<ProjectBuildingResult> build( List<File> pomFiles, boolean recursive
|
|||
|
||||
ReactorModelPool modelPool = new ReactorModelPool();
|
||||
|
||||
ReactorModelCache modelCache = new ReactorModelCache();
|
||||
|
||||
InternalConfig config = new InternalConfig( request, modelPool, modelCache );
|
||||
InternalConfig config = new InternalConfig( request, modelPool );
|
||||
|
||||
Map<String, MavenProject> projectIndex = new HashMap<String, MavenProject>( 256 );
|
||||
|
||||
|
@ -673,13 +671,10 @@ class InternalConfig
|
|||
|
||||
public final ReactorModelPool modelPool;
|
||||
|
||||
public final ReactorModelCache modelCache;
|
||||
|
||||
public InternalConfig( ProjectBuildingRequest request, ReactorModelPool modelPool, ReactorModelCache modelCache )
|
||||
InternalConfig( ProjectBuildingRequest request, ReactorModelPool modelPool )
|
||||
{
|
||||
this.request = request;
|
||||
this.modelPool = modelPool;
|
||||
this.modelCache = modelCache;
|
||||
session =
|
||||
LegacyLocalRepositoryManager.overlay( request.getLocalRepository(), request.getRepositorySession(),
|
||||
repoSystem );
|
||||
|
|
Loading…
Reference in New Issue