Class MavenSession

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class MavenSession
    extends java.lang.Object
    implements java.lang.Cloneable
    A Maven execution session.
    • Field Detail

      • repositorySession

        private org.eclipse.aether.RepositorySystemSession repositorySession
      • executionProperties

        private java.util.Properties executionProperties
      • projects

        private java.util.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 java.util.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.
      • parallel

        private boolean parallel
      • pluginContextsByProjectAndPluginKey

        private final java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.Object>>> pluginContextsByProjectAndPluginKey
      • projectMap

        private java.util.Map<java.lang.String,​MavenProject> projectMap
      • container

        private org.codehaus.plexus.PlexusContainer container
      • settings

        private final Settings settings
    • Constructor Detail

      • MavenSession

        @Deprecated
        public MavenSession​(org.codehaus.plexus.PlexusContainer container,
                            org.eclipse.aether.RepositorySystemSession repositorySession,
                            MavenExecutionRequest request,
                            MavenExecutionResult result)
        Deprecated.
      • MavenSession

        @Deprecated
        public MavenSession​(org.codehaus.plexus.PlexusContainer container,
                            Settings settings,
                            ArtifactRepository localRepository,
                            EventDispatcher eventDispatcher,
                            ReactorManager unused,
                            java.util.List<java.lang.String> goals,
                            java.lang.String executionRootDir,
                            java.util.Properties executionProperties,
                            java.util.Date startTime)
        Deprecated.
      • MavenSession

        @Deprecated
        public MavenSession​(org.codehaus.plexus.PlexusContainer container,
                            Settings settings,
                            ArtifactRepository localRepository,
                            EventDispatcher eventDispatcher,
                            ReactorManager unused,
                            java.util.List<java.lang.String> goals,
                            java.lang.String executionRootDir,
                            java.util.Properties executionProperties,
                            java.util.Properties userProperties,
                            java.util.Date startTime)
        Deprecated.
    • Method Detail

      • setProjects

        public void setProjects​(java.util.List<MavenProject> projects)
      • getGoals

        public java.util.List<java.lang.String> getGoals()
      • getUserProperties

        public java.util.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 java.util.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 java.util.List<MavenProject> getProjects()
      • getExecutionRootDirectory

        public java.lang.String getExecutionRootDirectory()
      • setCurrentProject

        public void setCurrentProject​(MavenProject currentProject)
      • getCurrentProject

        public MavenProject getCurrentProject()
      • getPluginGroups

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

        public boolean isOffline()
      • getTopLevelProject

        public MavenProject getTopLevelProject()
      • getPluginContext

        public java.util.Map<java.lang.String,​java.lang.Object> getPluginContext​(PluginDescriptor plugin,
                                                                                       MavenProject project)
      • setProjectDependencyGraph

        public void setProjectDependencyGraph​(ProjectDependencyGraph projectDependencyGraph)
      • getReactorFailureBehavior

        public java.lang.String getReactorFailureBehavior()
      • clone

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

        public java.util.Date getStartTime()
      • isParallel

        public boolean isParallel()
      • setParallel

        public void setParallel​(boolean parallel)
      • getRepositorySession

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

        public void setProjectMap​(java.util.Map<java.lang.String,​MavenProject> projectMap)
      • getAllProjects

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

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

        @Deprecated
        public java.util.Map<java.lang.String,​MavenProject> getProjectMap()
        Deprecated.
      • getSortedProjects

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

        @Deprecated
        public RepositoryCache getRepositoryCache()
        Deprecated.
      • getEventDispatcher

        @Deprecated
        public EventDispatcher getEventDispatcher()
        Deprecated.
      • isUsingPOMsFromFilesystem

        @Deprecated
        public boolean isUsingPOMsFromFilesystem()
        Deprecated.
      • getContainer

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

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

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

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

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