mirror of https://github.com/apache/maven.git
Follow-on to finish the fix for MNG-421.
This adds external profile repositories to the artifactRepository construction used in resolving parent POMs. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@189670 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
30b1434723
commit
dd24bf77d5
|
@ -31,6 +31,7 @@ import org.apache.maven.model.Model;
|
|||
import org.apache.maven.model.Parent;
|
||||
import org.apache.maven.model.Plugin;
|
||||
import org.apache.maven.model.Profile;
|
||||
import org.apache.maven.model.Repository;
|
||||
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
|
||||
import org.apache.maven.profile.activation.ProfileActivationCalculator;
|
||||
import org.apache.maven.project.artifact.MavenMetadataSource;
|
||||
|
@ -223,6 +224,23 @@ public class DefaultMavenProjectBuilder
|
|||
|
||||
List aggregatedRemoteWagonRepositories = ProjectUtils.buildArtifactRepositories( superModel.getRepositories(), artifactRepositoryFactory, container );
|
||||
|
||||
for ( Iterator i = externalProfiles.iterator(); i.hasNext(); )
|
||||
{
|
||||
Profile externalProfile = (Profile) i.next();
|
||||
|
||||
for ( Iterator repoIterator = externalProfile.getRepositories().iterator(); repoIterator.hasNext(); )
|
||||
{
|
||||
Repository mavenRepo = (Repository) repoIterator.next();
|
||||
|
||||
ArtifactRepository artifactRepo = ProjectUtils.buildArtifactRepository( mavenRepo, artifactRepositoryFactory, container );
|
||||
|
||||
if ( !aggregatedRemoteWagonRepositories.contains( artifactRepo ) )
|
||||
{
|
||||
aggregatedRemoteWagonRepositories.add( artifactRepo );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MavenProject project = assembleLineage( model, lineage, aggregatedRemoteWagonRepositories, localRepository );
|
||||
|
||||
Model previous = superModel;
|
||||
|
|
Loading…
Reference in New Issue