diff --git a/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java b/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java index b5088156d9..331e585a9a 100644 --- a/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java +++ b/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java @@ -884,6 +884,8 @@ public class DefaultMavenProjectBuilder superModel.setVersion( STANDALONE_SUPERPOM_VERSION ); MavenProject project = new MavenProject( superModel ); + + project.setOriginalModel( superModel ); try { diff --git a/maven-project/src/main/java/org/apache/maven/project/MavenProject.java b/maven-project/src/main/java/org/apache/maven/project/MavenProject.java index 0b32a2dabc..dd6670e7f8 100644 --- a/maven-project/src/main/java/org/apache/maven/project/MavenProject.java +++ b/maven-project/src/main/java/org/apache/maven/project/MavenProject.java @@ -176,6 +176,11 @@ public class MavenProject this.profileProperties = new Properties( project.profileProperties ); this.model = ModelUtils.cloneModel( project.model ); + + if ( project.originalModel != null ) + { + this.originalModel = ModelUtils.cloneModel( project.originalModel ); + } // TODO: need to clone this too? this.artifact = project.artifact;