diff --git a/maven-project/src/main/java/org/apache/maven/project/builder/impl/DefaultProjectBuilder.java b/maven-project/src/main/java/org/apache/maven/project/builder/impl/DefaultProjectBuilder.java index 56f35f06fc..be532dcf94 100644 --- a/maven-project/src/main/java/org/apache/maven/project/builder/impl/DefaultProjectBuilder.java +++ b/maven-project/src/main/java/org/apache/maven/project/builder/impl/DefaultProjectBuilder.java @@ -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 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 ); diff --git a/pom.xml b/pom.xml index 2b7f5252ae..089636aea3 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ org.apache.maven maven-parent - 9-SNAPSHOT + 10-SNAPSHOT ../pom/maven/pom.xml 4.0.0