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:
John Dennis Casey 2005-07-15 22:13:10 +00:00
parent 2c80da6ba4
commit 21e050e5fa
1 changed files with 15 additions and 7 deletions

View File

@ -194,7 +194,7 @@ private MavenProject buildFromSourceFile( File projectDescriptor, ArtifactReposi
// 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 MavenProject buildFromRepository( Artifact artifact, List remoteArtifactR
{
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,17 +263,25 @@ private Model findModelFromRepository( Artifact artifact, List remoteArtifactRep
}
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(),
artifactRepositoryFactory,
container );
List aggregatedRemoteWagonRepositories;
if ( remoteArtifactRepositories == null || remoteArtifactRepositories.isEmpty() )
{
aggregatedRemoteWagonRepositories = ProjectUtils.buildArtifactRepositories( superModel.getRepositories(),
artifactRepositoryFactory,
container );
}
else
{
aggregatedRemoteWagonRepositories = remoteArtifactRepositories;
}
for ( Iterator i = externalProfiles.iterator(); i.hasNext(); )
{
Profile externalProfile = (Profile) i.next();