Fix: If the child pom found a parent pom within a local build, where the child pom project/parent/groupId[artifactId] did not match the groupId[artifactId] of the parent pom, then it would exclude the parent pom from inheritance. Now it will attempt to locate the parent pom in the local repo. If the parent pom is not found in local repo, build will fail.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@696713 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Britton Isbell 2008-09-18 17:02:55 +00:00
parent 12b7abf394
commit 3caaba53ed
2 changed files with 10 additions and 1 deletions

View File

@ -310,6 +310,15 @@ public final class DefaultProjectBuilder
logger.warn( "Parent pom ids do not match: Parent File = " + parentFile.getAbsolutePath() + ", Parent ID = "
+ parentDomainModel.getId() + ", Child ID = " + domainModel.getId() + ", Expected Parent ID = "
+ domainModel.getModel().getParent().getId() );
List<DomainModel> parentDomainModels = getDomainModelParentsFromRepository( domainModel, artifactResolver );
if(parentDomainModels.size() == 0)
{
throw new IOException("Unable to find parent pom on local path or repo: "
+ domainModel.getModel().getParent().getId());
}
logger.info("Attempting to lookup from the repository: Found parents: " + parentDomainModels.size());
domainModels.addAll( parentDomainModels );
return domainModels;
}
domainModels.add( parentDomainModel );

View File

@ -18,7 +18,7 @@
<parent>
<groupId>org.apache.maven</groupId>
<artifactId>maven-parent</artifactId>
<version>9-SNAPSHOT</version>
<version>10-SNAPSHOT</version>
<relativePath>../pom/maven/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>