Class MavenCli

java.lang.Object
org.apache.maven.cli.MavenCli

@Deprecated public class MavenCli extends Object
Deprecated.
  • Field Details

    • MULTIMODULE_PROJECT_DIRECTORY

      public static final String MULTIMODULE_PROJECT_DIRECTORY
      Deprecated.
      See Also:
    • MVN_MAVEN_CONFIG

      private static final String MVN_MAVEN_CONFIG
      Deprecated.
      See Also:
    • classWorld

      private org.codehaus.plexus.classworlds.ClassWorld classWorld
      Deprecated.
    • plexusLoggerManager

      private org.codehaus.plexus.logging.LoggerManager plexusLoggerManager
      Deprecated.
    • slf4jLoggerFactory

      private org.slf4j.ILoggerFactory slf4jLoggerFactory
      Deprecated.
    • slf4jLogger

      private org.slf4j.Logger slf4jLogger
      Deprecated.
    • eventSpyDispatcher

      private EventSpyDispatcher eventSpyDispatcher
      Deprecated.
    • modelProcessor

      private ModelProcessor modelProcessor
      Deprecated.
    • maven

      private Maven maven
      Deprecated.
    • executionRequestPopulator

      private MavenExecutionRequestPopulator executionRequestPopulator
      Deprecated.
    • toolchainsBuilder

      private ToolchainsBuilder toolchainsBuilder
      Deprecated.
    • dispatcher

      private org.codehaus.plexus.components.secdispatcher.SecDispatcher dispatcher
      Deprecated.
    • configurationProcessors

      private Map<String,ConfigurationProcessor> configurationProcessors
      Deprecated.
    • cliManager

      private CLIManager cliManager
      Deprecated.
    • messageBuilderFactory

      private MessageBuilderFactory messageBuilderFactory
      Deprecated.
    • fileSystem

      private FileSystem fileSystem
      Deprecated.
    • NEXT_LINE

      private static final Pattern NEXT_LINE
      Deprecated.
    • LAST_ANSI_SEQUENCE

      private static final Pattern LAST_ANSI_SEQUENCE
      Deprecated.
    • ANSI_RESET

      private static final String ANSI_RESET
      Deprecated.
      See Also:
  • Constructor Details

    • MavenCli

      public MavenCli()
      Deprecated.
    • MavenCli

      public MavenCli(org.codehaus.plexus.classworlds.ClassWorld classWorld)
      Deprecated.
  • Method Details

    • main

      public static void main(String[] args)
      Deprecated.
    • main

      public static int main(String[] args, org.codehaus.plexus.classworlds.ClassWorld classWorld)
      Deprecated.
    • doMain

      public static int doMain(String[] args, org.codehaus.plexus.classworlds.ClassWorld classWorld)
      Deprecated.
    • doMain

      public int doMain(String[] args, String workingDirectory, PrintStream stdout, PrintStream stderr)
      Deprecated.
      This supports painless invocation by the Verifier during embedded execution of the core ITs. See Embedded3xLauncher in maven-verifier
      Parameters:
      args - CLI args
      workingDirectory - working directory
      stdout - stdout
      stderr - stderr
      Returns:
      return code
    • doMain

      public int doMain(CliRequest cliRequest)
      Deprecated.
    • initialize

      void initialize(CliRequest cliRequest) throws MavenCli.ExitException
      Deprecated.
      Throws:
      MavenCli.ExitException
    • cli

      void cli(CliRequest cliRequest) throws Exception
      Deprecated.
      Throws:
      Exception
    • informativeCommands

      private void informativeCommands(CliRequest cliRequest) throws MavenCli.ExitException
      Deprecated.
      Throws:
      MavenCli.ExitException
    • cliMerge

      private org.apache.commons.cli.CommandLine cliMerge(org.apache.commons.cli.CommandLine mavenConfig, org.apache.commons.cli.CommandLine mavenCli)
      Deprecated.
    • logging

      void logging(CliRequest cliRequest) throws MavenCli.ExitException
      Deprecated.
      configure logging
      Throws:
      MavenCli.ExitException
    • version

      private void version(CliRequest cliRequest)
      Deprecated.
    • commands

      private void commands(CliRequest cliRequest)
      Deprecated.
    • properties

      void properties(CliRequest cliRequest) throws Exception
      Deprecated.
      Throws:
      Exception
    • container

      org.codehaus.plexus.PlexusContainer container(CliRequest cliRequest) throws Exception
      Deprecated.
      Throws:
      Exception
    • loadCoreExtensions

      private List<CoreExtensionEntry> loadCoreExtensions(CliRequest cliRequest, org.codehaus.plexus.classworlds.realm.ClassRealm containerRealm, Set<String> providedArtifacts) throws Exception
      Deprecated.
      Throws:
      Exception
    • readCoreExtensionsDescriptor

      private List<CoreExtension> readCoreExtensionsDescriptor(String extensionsFile) throws IOException, XMLStreamException
      Deprecated.
      Throws:
      IOException
      XMLStreamException
    • setupContainerRealm

      private org.codehaus.plexus.classworlds.realm.ClassRealm setupContainerRealm(org.codehaus.plexus.classworlds.ClassWorld classWorld, org.codehaus.plexus.classworlds.realm.ClassRealm coreRealm, List<File> extClassPath, List<CoreExtensionEntry> extensions) throws Exception
      Deprecated.
      Throws:
      Exception
    • reverse

      private static <T> List<T> reverse(List<T> list)
      Deprecated.
    • parseExtClasspath

      private List<File> parseExtClasspath(CliRequest cliRequest)
      Deprecated.
    • encryption

      private void encryption(CliRequest cliRequest) throws Exception
      Deprecated.
      Throws:
      Exception
    • execute

      private int execute(CliRequest cliRequest) throws MavenExecutionRequestPopulationException
      Deprecated.
      Throws:
      MavenExecutionRequestPopulationException
    • logBuildResumeHint

      private void logBuildResumeHint(String resumeBuildHint)
      Deprecated.
    • getResumeFromSelector

      String getResumeFromSelector(List<MavenProject> mavenProjects, MavenProject firstFailedProject)
      Deprecated.
      A helper method to determine the value to resume the build with -rf taking into account the edge case where multiple modules in the reactor have the same artifactId.

      -rf :artifactId will pick up the first module which matches, but when multiple modules in the reactor have the same artifactId, effective failed module might be later in build reactor. This means that developer will either have to type groupId or wait for build execution of all modules which were fine, but they are still before one which reported errors.

      Then the returned value is groupId:artifactId when there is a name clash and :artifactId if there is no conflict. This method is made package-private for testing purposes.

      Parameters:
      mavenProjects - Maven projects which are part of build execution.
      firstFailedProject - The first project which has failed.
      Returns:
      Value for -rf flag to resume build exactly from place where it failed (:artifactId in general and groupId:artifactId when there is a name clash).
    • logSummary

      private void logSummary(ExceptionSummary summary, Map<String,String> references, String indent, boolean showErrors)
      Deprecated.
    • configure

      private void configure(CliRequest cliRequest) throws Exception
      Deprecated.
      Throws:
      Exception
    • toolchains

      void toolchains(CliRequest cliRequest) throws Exception
      Deprecated.
      Throws:
      Exception
    • getLocation

      private Object getLocation(Source source, File defaultLocation)
      Deprecated.
    • populateRequest

      protected MavenExecutionRequest populateRequest(CliRequest cliRequest)
      Deprecated.
    • populateRequest

      private MavenExecutionRequest populateRequest(CliRequest cliRequest, MavenExecutionRequest request)
      Deprecated.
    • disableInteractiveModeIfNeeded

      private void disableInteractiveModeIfNeeded(CliRequest cliRequest, MavenExecutionRequest request)
      Deprecated.
    • isRunningOnCI

      private static boolean isRunningOnCI(Properties systemProperties)
      Deprecated.
    • determineLocalRepositoryPath

      private String determineLocalRepositoryPath(MavenExecutionRequest request)
      Deprecated.
    • determinePom

      private File determinePom(org.apache.commons.cli.CommandLine commandLine, String workingDirectory, File baseDirectory)
      Deprecated.
    • performProjectActivation

      static void performProjectActivation(org.apache.commons.cli.CommandLine commandLine, ProjectActivation projectActivation)
      Deprecated.
    • performProfileActivation

      static void performProfileActivation(org.apache.commons.cli.CommandLine commandLine, ProfileActivation profileActivation)
      Deprecated.
    • determineExecutionListener

      private ExecutionListener determineExecutionListener()
      Deprecated.
    • determineReactorFailureBehaviour

      private String determineReactorFailureBehaviour(org.apache.commons.cli.CommandLine commandLine)
      Deprecated.
    • determineTransferListener

      private org.eclipse.aether.transfer.TransferListener determineTransferListener(boolean quiet, boolean verbose, org.apache.commons.cli.CommandLine commandLine, MavenExecutionRequest request)
      Deprecated.
    • determineMakeBehavior

      private String determineMakeBehavior(org.apache.commons.cli.CommandLine cl)
      Deprecated.
    • determineGlobalCheckPolicy

      private String determineGlobalCheckPolicy(org.apache.commons.cli.CommandLine commandLine)
      Deprecated.
    • disableOnPresentOption

      private void disableOnPresentOption(org.apache.commons.cli.CommandLine commandLine, String option, Consumer<Boolean> setting)
      Deprecated.
    • disableOnPresentOption

      private void disableOnPresentOption(org.apache.commons.cli.CommandLine commandLine, char option, Consumer<Boolean> setting)
      Deprecated.
    • enableOnPresentOption

      private void enableOnPresentOption(org.apache.commons.cli.CommandLine commandLine, String option, Consumer<Boolean> setting)
      Deprecated.
    • enableOnPresentOption

      private void enableOnPresentOption(org.apache.commons.cli.CommandLine commandLine, char option, Consumer<Boolean> setting)
      Deprecated.
    • enableOnAbsentOption

      private void enableOnAbsentOption(org.apache.commons.cli.CommandLine commandLine, char option, Consumer<Boolean> setting)
      Deprecated.
    • calculateDegreeOfConcurrency

      int calculateDegreeOfConcurrency(String threadConfiguration)
      Deprecated.
    • populateProperties

      void populateProperties(org.apache.commons.cli.CommandLine commandLine, Properties paths, Properties systemProperties, Properties userProperties) throws Exception
      Deprecated.
      Throws:
      Exception
    • prefix

      private static Function<String,String> prefix(String prefix, Function<String,String> cb)
      Deprecated.
    • or

      private static Function<String,String> or(Function<String,String>... callbacks)
      Deprecated.
    • stripLeadingAndTrailingQuotes

      private static String stripLeadingAndTrailingQuotes(String str)
      Deprecated.
    • getCanonicalPath

      private static Path getCanonicalPath(Path path)
      Deprecated.
    • getConsoleTransferListener

      protected org.eclipse.aether.transfer.TransferListener getConsoleTransferListener(boolean printResourceNames)
      Deprecated.
    • getBatchTransferListener

      protected org.eclipse.aether.transfer.TransferListener getBatchTransferListener()
      Deprecated.
    • customizeContainer

      protected void customizeContainer(org.codehaus.plexus.PlexusContainer container)
      Deprecated.
    • createModelProcessor

      protected ModelProcessor createModelProcessor(org.codehaus.plexus.PlexusContainer container) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
      Deprecated.
      Throws:
      org.codehaus.plexus.component.repository.exception.ComponentLookupException
    • setFileSystem

      public void setFileSystem(FileSystem fileSystem)
      Deprecated.