public MavenProject buildFromRepository( Artifact artifact,
List remoteArtifactRepositories,
ArtifactRepository localRepository,
boolean allowStubModel )
throws ProjectBuildingException
{
String cacheKey = createCacheKey( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion() );
MavenProject project = (MavenProject) processedProjectCache.get( cacheKey );
if ( project != null )
{
return project;
}
Model model = findModelFromRepository( artifact, remoteArtifactRepositories, localRepository, allowStubModel );
ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setLocalRepository( localRepository );
return buildInternal( "Artifact [" + artifact + "]", model, config, remoteArtifactRepositories,
null, false );
}