Interface MavenExecutionRequest

All Known Implementing Classes:
DefaultMavenExecutionRequest

public interface MavenExecutionRequest
  • Field Details

  • Method Details

    • setBaseDirectory

      @Deprecated MavenExecutionRequest setBaseDirectory(File basedir)
      Deprecated.
    • getBaseDirectory

      @Deprecated String getBaseDirectory()
      Deprecated.
      use getTopDirectory() instead
    • setStartTime

      @Deprecated MavenExecutionRequest setStartTime(Date start)
      Deprecated.
    • getStartTime

      @Deprecated Date getStartTime()
      Deprecated.
    • setStartInstant

      MavenExecutionRequest setStartInstant(Instant start)
    • getStartInstant

      Instant getStartInstant()
    • setGoals

      MavenExecutionRequest setGoals(List<String> goals)
    • getGoals

      List<String> getGoals()
    • setSystemProperties

      MavenExecutionRequest setSystemProperties(Properties systemProperties)
      Sets 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.
      Parameters:
      systemProperties - The system properties, may be null.
      Returns:
      This request, never null.
    • getSystemProperties

      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.
    • setUserProperties

      MavenExecutionRequest setUserProperties(Properties userProperties)
      Sets 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.
      Parameters:
      userProperties - The user properties, may be null.
      Returns:
      This request, never null.
    • getUserProperties

      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.
    • setReactorFailureBehavior

      MavenExecutionRequest setReactorFailureBehavior(String failureBehavior)
    • getReactorFailureBehavior

      String getReactorFailureBehavior()
    • setSelectedProjects

      @Deprecated MavenExecutionRequest setSelectedProjects(List<String> projects)
      Deprecated.
      Since Maven 4: use getProjectActivation().
    • getSelectedProjects

      @Deprecated List<String> getSelectedProjects()
      Deprecated.
      Since Maven 4: use getProjectActivation().
    • setExcludedProjects

      @Deprecated MavenExecutionRequest setExcludedProjects(List<String> projects)
      Deprecated.
      Since Maven 4: use getProjectActivation().
      Parameters:
      projects - the projects to exclude
      Returns:
      this MavenExecutionRequest
      Since:
      3.2
    • getExcludedProjects

      @Deprecated List<String> getExcludedProjects()
      Deprecated.
      Since Maven 4: use getProjectActivation().
      Returns:
      the excluded projects, never null
      Since:
      3.2
    • setResume

      MavenExecutionRequest setResume(boolean resume)
      Sets whether the build should be resumed from the data in the resume.properties file.
      Parameters:
      resume - Whether or not to resume a previous build.
      Returns:
      This request, never null.
    • isResume

      boolean isResume()
      Returns:
      Whether the build should be resumed from the data in the resume.properties file.
    • setResumeFrom

      MavenExecutionRequest setResumeFrom(String project)
    • getResumeFrom

      String getResumeFrom()
    • setMakeBehavior

      MavenExecutionRequest setMakeBehavior(String makeBehavior)
    • getMakeBehavior

      String getMakeBehavior()
    • setDegreeOfConcurrency

      void setDegreeOfConcurrency(int degreeOfConcurrency)
      Set's the parallel degree of concurrency used by the build.
      Parameters:
      degreeOfConcurrency -
    • getDegreeOfConcurrency

      int getDegreeOfConcurrency()
      Returns:
      the degree of concurrency for the build.
    • setRecursive

      MavenExecutionRequest setRecursive(boolean recursive)
    • isRecursive

      boolean isRecursive()
    • setPom

    • getPom

      File getPom()
    • setShowErrors

      MavenExecutionRequest setShowErrors(boolean showErrors)
    • isShowErrors

      boolean isShowErrors()
    • setTransferListener

      MavenExecutionRequest setTransferListener(org.eclipse.aether.transfer.TransferListener transferListener)
    • getTransferListener

      org.eclipse.aether.transfer.TransferListener getTransferListener()
    • setLoggingLevel

      MavenExecutionRequest setLoggingLevel(int loggingLevel)
    • getLoggingLevel

      int getLoggingLevel()
    • setUpdateSnapshots

      MavenExecutionRequest setUpdateSnapshots(boolean updateSnapshots)
    • isUpdateSnapshots

      boolean isUpdateSnapshots()
    • setNoSnapshotUpdates

      MavenExecutionRequest setNoSnapshotUpdates(boolean noSnapshotUpdates)
    • isNoSnapshotUpdates

      boolean isNoSnapshotUpdates()
    • setGlobalChecksumPolicy

      MavenExecutionRequest setGlobalChecksumPolicy(String globalChecksumPolicy)
    • getGlobalChecksumPolicy

      String getGlobalChecksumPolicy()
    • setLocalRepositoryPath

      MavenExecutionRequest setLocalRepositoryPath(String localRepository)
    • setLocalRepositoryPath

      MavenExecutionRequest setLocalRepositoryPath(File localRepository)
    • getLocalRepositoryPath

      File getLocalRepositoryPath()
    • setLocalRepository

      MavenExecutionRequest setLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository repository)
    • getLocalRepository

      org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
    • setInteractiveMode

      MavenExecutionRequest setInteractiveMode(boolean interactive)
    • isInteractiveMode

      boolean isInteractiveMode()
    • setOffline

      MavenExecutionRequest setOffline(boolean offline)
    • isOffline

      boolean isOffline()
    • isCacheTransferError

      boolean isCacheTransferError()
    • setCacheTransferError

      MavenExecutionRequest setCacheTransferError(boolean cacheTransferError)
    • isCacheNotFound

      boolean isCacheNotFound()
    • setCacheNotFound

      MavenExecutionRequest setCacheNotFound(boolean cacheNotFound)
    • isIgnoreMissingArtifactDescriptor

      boolean isIgnoreMissingArtifactDescriptor()
      Since:
      4.0.0
    • setIgnoreMissingArtifactDescriptor

      MavenExecutionRequest setIgnoreMissingArtifactDescriptor(boolean ignoreMissing)
      Since:
      4.0.0
    • isIgnoreInvalidArtifactDescriptor

      boolean isIgnoreInvalidArtifactDescriptor()
      Since:
      4.0.0
    • setIgnoreInvalidArtifactDescriptor

      MavenExecutionRequest setIgnoreInvalidArtifactDescriptor(boolean ignoreInvalid)
      Since:
      4.0.0
    • isIgnoreTransitiveRepositories

      boolean isIgnoreTransitiveRepositories()
      Since:
      4.0.0
    • setIgnoreTransitiveRepositories

      MavenExecutionRequest setIgnoreTransitiveRepositories(boolean ignoreTransitiveRepositories)
      Since:
      4.0.0
    • getProfiles

      List<org.apache.maven.model.Profile> getProfiles()
    • addProfile

      MavenExecutionRequest addProfile(org.apache.maven.model.Profile profile)
    • setProfiles

      MavenExecutionRequest setProfiles(List<org.apache.maven.model.Profile> profiles)
    • addActiveProfile

      @Deprecated MavenExecutionRequest addActiveProfile(String profile)
      Deprecated.
      Since Maven 4: use getProfileActivation().
    • addActiveProfiles

      @Deprecated MavenExecutionRequest addActiveProfiles(List<String> profiles)
      Deprecated.
      Since Maven 4: use getProfileActivation().
    • setActiveProfiles

      @Deprecated MavenExecutionRequest setActiveProfiles(List<String> profiles)
      Deprecated.
      Since Maven 4: use getProfileActivation().
    • getActiveProfiles

      @Deprecated List<String> getActiveProfiles()
      Deprecated.
      Since Maven 4: use getProfileActivation().
      Returns:
      The list of profiles that the user wants to activate.
    • addInactiveProfile

      @Deprecated MavenExecutionRequest addInactiveProfile(String profile)
      Deprecated.
      Since Maven 4: use getProfileActivation().
    • addInactiveProfiles

      @Deprecated MavenExecutionRequest addInactiveProfiles(List<String> profiles)
      Deprecated.
      Since Maven 4: use getProfileActivation().
    • setInactiveProfiles

      @Deprecated MavenExecutionRequest setInactiveProfiles(List<String> profiles)
      Deprecated.
      Since Maven 4: use getProfileActivation().
    • getInactiveProfiles

      @Deprecated List<String> getInactiveProfiles()
      Deprecated.
      Since Maven 4: use getProfileActivation().
      Returns:
      The list of profiles that the user wants to de-activate.
    • getProjectActivation

      ProjectActivation getProjectActivation()
      Return the requested activation(s) of project(s) in this execution.
      Returns:
      requested (de-)activation(s) of project(s) in this execution. Never null.
    • getProfileActivation

      ProfileActivation getProfileActivation()
      Return the requested activation(s) of profile(s) in this execution.
      Returns:
      requested (de-)activation(s) of profile(s) in this execution. Never null.
    • getProxies

      List<org.apache.maven.settings.Proxy> getProxies()
    • setProxies

      MavenExecutionRequest setProxies(List<org.apache.maven.settings.Proxy> proxies)
    • addProxy

      MavenExecutionRequest addProxy(org.apache.maven.settings.Proxy proxy)
    • getServers

      List<org.apache.maven.settings.Server> getServers()
    • setServers

      MavenExecutionRequest setServers(List<org.apache.maven.settings.Server> servers)
    • addServer

      MavenExecutionRequest addServer(org.apache.maven.settings.Server server)
    • getMirrors

      List<org.apache.maven.settings.Mirror> getMirrors()
    • setMirrors

      MavenExecutionRequest setMirrors(List<org.apache.maven.settings.Mirror> mirrors)
    • addMirror

      MavenExecutionRequest addMirror(org.apache.maven.settings.Mirror mirror)
    • getPluginGroups

      List<String> getPluginGroups()
    • setPluginGroups

      MavenExecutionRequest setPluginGroups(List<String> pluginGroups)
    • addPluginGroup

      MavenExecutionRequest addPluginGroup(String pluginGroup)
    • addPluginGroups

      MavenExecutionRequest addPluginGroups(List<String> pluginGroups)
    • isProjectPresent

      boolean isProjectPresent()
    • setProjectPresent

      MavenExecutionRequest setProjectPresent(boolean isProjectPresent)
    • getUserSettingsFile

      File getUserSettingsFile()
    • setUserSettingsFile

      MavenExecutionRequest setUserSettingsFile(File userSettingsFile)
    • getProjectSettingsFile

      File getProjectSettingsFile()
    • setProjectSettingsFile

      MavenExecutionRequest setProjectSettingsFile(File projectSettingsFile)
    • getGlobalSettingsFile

      @Deprecated File getGlobalSettingsFile()
      Deprecated.
    • setGlobalSettingsFile

      @Deprecated MavenExecutionRequest setGlobalSettingsFile(File globalSettingsFile)
      Deprecated.
    • getInstallationSettingsFile

      File getInstallationSettingsFile()
    • setInstallationSettingsFile

      MavenExecutionRequest setInstallationSettingsFile(File installationSettingsFile)
    • addRemoteRepository

      MavenExecutionRequest addRemoteRepository(org.apache.maven.artifact.repository.ArtifactRepository repository)
    • addPluginArtifactRepository

      MavenExecutionRequest addPluginArtifactRepository(org.apache.maven.artifact.repository.ArtifactRepository repository)
    • setRemoteRepositories

      MavenExecutionRequest setRemoteRepositories(List<org.apache.maven.artifact.repository.ArtifactRepository> repositories)
      Set a new list of remote repositories to use the execution request. This is necessary if you perform transformations on the remote repositories being used. For example if you replace existing repositories with mirrors then it's easier to just replace the whole list with a new list of transformed repositories.
      Parameters:
      repositories -
      Returns:
      This request, never null.
    • getRemoteRepositories

      List<org.apache.maven.artifact.repository.ArtifactRepository> getRemoteRepositories()
    • setPluginArtifactRepositories

      MavenExecutionRequest setPluginArtifactRepositories(List<org.apache.maven.artifact.repository.ArtifactRepository> repositories)
    • getPluginArtifactRepositories

      List<org.apache.maven.artifact.repository.ArtifactRepository> getPluginArtifactRepositories()
    • setRepositoryCache

      MavenExecutionRequest setRepositoryCache(org.eclipse.aether.RepositoryCache repositoryCache)
    • getRepositoryCache

      org.eclipse.aether.RepositoryCache getRepositoryCache()
    • getWorkspaceReader

      org.eclipse.aether.repository.WorkspaceReader getWorkspaceReader()
    • setWorkspaceReader

      MavenExecutionRequest setWorkspaceReader(org.eclipse.aether.repository.WorkspaceReader workspaceReader)
    • getUserToolchainsFile

      File getUserToolchainsFile()
    • setUserToolchainsFile

      MavenExecutionRequest setUserToolchainsFile(File userToolchainsFile)
    • getGlobalToolchainsFile

      @Deprecated File getGlobalToolchainsFile()
      Returns:
      the global toolchains file
      Since:
      3.3.0
    • setGlobalToolchainsFile

      @Deprecated MavenExecutionRequest setGlobalToolchainsFile(File globalToolchainsFile)
      Parameters:
      globalToolchainsFile - the global toolchains file
      Returns:
      this request
      Since:
      3.3.0
    • getInstallationToolchainsFile

      File getInstallationToolchainsFile()
      Returns:
      the installation toolchains file
      Since:
      4.0.0
    • setInstallationToolchainsFile

      MavenExecutionRequest setInstallationToolchainsFile(File installationToolchainsFile)
      Parameters:
      installationToolchainsFile - the installation toolchains file
      Returns:
      this request
      Since:
      4.0.0
    • getExecutionListener

      ExecutionListener getExecutionListener()
    • setExecutionListener

      MavenExecutionRequest setExecutionListener(ExecutionListener executionListener)
    • getProjectBuildingRequest

      ProjectBuildingRequest getProjectBuildingRequest()
    • isUseLegacyLocalRepository

      @Deprecated boolean isUseLegacyLocalRepository()
      Deprecated.
      Since 3.9 there is no direct Maven2 interop offered at LRM level. See Resolver Configuration page option aether.artifactResolver.simpleLrmInterop that provides similar semantics. This method should be never invoked, and always returns false.
      Since:
      3.1
    • setUseLegacyLocalRepository

      @Deprecated MavenExecutionRequest setUseLegacyLocalRepository(boolean useLegacyLocalRepository)
      Deprecated.
      Since 3.9 there is no direct Maven2 interop offered at LRM level. See Resolver Configuration page option aether.artifactResolver.simpleLrmInterop that provides similar semantics. This method should be never invoked, and ignores parameter (value remains always false).
      Since:
      3.1
    • setBuilderId

      MavenExecutionRequest setBuilderId(String builderId)
      Controls the Builder used by Maven by specification of the builder's id.
      Since:
      3.2.0
    • getBuilderId

      String getBuilderId()
      Controls the Builder used by Maven by specification of the builders id.
      Since:
      3.2.0
    • setToolchains

      MavenExecutionRequest setToolchains(Map<String,List<org.apache.maven.toolchain.model.ToolchainModel>> toolchains)
      Parameters:
      toolchains - all toolchains grouped by type
      Returns:
      this request
      Since:
      3.3.0
    • getToolchains

      Map<String,List<org.apache.maven.toolchain.model.ToolchainModel>> getToolchains()
      Returns:
      all toolchains grouped by type, never null
      Since:
      3.3.0
    • setMultiModuleProjectDirectory

      @Deprecated void setMultiModuleProjectDirectory(File file)
      Deprecated.
      Since:
      3.3.0
    • getMultiModuleProjectDirectory

      @Deprecated File getMultiModuleProjectDirectory()
      Deprecated.
      use getRootDirectory() instead
      Since:
      3.3.0
    • setTopDirectory

      MavenExecutionRequest setTopDirectory(Path topDirectory)
      Sets the top directory of the project.
      Since:
      4.0.0
    • getTopDirectory

      Path getTopDirectory()
      Gets the directory of the topmost project being built, usually the current directory or the directory pointed at by the -f/--file command line argument.
      Since:
      4.0.0
    • setRootDirectory

      MavenExecutionRequest setRootDirectory(Path rootDirectory)
      Sets the root directory of the project.
      Since:
      4.0.0
    • getRootDirectory

      Path getRootDirectory()
      Gets the root directory of the top project, which is the parent directory containing the .mvn directory or a pom.xml file with the root="true" attribute. If there's no such directory, an IllegalStateException will be thrown.
      Throws:
      IllegalStateException - if the root directory could not be found
      Since:
      4.0.0
      See Also:
    • setEventSpyDispatcher

      MavenExecutionRequest setEventSpyDispatcher(EventSpyDispatcher eventSpyDispatcher)
      Since:
      3.3.0
    • getEventSpyDispatcher

      EventSpyDispatcher getEventSpyDispatcher()
      Since:
      3.3.0
    • getData

      Map<String,Object> getData()
      Since:
      3.3.0