From e8bf60f962839c8f28dec5cc31d673015c5ea04d Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Wed, 1 Oct 2008 13:07:26 +0000 Subject: [PATCH] o start a little caching component that does nothing special now but we need to build it out after the multiple instance problem is corrected, and we decide on the interactions between the metadata layer, project building, the reactor, and workspaces in IDEs. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@700758 13f79535-47bb-0310-9956-ffa450edef68 --- .../project/DefaultMavenProjectBuilder.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java b/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java index b37527b242..c48a33a5e0 100644 --- a/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java +++ b/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java @@ -147,6 +147,24 @@ public class DefaultMavenProjectBuilder return project; } + // I want to build this out as a component with history and statistics to help me track down the realm problems. jvz. + class ProjectCache + { + private Map projects = new HashMap(); + + public MavenProject get( String key ) + { + MavenProject p = projects.get( key ); + + return p; + } + + public MavenProject put( String key, MavenProject project ) + { + return projects.put( key, project ); + } + } + // This is used by the RR plugin public MavenProject buildFromRepository( Artifact artifact, List remoteArtifactRepositories, ArtifactRepository localRepository, boolean allowStubs ) throws ProjectBuildingException