1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19 package org.apache.maven.api;
20
21 import org.apache.maven.api.annotations.Config;
22
23 /**
24 * Configuration constants.
25 */
26 public final class Constants {
27
28 /**
29 * Maven home.
30 *
31 * @since 3.0.0
32 */
33 @Config(readOnly = true, source = Config.Source.SYSTEM_PROPERTIES)
34 public static final String MAVEN_HOME = "maven.home";
35
36 /**
37 * Maven version.
38 *
39 * @since 3.0.0
40 */
41 @Config(readOnly = true, source = Config.Source.SYSTEM_PROPERTIES)
42 public static final String MAVEN_VERSION = "maven.version";
43
44 /**
45 * Maven major version: contains the major segment of this Maven version.
46 *
47 * @since 4.0.0
48 */
49 @Config(readOnly = true, source = Config.Source.SYSTEM_PROPERTIES)
50 public static final String MAVEN_VERSION_MAJOR = "maven.version.major";
51
52 /**
53 * Maven minor version: contains the minor segment of this Maven version.
54 *
55 * @since 4.0.0
56 */
57 @Config(readOnly = true, source = Config.Source.SYSTEM_PROPERTIES)
58 public static final String MAVEN_VERSION_MINOR = "maven.version.minor";
59
60 /**
61 * Maven patch version: contains the patch segment of this Maven version.
62 *
63 * @since 4.0.0
64 */
65 @Config(readOnly = true, source = Config.Source.SYSTEM_PROPERTIES)
66 public static final String MAVEN_VERSION_PATCH = "maven.version.patch";
67
68 /**
69 * Maven snapshot: contains "true" if this Maven is a snapshot version.
70 *
71 * @since 4.0.0
72 */
73 @Config(readOnly = true, source = Config.Source.SYSTEM_PROPERTIES)
74 public static final String MAVEN_VERSION_SNAPSHOT = "maven.version.snapshot";
75
76 /**
77 * Maven build version: a human-readable string containing this Maven version, buildnumber, and time of its build.
78 *
79 * @since 3.0.0
80 */
81 @Config(readOnly = true, source = Config.Source.SYSTEM_PROPERTIES)
82 public static final String MAVEN_BUILD_VERSION = "maven.build.version";
83
84 /**
85 * Maven installation configuration directory.
86 *
87 * @since 4.0.0
88 */
89 @Config(defaultValue = "${maven.home}/conf")
90 public static final String MAVEN_INSTALLATION_CONF = "maven.installation.conf";
91
92 /**
93 * Maven user configuration directory.
94 *
95 * @since 4.0.0
96 */
97 @Config(defaultValue = "${user.home}/.m2")
98 public static final String MAVEN_USER_CONF = "maven.user.conf";
99
100 /**
101 * Maven project configuration directory.
102 *
103 * @since 4.0.0
104 */
105 @Config(defaultValue = "${session.rootDirectory}/.mvn")
106 public static final String MAVEN_PROJECT_CONF = "maven.project.conf";
107
108 /**
109 * Maven local repository.
110 *
111 * @since 3.0.0
112 */
113 @Config(defaultValue = "${maven.user.conf}/repository")
114 public static final String MAVEN_REPO_LOCAL = "maven.repo.local";
115
116 /**
117 * Maven central repository URL.
118 * The property will have the value of the <code>MAVEN_REPO_CENTRAL</code>
119 * environment variable if it is defined.
120 *
121 * @since 4.0.0
122 */
123 @Config(defaultValue = "https://repo.maven.apache.org/maven2")
124 public static final String MAVEN_REPO_CENTRAL = "maven.repo.central";
125
126 /**
127 * Maven installation settings.
128 *
129 * @since 4.0.0
130 */
131 @Config(defaultValue = "${maven.installation.conf}/settings.xml")
132 public static final String MAVEN_INSTALLATION_SETTINGS = "maven.installation.settings";
133
134 /**
135 * Maven user settings.
136 *
137 * @since 4.0.0
138 */
139 @Config(defaultValue = "${maven.user.conf}/settings.xml")
140 public static final String MAVEN_USER_SETTINGS = "maven.user.settings";
141
142 /**
143 * Maven project settings.
144 *
145 * @since 4.0.0
146 */
147 @Config(defaultValue = "${maven.project.conf}/settings.xml")
148 public static final String MAVEN_PROJECT_SETTINGS = "maven.project.settings";
149
150 /**
151 * Maven installation extensions.
152 *
153 * @since 4.0.0
154 */
155 @Config(defaultValue = "${maven.installation.conf}/extensions.xml")
156 public static final String MAVEN_INSTALLATION_EXTENSIONS = "maven.installation.extensions";
157
158 /**
159 * Maven user extensions.
160 *
161 * @since 4.0.0
162 */
163 @Config(defaultValue = "${maven.user.conf}/extensions.xml")
164 public static final String MAVEN_USER_EXTENSIONS = "maven.user.extensions";
165
166 /**
167 * Maven project extensions.
168 *
169 * @since 4.0.0
170 */
171 @Config(defaultValue = "${maven.project.conf}/extensions.xml")
172 public static final String MAVEN_PROJECT_EXTENSIONS = "maven.project.extensions";
173
174 /**
175 * Maven installation toolchains.
176 *
177 * @since 4.0.0
178 */
179 @Config(defaultValue = "${maven.installation.conf}/toolchains.xml")
180 public static final String MAVEN_INSTALLATION_TOOLCHAINS = "maven.installation.toolchains";
181
182 /**
183 * Maven user toolchains.
184 *
185 * @since 4.0.0
186 */
187 @Config(defaultValue = "${maven.user.conf}/toolchains.xml")
188 public static final String MAVEN_USER_TOOLCHAINS = "maven.user.toolchains";
189
190 /**
191 * Extensions class path.
192 */
193 @Config
194 public static final String MAVEN_EXT_CLASS_PATH = "maven.ext.class.path";
195
196 @Config(defaultValue = "${maven.user.conf}/settings-security4.xml")
197 public static final String MAVEN_SETTINGS_SECURITY = "maven.settings.security";
198
199 public static final String MAVEN_SETTINGS_SECURITY_FILE_NAME = "settings-security4.xml";
200
201 public static final String MAVEN_STYLE_PREFIX = "maven.style.";
202
203 // Style Names
204 public static final String MAVEN_STYLE_TRANSFER_NAME = "transfer";
205 public static final String MAVEN_STYLE_TRACE_NAME = "trace";
206 public static final String MAVEN_STYLE_DEBUG_NAME = "debug";
207 public static final String MAVEN_STYLE_INFO_NAME = "info";
208 public static final String MAVEN_STYLE_WARNING_NAME = "warning";
209 public static final String MAVEN_STYLE_ERROR_NAME = "error";
210 public static final String MAVEN_STYLE_SUCCESS_NAME = "success";
211 public static final String MAVEN_STYLE_FAILURE_NAME = "failure";
212 public static final String MAVEN_STYLE_STRONG_NAME = "strong";
213 public static final String MAVEN_STYLE_MOJO_NAME = "mojo";
214 public static final String MAVEN_STYLE_PROJECT_NAME = "project";
215
216 // Default Values
217 public static final String MAVEN_STYLE_TRANSFER_DEFAULT = "f:bright-black";
218 public static final String MAVEN_STYLE_TRACE_DEFAULT = "bold,f:magenta";
219 public static final String MAVEN_STYLE_DEBUG_DEFAULT = "bold,f:cyan";
220 public static final String MAVEN_STYLE_INFO_DEFAULT = "bold,f:blue";
221 public static final String MAVEN_STYLE_WARNING_DEFAULT = "bold,f:yellow";
222 public static final String MAVEN_STYLE_ERROR_DEFAULT = "bold,f:red";
223 public static final String MAVEN_STYLE_SUCCESS_DEFAULT = "bold,f:green";
224 public static final String MAVEN_STYLE_FAILURE_DEFAULT = "bold,f:red";
225 public static final String MAVEN_STYLE_STRONG_DEFAULT = "bold";
226 public static final String MAVEN_STYLE_MOJO_DEFAULT = "f:green";
227 public static final String MAVEN_STYLE_PROJECT_DEFAULT = "f:cyan";
228
229 /**
230 * Maven output color mode.
231 * Allowed values are <code>auto</code>, <code>always</code>, <code>never</code>.
232 *
233 * @since 4.0.0
234 */
235 @Config(defaultValue = "auto")
236 public static final String MAVEN_STYLE_COLOR_PROPERTY = MAVEN_STYLE_PREFIX + "color";
237
238 /**
239 * Color style for transfer messages.
240 * @since 4.0.0
241 */
242 @Config(defaultValue = MAVEN_STYLE_TRANSFER_DEFAULT)
243 public static final String MAVEN_STYLE_TRANSFER = MAVEN_STYLE_PREFIX + MAVEN_STYLE_TRANSFER_NAME;
244
245 /**
246 * Color style for trace messages.
247 * @since 4.0.0
248 */
249 @Config(defaultValue = MAVEN_STYLE_TRACE_DEFAULT)
250 public static final String MAVEN_STYLE_TRACE = MAVEN_STYLE_PREFIX + MAVEN_STYLE_TRACE_NAME;
251
252 /**
253 * Color style for debug messages.
254 * @since 4.0.0
255 */
256 @Config(defaultValue = MAVEN_STYLE_DEBUG_DEFAULT)
257 public static final String MAVEN_STYLE_DEBUG = MAVEN_STYLE_PREFIX + MAVEN_STYLE_DEBUG_NAME;
258
259 /**
260 * Color style for info messages.
261 * @since 4.0.0
262 */
263 @Config(defaultValue = MAVEN_STYLE_INFO_DEFAULT)
264 public static final String MAVEN_STYLE_INFO = MAVEN_STYLE_PREFIX + MAVEN_STYLE_INFO_NAME;
265
266 /**
267 * Color style for warning messages.
268 * @since 4.0.0
269 */
270 @Config(defaultValue = MAVEN_STYLE_WARNING_DEFAULT)
271 public static final String MAVEN_STYLE_WARNING = MAVEN_STYLE_PREFIX + MAVEN_STYLE_WARNING_NAME;
272
273 /**
274 * Color style for error messages.
275 * @since 4.0.0
276 */
277 @Config(defaultValue = MAVEN_STYLE_ERROR_DEFAULT)
278 public static final String MAVEN_STYLE_ERROR = MAVEN_STYLE_PREFIX + MAVEN_STYLE_ERROR_NAME;
279
280 /**
281 * Color style for success messages.
282 * @since 4.0.0
283 */
284 @Config(defaultValue = MAVEN_STYLE_SUCCESS_DEFAULT)
285 public static final String MAVEN_STYLE_SUCCESS = MAVEN_STYLE_PREFIX + MAVEN_STYLE_SUCCESS_NAME;
286
287 /**
288 * Color style for failure messages.
289 * @since 4.0.0
290 */
291 @Config(defaultValue = MAVEN_STYLE_FAILURE_DEFAULT)
292 public static final String MAVEN_STYLE_FAILURE = MAVEN_STYLE_PREFIX + MAVEN_STYLE_FAILURE_NAME;
293
294 /**
295 * Color style for strong messages.
296 * @since 4.0.0
297 */
298 @Config(defaultValue = MAVEN_STYLE_STRONG_DEFAULT)
299 public static final String MAVEN_STYLE_STRONG = MAVEN_STYLE_PREFIX + MAVEN_STYLE_STRONG_NAME;
300
301 /**
302 * Color style for mojo messages.
303 * @since 4.0.0
304 */
305 @Config(defaultValue = MAVEN_STYLE_MOJO_DEFAULT)
306 public static final String MAVEN_STYLE_MOJO = MAVEN_STYLE_PREFIX + MAVEN_STYLE_MOJO_NAME;
307
308 /**
309 * Color style for project messages.
310 * @since 4.0.0
311 */
312 @Config(defaultValue = MAVEN_STYLE_PROJECT_DEFAULT)
313 public static final String MAVEN_STYLE_PROJECT = MAVEN_STYLE_PREFIX + MAVEN_STYLE_PROJECT_NAME;
314
315 /**
316 * Build timestamp format.
317 *
318 * @since 3.0.0
319 */
320 @Config(source = Config.Source.MODEL, defaultValue = "yyyy-MM-dd'T'HH:mm:ssXXX")
321 public static final String MAVEN_BUILD_TIMESTAMP_FORMAT = "maven.build.timestamp.format";
322
323 /**
324 * User controlled relocations.
325 * This property is a comma separated list of entries with the syntax <code>GAV>GAV</code>.
326 * The first <code>GAV</code> can contain <code>*</code> for any elem (so <code>*:*:*</code> would mean ALL, something
327 * you don't want). The second <code>GAV</code> is either fully specified, or also can contain <code>*</code>,
328 * then it behaves as "ordinary relocation": the coordinate is preserved from relocated artifact.
329 * Finally, if right hand <code>GAV</code> is absent (line looks like <code>GAV></code>), the left hand matching
330 * <code>GAV</code> is banned fully (from resolving).
331 * <br/>
332 * Note: the <code>></code> means project level, while <code>>></code> means global (whole session level,
333 * so even plugins will get relocated artifacts) relocation.
334 * <br/>
335 * For example,
336 * <pre>maven.relocations.entries = org.foo:*:*>, \\<br/> org.here:*:*>org.there:*:*, \\<br/> javax.inject:javax.inject:1>>jakarta.inject:jakarta.inject:1.0.5</pre>
337 * means: 3 entries, ban <code>org.foo group</code> (exactly, so <code>org.foo.bar</code> is allowed),
338 * relocate <code>org.here</code> to <code>org.there</code> and finally globally relocate (see <code>>></code> above)
339 * <code>javax.inject:javax.inject:1</code> to <code>jakarta.inject:jakarta.inject:1.0.5</code>.
340 *
341 * @since 4.0.0
342 */
343 @Config
344 public static final String MAVEN_RELOCATIONS_ENTRIES = "maven.relocations.entries";
345
346 /**
347 * User property for version filter expression used in session, applied to resolving ranges: a semicolon separated
348 * list of filters to apply. By default, no version filter is applied (like in Maven 3).
349 * <br/>
350 * Supported filters:
351 * <ul>
352 * <li>"h" or "h(num)" - highest version or top list of highest ones filter</li>
353 * <li>"l" or "l(num)" - lowest version or bottom list of lowest ones filter</li>
354 * <li>"s" - contextual snapshot filter</li>
355 * <li>"ns" - unconditional snapshot filter (no snapshots selected from ranges)</li>
356 * <li>"e(G:A:V)" - predicate filter (leaves out G:A:V from range, if hit, V can be range)</li>
357 * </ul>
358 * Example filter expression: <code>"h(5);s;e(org.foo:bar:1)</code> will cause: ranges are filtered for "top 5" (instead
359 * full range), snapshots are banned if root project is not a snapshot, and if range for <code>org.foo:bar</code> is
360 * being processed, version 1 is omitted. Value in this property builds
361 * <code>org.eclipse.aether.collection.VersionFilter</code> instance.
362 *
363 * @since 4.0.0
364 */
365 @Config
366 public static final String MAVEN_VERSION_FILTER = "maven.session.versionFilter";
367
368 /**
369 * User property for chained LRM: the new "head" local repository to use, and "push" the existing into tail.
370 * Similar to <code>maven.repo.local.tail</code>, this property may contain comma separated list of paths to be
371 * used as local repositories (combine with chained local repository), but while latter is "appending" this
372 * one is "prepending".
373 *
374 * @since 4.0.0
375 */
376 @Config
377 public static final String MAVEN_REPO_LOCAL_HEAD = "maven.repo.local.head";
378
379 /**
380 * User property for chained LRM: list of "tail" local repository paths (separated by comma), to be used with
381 * <code>org.eclipse.aether.util.repository.ChainedLocalRepositoryManager</code>.
382 * Default value: <code>null</code>, no chained LRM is used.
383 *
384 * @since 3.9.0
385 */
386 @Config
387 public static final String MAVEN_REPO_LOCAL_TAIL = "maven.repo.local.tail";
388
389 /**
390 * User property for chained LRM: whether to ignore "availability check" in tail or not. Usually you do want
391 * to ignore it. This property is mapped onto corresponding Resolver 2.x property, is like a synonym for it.
392 * Default value: <code>true</code>.
393 *
394 * @since 3.9.0
395 * @see <a href="https://maven.apache.org/resolver/configuration.html">Resolver Configuration: aether.chainedLocalRepository.ignoreTailAvailability</a>
396 */
397 @Config
398 public static final String MAVEN_REPO_LOCAL_TAIL_IGNORE_AVAILABILITY = "maven.repo.local.tail.ignoreAvailability";
399
400 /**
401 * User property for reverse dependency tree. If enabled, Maven will record ".tracking" directory into local
402 * repository with "reverse dependency tree", essentially explaining WHY given artifact is present in local
403 * repository.
404 * Default: <code>false</code>, will not record anything.
405 *
406 * @since 3.9.0
407 */
408 @Config(defaultValue = "false")
409 public static final String MAVEN_REPO_LOCAL_RECORD_REVERSE_TREE = "maven.repo.local.recordReverseTree";
410
411 /**
412 * User property for selecting dependency manager behaviour regarding transitive dependencies and dependency
413 * management entries in their POMs. Maven 3 targeted full backward compatibility with Maven 2. Hence, it ignored
414 * dependency management entries in transitive dependency POMs. Maven 4 enables "transitivity" by default. Hence
415 * unlike Maven 3, it obeys dependency management entries deep in the dependency graph as well.
416 * <br/>
417 * Default: <code>"true"</code>.
418 *
419 * @since 4.0.0
420 */
421 @Config(defaultValue = "true")
422 public static final String MAVEN_RESOLVER_DEPENDENCY_MANAGER_TRANSITIVITY =
423 "maven.resolver.dependencyManagerTransitivity";
424
425 /**
426 * Resolver transport to use.
427 * Can be <code>default</code>, <code>wagon</code>, <code>apache</code>, <code>jdk</code> or <code>auto</code>.
428 *
429 * @since 4.0.0
430 */
431 @Config(defaultValue = "default")
432 public static final String MAVEN_RESOLVER_TRANSPORT = "maven.resolver.transport";
433
434 /**
435 * Plugin validation level.
436 *
437 * @since 3.9.2
438 */
439 @Config(defaultValue = "inline")
440 public static final String MAVEN_PLUGIN_VALIDATION = "maven.plugin.validation";
441
442 /**
443 * Plugin validation exclusions.
444 *
445 * @since 3.9.6
446 */
447 @Config
448 public static final String MAVEN_PLUGIN_VALIDATION_EXCLUDES = "maven.plugin.validation.excludes";
449
450 /**
451 * ProjectBuilder parallelism.
452 *
453 * @since 4.0.0
454 */
455 @Config(type = "java.lang.Integer", defaultValue = "cores/2 + 1")
456 public static final String MAVEN_MODEL_BUILDER_PARALLELISM = "maven.modelBuilder.parallelism";
457
458 /**
459 * User property for enabling/disabling the consumer POM feature.
460 *
461 * @since 4.0.0
462 */
463 @Config(type = "java.lang.Boolean", defaultValue = "true")
464 public static final String MAVEN_CONSUMER_POM = "maven.consumer.pom";
465
466 /**
467 * User property for controlling consumer POM flattening behavior.
468 * When set to <code>true</code> (default), consumer POMs are flattened by removing
469 * dependency management and keeping only direct dependencies with transitive scopes.
470 * When set to <code>false</code>, consumer POMs preserve dependency management
471 * like parent POMs, allowing dependency management to be inherited by consumers.
472 *
473 * @since 4.1.0
474 */
475 @Config(type = "java.lang.Boolean", defaultValue = "false")
476 public static final String MAVEN_CONSUMER_POM_FLATTEN = "maven.consumer.pom.flatten";
477
478 /**
479 * User property for controlling "maven personality". If activated Maven will behave
480 * like the previous major version, Maven 3.
481 *
482 * @since 4.0.0
483 */
484 @Config(type = "java.lang.Boolean", defaultValue = "false")
485 public static final String MAVEN_MAVEN3_PERSONALITY = "maven.maven3Personality";
486
487 /**
488 * User property for disabling version resolver cache.
489 *
490 * @since 3.0.0
491 */
492 @Config(type = "java.lang.Boolean", defaultValue = "false")
493 public static final String MAVEN_VERSION_RESOLVER_NO_CACHE = "maven.versionResolver.noCache";
494
495 /**
496 * User property for overriding calculated "build number" for snapshot deploys. Caution: this property should
497 * be RARELY used (if used at all). It may help in special cases like "aligning" a reactor build subprojects
498 * build numbers to perform a "snapshot lock down". Value given here must be <code>maxRemoteBuildNumber + 1</code>
499 * or greater, otherwise build will fail. How the number to be obtained is left to user (ie by inspecting
500 * snapshot repository metadata or alike).
501 *
502 * Note: this feature is present in Maven 3.9.7 but with different key: <code>maven.buildNumber</code>. In Maven 4
503 * as part of cleanup effort this key was renamed to properly reflect its purpose.
504 *
505 * @since 4.0.0
506 */
507 @Config(type = "java.lang.Integer")
508 public static final String MAVEN_DEPLOY_SNAPSHOT_BUILD_NUMBER = "maven.deploy.snapshot.buildNumber";
509
510 /**
511 * User property for controlling whether build POMs are deployed alongside consumer POMs.
512 * When set to <code>false</code>, only the consumer POM will be deployed, and the build POM
513 * will be excluded from deployment. This is useful to avoid deploying internal build information
514 * that is not needed by consumers of the artifact.
515 * <br/>
516 * Default: <code>"true"</code>.
517 *
518 * @since 4.1.0
519 */
520 @Config(type = "java.lang.Boolean", defaultValue = "true")
521 public static final String MAVEN_DEPLOY_BUILD_POM = "maven.deploy.buildPom";
522
523 /**
524 * User property used to store the build timestamp.
525 *
526 * @since 4.0.0
527 */
528 @Config(type = "java.time.Instant")
529 public static final String MAVEN_START_INSTANT = "maven.startInstant";
530
531 /**
532 * Max number of problems for each severity level retained by the model builder.
533 *
534 * @since 4.0.0
535 */
536 @Config(type = "java.lang.Integer", defaultValue = "100")
537 public static final String MAVEN_BUILDER_MAX_PROBLEMS = "maven.builder.maxProblems";
538
539 /**
540 * Configuration property for version range resolution used metadata "nature".
541 * It may contain following string values:
542 * <ul>
543 * <li>"auto" - decision done based on range being resolver: if any boundary is snapshot, use "release_or_snapshot", otherwise "release"</li>
544 * <li>"release_or_snapshot" - the default</li>
545 * <li>"release" - query only release repositories to discover versions</li>
546 * <li>"snapshot" - query only snapshot repositories to discover versions</li>
547 * </ul>
548 * Default (when unset) is existing Maven behaviour: "release_or_snapshots".
549 * @since 4.0.0
550 */
551 @Config(defaultValue = "release_or_snapshot")
552 public static final String MAVEN_VERSION_RANGE_RESOLVER_NATURE_OVERRIDE =
553 "maven.versionRangeResolver.natureOverride";
554
555 /**
556 * Comma-separated list of XML contexts/fields to intern during POM parsing for memory optimization.
557 * When not specified, a default set of commonly repeated contexts will be used.
558 * Example: "groupId,artifactId,version,scope,type"
559 *
560 * @since 4.0.0
561 */
562 @Config
563 public static final String MAVEN_MODEL_BUILDER_INTERNS = "maven.modelBuilder.interns";
564
565 /**
566 * All system properties used by Maven Logger start with this prefix.
567 *
568 * @since 4.0.0
569 */
570 public static final String MAVEN_LOGGER_PREFIX = "maven.logger.";
571
572 /**
573 * Default log level for all instances of SimpleLogger. Must be one of ("trace", "debug", "info",
574 * "warn", "error" or "off"). If not specified, defaults to "info".
575 *
576 * @since 4.0.0
577 */
578 @Config
579 public static final String MAVEN_LOGGER_DEFAULT_LOG_LEVEL = MAVEN_LOGGER_PREFIX + "defaultLogLevel";
580
581 /**
582 * Set to true if you want the current date and time to be included in output messages. Default is false.
583 *
584 * @since 4.0.0
585 */
586 @Config(type = "java.lang.Boolean", defaultValue = "false")
587 public static final String MAVEN_LOGGER_SHOW_DATE_TIME = MAVEN_LOGGER_PREFIX + "showDateTime";
588
589 /**
590 * The date and time format to be used in the output messages. The pattern describing the date and
591 * time format is defined by SimpleDateFormat. If the format is not specified or is invalid, the
592 * number of milliseconds since start up will be output.
593 *
594 * @since 4.0.0
595 */
596 @Config
597 public static final String MAVEN_LOGGER_DATE_TIME_FORMAT = MAVEN_LOGGER_PREFIX + "dateTimeFormat";
598
599 /**
600 * If you would like to output the current thread id, then set to true. Defaults to false.
601 *
602 * @since 4.0.0
603 */
604 @Config(type = "java.lang.Boolean", defaultValue = "false")
605 public static final String MAVEN_LOGGER_SHOW_THREAD_ID = MAVEN_LOGGER_PREFIX + "showThreadId";
606
607 /**
608 * Set to true if you want to output the current thread name. Defaults to true.
609 *
610 * @since 4.0.0
611 */
612 @Config(type = "java.lang.Boolean", defaultValue = "true")
613 public static final String MAVEN_LOGGER_SHOW_THREAD_NAME = MAVEN_LOGGER_PREFIX + "showThreadName";
614
615 /**
616 * Set to true if you want the Logger instance name to be included in output messages. Defaults to true.
617 *
618 * @since 4.0.0
619 */
620 @Config(type = "java.lang.Boolean", defaultValue = "true")
621 public static final String MAVEN_LOGGER_SHOW_LOG_NAME = MAVEN_LOGGER_PREFIX + "showLogName";
622
623 /**
624 * Set to true if you want the last component of the name to be included in output messages. Defaults to false.
625 *
626 * @since 4.0.0
627 */
628 @Config(type = "java.lang.Boolean", defaultValue = "false")
629 public static final String MAVEN_LOGGER_SHOW_SHORT_LOG_NAME = MAVEN_LOGGER_PREFIX + "showShortLogName";
630
631 /**
632 * The output target which can be the path to a file, or the special values "System.out" and "System.err".
633 * Default is "System.err".
634 *
635 * @since 4.0.0
636 */
637 @Config
638 public static final String MAVEN_LOGGER_LOG_FILE = MAVEN_LOGGER_PREFIX + "logFile";
639
640 /**
641 * Should the level string be output in brackets? Defaults to false.
642 *
643 * @since 4.0.0
644 */
645 @Config(type = "java.lang.Boolean", defaultValue = "false")
646 public static final String MAVEN_LOGGER_LEVEL_IN_BRACKETS = MAVEN_LOGGER_PREFIX + "levelInBrackets";
647
648 /**
649 * The string value output for the warn level. Defaults to WARN.
650 *
651 * @since 4.0.0
652 */
653 @Config(defaultValue = "WARN")
654 public static final String MAVEN_LOGGER_WARN_LEVEL = MAVEN_LOGGER_PREFIX + "warnLevelString";
655
656 /**
657 * If the output target is set to "System.out" or "System.err" (see preceding entry), by default, logs will
658 * be output to the latest value referenced by System.out/err variables. By setting this parameter to true,
659 * the output stream will be cached, i.e. assigned once at initialization time and re-used independently of
660 * the current value referenced by System.out/err.
661 *
662 * @since 4.0.0
663 */
664 @Config(type = "java.lang.Boolean", defaultValue = "false")
665 public static final String MAVEN_LOGGER_CACHE_OUTPUT_STREAM = MAVEN_LOGGER_PREFIX + "cacheOutputStream";
666
667 /**
668 * maven.logger.log.a.b.c - Logging detail level for a SimpleLogger instance named "a.b.c". Right-side value
669 * must be one of "trace", "debug", "info", "warn", "error" or "off". When a logger named "a.b.c" is initialized,
670 * its level is assigned from this property. If unspecified, the level of nearest parent logger will be used,
671 * and if none is set, then the value specified by {@code maven.logger.defaultLogLevel} will be used.
672 *
673 * @since 4.0.0
674 */
675 public static final String MAVEN_LOGGER_LOG_PREFIX = MAVEN_LOGGER_PREFIX + "log.";
676
677 /**
678 * User property key for cache configuration.
679 *
680 * @since 4.1.0
681 */
682 public static final String MAVEN_CACHE_CONFIG_PROPERTY = "maven.cache.config";
683
684 /**
685 * User property to enable cache statistics display at the end of the build.
686 * When set to true, detailed cache statistics including hit/miss ratios,
687 * request type breakdowns, and retention policy effectiveness will be displayed
688 * when the build completes.
689 *
690 * @since 4.1.0
691 */
692 @Config(type = "java.lang.Boolean", defaultValue = "false")
693 public static final String MAVEN_CACHE_STATS = "maven.cache.stats";
694
695 /**
696 * User property to configure separate reference types for cache keys.
697 * This enables fine-grained analysis of cache misses caused by key vs value evictions.
698 * Supported values are {@code HARD}, {@code SOFT} and {@code WEAK}.
699 *
700 * @since 4.1.0
701 */
702 public static final String MAVEN_CACHE_KEY_REFS = "maven.cache.keyValueRefs";
703
704 /**
705 * User property to configure separate reference types for cache values.
706 * This enables fine-grained analysis of cache misses caused by key vs value evictions.
707 * Supported values are {@code HARD}, {@code SOFT} and {@code WEAK}.
708 *
709 * @since 4.1.0
710 */
711 public static final String MAVEN_CACHE_VALUE_REFS = "maven.cache.keyValueRefs";
712
713 /**
714 * User property key for configuring which object types are pooled by ModelObjectProcessor.
715 * Value should be a comma-separated list of simple class names (e.g., "Dependency,Plugin,Build").
716 * Default is "Dependency" for backward compatibility.
717 *
718 * @since 4.1.0
719 */
720 @Config(defaultValue = "Dependency")
721 public static final String MAVEN_MODEL_PROCESSOR_POOLED_TYPES = "maven.model.processor.pooledTypes";
722
723 /**
724 * User property key for configuring the default reference type used by ModelObjectProcessor.
725 * Valid values are: "SOFT", "HARD", "WEAK", "NONE".
726 * Default is "HARD" for optimal performance.
727 *
728 * @since 4.1.0
729 */
730 @Config(defaultValue = "HARD")
731 public static final String MAVEN_MODEL_PROCESSOR_REFERENCE_TYPE = "maven.model.processor.referenceType";
732
733 /**
734 * User property key prefix for configuring per-object-type reference types.
735 * Format: maven.model.processor.referenceType.{ClassName} = {ReferenceType}
736 * Example: maven.model.processor.referenceType.Dependency = SOFT
737 *
738 * @since 4.1.0
739 */
740 public static final String MAVEN_MODEL_PROCESSOR_REFERENCE_TYPE_PREFIX = "maven.model.processor.referenceType.";
741
742 private Constants() {}
743 }