mirror of https://github.com/apache/maven.git
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:
parent
1c1cede3b5
commit
cddc9df70e
|
@ -276,8 +276,8 @@ public class DefaultMavenProjectBuilder
|
||||||
modelCache.put( createCacheKey( model.getGroupId(), model.getArtifactId(), model.getVersion() ), model );
|
modelCache.put( createCacheKey( model.getGroupId(), model.getArtifactId(), model.getVersion() ), model );
|
||||||
|
|
||||||
MavenProject project = build( projectDescriptor.getAbsolutePath(), model, localRepository,
|
MavenProject project = build( projectDescriptor.getAbsolutePath(), model, localRepository,
|
||||||
Collections.EMPTY_LIST, projectDescriptor.getAbsoluteFile().getParentFile(),
|
buildArtifactRepositories( getSuperModel() ),
|
||||||
profileManager );
|
projectDescriptor.getAbsoluteFile().getParentFile(), profileManager );
|
||||||
|
|
||||||
if ( project.getDistributionManagement() != null && project.getDistributionManagement().getStatus() != null )
|
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
|
// only add the super repository if it wasn't overridden by a profile or project
|
||||||
List repositories = new ArrayList( aggregatedRemoteWagonRepositories );
|
List repositories = new ArrayList( aggregatedRemoteWagonRepositories );
|
||||||
List superRepositories = ProjectUtils.buildArtifactRepositories( superModel.getRepositories(),
|
List superRepositories = buildArtifactRepositories( superModel );
|
||||||
artifactRepositoryFactory, container );
|
|
||||||
for ( Iterator i = superRepositories.iterator(); i.hasNext(); )
|
for ( Iterator i = superRepositories.iterator(); i.hasNext(); )
|
||||||
{
|
{
|
||||||
ArtifactRepository repository = (ArtifactRepository) i.next();
|
ArtifactRepository repository = (ArtifactRepository) i.next();
|
||||||
|
@ -533,6 +532,12 @@ public class DefaultMavenProjectBuilder
|
||||||
return project;
|
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 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
|
* @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() )
|
if ( !model.getRepositories().isEmpty() )
|
||||||
{
|
{
|
||||||
List respositories = ProjectUtils.buildArtifactRepositories( model.getRepositories(),
|
List respositories = buildArtifactRepositories( model );
|
||||||
artifactRepositoryFactory, container );
|
|
||||||
|
|
||||||
for ( Iterator it = respositories.iterator(); it.hasNext(); )
|
for ( Iterator it = respositories.iterator(); it.hasNext(); )
|
||||||
{
|
{
|
||||||
|
@ -1114,8 +1118,7 @@ public class DefaultMavenProjectBuilder
|
||||||
{
|
{
|
||||||
project.setFile( new File( ".", "pom.xml" ) );
|
project.setFile( new File( ".", "pom.xml" ) );
|
||||||
|
|
||||||
List remoteRepositories = ProjectUtils.buildArtifactRepositories( superModel.getRepositories(),
|
List remoteRepositories = buildArtifactRepositories( superModel );
|
||||||
artifactRepositoryFactory, container );
|
|
||||||
|
|
||||||
project = processProjectLogic( "<Super-POM>", project, remoteRepositories, null );
|
project = processProjectLogic( "<Super-POM>", project, remoteRepositories, null );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue