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 981e22bdb9..2e0970a147 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 @@ -562,7 +562,7 @@ public class DefaultMavenProjectBuilder // clone the model because the profile injection below will modify this instance MavenProject p = new MavenProject( ModelUtils.cloneModel( model ) ); p.setFile( project.getFile() ); - modelCache.put( key, project ); + modelCache.put( key, p ); } List activeProfiles = project.getActiveProfiles();