mirror of https://github.com/apache/maven.git
Attempting to fix problem with resolution of parent-poms for plugins, but continuing the use of the plugin repository when assembling the plugin-pom's lineage.
NOTE: I have not bootstrapped with this fix in place (I'm in the middle of something else right now), so BEWARE! git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@219252 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2c80da6ba4
commit
21e050e5fa
|
@ -194,7 +194,7 @@ public class DefaultMavenProjectBuilder
|
|||
// Always cache files in the source tree over those in the repository
|
||||
modelCache.put( createCacheKey( model.getGroupId(), model.getArtifactId(), model.getVersion() ), model );
|
||||
|
||||
MavenProject project = build( projectDescriptor.getAbsolutePath(), model, localRepository, externalProfiles );
|
||||
MavenProject project = build( projectDescriptor.getAbsolutePath(), model, localRepository, Collections.EMPTY_LIST, externalProfiles );
|
||||
|
||||
// Only translate the base directory for files in the source tree
|
||||
pathTranslator.alignToBaseDirectory( project.getModel(), projectDescriptor );
|
||||
|
@ -216,7 +216,7 @@ public class DefaultMavenProjectBuilder
|
|||
{
|
||||
Model model = findModelFromRepository( artifact, remoteArtifactRepositories, localRepository );
|
||||
|
||||
return build( "Artifact [" + artifact.getId() + "]", model, localRepository, Collections.EMPTY_LIST );
|
||||
return build( "Artifact [" + artifact.getId() + "]", model, localRepository, remoteArtifactRepositories, Collections.EMPTY_LIST );
|
||||
}
|
||||
|
||||
private Model findModelFromRepository( Artifact artifact, List remoteArtifactRepositories,
|
||||
|
@ -263,16 +263,24 @@ public class DefaultMavenProjectBuilder
|
|||
}
|
||||
|
||||
private MavenProject build( String pomLocation, Model model, ArtifactRepository localRepository,
|
||||
List externalProfiles )
|
||||
List remoteArtifactRepositories, List externalProfiles )
|
||||
throws ProjectBuildingException
|
||||
{
|
||||
Model superModel = getSuperModel();
|
||||
|
||||
LinkedList lineage = new LinkedList();
|
||||
|
||||
List aggregatedRemoteWagonRepositories = ProjectUtils.buildArtifactRepositories( superModel.getRepositories(),
|
||||
List aggregatedRemoteWagonRepositories;
|
||||
if ( remoteArtifactRepositories == null || remoteArtifactRepositories.isEmpty() )
|
||||
{
|
||||
aggregatedRemoteWagonRepositories = ProjectUtils.buildArtifactRepositories( superModel.getRepositories(),
|
||||
artifactRepositoryFactory,
|
||||
container );
|
||||
}
|
||||
else
|
||||
{
|
||||
aggregatedRemoteWagonRepositories = remoteArtifactRepositories;
|
||||
}
|
||||
|
||||
for ( Iterator i = externalProfiles.iterator(); i.hasNext(); )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue