PR: MNG-753

add a missing need for the super repository

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@240218 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-08-26 12:23:20 +00:00
parent 1c1cede3b5
commit cddc9df70e
1 changed files with 11 additions and 8 deletions

View File

@ -276,8 +276,8 @@ public class DefaultMavenProjectBuilder
modelCache.put( createCacheKey( model.getGroupId(), model.getArtifactId(), model.getVersion() ), model );
MavenProject project = build( projectDescriptor.getAbsolutePath(), model, localRepository,
Collections.EMPTY_LIST, projectDescriptor.getAbsoluteFile().getParentFile(),
profileManager );
buildArtifactRepositories( getSuperModel() ),
projectDescriptor.getAbsoluteFile().getParentFile(), profileManager );
if ( project.getDistributionManagement() != null && project.getDistributionManagement().getStatus() != null )
{
@ -508,8 +508,7 @@ public class DefaultMavenProjectBuilder
// only add the super repository if it wasn't overridden by a profile or project
List repositories = new ArrayList( aggregatedRemoteWagonRepositories );
List superRepositories = ProjectUtils.buildArtifactRepositories( superModel.getRepositories(),
artifactRepositoryFactory, container );
List superRepositories = buildArtifactRepositories( superModel );
for ( Iterator i = superRepositories.iterator(); i.hasNext(); )
{
ArtifactRepository repository = (ArtifactRepository) i.next();
@ -533,6 +532,12 @@ public class DefaultMavenProjectBuilder
return project;
}
private List buildArtifactRepositories( Model model )
throws ProjectBuildingException
{
return ProjectUtils.buildArtifactRepositories( model.getRepositories(), artifactRepositoryFactory, container );
}
/**
* @todo can this take in a model instead of a project and still be successful?
* @todo In fact, does project REALLY need a MavenProject as a parent? Couldn't it have just a wrapper around a
@ -664,8 +669,7 @@ public class DefaultMavenProjectBuilder
{
if ( !model.getRepositories().isEmpty() )
{
List respositories = ProjectUtils.buildArtifactRepositories( model.getRepositories(),
artifactRepositoryFactory, container );
List respositories = buildArtifactRepositories( model );
for ( Iterator it = respositories.iterator(); it.hasNext(); )
{
@ -1114,8 +1118,7 @@ public class DefaultMavenProjectBuilder
{
project.setFile( new File( ".", "pom.xml" ) );
List remoteRepositories = ProjectUtils.buildArtifactRepositories( superModel.getRepositories(),
artifactRepositoryFactory, container );
List remoteRepositories = buildArtifactRepositories( superModel );
project = processProjectLogic( "<Super-POM>", project, remoteRepositories, null );