From d1c52a08430820fda1a72b53ca0a8b5bc9b84c79 Mon Sep 17 00:00:00 2001 From: John Dennis Casey Date: Tue, 27 Mar 2007 21:37:36 +0000 Subject: [PATCH] Restoring backward compat using the old constructor, which is now deprecated. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@523092 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/maven/execution/MavenSession.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) 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 47024703b7..d06b14ec31 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 @@ -27,6 +27,7 @@ import org.apache.maven.settings.Settings; import org.codehaus.plexus.PlexusContainer; import org.codehaus.plexus.component.repository.exception.ComponentLookupException; +import java.io.File; import java.util.Date; import java.util.LinkedHashMap; import java.util.List; @@ -50,6 +51,40 @@ public class MavenSession private MavenExecutionRequest request; private Map reports = new LinkedHashMap(); + + /** + * @deprecated Use {@link MavenSession#MavenSession(PlexusContainer, MavenExecutionRequest, EventDispatcher, ReactorManager)} + * instead. MavenExecutionRequest is now used for the rest of this information. + * + * @param container + * @param settings + * @param localRepository + * @param eventDispatcher + * @param reactorManager + * @param goals + * @param executionRootDir + * @param executionProperties + * @param startTime + */ + public MavenSession( PlexusContainer container, Settings settings, ArtifactRepository localRepository, + EventDispatcher eventDispatcher, ReactorManager reactorManager, List goals, + String executionRootDir, Properties executionProperties, Date startTime ) + { + this.container = container; + this.eventDispatcher = eventDispatcher; + this.reactorManager = reactorManager; + + MavenExecutionRequest request = new DefaultMavenExecutionRequest(); + + request.setBaseDirectory( new File( executionRootDir ) ); + request.setSettings( settings ); + request.setLocalRepository( localRepository ); + request.setGoals( goals ); + request.setProperties( executionProperties ); + request.setStartTime( startTime ); + + this.request = request; + } public MavenSession( PlexusContainer container, MavenExecutionRequest request,