diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/session/MavenSession.java b/maven-core/src/main/java/org/apache/maven/lifecycle/session/MavenSession.java index 85662fe631..6fdf622f4f 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/session/MavenSession.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/session/MavenSession.java @@ -163,6 +163,11 @@ public class MavenSession public List getPreGoals( String goal ) { + if ( project == null ) + { + return null; + } + List result = (List) preGoalMappings.get( goal ); return result; @@ -170,6 +175,11 @@ public class MavenSession public List getPostGoals( String goal ) { + if ( project == null ) + { + return null; + } + List result = (List) postGoalMappings.get( goal ); return result;