From ebbb80139c2134facd9e3cab429a871fdda990aa Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Tue, 28 Dec 2004 19:30:43 +0000 Subject: [PATCH] o if we don't have a project then we don't have any pre/post goals. this happens when we are initializing a project. maybe for the initializing mode we should send in the parent POM. not sure yet. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163273 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/maven/lifecycle/session/MavenSession.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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;