diff --git a/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java b/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java index d307a5c7ca..7fe554a958 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java +++ b/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java @@ -67,7 +67,11 @@ public class MavenSession this.container = container; this.request = request; this.result = result; - this.currentProject = projects.get( 0 ); + //TODO: Current for testing classes creating the session + if ( projects.size() > 0 ) + { + this.currentProject = projects.get( 0 ); + } this.projects = projects; }