mirror of https://github.com/apache/maven.git
o we don't need to deal with import models right now, all we care about in the near future are mixins. this is an attempt
to simplify the API enabling me to more easily create the specification tests git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@727210 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ee9e67af9b
commit
ff3548a6b4
|
@ -548,12 +548,10 @@ public class DefaultMavenProjectBuilder
|
|||
try
|
||||
{
|
||||
mavenProject = projectBuilder.buildFromLocalPath( projectDescriptor,
|
||||
Arrays.asList(
|
||||
getSuperProject( config, projectDescriptor, true ).getModel() ),
|
||||
null,
|
||||
interpolatorProperties,
|
||||
resolver,
|
||||
config );
|
||||
Arrays.asList( getSuperProject( config, projectDescriptor, true ).getModel() ),
|
||||
interpolatorProperties,
|
||||
resolver,
|
||||
config );
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
|
|
|
@ -19,15 +19,15 @@ package org.apache.maven.project.builder;
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.model.Model;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.apache.maven.project.ProjectBuilderConfiguration;
|
||||
import org.apache.maven.shared.model.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.*;
|
||||
import org.apache.maven.shared.model.InterpolatorProperty;
|
||||
|
||||
/**
|
||||
* Provides services for building maven projects from models.
|
||||
|
@ -36,9 +36,8 @@ public interface ProjectBuilder
|
|||
{
|
||||
public PomClassicDomainModel buildModel( File pom,
|
||||
List<Model> inheritedModels,
|
||||
Collection<ImportModel> importModels,
|
||||
Collection<InterpolatorProperty> interpolatorProperties,
|
||||
DefaultPomArtifactResolver resolver )
|
||||
PomArtifactResolver resolver )
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
|
@ -55,9 +54,8 @@ public interface ProjectBuilder
|
|||
*/
|
||||
MavenProject buildFromLocalPath( File pom,
|
||||
List<Model> inheritedModels,
|
||||
Collection<ImportModel> importModels,
|
||||
Collection<InterpolatorProperty> interpolatorProperties,
|
||||
DefaultPomArtifactResolver resolver,
|
||||
PomArtifactResolver resolver,
|
||||
ProjectBuilderConfiguration projectBuilderConfiguration )
|
||||
throws IOException;
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ import org.apache.maven.project.ProjectBuilderConfiguration;
|
|||
import org.apache.maven.project.builder.ArtifactModelContainerFactory;
|
||||
import org.apache.maven.project.builder.IdModelContainerFactory;
|
||||
import org.apache.maven.project.builder.DefaultPomArtifactResolver;
|
||||
import org.apache.maven.project.builder.PomArtifactResolver;
|
||||
import org.apache.maven.project.builder.PomClassicDomainModel;
|
||||
import org.apache.maven.project.builder.PomClassicDomainModelFactory;
|
||||
import org.apache.maven.project.builder.PomClassicTransformer;
|
||||
|
@ -74,14 +75,9 @@ public final class DefaultProjectBuilder
|
|||
|
||||
private Logger logger;
|
||||
|
||||
public DefaultProjectBuilder()
|
||||
{
|
||||
}
|
||||
|
||||
public PomClassicDomainModel buildModel( File pom, List<Model> inheritedModels,
|
||||
Collection<ImportModel> importModels,
|
||||
Collection<InterpolatorProperty> interpolatorProperties,
|
||||
DefaultPomArtifactResolver resolver )
|
||||
PomArtifactResolver resolver )
|
||||
throws IOException
|
||||
{
|
||||
if ( pom == null )
|
||||
|
@ -156,7 +152,7 @@ public final class DefaultProjectBuilder
|
|||
PomClassicDomainModel transformedDomainModel = ( (PomClassicDomainModel) ctx.transform( domainModels,
|
||||
transformer,
|
||||
transformer,
|
||||
importModels,
|
||||
Collections.EMPTY_LIST,
|
||||
properties,
|
||||
listeners ) );
|
||||
transformedDomainModel.setParentFile( parentFile );
|
||||
|
@ -165,15 +161,13 @@ public final class DefaultProjectBuilder
|
|||
}
|
||||
|
||||
public MavenProject buildFromLocalPath( File pom, List<Model> inheritedModels,
|
||||
Collection<ImportModel> importModels,
|
||||
Collection<InterpolatorProperty> interpolatorProperties,
|
||||
DefaultPomArtifactResolver resolver,
|
||||
PomArtifactResolver resolver,
|
||||
ProjectBuilderConfiguration projectBuilderConfiguration )
|
||||
throws IOException
|
||||
{
|
||||
PomClassicDomainModel domainModel = buildModel( pom,
|
||||
inheritedModels,
|
||||
importModels,
|
||||
interpolatorProperties,
|
||||
resolver );
|
||||
|
||||
|
@ -221,7 +215,7 @@ public final class DefaultProjectBuilder
|
|||
}
|
||||
|
||||
private List<DomainModel> getDomainModelParentsFromRepository( PomClassicDomainModel domainModel,
|
||||
DefaultPomArtifactResolver artifactResolver )
|
||||
PomArtifactResolver artifactResolver )
|
||||
throws IOException
|
||||
{
|
||||
List<DomainModel> domainModels = new ArrayList<DomainModel>();
|
||||
|
@ -261,7 +255,7 @@ public final class DefaultProjectBuilder
|
|||
* @throws IOException
|
||||
*/
|
||||
private List<DomainModel> getDomainModelParentsFromLocalPath( PomClassicDomainModel domainModel,
|
||||
DefaultPomArtifactResolver artifactResolver,
|
||||
PomArtifactResolver artifactResolver,
|
||||
File projectDirectory )
|
||||
throws IOException
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue