Class Constants

java.lang.Object
org.apache.maven.api.Constants

public final class Constants extends Object
Configuration constants.
  • Field Details

    • MAVEN_HOME

      @Config(readOnly=true, source=SYSTEM_PROPERTIES) public static final String MAVEN_HOME
      Maven home.
      Since:
      3.0.0
      See Also:
    • MAVEN_VERSION

      @Config(readOnly=true, source=SYSTEM_PROPERTIES) public static final String MAVEN_VERSION
      Maven version.
      Since:
      3.0.0
      See Also:
    • MAVEN_VERSION_MAJOR

      @Config(readOnly=true, source=SYSTEM_PROPERTIES) public static final String MAVEN_VERSION_MAJOR
      Maven major version: contains the major segment of this Maven version.
      Since:
      4.0.0
      See Also:
    • MAVEN_VERSION_MINOR

      @Config(readOnly=true, source=SYSTEM_PROPERTIES) public static final String MAVEN_VERSION_MINOR
      Maven minor version: contains the minor segment of this Maven version.
      Since:
      4.0.0
      See Also:
    • MAVEN_VERSION_PATCH

      @Config(readOnly=true, source=SYSTEM_PROPERTIES) public static final String MAVEN_VERSION_PATCH
      Maven patch version: contains the patch segment of this Maven version.
      Since:
      4.0.0
      See Also:
    • MAVEN_VERSION_SNAPSHOT

      @Config(readOnly=true, source=SYSTEM_PROPERTIES) public static final String MAVEN_VERSION_SNAPSHOT
      Maven snapshot: contains "true" if this Maven is a snapshot version.
      Since:
      4.0.0
      See Also:
    • MAVEN_BUILD_VERSION

      @Config(readOnly=true, source=SYSTEM_PROPERTIES) public static final String MAVEN_BUILD_VERSION
      Maven build version: a human-readable string containing this Maven version, buildnumber, and time of its build.
      Since:
      3.0.0
      See Also:
    • MAVEN_INSTALLATION_CONF

      @Config(defaultValue="${maven.home}/conf") public static final String MAVEN_INSTALLATION_CONF
      Maven installation configuration directory.
      Since:
      4.0.0
      See Also:
    • MAVEN_USER_CONF

      @Config(defaultValue="${user.home}/.m2") public static final String MAVEN_USER_CONF
      Maven user configuration directory.
      Since:
      4.0.0
      See Also:
    • MAVEN_PROJECT_CONF

      @Config(defaultValue="${session.rootDirectory}/.mvn") public static final String MAVEN_PROJECT_CONF
      Maven project configuration directory.
      Since:
      4.0.0
      See Also:
    • MAVEN_REPO_LOCAL

      @Config(defaultValue="${maven.user.conf}/repository") public static final String MAVEN_REPO_LOCAL
      Maven local repository.
      Since:
      3.0.0
      See Also:
    • MAVEN_REPO_CENTRAL

      @Config(defaultValue="https://repo.maven.apache.org/maven2") public static final String MAVEN_REPO_CENTRAL
      Maven central repository URL. The property will have the value of the MAVEN_REPO_CENTRAL environment variable if it is defined.
      Since:
      4.0.0
      See Also:
    • MAVEN_INSTALLATION_SETTINGS

      @Config(defaultValue="${maven.installation.conf}/settings.xml") public static final String MAVEN_INSTALLATION_SETTINGS
      Maven installation settings.
      Since:
      4.0.0
      See Also:
    • MAVEN_USER_SETTINGS

      @Config(defaultValue="${maven.user.conf}/settings.xml") public static final String MAVEN_USER_SETTINGS
      Maven user settings.
      Since:
      4.0.0
      See Also:
    • MAVEN_PROJECT_SETTINGS

      @Config(defaultValue="${maven.project.conf}/settings.xml") public static final String MAVEN_PROJECT_SETTINGS
      Maven project settings.
      Since:
      4.0.0
      See Also:
    • MAVEN_INSTALLATION_EXTENSIONS

      @Config(defaultValue="${maven.installation.conf}/extensions.xml") public static final String MAVEN_INSTALLATION_EXTENSIONS
      Maven installation extensions.
      Since:
      4.0.0
      See Also:
    • MAVEN_USER_EXTENSIONS

      @Config(defaultValue="${maven.user.conf}/extensions.xml") public static final String MAVEN_USER_EXTENSIONS
      Maven user extensions.
      Since:
      4.0.0
      See Also:
    • MAVEN_PROJECT_EXTENSIONS

      @Config(defaultValue="${maven.project.conf}/extensions.xml") public static final String MAVEN_PROJECT_EXTENSIONS
      Maven project extensions.
      Since:
      4.0.0
      See Also:
    • MAVEN_INSTALLATION_TOOLCHAINS

      @Config(defaultValue="${maven.installation.conf}/toolchains.xml") public static final String MAVEN_INSTALLATION_TOOLCHAINS
      Maven installation toolchains.
      Since:
      4.0.0
      See Also:
    • MAVEN_USER_TOOLCHAINS

      @Config(defaultValue="${maven.user.conf}/toolchains.xml") public static final String MAVEN_USER_TOOLCHAINS
      Maven user toolchains.
      Since:
      4.0.0
      See Also:
    • MAVEN_EXT_CLASS_PATH

      @Config public static final String MAVEN_EXT_CLASS_PATH
      Extensions class path.
      See Also:
    • MAVEN_SETTINGS_SECURITY

      @Config(defaultValue="${maven.user.conf}/settings-security4.xml") public static final String MAVEN_SETTINGS_SECURITY
      See Also:
    • MAVEN_SETTINGS_SECURITY_FILE_NAME

      public static final String MAVEN_SETTINGS_SECURITY_FILE_NAME
      See Also:
    • MAVEN_STYLE_PREFIX

      public static final String MAVEN_STYLE_PREFIX
      See Also:
    • MAVEN_STYLE_TRANSFER_NAME

      public static final String MAVEN_STYLE_TRANSFER_NAME
      See Also:
    • MAVEN_STYLE_TRACE_NAME

      public static final String MAVEN_STYLE_TRACE_NAME
      See Also:
    • MAVEN_STYLE_DEBUG_NAME

      public static final String MAVEN_STYLE_DEBUG_NAME
      See Also:
    • MAVEN_STYLE_INFO_NAME

      public static final String MAVEN_STYLE_INFO_NAME
      See Also:
    • MAVEN_STYLE_WARNING_NAME

      public static final String MAVEN_STYLE_WARNING_NAME
      See Also:
    • MAVEN_STYLE_ERROR_NAME

      public static final String MAVEN_STYLE_ERROR_NAME
      See Also:
    • MAVEN_STYLE_SUCCESS_NAME

      public static final String MAVEN_STYLE_SUCCESS_NAME
      See Also:
    • MAVEN_STYLE_FAILURE_NAME

      public static final String MAVEN_STYLE_FAILURE_NAME
      See Also:
    • MAVEN_STYLE_STRONG_NAME

      public static final String MAVEN_STYLE_STRONG_NAME
      See Also:
    • MAVEN_STYLE_MOJO_NAME

      public static final String MAVEN_STYLE_MOJO_NAME
      See Also:
    • MAVEN_STYLE_PROJECT_NAME

      public static final String MAVEN_STYLE_PROJECT_NAME
      See Also:
    • MAVEN_STYLE_TRANSFER_DEFAULT

      public static final String MAVEN_STYLE_TRANSFER_DEFAULT
      See Also:
    • MAVEN_STYLE_TRACE_DEFAULT

      public static final String MAVEN_STYLE_TRACE_DEFAULT
      See Also:
    • MAVEN_STYLE_DEBUG_DEFAULT

      public static final String MAVEN_STYLE_DEBUG_DEFAULT
      See Also:
    • MAVEN_STYLE_INFO_DEFAULT

      public static final String MAVEN_STYLE_INFO_DEFAULT
      See Also:
    • MAVEN_STYLE_WARNING_DEFAULT

      public static final String MAVEN_STYLE_WARNING_DEFAULT
      See Also:
    • MAVEN_STYLE_ERROR_DEFAULT

      public static final String MAVEN_STYLE_ERROR_DEFAULT
      See Also:
    • MAVEN_STYLE_SUCCESS_DEFAULT

      public static final String MAVEN_STYLE_SUCCESS_DEFAULT
      See Also:
    • MAVEN_STYLE_FAILURE_DEFAULT

      public static final String MAVEN_STYLE_FAILURE_DEFAULT
      See Also:
    • MAVEN_STYLE_STRONG_DEFAULT

      public static final String MAVEN_STYLE_STRONG_DEFAULT
      See Also:
    • MAVEN_STYLE_MOJO_DEFAULT

      public static final String MAVEN_STYLE_MOJO_DEFAULT
      See Also:
    • MAVEN_STYLE_PROJECT_DEFAULT

      public static final String MAVEN_STYLE_PROJECT_DEFAULT
      See Also:
    • MAVEN_STYLE_COLOR_PROPERTY

      @Config(defaultValue="auto") public static final String MAVEN_STYLE_COLOR_PROPERTY
      Maven output color mode. Allowed values are auto, always, never.
      Since:
      4.0.0
      See Also:
    • MAVEN_STYLE_TRANSFER

      @Config(defaultValue="f:bright-black") public static final String MAVEN_STYLE_TRANSFER
      Color style for transfer messages.
      Since:
      4.0.0
      See Also:
    • MAVEN_STYLE_TRACE

      @Config(defaultValue="bold,f:magenta") public static final String MAVEN_STYLE_TRACE
      Color style for trace messages.
      Since:
      4.0.0
      See Also:
    • MAVEN_STYLE_DEBUG

      @Config(defaultValue="bold,f:cyan") public static final String MAVEN_STYLE_DEBUG
      Color style for debug messages.
      Since:
      4.0.0
      See Also:
    • MAVEN_STYLE_INFO

      @Config(defaultValue="bold,f:blue") public static final String MAVEN_STYLE_INFO
      Color style for info messages.
      Since:
      4.0.0
      See Also:
    • MAVEN_STYLE_WARNING

      @Config(defaultValue="bold,f:yellow") public static final String MAVEN_STYLE_WARNING
      Color style for warning messages.
      Since:
      4.0.0
      See Also:
    • MAVEN_STYLE_ERROR

      @Config(defaultValue="bold,f:red") public static final String MAVEN_STYLE_ERROR
      Color style for error messages.
      Since:
      4.0.0
      See Also:
    • MAVEN_STYLE_SUCCESS

      @Config(defaultValue="bold,f:green") public static final String MAVEN_STYLE_SUCCESS
      Color style for success messages.
      Since:
      4.0.0
      See Also:
    • MAVEN_STYLE_FAILURE

      @Config(defaultValue="bold,f:red") public static final String MAVEN_STYLE_FAILURE
      Color style for failure messages.
      Since:
      4.0.0
      See Also:
    • MAVEN_STYLE_STRONG

      @Config(defaultValue="bold") public static final String MAVEN_STYLE_STRONG
      Color style for strong messages.
      Since:
      4.0.0
      See Also:
    • MAVEN_STYLE_MOJO

      @Config(defaultValue="f:green") public static final String MAVEN_STYLE_MOJO
      Color style for mojo messages.
      Since:
      4.0.0
      See Also:
    • MAVEN_STYLE_PROJECT

      @Config(defaultValue="f:cyan") public static final String MAVEN_STYLE_PROJECT
      Color style for project messages.
      Since:
      4.0.0
      See Also:
    • MAVEN_BUILD_TIMESTAMP_FORMAT

      @Config(source=MODEL, defaultValue="yyyy-MM-dd\'T\'HH:mm:ssXXX") public static final String MAVEN_BUILD_TIMESTAMP_FORMAT
      Build timestamp format.
      Since:
      3.0.0
      See Also:
    • MAVEN_RELOCATIONS_ENTRIES

      @Config public static final String MAVEN_RELOCATIONS_ENTRIES
      User controlled relocations. This property is a comma separated list of entries with the syntax GAV>GAV. The first GAV can contain * for any elem (so *:*:* would mean ALL, something you don't want). The second GAV is either fully specified, or also can contain *, then it behaves as "ordinary relocation": the coordinate is preserved from relocated artifact. Finally, if right hand GAV is absent (line looks like GAV>), the left hand matching GAV is banned fully (from resolving).
      Note: the > means project level, while >> means global (whole session level, so even plugins will get relocated artifacts) relocation.
      For example,
      maven.relocations.entries = org.foo:*:*>, \\
      org.here:*:*>org.there:*:*, \\
      javax.inject:javax.inject:1>>jakarta.inject:jakarta.inject:1.0.5
      means: 3 entries, ban org.foo group (exactly, so org.foo.bar is allowed), relocate org.here to org.there and finally globally relocate (see >> above) javax.inject:javax.inject:1 to jakarta.inject:jakarta.inject:1.0.5.
      Since:
      4.0.0
      See Also:
    • MAVEN_VERSION_FILTER

      @Config public static final String MAVEN_VERSION_FILTER
      User property for version filter expression used in session, applied to resolving ranges: a semicolon separated list of filters to apply. By default, no version filter is applied (like in Maven 3).
      Supported filters:
      • "h" or "h(num)" - highest version or top list of highest ones filter
      • "l" or "l(num)" - lowest version or bottom list of lowest ones filter
      • "s" - contextual snapshot filter
      • "e(G:A:V)" - predicate filter (leaves out G:A:V from range, if hit, V can be range)
      Example filter expression: "h(5);s;e(org.foo:bar:1) will cause: ranges are filtered for "top 5" (instead full range), snapshots are banned if root project is not a snapshot, and if range for org.foo:bar is being processed, version 1 is omitted. Value in this property builds org.eclipse.aether.collection.VersionFilter instance.
      Since:
      4.0.0
      See Also:
    • MAVEN_REPO_LOCAL_HEAD

      @Config public static final String MAVEN_REPO_LOCAL_HEAD
      User property for chained LRM: the new "head" local repository to use, and "push" the existing into tail. Similar to maven.repo.local.tail, this property may contain comma separated list of paths to be used as local repositories (combine with chained local repository), but while latter is "appending" this one is "prepending".
      Since:
      4.0.0
      See Also:
    • MAVEN_REPO_LOCAL_TAIL

      @Config public static final String MAVEN_REPO_LOCAL_TAIL
      User property for chained LRM: list of "tail" local repository paths (separated by comma), to be used with org.eclipse.aether.util.repository.ChainedLocalRepositoryManager. Default value: null, no chained LRM is used.
      Since:
      3.9.0
      See Also:
    • MAVEN_REPO_LOCAL_TAIL_IGNORE_AVAILABILITY

      @Config public static final String MAVEN_REPO_LOCAL_TAIL_IGNORE_AVAILABILITY
      User property for chained LRM: whether to ignore "availability check" in tail or not. Usually you do want to ignore it. This property is mapped onto corresponding Resolver 2.x property, is like a synonym for it. Default value: true.
      Since:
      3.9.0
      See Also:
    • MAVEN_REPO_LOCAL_RECORD_REVERSE_TREE

      @Config(defaultValue="false") public static final String MAVEN_REPO_LOCAL_RECORD_REVERSE_TREE
      User property for reverse dependency tree. If enabled, Maven will record ".tracking" directory into local repository with "reverse dependency tree", essentially explaining WHY given artifact is present in local repository. Default: false, will not record anything.
      Since:
      3.9.0
      See Also:
    • MAVEN_RESOLVER_DEPENDENCY_MANAGER_TRANSITIVITY

      @Config(defaultValue="true") public static final String MAVEN_RESOLVER_DEPENDENCY_MANAGER_TRANSITIVITY
      User property for selecting dependency manager behaviour regarding transitive dependencies and dependency management entries in their POMs. Maven 3 targeted full backward compatibility with Maven2, hence it ignored dependency management entries in transitive dependency POMs. Maven 4 enables "transitivity" by default, hence unlike Maven2, obeys dependency management entries deep in dependency graph as well.
      Default: "true".
      Since:
      4.0.0
      See Also:
    • MAVEN_RESOLVER_TRANSPORT

      @Config(defaultValue="default") public static final String MAVEN_RESOLVER_TRANSPORT
      Resolver transport to use. Can be default, wagon, apache, jdk or auto.
      Since:
      4.0.0
      See Also:
    • MAVEN_PLUGIN_VALIDATION

      @Config(defaultValue="inline") public static final String MAVEN_PLUGIN_VALIDATION
      Plugin validation level.
      Since:
      3.9.2
      See Also:
    • MAVEN_PLUGIN_VALIDATION_EXCLUDES

      @Config public static final String MAVEN_PLUGIN_VALIDATION_EXCLUDES
      Plugin validation exclusions.
      Since:
      3.9.6
      See Also:
    • MAVEN_MODEL_BUILDER_PARALLELISM

      @Config(type="java.lang.Integer", defaultValue="cores/2 + 1") public static final String MAVEN_MODEL_BUILDER_PARALLELISM
      ProjectBuilder parallelism.
      Since:
      4.0.0
      See Also:
    • MAVEN_CONSUMER_POM

      @Config(type="java.lang.Boolean", defaultValue="true") public static final String MAVEN_CONSUMER_POM
      User property for enabling/disabling the consumer POM feature.
      Since:
      4.0.0
      See Also:
    • MAVEN_VERSION_RESOLVER_NO_CACHE

      @Config(type="java.lang.Boolean", defaultValue="false") public static final String MAVEN_VERSION_RESOLVER_NO_CACHE
      User property for disabling version resolver cache.
      Since:
      3.0.0
      See Also:
    • MAVEN_DEPLOY_SNAPSHOT_BUILD_NUMBER

      @Config(type="java.lang.Integer") public static final String MAVEN_DEPLOY_SNAPSHOT_BUILD_NUMBER
      User property for overriding calculated "build number" for snapshot deploys. Caution: this property should be RARELY used (if used at all). It may help in special cases like "aligning" a reactor build subprojects build numbers to perform a "snapshot lock down". Value given here must be maxRemoteBuildNumber + 1 or greater, otherwise build will fail. How the number to be obtained is left to user (ie by inspecting snapshot repository metadata or alike). Note: this feature is present in Maven 3.9.7 but with different key: maven.buildNumber. In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose.
      Since:
      4.0.0
      See Also:
    • MAVEN_START_INSTANT

      @Config(type="java.time.Instant") public static final String MAVEN_START_INSTANT
      User property used to store the build timestamp.
      Since:
      4.0.0
      See Also:
    • MAVEN_BUILDER_MAX_PROBLEMS

      @Config(type="java.lang.Integer", defaultValue="100") public static final String MAVEN_BUILDER_MAX_PROBLEMS
      Max number of problems for each severity level retained by the model builder.
      Since:
      4.0.0
      See Also:
    • MAVEN_LOGGER_PREFIX

      public static final String MAVEN_LOGGER_PREFIX
      All system properties used by Maven Logger start with this prefix.
      Since:
      4.0.0
      See Also:
    • MAVEN_LOGGER_DEFAULT_LOG_LEVEL

      @Config public static final String MAVEN_LOGGER_DEFAULT_LOG_LEVEL
      Default log level for all instances of SimpleLogger. Must be one of ("trace", "debug", "info", "warn", "error" or "off"). If not specified, defaults to "info".
      Since:
      4.0.0
      See Also:
    • MAVEN_LOGGER_SHOW_DATE_TIME

      @Config(type="java.lang.Boolean", defaultValue="false") public static final String MAVEN_LOGGER_SHOW_DATE_TIME
      Set to true if you want the current date and time to be included in output messages. Default is false.
      Since:
      4.0.0
      See Also:
    • MAVEN_LOGGER_DATE_TIME_FORMAT

      @Config public static final String MAVEN_LOGGER_DATE_TIME_FORMAT
      The date and time format to be used in the output messages. The pattern describing the date and time format is defined by SimpleDateFormat. If the format is not specified or is invalid, the number of milliseconds since start up will be output.
      Since:
      4.0.0
      See Also:
    • MAVEN_LOGGER_SHOW_THREAD_ID

      @Config(type="java.lang.Boolean", defaultValue="false") public static final String MAVEN_LOGGER_SHOW_THREAD_ID
      If you would like to output the current thread id, then set to true. Defaults to false.
      Since:
      4.0.0
      See Also:
    • MAVEN_LOGGER_SHOW_THREAD_NAME

      @Config(type="java.lang.Boolean", defaultValue="true") public static final String MAVEN_LOGGER_SHOW_THREAD_NAME
      Set to true if you want to output the current thread name. Defaults to true.
      Since:
      4.0.0
      See Also:
    • MAVEN_LOGGER_SHOW_LOG_NAME

      @Config(type="java.lang.Boolean", defaultValue="true") public static final String MAVEN_LOGGER_SHOW_LOG_NAME
      Set to true if you want the Logger instance name to be included in output messages. Defaults to true.
      Since:
      4.0.0
      See Also:
    • MAVEN_LOGGER_SHOW_SHORT_LOG_NAME

      @Config(type="java.lang.Boolean", defaultValue="false") public static final String MAVEN_LOGGER_SHOW_SHORT_LOG_NAME
      Set to true if you want the last component of the name to be included in output messages. Defaults to false.
      Since:
      4.0.0
      See Also:
    • MAVEN_LOGGER_LOG_FILE

      @Config public static final String MAVEN_LOGGER_LOG_FILE
      The output target which can be the path to a file, or the special values "System.out" and "System.err". Default is "System.err".
      Since:
      4.0.0
      See Also:
    • MAVEN_LOGGER_LEVEL_IN_BRACKETS

      @Config(type="java.lang.Boolean", defaultValue="false") public static final String MAVEN_LOGGER_LEVEL_IN_BRACKETS
      Should the level string be output in brackets? Defaults to false.
      Since:
      4.0.0
      See Also:
    • MAVEN_LOGGER_WARN_LEVEL

      @Config(defaultValue="WARN") public static final String MAVEN_LOGGER_WARN_LEVEL
      The string value output for the warn level. Defaults to WARN.
      Since:
      4.0.0
      See Also:
    • MAVEN_LOGGER_CACHE_OUTPUT_STREAM

      @Config(type="java.lang.Boolean", defaultValue="false") public static final String MAVEN_LOGGER_CACHE_OUTPUT_STREAM
      If the output target is set to "System.out" or "System.err" (see preceding entry), by default, logs will be output to the latest value referenced by System.out/err variables. By setting this parameter to true, the output stream will be cached, i.e. assigned once at initialization time and re-used independently of the current value referenced by System.out/err.
      Since:
      4.0.0
      See Also:
    • MAVEN_LOGGER_LOG_PREFIX

      public static final String MAVEN_LOGGER_LOG_PREFIX
      maven.logger.log.a.b.c - Logging detail level for a SimpleLogger instance named "a.b.c". Right-side value must be one of "trace", "debug", "info", "warn", "error" or "off". When a logger named "a.b.c" is initialized, its level is assigned from this property. If unspecified, the level of nearest parent logger will be used, and if none is set, then the value specified by maven.logger.defaultLogLevel will be used.
      Since:
      4.0.0
      See Also: