o project builder takes a file now and not an input stream

o separated the construction of the domain model from the maven project


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@726951 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2008-12-16 04:40:59 +00:00
parent ff09f5beb7
commit 2dc15dda49
1 changed files with 33 additions and 15 deletions

View File

@ -21,7 +21,6 @@ package org.apache.maven.project.builder.impl;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@ -80,14 +79,11 @@ public final class DefaultProjectBuilder
{
}
/**
* @see ProjectBuilder#buildFromLocalPath(java.io.InputStream, java.util.List, java.util.Collection, java.util.Collection, org.apache.maven.project.builder.PomArtifactResolver, java.io.File, org.apache.maven.project.ProjectBuilderConfiguration)
*/
public MavenProject buildFromLocalPath( File pom, List<Model> inheritedModels,
Collection<ImportModel> importModels,
Collection<InterpolatorProperty> interpolatorProperties,
PomArtifactResolver resolver, File projectDirectory,
ProjectBuilderConfiguration projectBuilderConfiguration )
public PomClassicDomainModel buildModel( File pom, List<Model> inheritedModels,
Collection<ImportModel> importModels,
Collection<InterpolatorProperty> interpolatorProperties,
PomArtifactResolver resolver, File projectDirectory,
ProjectBuilderConfiguration projectBuilderConfiguration )
throws IOException
{
if ( pom == null )
@ -170,14 +166,36 @@ public final class DefaultProjectBuilder
importModels,
properties,
listeners ) );
transformedDomainModel.setParentFile( parentFile );
return transformedDomainModel;
}
public MavenProject buildFromLocalPath( File pom, List<Model> inheritedModels,
Collection<ImportModel> importModels,
Collection<InterpolatorProperty> interpolatorProperties,
PomArtifactResolver resolver, File projectDirectory,
ProjectBuilderConfiguration projectBuilderConfiguration )
throws IOException
{
PomClassicDomainModel domainModel = buildModel( pom,
inheritedModels,
importModels,
interpolatorProperties,
resolver,
projectDirectory,
projectBuilderConfiguration );
try
{
MavenProject mavenProject = new MavenProject( transformedDomainModel.getModel(),
MavenProject mavenProject = new MavenProject( domainModel.getModel(),
artifactFactory,
mavenTools,
null,
projectBuilderConfiguration );
mavenProject.setParentFile( parentFile );
mavenProject.setParentFile( domainModel.getParentFile() );
return mavenProject;
}
catch ( InvalidRepositoryException e )