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 b2bab450b1..dfe265c39f 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 @@ -138,6 +138,12 @@ public class DefaultProfileInjector private void injectPlugins( PluginContainer profileContainer, PluginContainer modelContainer ) { + if ( profileContainer == null || modelContainer == null ) + { + // nothing to do... + return; + } + List modelPlugins = modelContainer.getPlugins(); if ( modelPlugins == null )