From 02a0cb7d5ac0bec54918759250e17944b39c1428 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Thu, 18 Sep 2008 11:39:16 +0000 Subject: [PATCH] o match shane's changes to remove the workspace git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@696637 13f79535-47bb-0310-9956-ffa450edef68 --- .../lineage/DefaultModelLineageBuilder.java | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/maven-core/src/main/java/org/apache/maven/extension/lineage/DefaultModelLineageBuilder.java b/maven-core/src/main/java/org/apache/maven/extension/lineage/DefaultModelLineageBuilder.java index 7481d60054..5c7396edfc 100644 --- a/maven-core/src/main/java/org/apache/maven/extension/lineage/DefaultModelLineageBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/extension/lineage/DefaultModelLineageBuilder.java @@ -35,7 +35,6 @@ import org.apache.maven.profiles.build.ProfileAdvisor; import org.apache.maven.project.ProjectBuilderConfiguration; import org.apache.maven.project.ProjectBuildingException; import org.apache.maven.project.ModelAndFile; -import org.apache.maven.project.workspace.ProjectWorkspace; import org.codehaus.plexus.logging.LogEnabled; import org.codehaus.plexus.logging.Logger; import org.codehaus.plexus.logging.console.ConsoleLogger; @@ -69,8 +68,6 @@ public class DefaultModelLineageBuilder private ProfileAdvisor profileAdvisor; - private ProjectWorkspace projectWorkspace; - private Logger logger; public DefaultModelLineageBuilder() @@ -99,12 +96,7 @@ public class DefaultModelLineageBuilder List currentRemoteRepositories = remoteRepositories == null ? new ArrayList() : new ArrayList( remoteRepositories ); - ModelAndFile current = projectWorkspace.getModelAndFile( pom ); - if ( current == null ) - { - current = new ModelAndFile( readModel( pom ), pom, isReactorProject ); - projectWorkspace.storeModelAndFile( current ); - } + ModelAndFile current = new ModelAndFile( readModel( pom ), pom, isReactorProject ); do { @@ -314,7 +306,6 @@ public class DefaultModelLineageBuilder // getLogger().debug( "Checking cache for parent model-and-file instance: " + key + " using file: " + parentPomFile ); - result = projectWorkspace.getModelAndFile( parentPomFile ); if ( result != null && !parentModelMatches( modelParent, result.getModel() ) ) { parentPomFile = null; @@ -322,13 +313,6 @@ public class DefaultModelLineageBuilder } } - if ( result == null ) - { -// getLogger().debug( "Checking cache for parent model-and-file instance: " + key + " using project groupId:artifactId:version." ); - - result = projectWorkspace.getModelAndFile( modelParent.getGroupId(), modelParent.getArtifactId(), modelParent.getVersion() ); - } - if ( result != null ) { // getLogger().debug( "Returning cached instance." ); @@ -421,12 +405,6 @@ public class DefaultModelLineageBuilder } } - if ( result != null ) - { -// getLogger().debug( "Caching parent model-and-file: " + result ); - projectWorkspace.storeModelAndFile( result ); - } - return result; }