diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java index 783dd7cdc9..af9642c401 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java @@ -143,6 +143,8 @@ public class DefaultPluginManager // use for the mapping manager in here Settings settings = session.getSettings(); List pluginGroups = settings.getPluginGroups(); + if ( pluginMappingManager == null ) throw new NullPointerException( "pluginMappingManager was null" ); + if ( project == null ) throw new NullPointerException( "project was null" ); return pluginMappingManager.getByPrefix( prefix, pluginGroups, project.getPluginArtifactRepositories(), session.getLocalRepository() ); }