org.apache.maven.execution

## Class MavenSession

- java.lang.Object
- - org.apache.maven.execution.MavenSession

    public class MavenSession
    extends java.lang.Object

Version:
  $Id: MavenSession.java 793745 2009-07-13 23:24:10Z jdcasey $
Author:
  Jason van Zyl

### Constructor Summary

Constructors
Constructor and Description
`MavenSession(PlexusContainer container, Settings settings, ArtifactRepository localRepository, EventDispatcher eventDispatcher, ReactorManager reactorManager, java.util.List goals, java.lang.String executionRootDir, java.util.Properties executionProperties, java.util.Date startTime)`
`MavenSession(PlexusContainer container, Settings settings, ArtifactRepository localRepository, EventDispatcher eventDispatcher, ReactorManager reactorManager, java.util.List goals, java.lang.String executionRootDir, java.util.Properties executionProperties, java.util.Properties userProperties, java.util.Date startTime)`

### Method Summary

Methods
`PlexusContainer` `getContainer()`
`MavenProject` `getCurrentProject()` Return the current project for use in a mojo execution.
`EventDispatcher` `getEventDispatcher()`
`java.util.Properties` `getExecutionProperties()`
`java.lang.String` `getExecutionRootDirectory()`
`java.util.List` `getGoals()`
`ArtifactRepository` `getLocalRepository()`
`java.util.Map` `getPluginContext(PluginDescriptor pluginDescriptor, MavenProject project)`
`ProjectBuilderConfiguration` `getProjectBuilderConfiguration()` NOTE: This varies from `DefaultMavenExecutionRequest.getProjectBuilderConfiguration()` in that it doesn't supply a global profile manager.
`Settings` `getSettings()`
`java.util.List<MavenProject>` `getSortedProjects()`
`java.util.Date` `getStartTime()`
`java.util.Properties` `getUserProperties()`
`boolean` `isUsingPOMsFromFilesystem()`
`java.lang.Object` `lookup(java.lang.String role)`
`java.lang.Object` `lookup(java.lang.String role, java.lang.String roleHint)`
`java.util.List` `lookupList(java.lang.String role)`
`java.util.Map` `lookupMap(java.lang.String role)`
`void` `setCurrentProject(MavenProject currentProject)`
`void` `setUserProperties(java.util.Properties userProperties)`
`void` `setUsingPOMsFromFilesystem(boolean usingPOMsFromFilesystem)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MavenSession

    public MavenSession(PlexusContainer container,
                Settings settings,
                ArtifactRepository localRepository,
                EventDispatcher eventDispatcher,
                ReactorManager reactorManager,
                java.util.List goals,
                java.lang.String executionRootDir,
                java.util.Properties executionProperties,
                java.util.Date startTime)

#### MavenSession

    public MavenSession(PlexusContainer container,
                Settings settings,
                ArtifactRepository localRepository,
                EventDispatcher eventDispatcher,
                ReactorManager reactorManager,
                java.util.List goals,
                java.lang.String executionRootDir,
                java.util.Properties executionProperties,
                java.util.Properties userProperties,
                java.util.Date startTime)

### Method Detail

#### getPluginContext

    public java.util.Map getPluginContext(PluginDescriptor pluginDescriptor,
                                 MavenProject project)

#### getContainer

    public PlexusContainer getContainer()

#### getLocalRepository

    public ArtifactRepository getLocalRepository()

#### getGoals

    public java.util.List getGoals()

#### getExecutionProperties

    public java.util.Properties getExecutionProperties()

#### lookup

    public java.lang.Object lookup(java.lang.String role)
                            throws ComponentLookupException

Throws:
  `ComponentLookupException`

#### lookup

    public java.lang.Object lookup(java.lang.String role,
                          java.lang.String roleHint)
                            throws ComponentLookupException

Throws:
  `ComponentLookupException`

#### lookupList

    public java.util.List lookupList(java.lang.String role)
                              throws ComponentLookupException

Throws:
  `ComponentLookupException`

#### lookupMap

    public java.util.Map lookupMap(java.lang.String role)
                            throws ComponentLookupException

Throws:
  `ComponentLookupException`

#### getEventDispatcher

    public EventDispatcher getEventDispatcher()

#### getSettings

    public Settings getSettings()

#### getSortedProjects

    public java.util.List<MavenProject> getSortedProjects()

#### getExecutionRootDirectory

    public java.lang.String getExecutionRootDirectory()

#### setUsingPOMsFromFilesystem

    public void setUsingPOMsFromFilesystem(boolean usingPOMsFromFilesystem)

#### isUsingPOMsFromFilesystem

    public boolean isUsingPOMsFromFilesystem()

#### getStartTime

    public java.util.Date getStartTime()

#### setCurrentProject

    public void setCurrentProject(MavenProject currentProject)

#### getCurrentProject

    public MavenProject getCurrentProject()

Return the current project for use in a mojo execution.

#### getUserProperties

    public java.util.Properties getUserProperties()

#### setUserProperties

    public void setUserProperties(java.util.Properties userProperties)

#### getProjectBuilderConfiguration

    public ProjectBuilderConfiguration getProjectBuilderConfiguration()

NOTE: This varies from `DefaultMavenExecutionRequest.getProjectBuilderConfiguration()` in that it doesn't supply a global profile manager.