Package org.apache.maven.api.cli
package org.apache.maven.api.cli
Provides the API for Maven's command-line interface and tools.
This package contains interfaces and classes for:
- Command-line argument parsing and processing
- Maven tool invocation (
mvn
,mvnenc
,mvnsh
) - Core extensions configuration
- Early-stage logging before the full Maven logging system is initialized
The main components are:
Invoker
- Base interface for executing Maven toolsParser
- Processes command-line arguments into invoker requestsOptions
- Represents Maven configuration optionsCoreExtensions
- Manages Maven core extensions
Core extensions can be configured through .mvn/extensions.xml
in the project base directory
to enhance Maven's capabilities during build execution.
- Since:
- 4.0.0
-
ClassDescriptionDefines the contract for a component responsible for executing a Maven tool using the information provided in an
ExecutorRequest
.Represents an exception that occurs during the execution of a Maven build or command.Represents a request to execute Maven with command-line arguments.Defines the contract for a component responsible for invoking a Maven application using the information provided in anInvokerRequest
.Represents an exception that occurs during the invocation of a Maven build or command.Exception for intentional exit: No message or anything will be displayed, just the carried exit code will be returned from invokerInvoker.invoke(InvokerRequest)
method.Represents a Maven invocation request, encapsulating all necessary information for invoking a Maven build or command.Defines a simple logging interface for Maven CLI operations.Logger entries returned byLogger.drain()
method.Represents the severity levels for log messages.Represents the base options supported by Maven tools.Defines the contract for parsing Maven command-line arguments and creating an execution or invoker requests.Represents a request to parse Maven command-line arguments.Represents most common tools supported by CLIng.