Class MavenSession

java.lang.Object
org.apache.maven.execution.MavenSession
All Implemented Interfaces:
Cloneable

public class MavenSession extends Object implements Cloneable
A Maven execution session.
  • Field Details

    • request

      private MavenExecutionRequest request
    • result

      private MavenExecutionResult result
    • repositorySession

      private org.eclipse.aether.RepositorySystemSession repositorySession
    • executionProperties

      private Properties executionProperties
    • currentProject

      private ThreadLocal<MavenProject> currentProject
    • projects

      private List<MavenProject> projects
      These projects have already been topologically sorted in the Maven component before being passed into the session. This is also the potentially constrained set of projects by using --projects on the command line.
    • allProjects

      private List<MavenProject> allProjects
      The full set of projects before any potential constraining by --projects. Useful in the case where you want to build a smaller set of projects but perform other operations in the context of your reactor.
    • topLevelProject

      private MavenProject topLevelProject
    • projectDependencyGraph

      private ProjectDependencyGraph projectDependencyGraph
    • parallel

      private boolean parallel
    • pluginContextsByProjectAndPluginKey

      private final Map<String,Map<String,Map<String,Object>>> pluginContextsByProjectAndPluginKey
    • projectMap

      private Map<String,MavenProject> projectMap
    • container

      private org.codehaus.plexus.PlexusContainer container
    • settings

      private final Settings settings
  • Constructor Details

  • Method Details

    • setProjects

      public void setProjects(List<MavenProject> projects)
    • getLocalRepository

      public ArtifactRepository getLocalRepository()
    • getGoals

      public List<String> getGoals()
    • getUserProperties

      public Properties getUserProperties()
      Gets the user properties to use for interpolation and profile activation. The user properties have been configured directly by the user on his discretion, e.g. via the -Dkey=value parameter on the command line.
      Returns:
      The user properties, never null.
    • getSystemProperties

      public Properties getSystemProperties()
      Gets the system properties to use for interpolation and profile activation. The system properties are collected from the runtime environment like System.getProperties() and environment variables.
      Returns:
      The system properties, never null.
    • getSettings

      public Settings getSettings()
    • getProjects

      public List<MavenProject> getProjects()
    • getExecutionRootDirectory

      public String getExecutionRootDirectory()
    • getRequest

      public MavenExecutionRequest getRequest()
    • setCurrentProject

      public void setCurrentProject(MavenProject currentProject)
    • getCurrentProject

      public MavenProject getCurrentProject()
    • getProjectBuildingRequest

      public ProjectBuildingRequest getProjectBuildingRequest()
    • getPluginGroups

      public List<String> getPluginGroups()
    • isOffline

      public boolean isOffline()
    • getTopLevelProject

      public MavenProject getTopLevelProject()
    • getResult

      public MavenExecutionResult getResult()
    • getPluginContext

      public Map<String,Object> getPluginContext(PluginDescriptor plugin, MavenProject project)
    • getProjectDependencyGraph

      public ProjectDependencyGraph getProjectDependencyGraph()
    • setProjectDependencyGraph

      public void setProjectDependencyGraph(ProjectDependencyGraph projectDependencyGraph)
    • getReactorFailureBehavior

      public String getReactorFailureBehavior()
    • clone

      public MavenSession clone()
      Overrides:
      clone in class Object
    • getStartTime

      public Date getStartTime()
    • isParallel

      public boolean isParallel()
    • setParallel

      public void setParallel(boolean parallel)
    • getRepositorySession

      public org.eclipse.aether.RepositorySystemSession getRepositorySession()
    • setProjectMap

      public void setProjectMap(Map<String,MavenProject> projectMap)
    • getAllProjects

      public List<MavenProject> getAllProjects()
      This is a provisional method and may be removed
    • setAllProjects

      public void setAllProjects(List<MavenProject> allProjects)
      This is a provisional method and may be removed
    • getProjectMap

      @Deprecated public Map<String,MavenProject> getProjectMap()
      Deprecated.
    • getSortedProjects

      @Deprecated public List<MavenProject> getSortedProjects()
      Deprecated.
    • getRepositoryCache

      @Deprecated public RepositoryCache getRepositoryCache()
      Deprecated.
    • getEventDispatcher

      @Deprecated public EventDispatcher getEventDispatcher()
      Deprecated.
    • isUsingPOMsFromFilesystem

      @Deprecated public boolean isUsingPOMsFromFilesystem()
      Deprecated.
    • getExecutionProperties

      @Deprecated public Properties getExecutionProperties()
      Deprecated.
    • getContainer

      @Deprecated public org.codehaus.plexus.PlexusContainer getContainer()
      Deprecated.
    • lookup

      @Deprecated public Object lookup(String role) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
      Deprecated.
      Throws:
      org.codehaus.plexus.component.repository.exception.ComponentLookupException
    • lookup

      @Deprecated public Object lookup(String role, String roleHint) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
      Deprecated.
      Throws:
      org.codehaus.plexus.component.repository.exception.ComponentLookupException
    • lookupList

      @Deprecated public List<Object> lookupList(String role) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
      Deprecated.
      Throws:
      org.codehaus.plexus.component.repository.exception.ComponentLookupException
    • lookupMap

      @Deprecated public Map<String,Object> lookupMap(String role) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
      Deprecated.
      Throws:
      org.codehaus.plexus.component.repository.exception.ComponentLookupException