mirror of https://github.com/apache/maven.git
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:
parent
12b7abf394
commit
3caaba53ed
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue