org.apache.maven.execution
Class MavenSession

java.lang.Object
  extended by org.apache.maven.execution.MavenSession

public class MavenSession
extends java.lang.Object

Version:
$Id: MavenSession.java 726164 2008-12-13 03:17:35Z jvanzyl $
Author:
Jason van Zyl

Constructor Summary
MavenSession(org.codehaus.plexus.PlexusContainer container, MavenExecutionRequest request, EventDispatcher eventDispatcher, ReactorManager reactorManager)
           
 
Method Summary
 void addForkedProject(MavenProject project)
          Push the existing currentProject onto the forked-project stack, and set the specified project as the new current project.
 void addReport(MojoDescriptor mojoDescriptor, MavenReport report)
          Add a newly-executed report (MavenReport instance) to the reports collection, for future reference.
 void clearReports()
          Clear the reports for this project
 BuildPlan getBuildPlan(MavenProject project)
           
 BuildPlan getBuildPlan(java.lang.String projectId)
           
 java.util.Map getBuildPlans()
           
 org.codehaus.plexus.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)
           
 java.util.List<java.lang.String> getPluginGroups()
           
 ProjectBuilderConfiguration getProjectBuilderConfiguration()
           
 MavenRealmManager getRealmManager()
           
 java.util.Set getReportMojoDescriptors()
           
 java.util.List getReports()
          Retrieve the list of reports (MavenReport instances) that have been executed against this project, for use in another mojo's execution.
 MavenExecutionRequest getRequest()
           
 Settings getSettings()
           
 java.util.List getSortedProjects()
           
 java.util.Date getStartTime()
           
 boolean isOffline()
           
 boolean isUsingPOMsFromFilesystem()
           
<T> T
lookup(java.lang.Class<T> type)
           
<T> T
lookup(java.lang.Class<T> type, java.lang.String roleHint)
           
 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)
           
 MavenProject removeForkedProject()
          Peel off the last forked project from the stack, and restore it as the currentProject.
 void setBuildPlan(MavenProject project, BuildPlan buildPlan)
           
 void setCurrentProject(MavenProject currentProject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MavenSession

public MavenSession(org.codehaus.plexus.PlexusContainer container,
                    MavenExecutionRequest request,
                    EventDispatcher eventDispatcher,
                    ReactorManager reactorManager)
Method Detail

getRealmManager

public MavenRealmManager getRealmManager()

getPluginContext

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

getContainer

public org.codehaus.plexus.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 org.codehaus.plexus.component.repository.exception.ComponentLookupException
Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException

lookup

public java.lang.Object lookup(java.lang.String role,
                               java.lang.String roleHint)
                        throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException

lookup

public <T> T lookup(java.lang.Class<T> type)
         throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException

lookup

public <T> T lookup(java.lang.Class<T> type,
                    java.lang.String roleHint)
         throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException

lookupList

public java.util.List lookupList(java.lang.String role)
                          throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException

lookupMap

public java.util.Map lookupMap(java.lang.String role)
                        throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException

getEventDispatcher

public EventDispatcher getEventDispatcher()

getSettings

public Settings getSettings()

getSortedProjects

public java.util.List getSortedProjects()

getExecutionRootDirectory

public java.lang.String getExecutionRootDirectory()

isUsingPOMsFromFilesystem

public boolean isUsingPOMsFromFilesystem()

getStartTime

public java.util.Date getStartTime()

getRequest

public MavenExecutionRequest getRequest()

addForkedProject

public void addForkedProject(MavenProject project)
Push the existing currentProject onto the forked-project stack, and set the specified project as the new current project. This signifies the beginning of a new forked-execution context.


removeForkedProject

public MavenProject removeForkedProject()
Peel off the last forked project from the stack, and restore it as the currentProject. This signifies the cleanup of a completed forked-execution context.


setCurrentProject

public void setCurrentProject(MavenProject currentProject)

getCurrentProject

public MavenProject getCurrentProject()
Return the current project for use in a mojo execution.


getReports

public java.util.List getReports()
Retrieve the list of reports (MavenReport instances) that have been executed against this project, for use in another mojo's execution.


clearReports

public void clearReports()
Clear the reports for this project


addReport

public void addReport(MojoDescriptor mojoDescriptor,
                      MavenReport report)
Add a newly-executed report (MavenReport instance) to the reports collection, for future reference.


getReportMojoDescriptors

public java.util.Set getReportMojoDescriptors()

getBuildPlan

public BuildPlan getBuildPlan(java.lang.String projectId)

getBuildPlan

public BuildPlan getBuildPlan(MavenProject project)

setBuildPlan

public void setBuildPlan(MavenProject project,
                         BuildPlan buildPlan)

getBuildPlans

public java.util.Map getBuildPlans()

getProjectBuilderConfiguration

public ProjectBuilderConfiguration getProjectBuilderConfiguration()

getPluginGroups

public java.util.List<java.lang.String> getPluginGroups()

isOffline

public boolean isOffline()


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.