Class SessionStub

java.lang.Object
org.apache.maven.api.plugin.testing.stubs.SessionStub
All Implemented Interfaces:
org.apache.maven.api.Session

public class SessionStub extends Object implements org.apache.maven.api.Session
  • Constructor Details

    • SessionStub

      public SessionStub(org.apache.maven.api.settings.Settings settings)
    • SessionStub

      public SessionStub()
    • SessionStub

      public SessionStub(Map<String,String> userProperties)
    • SessionStub

      public SessionStub(Map<String,String> systemProperties, Map<String,String> userProperties, org.apache.maven.api.settings.Settings settings)
  • Method Details

    • getSettings

      public org.apache.maven.api.settings.Settings getSettings()
      Specified by:
      getSettings in interface org.apache.maven.api.Session
    • getSystemProperties

      public Map<String,String> getSystemProperties()
      Specified by:
      getSystemProperties in interface org.apache.maven.api.Session
    • getUserProperties

      public Map<String,String> getUserProperties()
      Specified by:
      getUserProperties in interface org.apache.maven.api.Session
    • getEffectiveProperties

      @Nonnull public Map<String,String> getEffectiveProperties(@Nullable org.apache.maven.api.Project project)
      Specified by:
      getEffectiveProperties in interface org.apache.maven.api.Session
    • getLocalRepository

      public org.apache.maven.api.LocalRepository getLocalRepository()
      Specified by:
      getLocalRepository in interface org.apache.maven.api.Session
    • getTopDirectory

      public Path getTopDirectory()
      Specified by:
      getTopDirectory in interface org.apache.maven.api.Session
    • getRootDirectory

      public Path getRootDirectory()
      Specified by:
      getRootDirectory in interface org.apache.maven.api.Session
    • getRemoteRepositories

      public List<org.apache.maven.api.RemoteRepository> getRemoteRepositories()
      Specified by:
      getRemoteRepositories in interface org.apache.maven.api.Session
    • getData

      public org.apache.maven.api.SessionData getData()
      Specified by:
      getData in interface org.apache.maven.api.Session
    • getMavenVersion

      public org.apache.maven.api.Version getMavenVersion()
      Specified by:
      getMavenVersion in interface org.apache.maven.api.Session
    • getDegreeOfConcurrency

      public int getDegreeOfConcurrency()
      Specified by:
      getDegreeOfConcurrency in interface org.apache.maven.api.Session
    • getStartTime

      public Instant getStartTime()
      Specified by:
      getStartTime in interface org.apache.maven.api.Session
    • getProjects

      public List<org.apache.maven.api.Project> getProjects()
      Specified by:
      getProjects in interface org.apache.maven.api.Session
    • getPluginContext

      public Map<String,Object> getPluginContext(org.apache.maven.api.Project project)
      Specified by:
      getPluginContext in interface org.apache.maven.api.Session
    • getService

      public <T extends org.apache.maven.api.Service> T getService(Class<T> clazz)
      Specified by:
      getService in interface org.apache.maven.api.Session
    • withLocalRepository

      public org.apache.maven.api.Session withLocalRepository(org.apache.maven.api.LocalRepository localRepository)
      Specified by:
      withLocalRepository in interface org.apache.maven.api.Session
    • withRemoteRepositories

      public org.apache.maven.api.Session withRemoteRepositories(List<org.apache.maven.api.RemoteRepository> repositories)
      Specified by:
      withRemoteRepositories in interface org.apache.maven.api.Session
    • registerListener

      public void registerListener(org.apache.maven.api.Listener listener)
      Specified by:
      registerListener in interface org.apache.maven.api.Session
    • unregisterListener

      public void unregisterListener(org.apache.maven.api.Listener listener)
      Specified by:
      unregisterListener in interface org.apache.maven.api.Session
    • getListeners

      public Collection<org.apache.maven.api.Listener> getListeners()
      Specified by:
      getListeners in interface org.apache.maven.api.Session
    • createLocalRepository

      public org.apache.maven.api.LocalRepository createLocalRepository(Path path)
      Specified by:
      createLocalRepository in interface org.apache.maven.api.Session
    • createRemoteRepository

      public org.apache.maven.api.RemoteRepository createRemoteRepository(String id, String url)
      Specified by:
      createRemoteRepository in interface org.apache.maven.api.Session
    • createRemoteRepository

      public org.apache.maven.api.RemoteRepository createRemoteRepository(org.apache.maven.api.model.Repository repository)
      Specified by:
      createRemoteRepository in interface org.apache.maven.api.Session
    • createArtifact

      public org.apache.maven.api.Artifact createArtifact(String groupId, String artifactId, String version, String extension)
      Specified by:
      createArtifact in interface org.apache.maven.api.Session
    • createArtifact

      public org.apache.maven.api.Artifact createArtifact(String groupId, String artifactId, String version, String classifier, String extension, String type)
      Specified by:
      createArtifact in interface org.apache.maven.api.Session
    • createProducedArtifact

      public org.apache.maven.api.ProducedArtifact createProducedArtifact(String groupId, String artifactId, String version, String extension)
      Specified by:
      createProducedArtifact in interface org.apache.maven.api.Session
    • createProducedArtifact

      public org.apache.maven.api.ProducedArtifact createProducedArtifact(String groupId, String artifactId, String version, String classifier, String extension, String type)
      Specified by:
      createProducedArtifact in interface org.apache.maven.api.Session
    • createArtifactCoordinates

      public org.apache.maven.api.ArtifactCoordinates createArtifactCoordinates(String groupId, String artifactId, String version, String extension)
      Specified by:
      createArtifactCoordinates in interface org.apache.maven.api.Session
    • createArtifactCoordinates

      public org.apache.maven.api.ArtifactCoordinates createArtifactCoordinates(String coordString)
      Specified by:
      createArtifactCoordinates in interface org.apache.maven.api.Session
    • createArtifactCoordinates

      public org.apache.maven.api.ArtifactCoordinates createArtifactCoordinates(String groupId, String artifactId, String version, String classifier, String extension, String type)
      Specified by:
      createArtifactCoordinates in interface org.apache.maven.api.Session
    • createArtifactCoordinates

      public org.apache.maven.api.ArtifactCoordinates createArtifactCoordinates(org.apache.maven.api.Artifact artifact)
      Specified by:
      createArtifactCoordinates in interface org.apache.maven.api.Session
    • createDependencyCoordinates

      public org.apache.maven.api.DependencyCoordinates createDependencyCoordinates(org.apache.maven.api.ArtifactCoordinates artifactCoordinates)
      Specified by:
      createDependencyCoordinates in interface org.apache.maven.api.Session
    • createDependencyCoordinates

      public org.apache.maven.api.DependencyCoordinates createDependencyCoordinates(org.apache.maven.api.Dependency dependency)
      Specified by:
      createDependencyCoordinates in interface org.apache.maven.api.Session
    • resolveArtifact

      public org.apache.maven.api.DownloadedArtifact resolveArtifact(org.apache.maven.api.Artifact artifact)
      Specified by:
      resolveArtifact in interface org.apache.maven.api.Session
    • resolveArtifact

      public org.apache.maven.api.DownloadedArtifact resolveArtifact(org.apache.maven.api.ArtifactCoordinates coordinate)
      Specified by:
      resolveArtifact in interface org.apache.maven.api.Session
    • resolveArtifact

      public org.apache.maven.api.DownloadedArtifact resolveArtifact(org.apache.maven.api.ArtifactCoordinates coordinates, List<org.apache.maven.api.RemoteRepository> repositories)
      Specified by:
      resolveArtifact in interface org.apache.maven.api.Session
    • resolveArtifact

      public org.apache.maven.api.DownloadedArtifact resolveArtifact(org.apache.maven.api.Artifact artifact, List<org.apache.maven.api.RemoteRepository> repositories)
      Specified by:
      resolveArtifact in interface org.apache.maven.api.Session
    • resolveArtifacts

      public Collection<org.apache.maven.api.DownloadedArtifact> resolveArtifacts(org.apache.maven.api.ArtifactCoordinates... artifactCoordinates)
      Specified by:
      resolveArtifacts in interface org.apache.maven.api.Session
    • resolveArtifacts

      public Collection<org.apache.maven.api.DownloadedArtifact> resolveArtifacts(Collection<? extends org.apache.maven.api.ArtifactCoordinates> collection)
      Specified by:
      resolveArtifacts in interface org.apache.maven.api.Session
    • resolveArtifacts

      public Collection<org.apache.maven.api.DownloadedArtifact> resolveArtifacts(org.apache.maven.api.Artifact... artifacts)
      Specified by:
      resolveArtifacts in interface org.apache.maven.api.Session
    • resolveArtifacts

      public Collection<org.apache.maven.api.DownloadedArtifact> resolveArtifacts(Collection<? extends org.apache.maven.api.ArtifactCoordinates> coordinates, List<org.apache.maven.api.RemoteRepository> repositories)
      Specified by:
      resolveArtifacts in interface org.apache.maven.api.Session
    • flattenDependencies

      public List<org.apache.maven.api.Node> flattenDependencies(org.apache.maven.api.Node node, org.apache.maven.api.PathScope scope)
      Specified by:
      flattenDependencies in interface org.apache.maven.api.Session
    • resolveDependencies

      public List<Path> resolveDependencies(org.apache.maven.api.DependencyCoordinates dependencyCoordinates)
      Specified by:
      resolveDependencies in interface org.apache.maven.api.Session
    • resolveDependencies

      public List<Path> resolveDependencies(List<org.apache.maven.api.DependencyCoordinates> dependencyCoordinatess)
      Specified by:
      resolveDependencies in interface org.apache.maven.api.Session
    • resolveDependencies

      public List<Path> resolveDependencies(org.apache.maven.api.Project project, org.apache.maven.api.PathScope scope)
      Specified by:
      resolveDependencies in interface org.apache.maven.api.Session
    • resolveVersion

      public org.apache.maven.api.Version resolveVersion(org.apache.maven.api.ArtifactCoordinates artifact)
      Specified by:
      resolveVersion in interface org.apache.maven.api.Session
    • resolveVersionRange

      public List<org.apache.maven.api.Version> resolveVersionRange(org.apache.maven.api.ArtifactCoordinates artifact)
      Specified by:
      resolveVersionRange in interface org.apache.maven.api.Session
    • resolveVersionRange

      public List<org.apache.maven.api.Version> resolveVersionRange(org.apache.maven.api.ArtifactCoordinates artifact, List<org.apache.maven.api.RemoteRepository> repositories)
      Specified by:
      resolveVersionRange in interface org.apache.maven.api.Session
    • installArtifacts

      public void installArtifacts(org.apache.maven.api.Artifact... artifacts)
      Specified by:
      installArtifacts in interface org.apache.maven.api.Session
    • installArtifacts

      public void installArtifacts(Collection<org.apache.maven.api.Artifact> artifacts)
      Specified by:
      installArtifacts in interface org.apache.maven.api.Session
    • deployArtifact

      public void deployArtifact(org.apache.maven.api.RemoteRepository repository, org.apache.maven.api.Artifact... artifacts)
      Specified by:
      deployArtifact in interface org.apache.maven.api.Session
    • setArtifactPath

      public void setArtifactPath(org.apache.maven.api.ProducedArtifact artifact, Path path)
      Specified by:
      setArtifactPath in interface org.apache.maven.api.Session
    • getArtifactPath

      public Optional<Path> getArtifactPath(org.apache.maven.api.Artifact artifact)
      Specified by:
      getArtifactPath in interface org.apache.maven.api.Session
    • isVersionSnapshot

      public boolean isVersionSnapshot(String version)
      Specified by:
      isVersionSnapshot in interface org.apache.maven.api.Session
    • collectDependencies

      public org.apache.maven.api.Node collectDependencies(org.apache.maven.api.Artifact artifact, org.apache.maven.api.PathScope scope)
      Specified by:
      collectDependencies in interface org.apache.maven.api.Session
    • collectDependencies

      public org.apache.maven.api.Node collectDependencies(org.apache.maven.api.Project project, org.apache.maven.api.PathScope scope)
      Specified by:
      collectDependencies in interface org.apache.maven.api.Session
    • collectDependencies

      public org.apache.maven.api.Node collectDependencies(org.apache.maven.api.DependencyCoordinates dependencyCoordinates, org.apache.maven.api.PathScope scope)
      Specified by:
      collectDependencies in interface org.apache.maven.api.Session
    • getPathForLocalArtifact

      public Path getPathForLocalArtifact(org.apache.maven.api.Artifact artifact)
      Specified by:
      getPathForLocalArtifact in interface org.apache.maven.api.Session
    • getPathForRemoteArtifact

      public Path getPathForRemoteArtifact(org.apache.maven.api.RemoteRepository remote, org.apache.maven.api.Artifact artifact)
      Specified by:
      getPathForRemoteArtifact in interface org.apache.maven.api.Session
    • parseVersion

      public org.apache.maven.api.Version parseVersion(String version)
      Specified by:
      parseVersion in interface org.apache.maven.api.Session
    • parseVersionRange

      public org.apache.maven.api.VersionRange parseVersionRange(String versionRange)
      Specified by:
      parseVersionRange in interface org.apache.maven.api.Session
    • parseVersionConstraint

      public org.apache.maven.api.VersionConstraint parseVersionConstraint(String s)
      Specified by:
      parseVersionConstraint in interface org.apache.maven.api.Session
    • resolveDependencies

      public Map<org.apache.maven.api.PathType,List<Path>> resolveDependencies(org.apache.maven.api.DependencyCoordinates dependencyCoordinates, org.apache.maven.api.PathScope scope, Collection<org.apache.maven.api.PathType> desiredTypes)
      Specified by:
      resolveDependencies in interface org.apache.maven.api.Session
    • resolveDependencies

      public Map<org.apache.maven.api.PathType,List<Path>> resolveDependencies(org.apache.maven.api.Project project, org.apache.maven.api.PathScope scope, Collection<org.apache.maven.api.PathType> desiredTypes)
      Specified by:
      resolveDependencies in interface org.apache.maven.api.Session
    • requireType

      public org.apache.maven.api.Type requireType(String id)
      Specified by:
      requireType in interface org.apache.maven.api.Session
    • requireLanguage

      public org.apache.maven.api.Language requireLanguage(String id)
      Specified by:
      requireLanguage in interface org.apache.maven.api.Session
    • requirePackaging

      public org.apache.maven.api.Packaging requirePackaging(String id)
      Specified by:
      requirePackaging in interface org.apache.maven.api.Session
    • requireProjectScope

      public org.apache.maven.api.ProjectScope requireProjectScope(String id)
      Specified by:
      requireProjectScope in interface org.apache.maven.api.Session
    • requireDependencyScope

      public org.apache.maven.api.DependencyScope requireDependencyScope(String id)
      Specified by:
      requireDependencyScope in interface org.apache.maven.api.Session
    • requirePathScope

      public org.apache.maven.api.PathScope requirePathScope(String id)
      Specified by:
      requirePathScope in interface org.apache.maven.api.Session