diff --git a/maven-project/src/main/java/org/apache/maven/project/injection/DefaultProfileInjector.java b/maven-project/src/main/java/org/apache/maven/project/injection/DefaultProfileInjector.java index 1858033ee5..58f45d7898 100644 --- a/maven-project/src/main/java/org/apache/maven/project/injection/DefaultProfileInjector.java +++ b/maven-project/src/main/java/org/apache/maven/project/injection/DefaultProfileInjector.java @@ -12,16 +12,8 @@ public class DefaultProfileInjector public void inject( Profile profile, Model model ) { - ModelUtils.mergeModelBases( profile, model ); - - model.setDependencies( profile.getDependencies() ); - model.setDependencyManagement( profile.getDependencyManagement() ); - model.setDistributionManagement( profile.getDistributionManagement() ); - model.setModules( profile.getModules() ); - model.setPluginRepositories( profile.getPluginRepositories() ); - model.setReporting( profile.getReporting() ); - model.setRepositories( profile.getRepositories() ); - + ModelUtils.mergeModelBases( model, profile ); + BuildBase profileBuild = profile.getBuild(); if ( profileBuild != null ) {